DWM Themes

Hi I’m use xorg-xrdb package for change themes xrdb ~/.Xresources
in Xresoures
#include “/full/path/to/themes/*.res”
#include “/full/path/to/themes/template.txt” works fine but I find script and no idea how this work maybe some one help. Thanks
#!/bin/sh
CFG_DIR=$1
if [ “$CFG_DIR” == “” ]; then
CFG_DIR=${XDG_CONFIG_HOME:-${HOME}/.config}/themes
fi

if [ ! -e “$CFG_DIR” ]; then
echo “Add theme files to $CFG_DIR”
exit
fi

THEME=$(
find “$CFG_DIR” -type f -name ‘.res’
| sed -r 's#^(.
)/([^/]+)[.][^.]+$#\2|\0#’
| sort
| dmenu -p " theme:" -RestrictReturn -RejectNoMatch -ShowNumbers -c -w 70% -l 50 -g 10 -d “|”
)

if [ “$THEME” != “” ]; then
xrdb_reload.sh “$THEME”
fi

#!/bin/sh

CFG_DIR=$1
if [ “$CFG_DIR” == “” ]; then
CFG_DIR=${XDG_CONFIG_HOME:-${HOME}/.sources}/dusk/themes
fi

if [ ! -e “$CFG_DIR” ]; then
echo “Add theme files to $CFG_DIR”
exit
fi

THEME=$(
find “$CFG_DIR” -type f -name ‘.res’
| sed -r 's#^(.
)/([^/]+)[.][^.]+$#\2|\0#’
| sort
| dmenu -p “dusk theme:” -RestrictReturn -RejectNoMatch -ShowNumbers -c -w 70% -l 50 -g 10 -d “|”
)

if [ “$THEME” != “” ]; then
/home/rp/.scripts/xrdb_reload.sh “$THEME”
fi
done thanks :smiley:

Have you integrated the xrdb patch into your dwm build?

https://dwm.suckless.org/patches/xrdb/

See that page and the code. Should get you over the current hump I think.

duskwm

a lots fun :ok_hand: