diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2020-06-28 20:42:43 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2020-06-28 20:42:43 +0200 |
commit | 5ec04216c1950e1843211f99e2a0ac42e9a9d0e4 (patch) | |
tree | ba3c0e8f4283042bafaf872d0a4b376214900c4b /xinitrc.d/10-background.sh | |
parent | 33ede38c48082c6b3b32947311fa70da0d78499c (diff) | |
download | dotfiles-5ec04216c1950e1843211f99e2a0ac42e9a9d0e4.tar.gz |
fix random backrgoudn
Diffstat (limited to 'xinitrc.d/10-background.sh')
-rwxr-xr-x | xinitrc.d/10-background.sh | 15 |
1 files changed, 9 insertions, 6 deletions
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 |