aboutsummaryrefslogtreecommitdiff
path: root/nixos/.local
diff options
context:
space:
mode:
authorJacob Janzen <jacob.a.s.janzen@gmail.com>2024-09-26 21:08:50 -0500
committerJacob Janzen <jacob.a.s.janzen@gmail.com>2024-09-26 21:08:50 -0500
commita9ce5f278243198310577165bb593a9eededad6c (patch)
treea09f4df71571d06d7e0721b9d00771674fe586bf /nixos/.local
parent1c714dc335715deb71c254ae1251f45eaf088c1c (diff)
new stuff
Diffstat (limited to 'nixos/.local')
-rw-r--r--nixos/.local/bin/poweroptions.org24
1 files changed, 24 insertions, 0 deletions
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