57 lines
1.3 KiB
Bash
Executable File
57 lines
1.3 KiB
Bash
Executable File
#!/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" \
|
|
~/.config/xmobar/xmobarrc-template > ~/.config/xmobar/xmobarrc
|
|
}
|
|
args=("$@")
|
|
PATH_TO_IMG="${args[0]}"
|
|
|
|
if [[ -z "$PATH_TO_IMG" ]]; then
|
|
wpg -m
|
|
else
|
|
echo $PATH_TO_IMG
|
|
wpg -a $PATH_TO_IMG
|
|
wpg -s "$(basename $PATH_TO_IMG)"
|
|
fi
|
|
# overwrite .Xresources file
|
|
cat ~/.cache/wal/colors.Xresources > ~/.Xresources
|
|
echo "\nXcursor.theme: Breeze" >> ~./Xresources
|
|
|
|
# merge it into xrdb
|
|
xrdb -merge ~/.Xresources
|
|
|
|
#emacsclient -e '(my-load-xresources)'
|
|
|
|
xmobar_change
|
|
killall xmobar
|
|
xmonad --restart
|
|
#cd ~/dev/linux/st
|
|
#sudo make clean install
|
|
#cd /home/os/bin/dmenu
|
|
#sudo make clean install
|
|
|
|
# change lock screen background
|
|
#betterlockscreen -u $PATH_TO_IMG
|
|
|
|
betterlockscreen -u $PATH_TO_IMG &
|
|
|