diff --git a/bin/obtheme2jgmenu b/bin/obtheme2jgmenu index 426ebea..8c0fe53 100755 --- a/bin/obtheme2jgmenu +++ b/bin/obtheme2jgmenu @@ -3,5 +3,12 @@ ob_file=$HOME/.config/openbox/rc.xml [[ -f $ob_file ]] && wm_theme=$(awk '// {while (getline n) {if (match(n, //)){l=n; exit}}} END {split(l, a, "[<>]"); print a[3]}' "$ob_file") +#Run only if theme doesn't exist + +CONFFILE="$HOME/.config/mabox/jgobthemes/$wm_theme.colorrc" + + +if [ ! -f "$CONFFILE" ]; then jgmenu_run init --apply-obtheme cp $HOME/.config/jgmenu/jgmenurc $HOME/.config/mabox/jgobthemes/$wm_theme.colorrc +fi