diff options
author | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-09-26 21:08:50 -0500 |
---|---|---|
committer | Jacob Janzen <jacob.a.s.janzen@gmail.com> | 2024-09-26 21:08:50 -0500 |
commit | a9ce5f278243198310577165bb593a9eededad6c (patch) | |
tree | a09f4df71571d06d7e0721b9d00771674fe586bf /nixos/.local/bin | |
parent | 1c714dc335715deb71c254ae1251f45eaf088c1c (diff) |
new stuff
Diffstat (limited to 'nixos/.local/bin')
-rw-r--r-- | nixos/.local/bin/poweroptions.org | 24 |
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 |