mb-obthemes,conky_toggle
parent
51669d2254
commit
60196e3430
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if pgrep -f "conky -c" ;then
|
||||||
|
pkill conky
|
||||||
|
else
|
||||||
SESSIONFILE=$HOME/.config/conky/conky-sessionfile
|
SESSIONFILE=$HOME/.config/conky/conky-sessionfile
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
if [[ $line == *conky* ]]; then
|
if [[ $line == *conky* ]]; then
|
||||||
|
@ -14,4 +17,5 @@ while read -r line; do
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < $SESSIONFILE
|
done < $SESSIONFILE
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -587,7 +587,7 @@ function getOBtheme(){ # copy <theme> section from rc.xml to obtheme.txt, and
|
||||||
tag="theme"
|
tag="theme"
|
||||||
sed -n "/<$tag>/,/<\/$tag>/p" "$RCFILE" > "$CONFIGDIR/obtheme.txt"
|
sed -n "/<$tag>/,/<\/$tag>/p" "$RCFILE" > "$CONFIGDIR/obtheme.txt"
|
||||||
echo "[OBTHEME]" >> "$SETTINGS"
|
echo "[OBTHEME]" >> "$SETTINGS"
|
||||||
cp "$OBPATH/menu.xml" "$CONFIGDIR"
|
#cp "$OBPATH/menu.xml" "$CONFIGDIR"
|
||||||
getOBname
|
getOBname
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,6 +597,10 @@ function getOBname(){ # get OB theme name
|
||||||
TXT="Openbox theme: $OBTHEME\n"
|
TXT="Openbox theme: $OBTHEME\n"
|
||||||
echo -e "\n Zapisano $TXT"
|
echo -e "\n Zapisano $TXT"
|
||||||
echo "$TXT" >> "$LISTMSG"
|
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(){
|
function getGTKtheme(){
|
||||||
|
@ -624,7 +628,7 @@ function getGTKname(){ # get GTK theme name
|
||||||
echo "$TXT" >> "$LISTMSG"
|
echo "$TXT" >> "$LISTMSG"
|
||||||
}
|
}
|
||||||
function getMenuPanel() {
|
function getMenuPanel() {
|
||||||
echo "configdir: $CONFIGDIR"
|
#echo "configdir: $CONFIGDIR"
|
||||||
cp "$HOME"/.config/mabox/mabox.conf "$CONFIGDIR"/
|
cp "$HOME"/.config/mabox/mabox.conf "$CONFIGDIR"/
|
||||||
}
|
}
|
||||||
function setXsettingsd() {
|
function setXsettingsd() {
|
||||||
|
@ -798,11 +802,20 @@ mb-setvar phwmon_iconsize=${phwmon_iconsize:-32}
|
||||||
|
|
||||||
}
|
}
|
||||||
function restoreOBrc(){
|
function restoreOBrc(){
|
||||||
|
# also terminal theme
|
||||||
RCFILE="$OBPATH/rc.xml"
|
RCFILE="$OBPATH/rc.xml"
|
||||||
THEMEFILE="$1/obtheme.txt"
|
THEMEFILE="$1/obtheme.txt"
|
||||||
FTEMP=$(mktemp --tmpdir blob.XXXX)
|
FTEMP=$(mktemp --tmpdir blob.XXXX)
|
||||||
MENUFILE="$1/menu.xml"
|
MENUFILE="$1/menu.xml"
|
||||||
cp "$MENUFILE" "$OBPATH"
|
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"
|
rm -f "$OBBROWSER_ICON_CACHE"
|
||||||
if [[ $(grep "[OBTHEME]" "$1/settings.cfg" ) ]] &>/dev/null;then
|
if [[ $(grep "[OBTHEME]" "$1/settings.cfg" ) ]] &>/dev/null;then
|
||||||
# backup rc.xml first
|
# backup rc.xml first
|
||||||
|
|
Loading…
Reference in New Issue