diff --git a/bin/conky_toggle b/bin/conky_toggle index 7a74732..5d8968e 100755 --- a/bin/conky_toggle +++ b/bin/conky_toggle @@ -1,5 +1,8 @@ #!/bin/bash +if pgrep -f "conky -c" ;then +pkill conky +else SESSIONFILE=$HOME/.config/conky/conky-sessionfile while read -r line; do if [[ $line == *conky* ]]; then @@ -14,4 +17,5 @@ while read -r line; do fi fi done < $SESSIONFILE +fi exit 0 diff --git a/bin/mb-obthemes b/bin/mb-obthemes index b397651..1d68fad 100755 --- a/bin/mb-obthemes +++ b/bin/mb-obthemes @@ -587,7 +587,7 @@ function getOBtheme(){ # copy section from rc.xml to obtheme.txt, and tag="theme" sed -n "/<$tag>/,/<\/$tag>/p" "$RCFILE" > "$CONFIGDIR/obtheme.txt" echo "[OBTHEME]" >> "$SETTINGS" - cp "$OBPATH/menu.xml" "$CONFIGDIR" + #cp "$OBPATH/menu.xml" "$CONFIGDIR" getOBname } @@ -597,6 +597,10 @@ function getOBname(){ # get OB theme name TXT="Openbox theme: $OBTHEME\n" echo -e "\n Zapisano $TXT" echo "$TXT" >> "$LISTMSG" + if [[ "$OBTHEME" == "MBcolors" ]];then + cp ~/.themes/MBcolors/openbox-3/themerc "$CONFIGDIR" + theme.sh -l|tail -n1 > "$CONFIGDIR/terminal_theme" + fi } function getGTKtheme(){ @@ -624,7 +628,7 @@ function getGTKname(){ # get GTK theme name echo "$TXT" >> "$LISTMSG" } function getMenuPanel() { - echo "configdir: $CONFIGDIR" + #echo "configdir: $CONFIGDIR" cp "$HOME"/.config/mabox/mabox.conf "$CONFIGDIR"/ } function setXsettingsd() { @@ -798,11 +802,20 @@ mb-setvar phwmon_iconsize=${phwmon_iconsize:-32} } function restoreOBrc(){ + # also terminal theme RCFILE="$OBPATH/rc.xml" THEMEFILE="$1/obtheme.txt" FTEMP=$(mktemp --tmpdir blob.XXXX) MENUFILE="$1/menu.xml" cp "$MENUFILE" "$OBPATH" + THEMERC="$1/themerc" + if [[ -f "$THEMERC" ]];then + cp "$THEMERC" ~/.themes/MBcolors/openbox-3/ + fi + TERMINAL_THEME="$1/terminal_theme" + if [[ -f "$TERMINAL_THEME" ]];then + cat "$TERMINAL_THEME" >> ~/.theme_history + fi rm -f "$OBBROWSER_ICON_CACHE" if [[ $(grep "[OBTHEME]" "$1/settings.cfg" ) ]] &>/dev/null;then # backup rc.xml first