From 4de5a217c25fe83bb54063f8d842b78c9e6d7fb3 Mon Sep 17 00:00:00 2001 From: "eric.marin" Date: Thu, 26 Dec 2024 14:33:06 +0100 Subject: wallust --- scripts/powermenu | 20 ++++++++++++++++++++ scripts/set_background | 16 ++++++++++++++++ scripts/set_random | 14 ++++++++++++++ scripts/wallpapermenu | 11 +++++++++++ 4 files changed, 61 insertions(+) create mode 100755 scripts/powermenu create mode 100755 scripts/set_background create mode 100755 scripts/set_random create mode 100755 scripts/wallpapermenu (limited to 'scripts') 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) " + 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) " + 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) -- cgit v1.2.3