vdotfiles

Cem's Dotfiles for Void Linux
git clone git://git.ckyln.com/vdotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 33382406ca8196dd092710dc9063b981d5615577
parent eed05b37cd85ca92b12343967ae5cdefa4476428
Author: Cem Keylan <cem@ckyln.com>
Date:   Mon, 11 Nov 2019 16:41:55 +0300

add zathura config and zathura colors

Diffstat:
A.config/zathura/zathurarc | 5+++++
M.local/bin/dmenuresources | 2++
A.local/bin/zc | 43+++++++++++++++++++++++++++++++++++++++++++
M.xinitrc | 2+-
4 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc @@ -0,0 +1,5 @@ +include /tmp/zathura-color +set selection-clipboard clipboard +set pages-per-row 1 + +# vim:filetype=conf diff --git a/.local/bin/dmenuresources b/.local/bin/dmenuresources @@ -1,4 +1,5 @@ #!/usr/bin/env sh +. "$HOME"/.profile # User chooses between dark and light themes theme="$(printf "dark\nlight" | dmenu -p "Do you want a light theme or a night theme?")" @@ -8,4 +9,5 @@ lsrsrc="$(ls $HOME/.local/share/xresource-themes/$theme/)" selrsrc="$(echo "$lsrsrc" | dmenu -p "choose the resource you want to set")" [ -z "$selrsrc" ] && exit xrdb $HOME/.local/share/xresource-themes/$theme/$selrsrc && notify-send "Xresources Changed" "Your theme has been set to $selrsrc" +[ "$ZATHURA_RECOLOR" = "true" ] && zc printf "$HOME/.local/share/xresource-themes/$theme/$selrsrc" > $HOME/.lastresource diff --git a/.local/bin/zc b/.local/bin/zc @@ -0,0 +1,43 @@ +#!/usr/bin/env sh +if [ "$1" = "off" ]; then + sed -i 's/true/false/g' /tmp/zathura-color + exit 0 +fi + +. "$HOME"/.profile + +foreground="$(xrdb -query | grep foreground | head -n 1 | awk '{print $2}')" +background="$(xrdb -query | grep background | head -n 1 | awk '{print $2}')" +color1="$(xrdb -query | grep color1 | head -n 1 | awk '{print $2}')" +color2="$(xrdb -query | grep color2 | head -n 1 | awk '{print $2}')" + +rm /tmp/zathura-color >/dev/null 2>&1 +cat >/tmp/zathura-color <<EOF +set recolor "$ZATHURA_RECOLOR" + +set completion-bg "$background" +set completion-fg "$foreground" +set completion-group-bg "$background" +set completion-group-fg "$color2" +set completion-highlight-bg "$foreground" +set completion-highlight-fg "$background" +set recolor-lightcolor "$background" +set recolor-darkcolor "$foreground" +set default-bg "$background" +set inputbar-bg "$background" +set inputbar-fg "$foreground" +set notification-bg "$background" +set notification-fg "$foreground" +set notification-error-bg "$color1" +set notification-error-fg "$foreground" +set notification-warning-bg "$color1" +set notification-warning-fg "$foreground" +set statusbar-bg "$background" +set statusbar-fg "$foreground" +set index-bg "$background" +set index-fg "$foreground" +set index-active-bg "$foreground" +set index-active-fg "$background" +set render-loading-bg "$background" +set render-loading-fg "$foreground" +EOF diff --git a/.xinitrc b/.xinitrc @@ -8,11 +8,11 @@ nightmodetoggle disable & powercheck & slstatus & [ -e $HOME/.lastresource ] && xrdb "$(cat $HOME/.lastresource)" || xrdb $HOME/.local/share/xresource-themes/dark/dracula +zc & unclutter & numlockx on & mpd >/dev/null 2>&1 & if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then - eval "$(ck-launch-session dbus-launch --sh-syntax)" dbus-update-activation-environment --all else dbus-update-activation-environment --systemd DISPLAY