generate jgtheme only if not exist

master
Daniel Napora 2020-03-03 18:37:32 +01:00
parent 4a9b2e920e
commit 21f9ef0815
1 changed files with 7 additions and 0 deletions

View File

@ -3,5 +3,12 @@
ob_file=$HOME/.config/openbox/rc.xml 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") [[ -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")
#Run only if theme doesn't exist
CONFFILE="$HOME/.config/mabox/jgobthemes/$wm_theme.colorrc"
if [ ! -f "$CONFFILE" ]; then
jgmenu_run init --apply-obtheme jgmenu_run init --apply-obtheme
cp $HOME/.config/jgmenu/jgmenurc $HOME/.config/mabox/jgobthemes/$wm_theme.colorrc cp $HOME/.config/jgmenu/jgmenurc $HOME/.config/mabox/jgobthemes/$wm_theme.colorrc
fi