home/sway: set full command path for exec calls

home/sway: set full command path for exec calls
This commit is contained in:
Asmir A 2024-01-28 15:14:26 +01:00
parent 21a44c285c
commit c0bb1e00fd
Signed by: asmir
GPG Key ID: 020C42B7A9ABA3E2

View File

@ -2,6 +2,8 @@
config,
lib,
pkgs,
inputs,
system,
...
}: let
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
@ -10,6 +12,9 @@
${pkgs.cliphist}/bin/cliphist decode | \
${pkgs.wl-clipboard}/bin/wl-copy
'';
swaysw = inputs.swaysw.packages.${system}.swaysw;
zapzap = pkgs.callPackage ../packages/zapzap/default.nix {};
viber = pkgs.callPackage ../packages/viber/default.nix {};
in {
wayland.windowManager.sway = {
enable = true;
@ -65,7 +70,7 @@ in {
style = "Bold Semi-Condensed";
size = 12.0;
};
statusCommand = "i3status-rs ~/.config/i3status-rust/config-top.toml";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-top.toml";
}
];
@ -108,21 +113,16 @@ in {
"Alt+j" = "focus down";
"Alt+k" = "focus up";
"Alt+l" = "focus right";
"Alt+slash" = "exec swaysw";
"Alt+slash" = "exec ${pkgs.moreutils}/bin/lckdo swaysw ${swaysw}/bin/swaysw";
"Alt+Escape" = "workspace back_and_forth";
"Alt+f" = "fullscreen enable";
"Mod4+l" = ''
exec swaymsg [app_id="python3"] scratchpad show || exec foot -a python3 python3'';
"Mod4+h" = "exec swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec zapzap";
"Mod4+j" = "exec swaymsg [app_id=com.viber] scratchpad show || exec viber";
exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${pkgs.foot}/bin/footclient -a python3 ${pkgs.python3}/bin/python3'';
"Mod4+h" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${zapzap}/bin/zapzap";
"Mod4+j" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber";
"Mod4+y" = ''
exec swaymsg [app_id="pulsemixer"] scratchpad show || exec foot -a pulsemixer pulsemixer'';
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%";
"XF86AudioLowerVolume" = "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%";
"XF86AudioMute" = "exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle";
"XF86AudioMicMute" = "exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle";
exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${pkgs.foot}/bin/footclient -a pulsemixer ${pkgs.pulsemixer}/bin/pulsemixer'';
};
};
};