diff --git a/bin/mb-setfont b/bin/mb-setfont index 5fcb20d..21b4a05 100755 --- a/bin/mb-setfont +++ b/bin/mb-setfont @@ -99,6 +99,14 @@ font_conky_all () { exit 0 fi } +t2_time1_font(){ + sd "^time1_font.*$" "time1_font = ${FONTNAME} ${FONTSTYLE} ${FONTSIZE}" ${1} + killall -SIGUSR1 tint2 +} +t2_time2_font(){ + sd "^time2_font.*$" "time2_font = ${FONTNAME} ${FONTSTYLE} ${FONTSIZE}" ${1} + killall -SIGUSR1 tint2 +} case "$1" in @@ -125,6 +133,14 @@ case "$1" in selectfont font_conky_all ;; + t2_time1_font) + selectfont + t2_time1_font "$2" + ;; + t2_time2_font) + selectfont + t2_time2_font "$2" + ;; *) : ;; diff --git a/bin/t2ctl b/bin/t2ctl index f247acf..602fe1c 100755 --- a/bin/t2ctl +++ b/bin/t2ctl @@ -6,6 +6,7 @@ T2CONFFILE="${3}" +T2COLORFILE="$HOME/.config/tint2/*_mb.tint2rc" #T2CONFFILE="$HOME/.config/tint2/mabox2111.tint2rc" restartt2 () { @@ -194,6 +195,33 @@ mousereset(){ sd "^mouse_scroll_up.*$" "mouse_scroll_up = iconify" ${T2CONFFILE} sd "^mouse_scroll_down.*$" "mouse_scroll_down = toggle_iconify" ${T2CONFFILE} } +clock1_fontsize(){ + read -a FL1 <<< "$(grep "time1_font" ${T2CONFFILE} | cut -d'=' -f2)" + L1_FONT="${FL1[@]::${#FL1[@]}-1}" # this is crazy... all array elements but last + sd "^time1_font.*$" "time1_font = ${L1_FONT} ${1}" ${T2CONFFILE} +} +clock2_fontsize(){ + read -a FL2 <<< "$(grep "time2_font" ${T2CONFFILE} | cut -d'=' -f2)" + L2_FONT="${FL2[@]::${#FL2[@]}-1}" # this is crazy... all array elements but last + sd "^time2_font.*$" "time2_font = ${L2_FONT} ${1}" ${T2CONFFILE} +} + +panel_background_id(){ + sd "panel_background_id.*$" "panel_background_id = ${1}" ${T2COLORFILE} +} + +button_background_id(){ + sd "button_background_id.*$" "button_background_id = ${1}" ${T2COLORFILE} + sd "execp_background_id.*$" "execp_background_id = ${1}" ${T2COLORFILE} +} +task_background_id(){ + sd "task_background_id.*$" "task_background_id = ${1}" ${T2COLORFILE} +} +systray_background_id(){ + sd "systray_background_id.*$" "systray_background_id = ${1}" ${T2COLORFILE} +} + + case "$1" in position) pos "$2";; width) width "$2" ;; @@ -224,6 +252,13 @@ case "$1" in mdown)mdown "$2";; mousereset)mousereset;; reset) reset "$2" ;; + clock1_fontsize) clock1_fontsize "$2";; + clock2_fontsize) clock2_fontsize "$2";; + panel_background_id)panel_background_id "$2";; + button_background_id)button_background_id "$2";; + task_background_id)task_background_id "$2";; + systray_background_id)systray_background_id "$2";; + *) : ;; esac restartt2