aboutsummaryrefslogtreecommitdiff
path: root/mirenn/home/files/dotfiles/.config/scripts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xmirenn/home/files/dotfiles/.config/scripts/powermenu (renamed from scripts/powermenu)11
-rwxr-xr-xmirenn/home/files/dotfiles/.config/scripts/set_background (renamed from scripts/set_background)7
-rwxr-xr-xmirenn/home/files/dotfiles/.config/scripts/set_random (renamed from scripts/set_random)6
-rwxr-xr-xmirenn/home/files/dotfiles/.config/scripts/wallpapermenu12
4 files changed, 25 insertions, 11 deletions
diff --git a/scripts/powermenu b/mirenn/home/files/dotfiles/.config/scripts/powermenu
index ef68e29..d118a69 100755
--- a/scripts/powermenu
+++ b/mirenn/home/files/dotfiles/.config/scripts/powermenu
@@ -1,4 +1,5 @@
-#!/usr/bin/fish
+#!/usr/bin/env fish
+
set poweroff ""
set reboot ""
set lock ""
@@ -10,17 +11,17 @@ set chosen (echo -e "$poweroff\n$reboot\n$lock\n$exit\n$sleep\n$hibernate" | rof
switch $chosen
case $poweroff
- shutdown now
+ loginctl poweroff
case $reboot
- reboot
+ loginctl reboot
case $lock
loginctl lock-session
case $exit
niri msg action quit
case $sleep
- systemctl suspend
+ loginctl suspend
case $hibernate
- systemctl hibernate
+ loginctl hibernate
case '*'
exit 1
end
diff --git a/scripts/set_background b/mirenn/home/files/dotfiles/.config/scripts/set_background
index 0dd7347..7fea3d9 100755
--- a/scripts/set_background
+++ b/mirenn/home/files/dotfiles/.config/scripts/set_background
@@ -1,7 +1,8 @@
-#!/usr/bin/fish
+#!/usr/bin/env fish
+
if test (count $argv) -lt 1; or not test -f $argv[1]
- echo "Usage: $(status filename) <img>"
- exit 1
+ echo "Usage: $(status filename) <img>"
+ exit 1
end
wallust run $argv[1] -Ts; and begin
diff --git a/scripts/set_random b/mirenn/home/files/dotfiles/.config/scripts/set_random
index 6c4a76d..33cf267 100755
--- a/scripts/set_random
+++ b/mirenn/home/files/dotfiles/.config/scripts/set_random
@@ -1,8 +1,8 @@
-#!/usr/bin/fish
+#!/usr/bin/env fish
if test (count $argv) -lt 1; or not test -d $argv[1]
- echo "Usage: $(status filename) <dir>"
- exit 1
+ echo "Usage: $(status filename) <dir>"
+ exit 1
end
~/.config/scripts/set_background "$(fd -a -t f -d 1 -E "$(basename "$IMG")" -e jpg -e png -e webp . "$argv[1]" | shuf -n1)"
diff --git a/mirenn/home/files/dotfiles/.config/scripts/wallpapermenu b/mirenn/home/files/dotfiles/.config/scripts/wallpapermenu
new file mode 100755
index 0000000..2d6e1a8
--- /dev/null
+++ b/mirenn/home/files/dotfiles/.config/scripts/wallpapermenu
@@ -0,0 +1,12 @@
+#!/usr/bin/env fish
+
+if test (count $argv) -lt 1; or not test -d $argv[1]
+ echo "Usage: $(status filename) <dir>"
+ exit 1
+end
+
+~/.config/scripts/set_background (
+ for file in (fd -a -t f -d 1 -E "$(basename "$IMG")" -e jpg -e png -e webp . "$argv[1]")
+ echo -en "$file\0icon\x1fthumbnail://$file\n"
+ end | rofi -dmenu -p " " -show-icons -theme ~/.config/rofi/wallpapermenu.rasi
+)