dotfiles/i3/background/background.sh

10 lines
377 B
Bash
Raw Permalink 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
SUB="s/^client.focused .*/client.focused #${FILENAME} #${FILENAME} #${FILENAME} #${FILENAME} #${FILENAME}/"
sed -i "$SUB" ~/.config/i3/config
2021-04-06 23:09:06 -07:00
${0%/*}/refresh.sh