mb-obthemes,conky_toggle

master
Daniel Napora 2022-06-03 02:25:45 +02:00
parent 51669d2254
commit 60196e3430
2 changed files with 19 additions and 2 deletions

View File

@ -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

View File

@ -587,7 +587,7 @@ function getOBtheme(){ # copy <theme> 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