From 5ec04216c1950e1843211f99e2a0ac42e9a9d0e4 Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sun, 28 Jun 2020 20:42:43 +0200 Subject: fix random backrgoudn --- xinitrc.d/10-background.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'xinitrc.d/10-background.sh') diff --git a/xinitrc.d/10-background.sh b/xinitrc.d/10-background.sh index 359e65e..287183b 100755 --- a/xinitrc.d/10-background.sh +++ b/xinitrc.d/10-background.sh @@ -1,12 +1,15 @@ #!/bin/sh #Screen background feh -shopt -s nullglob +if [ -f ~/.files ]; then + source ~/.files + shopt -s nullglob -pics=(~/vimconfig/pictures/b_*) -len=${#pics[*]} -ran=$(($RANDOM % len)) + pics=($DOTFILEBASE/pictures/b_*) + len=${#pics[*]} + ran=$(($RANDOM % len)) -feh --bg-fill ${pics[$ran]} + feh --bg-fill ${pics[$ran]} -unset pics len ran + unset pics len ran +fi -- cgit v1.2.3