mb-jgtools/bin/obtheme2jgmenu

15 lines
449 B
Plaintext
Raw Normal View History

2020-03-03 16:14:43 +01:00
#!/bin/bash
ob_file=$HOME/.config/openbox/rc.xml
[[ -f $ob_file ]] && wm_theme=$(awk '/<theme>/ {while (getline n) {if (match(n, /<name>/)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file")
2020-03-03 18:37:32 +01:00
#Run only if theme doesn't exist
CONFFILE="$HOME/.config/mabox/jgobthemes/$wm_theme.colorrc"
if [ ! -f "$CONFFILE" ]; then
2020-03-03 16:14:43 +01:00
jgmenu_run init --apply-obtheme
cp $HOME/.config/jgmenu/jgmenurc $HOME/.config/mabox/jgobthemes/$wm_theme.colorrc
2020-03-03 18:37:32 +01:00
fi