From a6d6198e0db8bdf89154bdf51be8b6023170b38e Mon Sep 17 00:00:00 2001 From: dbroqua Date: Fri, 19 Jun 2020 08:23:37 +0200 Subject: [PATCH] Updated wallpaper - Use external script - Set wallpaper on screenlayout changes --- Bin/screenlayout.sh | 3 +++ Bin/wallpaper.sh | 11 +++++++++++ config/i3/config | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 Bin/wallpaper.sh diff --git a/Bin/screenlayout.sh b/Bin/screenlayout.sh index 9fa3317..8881ad0 100755 --- a/Bin/screenlayout.sh +++ b/Bin/screenlayout.sh @@ -66,3 +66,6 @@ case $nextconfig in --output DP-1 --off ;; esac + +# Reset wallpaper +~/Bin/wallpaper.sh diff --git a/Bin/wallpaper.sh b/Bin/wallpaper.sh new file mode 100755 index 0000000..44e6963 --- /dev/null +++ b/Bin/wallpaper.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +# CONFIG +DIRECTORY="/home/dbroqua/Nextcloud/images/Wallpaper/Rotation" + + + +# SCRIPT START HERE +SELECTED=`find ${DIRECTORY} -type f | shuf -n 1` + +feh --bg-fill ${SELECTED} diff --git a/config/i3/config b/config/i3/config index 7d31b76..e5dfb05 100644 --- a/config/i3/config +++ b/config/i3/config @@ -179,7 +179,7 @@ exec --no-startup-id i3-msg 'exec /usr/bin/spotify' # WALLPAPER # -exec --no-startup-id feh --bg-fill ~/.config/i3/wallpaper +exec --no-startup-id ~/Bin/wallpaper.sh # ------------------------------------------------------------------------------------------------- # Default workspace layout @@ -199,6 +199,7 @@ bindsym Control+q kill bindsym $mod+d exec dmenu_run -fn 'Droid Sans Mono-10' bindsym Mod1+space exec "rofi -show combi" + # start a terminal bindsym $mod+Return exec terminator