dotfiles/i3/background/background.sh

8 lines
235 B
Bash
Raw Normal View History

2021-04-06 23:09:06 -07:00
export BG_PATH=~/background
cd $BG_PATH
FILENAME=$(basename $(ls *.jpg | sort -R | head -n 1) .jpg)
SUB="s/^primary = #[a-z0-9]*/primary = #${FILENAME}/"
echo $FILENAME > color
sed -i "$SUB" ~/.config/polybar/config
${0%/*}/refresh.sh