Put this in your .zshrc
:
colo(){
cat "/home/x/.colors/$1" && (
echo $1 > ~/.curcol
xrdb ~/.Xresources
xrdb -merge "/home/x/.colors/$1"
killall polybar
polybar top -r &!
feh --bg-fill "/home/x/Pictures/themes/$1.png" || feh --bg-fill "/home/x/Pictures/themes/default.png"
bspc config active_border_color "$(~/xparse foreground)"
bspc config normal_border_color "$(~/xparse background)"
killall dunst
dunst -lb "$(~/xparse background)" -nb "$(~/xparse background)" -cb "$(~/xparse background)" -lf "$(~/xparse color10)" -nf "$(~/xparse color11)" -cf "$(~/xparse color9)" &!
)
}
Put this in ~/xparse
and make it executable:
#!/usr/bin/env node
E=require('child_process').execSync
x=E('xrdb -query')+''
console.log(
x
.split`\n`
.find(a=>a.match(process.argv[2]))
.split`:\t`[1]
)
Put this in .zshenv
:
alias dmenu_run='dmenu_run -i -h 1800 -w 2880 -p " >" -fn "DejaVu Sans Mono-15" -o .8 -nb "$(~/xparse background)" -nf "$(~/xparse color1)" -sb "$(~/xparse background)" -sf "$(~/xparse foreground)" -q'
Put the Xcolors files in ~/.colors
(name the file to the theme name), put the wallpaper in ~/Pictures/themes
(rename to [theme name].png
), and run colo [theme name]
in the terminal. Each time you run colo
, you must restart urxvt to see changes.