From 624f93cad03f27775f718559cccf0dc2850ddf64 Mon Sep 17 00:00:00 2001 From: Dan Head Date: Sat, 17 Mar 2018 16:52:21 +0000 Subject: [PATCH] Dynamic wallpaper script --- bin/wallpaper | 8 ++++++++ i3/desktop.config | 2 +- i3/magnum.config | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100755 bin/wallpaper diff --git a/bin/wallpaper b/bin/wallpaper new file mode 100755 index 0000000..6e7504f --- /dev/null +++ b/bin/wallpaper @@ -0,0 +1,8 @@ +#!/bin/bash + +wallpapers=~/wallpapers + +ls $wallpapers | sort -R | tail -1 | while read file; do + /usr/bin/feh --bg-fill $wallpapers/$file +done +exit 0 diff --git a/i3/desktop.config b/i3/desktop.config index 4e4b2bd..8620528 100644 --- a/i3/desktop.config +++ b/i3/desktop.config @@ -180,7 +180,7 @@ bindsym $mod+c mode "cmus" exec xrandr --output DVI-0 --primary --mode 1920x1200 --pos 1200x390 --output DVI-1 --mode 1920x1200 --rotate left --pos 0x0 -exec --no-startup-id feh --bg-fill ~/wallpapers/Forest.png +exec --no-startup-id ~/.dotfiles/bin/wallpaper exec --no-startup-id compton exec_always --no-startup-id ~/.dotfiles/polybar/launch.sh diff --git a/i3/magnum.config b/i3/magnum.config index f9a2f7b..85eabfa 100644 --- a/i3/magnum.config +++ b/i3/magnum.config @@ -178,7 +178,7 @@ mode "cmus" { bindsym $mod+c mode "cmus" -exec --no-startup-id feh --bg-fill ~/wallpapers/Forest.png +exec --no-startup-id ~/.dotfiles/bin/wallpaper exec --no-startup-id compton exec_always --no-startup-id ~/.dotfiles/polybar/launch_magnum.sh