From 5e7cddd075958ded03d3e34d98dfdc2581a65d8e Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Tue, 2 Jul 2024 12:41:48 +0700 Subject: [PATCH] background.sh for dwm added --- dwm/background.sh | 13 +++++++++++++ dwm/{dwm => }/startdwm.sh | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100755 dwm/background.sh rename dwm/{dwm => }/startdwm.sh (56%) diff --git a/dwm/background.sh b/dwm/background.sh new file mode 100755 index 0000000..41719a2 --- /dev/null +++ b/dwm/background.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +directory=~/Pictures/hyprpaper/images + +while true; do + if [ -d "$directory" ]; then + random_background=$(ls $directory/* | shuf -n 1) + + feh --bg-fill $random_background + fi + sleep 60 +done + diff --git a/dwm/dwm/startdwm.sh b/dwm/startdwm.sh similarity index 56% rename from dwm/dwm/startdwm.sh rename to dwm/startdwm.sh index e7ae5a3..443a5aa 100755 --- a/dwm/dwm/startdwm.sh +++ b/dwm/startdwm.sh @@ -1,7 +1,7 @@ #!/bin/sh setxkbmap "us,ru" -option 'grp:win_space_toggle' -feh --bg-fill ~/Pictures/hyprpaper/images/beautiful-nature-landscape-with-mountains-lake.png +~/dotfiles/dwm/background.sh & picom -b dwmbar &