add shutdown key bind
This commit is contained in:
parent
6feac7c250
commit
fa23067280
|
@ -125,7 +125,7 @@ in
|
||||||
bind = $mainMod, Space, togglefloating,
|
bind = $mainMod, Space, togglefloating,
|
||||||
bind = $mainMod, D, exec, pkill wofi || wofi --show drun
|
bind = $mainMod, D, exec, pkill wofi || wofi --show drun
|
||||||
bind = $mainMod, Escape, exec, swaylock
|
bind = $mainMod, Escape, exec, swaylock
|
||||||
bind = $mainMod SHIFT, Escape, exec, swaylock
|
bind = $mainMod SHIFT, Escape, exec, shutdown-script
|
||||||
# bind = SUPER, V, exec, cliphist list | wofi -dmenu | cliphist decode | wl-copy
|
# bind = SUPER, V, exec, cliphist list | wofi -dmenu | cliphist decode | wl-copy
|
||||||
bind = $mainMod, P, pseudo,
|
bind = $mainMod, P, pseudo,
|
||||||
bind = $mainMod, J, togglesplit,
|
bind = $mainMod, J, togglesplit,
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
lofi = pkgs.writeScriptBin "lofi" (builtins.readFile ./scripts/lofi.sh);
|
lofi = pkgs.writeScriptBin "lofi" (builtins.readFile ./scripts/lofi.sh);
|
||||||
compress = pkgs.writeScriptBin "compress" (builtins.readFile ./scripts/compress.sh);
|
compress = pkgs.writeScriptBin "compress" (builtins.readFile ./scripts/compress.sh);
|
||||||
extract = pkgs.writeScriptBin "extract" (builtins.readFile ./scripts/extract.sh);
|
extract = pkgs.writeScriptBin "extract" (builtins.readFile ./scripts/extract.sh);
|
||||||
|
shutdown-script = pkgs.writeScriptBin "shutdown-script" (builtins.readFile ./scripts/shutdown-script.sh);
|
||||||
in {
|
in {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
wall-change
|
wall-change
|
||||||
|
@ -33,5 +34,7 @@ in {
|
||||||
|
|
||||||
compress
|
compress
|
||||||
extract
|
extract
|
||||||
|
|
||||||
|
shutdown-script
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
10
modules/home/scripts/scripts/shutdown-script.sh
Normal file
10
modules/home/scripts/scripts/shutdown-script.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
respond="$(echo "---------------- Yes ----------------\n---------------- Nah ----------------" | wofi --show dmenu)"
|
||||||
|
if [ $respond = '---------------- Yes ----------------' ]
|
||||||
|
then
|
||||||
|
echo "shutdown"
|
||||||
|
shutdown now
|
||||||
|
else
|
||||||
|
notify-send "cancel shutdown"
|
||||||
|
fi
|
Loading…
Reference in a new issue