Compare commits
1 Commits
be88ce64fa
...
228a7e8dbf
Author | SHA1 | Date |
---|---|---|
coolneng | 228a7e8dbf |
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: power-manager <operation>"
|
||||||
|
echo "operation: poweroff|reboot"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
operation=$1
|
||||||
|
|
||||||
|
emacsclient --eval '(doom/save-session "~/.emacs.d/.local/etc/workspaces/autosave")' &&
|
||||||
|
systemctl "$operation"
|
|
@ -286,8 +286,8 @@ bindsym $mod+Shift+p mode "$Pause-break"
|
||||||
set $Pause-break (p) poweroff, (r) reboot
|
set $Pause-break (p) poweroff, (r) reboot
|
||||||
|
|
||||||
mode "$Pause-break" {
|
mode "$Pause-break" {
|
||||||
bindsym s exec --no-startup-id systemctl poweroff , mode "default"
|
bindsym s exec --no-startup-id ~/.local/share/scripts/power-manager "poweroff", mode "default"
|
||||||
bindsym r exec --no-startup-id systemctl reboot, mode "default"
|
bindsym r exec --no-startup-id ~/.local/share/scripts/power-manager "reboot", mode "default"
|
||||||
|
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
bindsym Escape mode "default"
|
bindsym Escape mode "default"
|
||||||
|
|
Loading…
Reference in New Issue