From a9ce5f278243198310577165bb593a9eededad6c Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Thu, 26 Sep 2024 21:08:50 -0500 Subject: new stuff --- nixos/.local/bin/poweroptions.org | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 nixos/.local/bin/poweroptions.org (limited to 'nixos/.local/bin') diff --git a/nixos/.local/bin/poweroptions.org b/nixos/.local/bin/poweroptions.org new file mode 100644 index 0000000..6f154ef --- /dev/null +++ b/nixos/.local/bin/poweroptions.org @@ -0,0 +1,24 @@ +#+title: Power Options Script + +Use =fuzzel= to open a menu to power off, reboot, or log out. +#+begin_src sh :tangle ~/.local/bin/poweroptions.sh :mkdirp yes :tangle-mode o755 + #!/bin/sh + + getoption () { + fuzzel --dmenu -l 3 -x 1 -r 10 << EOF + 󰐥 power off + 󰜉 restart + 󰍃 logout + EOF + } + + option=$(getoption | xargs) + case $option in + '󰐥 power off') + systemctl poweroff;; + '󰜉 restart') + systemctl reboot;; + '󰍃 logout') + hyprctl dispatch exit;; + esac +#+end_src -- cgit v1.2.3