Use substituteAll for rofi power menu

inky
Elnu 1 year ago
parent 8014e13950
commit 518273eec1

@ -8,6 +8,7 @@ in with theme.colors; {
home.packages = with pkgs; [
playerctl # pactl comes with PulseAudio
xclip # Copying screenshots to clipboard
wmctrl # For rofi power menu
];
# Screenshots
@ -69,7 +70,10 @@ in with theme.colors; {
"${mod}+Return" = "exec kitty";
"${mod}+Shift+e" = "exec i3-msg exit"; # bypass default session exit confirmation menu
"${mod}+space" = "exec i3-msg open"; # Open blank space
"Mod1+Q" = "exec /etc/profiles/per-user/elnu/bin/rofi-power";
"Mod1+Q" = let rofi-power = pkgs.substituteAll {
src = ./power.sh;
isExecutable = true;
}; in "exec ${rofi-power}";
# Audio controls
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10%";

@ -4,10 +4,6 @@ let
_theme = import ../theme;
theme = _theme.theme; # Theme name
in {
home.packages = with pkgs; [
(pkgs.callPackage ./power.nix { })
wmctrl # TODO: add as dependency of rofi-power
];
programs.rofi = {
enable = true;
inherit theme;

@ -1,9 +0,0 @@
{ pkgs, substituteAll }:
substituteAll {
name = "rofi-power";
src = ./power.sh;
dir = "bin";
isExecutable = true;
}
Loading…
Cancel
Save