This commit is contained in:
Daniel Napora 2023-06-02 21:34:19 +02:00
parent 6509ab2c88
commit a595eeae34
2 changed files with 51 additions and 0 deletions

View File

@ -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"
;;
*)
:
;;

View File

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