diff options
| author | eric.marin <maarin.eric@gmail.com> | 2024-12-26 14:33:06 +0100 |
|---|---|---|
| committer | eric.marin <maarin.eric@gmail.com> | 2024-12-30 21:07:42 +0100 |
| commit | 4de5a217c25fe83bb54063f8d842b78c9e6d7fb3 (patch) | |
| tree | 0460bc0600492324f111524dfdff1ef85c9fbf8e /scripts | |
| parent | ee2b01a3fff043a8b977385227c2659bbcf2e59a (diff) | |
| download | dotfiles-4de5a217c25fe83bb54063f8d842b78c9e6d7fb3.tar.gz dotfiles-4de5a217c25fe83bb54063f8d842b78c9e6d7fb3.zip | |
wallust
Diffstat (limited to '')
| -rwxr-xr-x | scripts/powermenu | 20 | ||||
| -rwxr-xr-x | scripts/set_background | 16 | ||||
| -rwxr-xr-x | scripts/set_random | 14 | ||||
| -rwxr-xr-x | scripts/wallpapermenu | 11 |
4 files changed, 61 insertions, 0 deletions
diff --git a/scripts/powermenu b/scripts/powermenu new file mode 100755 index 0000000..79519ed --- /dev/null +++ b/scripts/powermenu @@ -0,0 +1,20 @@ +#!/usr/bin/fish +set poweroff " Poweroff" +set reboot " Reboot" +set lock " Lock" +set exit " Exit" + +set chosen (echo -e "$poweroff\n$reboot\n$lock\n$exit" | fuzzel --dmenu --lines 4 --width 15) + +switch $chosen + case $poweroff + shutdown now + case $reboot + reboot + case $lock + loginctl lock-session + case $exit + niri msg action quit + case '*' + exit 1 +end diff --git a/scripts/set_background b/scripts/set_background new file mode 100755 index 0000000..41522a0 --- /dev/null +++ b/scripts/set_background @@ -0,0 +1,16 @@ +#!/usr/bin/fish + +if test (count $argv) -lt 1; or not test -f $argv[1] + echo "Usage: $(status filename) <img>" + exit 1 +end + +set -x SWWW_TRANSITION "wipe" +set -x SWWW_TRANSITION_FPS 60 +set -U img $argv[1] + +niri msg action do-screen-transition +swww img $img +wallust run $img +makoctl reload + diff --git a/scripts/set_random b/scripts/set_random new file mode 100755 index 0000000..cdc4018 --- /dev/null +++ b/scripts/set_random @@ -0,0 +1,14 @@ +#!/usr/bin/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 (find $argv[1] -type f) + if test -z $img; or test $file != $img + echo (math (random) % 1000)":$file" + end + end | sort -n | head -n 1 | cut -d ':' -f2) + diff --git a/scripts/wallpapermenu b/scripts/wallpapermenu new file mode 100755 index 0000000..9a3de1d --- /dev/null +++ b/scripts/wallpapermenu @@ -0,0 +1,11 @@ +#!/usr/bin/fish + +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" + end + end | cut -d '/' -f6 | fuzzel --dmenu) + +~/.config/scripts/set_background (echo $dir$chosen) |
