dotfiles/.scripts/changebg

69 lines
1.6 KiB
Plaintext
Raw Normal View History

2021-09-21 11:14:10 +02:00
#!/bin/bash
xmobar_change(){
echo "changing xmobarrc"
source ~/.cache/wal/colors.sh
sed -e "s/BGCOLOR/$background/g" \
-e "s/FGCOLOR/$foreground/g" \
-e "s/COLOR1/$color1/g" \
-e "s/COLOR2/$color2/g" \
-e "s/COLOR3/$color3/g" \
-e "s/COLOR4/$color4/g" \
-e "s/COLOR5/$color5/g" \
-e "s/COLOR6/$color6/g" \
-e "s/COLOR7/$color7/g" \
-e "s/COLOR8/$color8/g" \
-e "s/COLOR9/$color9/g" \
-e "s/COLOR10/$color10/g" \
-e "s/COLOR11/$color11/g" \
-e "s/COLOR12/$color12/g" \
-e "s/COLOR13/$color13/g" \
-e "s/COLOR14/$color14/g" \
-e "s/COLOR15/$color15/g" \
2021-10-30 14:52:24 +02:00
~/.config/xmobar/xmobarrc-template.hs > ~/.config/xmobar/xmobarrc
2021-09-21 11:14:10 +02:00
}
args=("$@")
PATH_TO_IMG="${args[0]}"
2021-09-30 12:33:07 +02:00
if [[ -z "$PATH_TO_IMG" ]]; then
2022-02-19 11:35:41 +01:00
wpg -m
2021-10-29 11:21:44 +02:00
. "${HOME}/.cache/wal/colors.sh"
PATH_TO_IMG=$wallpaper
2021-09-30 12:33:07 +02:00
else
2022-02-19 11:35:41 +01:00
additionalArgs=("${args[@]:1}")
2021-09-30 12:33:07 +02:00
wpg -a $PATH_TO_IMG
wpg -s "$(basename $PATH_TO_IMG)"
fi
2021-10-29 11:21:44 +02:00
echo $PATH_TO_IMG
2021-09-21 11:14:10 +02:00
# overwrite .Xresources file
cat ~/.cache/wal/colors.Xresources > ~/.Xresources
2021-12-19 14:57:13 +01:00
echo "Xcursor.theme: Breeze" >> ~/.Xresources
#echo "*.alpha: 0.20" >> ~/.Xresources
2021-09-21 11:14:10 +02:00
# merge it into xrdb
xrdb -merge ~/.Xresources
2021-12-19 14:57:13 +01:00
cat >> ~/.cache/wal/colors-rofi-dark.rasi<< EOF
element-text, element-icon {
background-color: inherit;
text-color: inherit;
}
EOF
2021-11-19 16:25:54 +01:00
2021-09-21 11:14:10 +02:00
xmobar_change
killall xmobar
xmonad --restart
2021-11-19 16:25:54 +01:00
zathura-pywal
2021-12-23 14:13:42 +01:00
emacsclient -e "(load-theme 'ewal-doom-one)"
~/dev/linux/telegram-palette-gen/telegram-palette-gen --wal
2022-03-21 15:20:09 +01:00
colorblocks
2021-12-23 14:13:42 +01:00
2022-02-19 11:35:41 +01:00
betterlockscreen -u $PATH_TO_IMG 2>/dev/null &
2021-12-23 14:13:42 +01:00
fish -c "source ~/.cache/wal/colors.fish"