Add some conf file variables
This commit is contained in:
parent
40af3ab992
commit
7dbc757a64
1 changed files with 8 additions and 4 deletions
|
@ -9,6 +9,10 @@
|
|||
# Location of link to wallpaper link.
|
||||
bgloc="${XDG_DATA_HOME:-$HOME/.local/share/}/bg"
|
||||
|
||||
# Configuration files of applications that have their themes changed by pywal.
|
||||
dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"
|
||||
zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc"
|
||||
|
||||
trueloc="$(readlink -f "$1")" &&
|
||||
case "$(file --mime-type -b "$trueloc")" in
|
||||
image/* ) ln -sf "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." ;;
|
||||
|
@ -22,8 +26,8 @@ if command -v wal >/dev/null 2>&1 ; then
|
|||
pidof dwm >/dev/null && xdotool key super+F12
|
||||
# If pywal is removed, return config files to normal.
|
||||
else
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc.bak" ] && unlink "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc" && mv "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc.bak" "${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"
|
||||
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc.bak" ] && unlink "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" && mv "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc.bak" "${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc"
|
||||
[ -f "$dunstconf.bak" ] && unlink "$dunstconf" && mv "$dunstconf.bak" "$dunstconf"
|
||||
[ -f "$zathuraconf.bak" ] && unlink "$zathuraconf" && mv "$zathuraconf.bak" "$zathuraconf"
|
||||
fi
|
||||
|
||||
xwallpaper --zoom "$bgloc"
|
||||
|
|
Loading…
Reference in a new issue