From b85fa4148de3413f40d4585d9b86495136d7de41 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Fri, 27 May 2022 00:10:10 +0200 Subject: [PATCH] mb-obthemes update --- bin/mb-obthemes | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/bin/mb-obthemes b/bin/mb-obthemes index d3430c4..20f2154 100755 --- a/bin/mb-obthemes +++ b/bin/mb-obthemes @@ -238,7 +238,7 @@ OK="--button=OK:0" IMGCMD="viewnior" # application command to view screenshot MENUMODIFIER="super+space" # keybind for show root-menu MOUSECMD="click 3" # mouse r-click -KEYDOWN=9 # adjust this for where "Preferences" is in the menu +KEYDOWN=4 # adjust this for where "Preferences" is in the menu #### END VARIABLES ##################################################### ### FUNCTIONS ########################################################## @@ -477,6 +477,17 @@ function getNitrogen(){ # get Nitrogen saved backgrounds fi } +function copyConky(){ + if [[ $(pidof conky) ]];then + mkdir -p "$CONFIGDIR/conky" + rm "$CONFIGDIR/conky/*conkyrc" + pgrep -a conky | while read a b c conkyfile;do + cp $conkyfile "$CONFIGDIR/conky/" + done + + fi +} + function getConky(){ CONKYCMD="" LISTMSGTXT="" @@ -484,6 +495,7 @@ function getConky(){ CONKYTEMP=$(mktemp --tmpdir blob.XXXX) if [[ $(pidof conky) ]];then # get full command of running conkys > "$CONKYTEMP" + copyConky pgrep -a conky | while read pid CMD;do echo "$CMD;" >> "$CONKYTEMP" done @@ -1122,6 +1134,9 @@ function restoreSettings(){ CONKYCMD=$(echo $line | cut -d ' ' -f2-) # write to conky session file... echo $CONKYCMD | awk -F';' '{for(i=1; i<=NF; i++) print $i}' >> "$CONKYSESSION" + if [ -d "$FPATH/conky" ];then + rsync -a $FPATH/conky/* ~/.config/conky/ + fi killall conky source "$CONKYSESSION" ;;