aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xscripts/powermenu36
-rwxr-xr-xscripts/set_background3
-rwxr-xr-xscripts/wallpapermenu6
3 files changed, 26 insertions, 19 deletions
diff --git a/scripts/powermenu b/scripts/powermenu
index 5dd5d19..ef68e29 100755
--- a/scripts/powermenu
+++ b/scripts/powermenu
@@ -1,20 +1,26 @@
#!/usr/bin/fish
-set poweroff " Poweroff"
-set reboot " Reboot"
-set lock " Lock"
-set exit "󰗼 Exit"
+set poweroff ""
+set reboot ""
+set lock ""
+set exit "󰗼"
+set sleep "󰒲"
+set hibernate ""
-set chosen (echo -e "$poweroff\n$reboot\n$lock\n$exit" | fuzzel --dmenu --lines 4 --width 15 --prompt "" --placeholder "")
+set chosen (echo -e "$poweroff\n$reboot\n$lock\n$exit\n$sleep\n$hibernate" | rofi -dmenu -theme ~/.config/rofi/powermenu.rasi)
switch $chosen
- case $poweroff
- shutdown now
- case $reboot
- reboot
- case $lock
- loginctl lock-session
- case $exit
- niri msg action quit
- case '*'
- exit 1
+case $poweroff
+ shutdown now
+case $reboot
+ reboot
+case $lock
+ loginctl lock-session
+case $exit
+ niri msg action quit
+case $sleep
+ systemctl suspend
+case $hibernate
+ systemctl hibernate
+case '*'
+ exit 1
end
diff --git a/scripts/set_background b/scripts/set_background
index e8846fb..1ba3665 100755
--- a/scripts/set_background
+++ b/scripts/set_background
@@ -5,8 +5,9 @@ if test (count $argv) -lt 1; or not test -f $argv[1]
exit 1
end
-set -x SWWW_TRANSITION "random"
+set -x SWWW_TRANSITION "any"
set -x SWWW_TRANSITION_FPS 60
+set -x SWWW_TRANSITION_DURATION 2
set -U img $argv[1]
niri msg action do-screen-transition
diff --git a/scripts/wallpapermenu b/scripts/wallpapermenu
index 9a3de1d..7f436ac 100755
--- a/scripts/wallpapermenu
+++ b/scripts/wallpapermenu
@@ -4,8 +4,8 @@ set dir "/home/eric.marin/Pictures/Backgrounds/"
set chosen (
for file in (find $dir -type f)
if test -z $img; or test $file != $img
- echo "$file"
+ echo -en "$file\0icon\x1fthumbnail://$file\n"
end
- end | cut -d '/' -f6 | fuzzel --dmenu)
+ end | rofi -dmenu -show-icons -theme ~/.config/rofi/wallpapermenu.rasi)
-~/.config/scripts/set_background (echo $dir$chosen)
+~/.config/scripts/set_background (echo $chosen)