dotfiles/i3/background/background.sh

8 lines
235 B
Bash
Executable File

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