#!/bin/bash # t2ctl - basic tint2 panel config actions # t2ctl variable value config_file # T2CONFFILE="${3:-${HOME}/.config/tint2/Jaskie*.tint2rc}" T2_CONFDIR="$HOME/.config/tint2" SESS_FILE="$T2_CONFDIR/tint2-sessionfile" # for Colorizer COLORIZER_FILES="$HOME/.config/tint2/Jaskie*.tint2rc" #array for looping COLORIZER_TINTS=("Jaskier" "Jaskier_glyphicons") # default file for gradients changes T2RC="$HOME/.config/tint2/Jaskier.tint2rc" #T2CONFFILE="$HOME/.config/tint2/mabox2111.tint2rc" restartt2 () { killall -SIGUSR1 tint2 } pos () { case "$1" in tch) sd "^panel_position.*$" "panel_position = top center horizontal" ${T2CONFFILE};; bch) sd "^panel_position.*$" "panel_position = bottom center horizontal" ${T2CONFFILE};; tlh) sd "^panel_position.*$" "panel_position = top left horizontal" ${T2CONFFILE};; trh) sd "^panel_position.*$" "panel_position = top right horizontal" ${T2CONFFILE};; blh) sd "^panel_position.*$" "panel_position = bottom left horizontal" ${T2CONFFILE};; brh) sd "^panel_position.*$" "panel_position = bottom right horizontal" ${T2CONFFILE};; clv) sd "^panel_position.*$" "panel_position = center left vertical" ${T2CONFFILE};; crv) sd "^panel_position.*$" "panel_position = center right vertical" ${T2CONFFILE};; tlv) sd "^panel_position.*$" "panel_position = top left vertical" ${T2CONFFILE};; trv) sd "^panel_position.*$" "panel_position = top right vertical" ${T2CONFFILE};; blv) sd "^panel_position.*$" "panel_position = bottom left vertical" ${T2CONFFILE};; brv) sd "^panel_position.*$" "panel_position = bottom right vertical" ${T2CONFFILE};; esac } width () { read WIDTH HEIGHT <<< "$(grep panel_size ${T2CONFFILE} | cut -d'=' -f2)" sd "^panel_size.*$" "panel_size = ${1} ${HEIGHT}" ${T2CONFFILE} sd "^panel_shrink.*$" "panel_shrink = 0" ${T2CONFFILE} } height () { read WIDTH HEIGHT <<< "$(grep panel_size ${T2CONFFILE} | cut -d'=' -f2)" sd "^panel_size.*$" "panel_size = ${WIDTH} ${1}" ${T2CONFFILE} exeh=$(( $1 - 2 )) sd "^execp_icon_h.*$" "execp_icon_h = ${exeh}" ${T2CONFFILE} #new button/exec font size btfsize=$(( $1 / 2 - 2 )) sd "button_font = Symbols.*$" "button_font = Symbols Nerd Font ${btfsize}" ${T2CONFFILE} sd "execp_font = Symbols.*$" "execp_font = Symbols Nerd Font ${btfsize}" ${T2CONFFILE} # for Jaskier_glyphicons calculate rounded round=$(( $1 / 4 - 2 )) sd "rounded.*$" "rounded = ${round}" ~/.config/tint2/Jaskier_glyphicons.tint2rc sd "button_padding.*$" "button_padding = ${round} ${round}" ~/.config/tint2/Jaskier_glyphicons.tint2rc sd "execp_padding.*$" "execp_padding = ${round} ${round}" ~/.config/tint2/Jaskier_glyphicons.tint2rc ## panel padding/spacing case "$1" in 24|28) sd "panel_padding.*$" "panel_padding = 1 1 1" ~/.config/tint2/Jaskier_glyphicons.tint2rc sd "taskbar_padding.*$" "taskbar_padding = 0 0 1" ~/.config/tint2/Jaskier_glyphicons.tint2rc;; 32|36|40) sd "panel_padding.*$" "panel_padding = 2 2 2" ~/.config/tint2/Jaskier_glyphicons.tint2rc sd "taskbar_padding.*$" "taskbar_padding = 0 0 2" ~/.config/tint2/Jaskier_glyphicons.tint2rc;; 48) sd "panel_padding.*$" "panel_padding = 4 4 4" ~/.config/tint2/Jaskier_glyphicons.tint2rc sd "taskbar_padding.*$" "taskbar_padding = 0 0 4" ~/.config/tint2/Jaskier_glyphicons.tint2rc;; *):;; esac } marginhor () { read HOR VERT <<< "$(grep panel_margin ${T2CONFFILE} | cut -d'=' -f2)" sd "^panel_margin.*$" "panel_margin = ${1} ${VERT}" ${T2CONFFILE} } marginver () { read HOR VERT <<< "$(grep panel_margin ${T2CONFFILE} | cut -d'=' -f2)" sd "^panel_margin.*$" "panel_margin = ${HOR} ${1}" ${T2CONFFILE} } paddinghor () { read PHOR PVERT SPACING <<< "$(grep panel_padding ${T2CONFFILE} | cut -d'=' -f2)" sd "^panel_padding.*$" "panel_padding = ${1} ${PVERT} ${SPACING}" ${T2CONFFILE} } paddingver () { read PHOR PVERT SPACING <<< "$(grep panel_padding ${T2CONFFILE} | cut -d'=' -f2)" sd "^panel_padding.*$" "panel_padding = ${PHOR} ${1} ${SPACING}" ${T2CONFFILE} } spacing () { read PHOR PVERT SPACING <<< "$(grep panel_padding ${T2CONFFILE} | cut -d'=' -f2)" sd "^panel_padding.*$" "panel_padding = ${PHOR} ${PVERT} ${1}" ${T2CONFFILE} } shrink () { sd "^panel_shrink.*$" "panel_shrink = ${1}" ${T2CONFFILE} } autohide () { sd "^autohide .*$" "autohide = ${1}" ${T2CONFFILE} sd "^panel_margin.*$" "panel_margin = 0 0" ${T2CONFFILE} } hideheight () { sd "^autohide_height.*$" "autohide_height = ${1}" ${T2CONFFILE} sd "^panel_margin.*$" "panel_margin = 0 0" ${T2CONFFILE} sd "^autohide .*$" "autohide = 1" ${T2CONFFILE} } icontheme () { sd "^launcher_icon_theme.*$" "launcher_icon_theme = ${1}" ${T2CONFFILE} } reset () { case "$LANG" in pl*) LNG=pl ;; es*) LNG=es ;; *) LNG=en ;; esac cp "/usr/share/mabox/lang/${LNG}/.config/tint2/${1}" "$HOME/.config/tint2/" } clockline1 () { sd "^time1_format.*$" "time1_format = ${1}" ${T2CONFFILE} } clockline2 () { if [[ "$1" == "none" ]];then sd "^time2_format.*$" "time2_format =" ${T2CONFFILE} else sd "^time2_format.*$" "time2_format = ${1}" ${T2CONFFILE} fi } tb_icon(){ sd "^task_icon .*$" "task_icon = 1" ${T2CONFFILE} sd "^task_text.*$" "task_text = 0" ${T2CONFFILE} read W H <<< "$(grep panel_size ${T2CONFFILE} | cut -d'=' -f2)" sd "^task_maximum_size.*$" "task_maximum_size = ${H} ${H}" ${T2CONFFILE} } tb_text(){ sd "^task_text.*$" "task_text = 1" ${T2CONFFILE} sd "^task_icon .*$" "task_icon = 0" ${T2CONFFILE} read TB_WIDTH TB_HEIGHT <<< "$(grep 'task_maximum_size' ${T2CONFFILE} | cut -d'=' -f2)" if [[ "$TB_WIDTH" -lt "80" ]];then if [[ "$TB_WIDTH" != "0" ]];then sd "^task_maximum_size.*$" "task_maximum_size = 100 100" ${T2CONFFILE} fi fi } tb_both(){ sd "^task_icon .*$" "task_icon = 1" ${T2CONFFILE} sd "^task_text.*$" "task_text = 1" ${T2CONFFILE} read TB_WIDTH TB_HEIGHT <<< "$(grep 'task_maximum_size' ${T2CONFFILE} | cut -d'=' -f2)" if [[ "$TB_WIDTH" -lt "80" ]];then #notify-send.sh "mni 80" "$TB_WIDTH" if [[ "$TB_WIDTH" != "0" ]];then sd "^task_maximum_size.*$" "task_maximum_size = 100 100" ${T2CONFFILE} fi fi } tb_centered(){ sd "^task_centered.*$" "task_centered = ${1}" ${T2CONFFILE} } tb_width(){ case "$1" in icon) read W H <<< "$(grep panel_size ${T2CONFFILE} | cut -d'=' -f2)" sd "^task_maximum_size.*$" "task_maximum_size = ${H} ${H}" ${T2CONFFILE};; *)sd "^task_maximum_size.*$" "task_maximum_size = ${1} ${1}" ${T2CONFFILE};; esac } tb_tooltip_none(){ case "$1" in 1) sd "^task_tooltip.*$" "task_tooltip = 0" ${T2CONFFILE} sd "^task_thumbnail.*$" "task_thumbnail = 0" ${T2CONFFILE} ;; 0) sd "^task_tooltip.*$" "task_tooltip = 1" ${T2CONFFILE} sd "^task_thumbnail.*$" "task_thumbnail = 0" ${T2CONFFILE} ;; esac } tb_tooltip(){ case "$1" in 1) sd "^task_tooltip.*$" "task_tooltip = 1" ${T2CONFFILE} sd "^task_thumbnail.*$" "task_thumbnail = 0" ${T2CONFFILE} ;; 0) sd "^task_tooltip.*$" "task_tooltip = 0" ${T2CONFFILE} sd "^task_thumbnail.*$" "task_thumbnail = 0" ${T2CONFFILE} ;; esac } tb_thumbnail(){ case "$1" in 1) sd "^task_thumbnail.*$" "task_thumbnail = 1" ${T2CONFFILE} sd "^task_tooltip.*$" "task_tooltip = 1" ${T2CONFFILE} ;; 0) sd "^task_thumbnail.*$" "task_thumbnail = 1" ${T2CONFFILE} ;; esac } mleft(){ sd "^mouse_left.*$" "mouse_left = ${1}" ${T2CONFFILE} } mright(){ sd "^mouse_right.*$" "mouse_right = ${1}" ${T2CONFFILE} } mmiddle(){ sd "^mouse_middle.*$" "mouse_middle = ${1}" ${T2CONFFILE} } mup(){ sd "^mouse_scroll_up.*$" "mouse_scroll_up = ${1}" ${T2CONFFILE} } mdown(){ sd "^mouse_scroll_down.*$" "mouse_scroll_down = ${1}" ${T2CONFFILE} } mousereset(){ T2CONFFILE="${1}" sd "^mouse_left.*$" "mouse_left = toggle_iconify" ${T2CONFFILE} sd "^mouse_right.*$" "mouse_right = toggle" ${T2CONFFILE} sd "^mouse_middle.*$" "mouse_middle = close" ${T2CONFFILE} 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} } clockcolor(){ read CLR OPA <<< "$(grep "clock_font_color" ${T2CONFFILE} | cut -d'=' -f2)" sd "clock_font_color.*$" "clock_font_color = ${1} 100" ${T2CONFFILE} } gradient(){ read CLR1 OPA1 <<< "$(grep "start_color" ${T2RC} | cut -d'=' -f2)" sd "start_color .*$" "start_color = $1 ${OPA1}" ${COLORIZER_FILES} sd "color_stop = 100 .*$" "color_stop = 100 $1 ${OPA1}" ${COLORIZER_FILES} read CLR2 OPA2 <<< "$(grep "end_color" ${T2RC} | cut -d'=' -f2)" sd "end_color .*$" "end_color = $2 ${OPA2}" ${COLORIZER_FILES} sd "color_stop = 0 .*$" "color_stop = 0 $2 ${OPA2}" ${COLORIZER_FILES} #FGCOLOR=$(pastel textcolor ${1}|pastel format hex) #if [[ "${FGCOLOR}" == "#ffffff" ]];then #font_color "#DDDDDD" #allelements 0 #systray_background_id 5 #clock_background_id 5 #else #font_color "#222222" #allelements 0 #systray_background_id 5 #clock_background_id 5 #fi #notify-send.sh "${FGCOLOR}" "" } color_reverse(){ read SBG SBGA<<< "$(grep 'start_color ' ${T2RC} | cut -d'=' -f2)" read EBG EBGA<<< "$(grep 'end_color ' ${T2RC} | cut -d'=' -f2)" sd "start_color .*$" "start_color = $EBG $EBGA" ${COLORIZER_FILES} sd "color_stop = 100 .*$" "color_stop = 100 $EBG ${EBGA}" ${COLORIZER_FILES} sd "end_color .*$" "end_color = $SBG $SBGA" ${COLORIZER_FILES} sd "color_stop = 0 .*$" "color_stop = 0 $SBG $SBGA" ${COLORIZER_FILES} } gradienttype(){ sd "gradient =.*$" "gradient = ${1}" ${COLORIZER_FILES} } start_color(){ read SBG SBGA<<< "$(grep 'start_color ' ${T2RC} | cut -d'=' -f2)" case "${#1}" in 7) #color sd "start_color .*$" "start_color = $1 $SBGA" ${COLORIZER_FILES} sd "color_stop = 100 .*$" "color_stop = 100 $1 ${SBGA}" ${COLORIZER_FILES} ;; *) sd "start_color .*$" "start_color = $SBG $1" ${COLORIZER_FILES} sd "color_stop = 100 .*$" "color_stop = 100 $SBG $1" ${COLORIZER_FILES} ;; esac } end_color(){ read EBG EBGA<<< "$(grep 'end_color ' ${T2RC} | cut -d'=' -f2)" case "${#1}" in 7) #color sd "end_color .*$" "end_color = $1 $EBGA" ${COLORIZER_FILES} sd "color_stop = 0 .*$" "color_stop = 0 $1 ${EBGA}" ${COLORIZER_FILES} ;; *) sd "end_color .*$" "end_color = $EBG $1" ${COLORIZER_FILES} sd "color_stop = 0 .*$" "color_stop = 0 $EBG $1" ${COLORIZER_FILES} ;; esac } font_color(){ #all sd "task_font_color .*$" "task_font_color = $1 100" ${COLORIZER_FILES} sd "task_active_font_color .*$" "task_active_font_color = $1 100" ${COLORIZER_FILES} sd "task_iconified_font_color .*$" "task_iconified_font_color = $1 60" ${COLORIZER_FILES} sd "task_urgent_font_color .*$" "task_urgent_font_color = $1 100" ${COLORIZER_FILES} sd "taskbar_name_font_color .*$" "taskbar_name_font_color = $1 60" ${COLORIZER_FILES} sd "taskbar_name_active_font_color .*$" "taskbar_name_active_font_color = $1 100" ${COLORIZER_FILES} sd "battery_font_color .*$" "battery_font_color = $1 100" ${COLORIZER_FILES} sd "execp_font_color .*$" "execp_font_color = $1 100" ${COLORIZER_FILES} sd "button_font_color .*$" "button_font_color = $1 100" ${COLORIZER_FILES} sd "clock_font_color .*$" "clock_font_color = $1 100" ${COLORIZER_FILES} } font_color_tasks(){ sd "task_font_color .*$" "task_font_color = $1 100" ${COLORIZER_FILES} sd "task_active_font_color .*$" "task_active_font_color = $1 100" ${COLORIZER_FILES} sd "task_iconified_font_color .*$" "task_iconified_font_color = $1 60" ${COLORIZER_FILES} sd "task_urgent_font_color .*$" "task_urgent_font_color = $1 100" ${COLORIZER_FILES} sd "taskbar_name_font_color .*$" "taskbar_name_font_color = $1 60" ${COLORIZER_FILES} sd "taskbar_name_active_font_color .*$" "taskbar_name_active_font_color = $1 100" ${COLORIZER_FILES} } font_color_task_active(){ sd "task_active_font_color .*$" "task_active_font_color = $1 100" ${COLORIZER_FILES} sd "taskbar_name_active_font_color .*$" "taskbar_name_active_font_color = $1 100" ${COLORIZER_FILES} } font_color_buttons(){ sd "battery_font_color .*$" "battery_font_color = $1 100" ${COLORIZER_FILES} sd "execp_font_color .*$" "execp_font_color = $1 100" ${COLORIZER_FILES} sd "button_font_color .*$" "button_font_color = $1 100" ${COLORIZER_FILES} } tooltip_font_color(){ sd "tooltip_font_color .*$" "tooltip_font_color = $1 100" ${COLORIZER_FILES} } menucolors(){ MENUTHEME="$HOME/.config/mabox/jgobthemes/MBcolors.colorrc" read SCLR SCLRA<<< "$(grep 'color_menu_bg ' ${MENUTHEME} | cut -d'=' -f2)" read ECLR ECLRA<<< "$(grep 'color_menu_bg_to ' ${MENUTHEME} | cut -d'=' -f2)" read FCLR FCLRA<<< "$(grep 'color_norm_fg ' ${MENUTHEME} | cut -d'=' -f2)" #notify-send.sh "${SCLR} ${SCLRA}" "${ECLR} ${ECLRA}" sd "start_color .*$" "start_color = ${SCLR} ${SCLRA}" ${COLORIZER_FILES} sd "color_stop = 100 .*$" "color_stop = 100 ${SCLR} ${SCLRA}" ${COLORIZER_FILES} sd "end_color .*$" "end_color = ${ECLR} ${ECLRA}" ${COLORIZER_FILES} sd "color_stop = 0 .*$" "color_stop = 0 ${ECLR} ${ECLRA}" ${COLORIZER_FILES} panel_background_id 10 button_background_id 11 font_color_buttons ${FCLR} font_color_tasks ${FCLR} } opacityboth(){ start_color $1 end_color $1 } postype(){ #notify-send.sh "$1" "${COLORIZER_FILES}" case "$1" in edge) sd "^panel_margin.*$" "panel_margin = 0 0" ${T2CONFFILE} #for conf in ${COLORIZER_TINTS[@]} #do read WIDTH HEIGHT <<< "$(grep panel_size ${T2CONFFILE} | cut -d'=' -f2)" sd "^panel_size.*$" "panel_size = 100% ${HEIGHT}" ${T2CONFFILE} sd "^panel_shrink.*$" "panel_shrink = 0" ${T2CONFFILE} #done ;; float) source ~/.config/mabox/mabox.conf m=${floatpanel_margin:-4} w=${floatpanel_width:-96} sd "^panel_margin.*$" "panel_margin = $m $m" ${T2CONFFILE} #for conf in ${COLORIZER_TINTS[@]} #do read WIDTH HEIGHT <<< "$(grep panel_size ${T2CONFFILE} | cut -d'=' -f2)" sd "^panel_size.*$" "panel_size = ${w}% ${HEIGHT}" ${T2CONFFILE} sd "^panel_shrink.*$" "panel_shrink = 0" ${T2CONFFILE} #done ;; esac } panel_background_id(){ sd "panel_background_id.*$" "panel_background_id = ${1}" ${COLORIZER_FILES} # calculate tooltips colors if [[ "$1" -lt 4 ]]; then tooltip_background_id 3 tooltip_font_color "#11111" #font_color "#222222" else tooltip_background_id 6 tooltip_font_color "#eeeeee" #font_color "#dddddd" fi } button_background_id(){ sd "button_background_id.*$" "button_background_id = ${1}" ${COLORIZER_FILES} sd "launcher_icon_background_id.*$" "launcher_icon_background_id = ${1}" ${COLORIZER_FILES} sd "execp_background_id.*$" "execp_background_id = ${1}" ${COLORIZER_FILES} } task_background_id(){ sd "task_background_id.*$" "task_background_id = ${1}" ${COLORIZER_FILES} #sd "task_active_background_id.*$" "task_active_background_id = ${1}" ${COLORIZER_FILES} sd "task_iconified_background_id.*$" "task_iconified_background_id = ${1}" ${COLORIZER_FILES} } task_active_background_id(){ sd "task_active_background_id.*$" "task_active_background_id = ${1}" ${COLORIZER_FILES} } task_iconified_background_id(){ sd "task_iconified_background_id.*$" "task_iconified_background_id = ${1}" ${COLORIZER_FILES} } task_fontsize(){ IFS=' ' read -r -a TASK_FONT <<< "$(grep '.*task_font ' ${T2CONFFILE} | cut -d"=" -f2)" ## TASK FONT FAMILY and SIZE TASK_FSIZE="${TASK_FONT[-1]}" TASK_FFAMILY="${TASK_FONT[@]::${#TASK_FONT[@]}-1}" sd "task_font .*$" "task_font = ${TASK_FFAMILY} ${1}" ${T2CONFFILE} } task_fontfamily(){ IFS=' ' read -r -a TASK_FONT <<< "$(grep '.*task_font ' ${T2CONFFILE} | cut -d"=" -f2)" ## TASK FONT FAMILY and SIZE TASK_FSIZE="${TASK_FONT[-1]}" TASK_FFAMILY="${TASK_FONT[@]::${#TASK_FONT[@]}-1}" sd "task_font .*$" "task_font = ${1} ${TASK_FSIZE}" ${T2CONFFILE} } taskbar_name_fontsize(){ IFS=' ' read -r -a TNAME_FONT <<< "$(grep '.*taskbar_name_font ' ${T2CONFFILE} | cut -d"=" -f2)" ## TASKBAR NAME FONT FAMILY and SIZE TNAME_FSIZE="${TNAME_FONT[-1]}" TNAME_FFAMILY="${TNAME_FONT[@]::${#TNAME_FONT[@]}-1}" sd "taskbar_name_font .*$" "taskbar_name_font = ${TNAME_FFAMILY} ${1}" ${T2CONFFILE} } taskbar_name_fontfamily(){ IFS=' ' read -r -a TNAME_FONT <<< "$(grep '.*taskbar_name_font ' ${T2CONFFILE} | cut -d"=" -f2)" ## TASKBAR NAME FONT FAMILY and SIZE TNAME_FSIZE="${TNAME_FONT[-1]}" TNAME_FFAMILY="${TNAME_FONT[@]::${#TNAME_FONT[@]}-1}" sd "taskbar_name_font .*$" "taskbar_name_font = ${1} ${TNAME_FSIZE}" ${T2CONFFILE} } taskbar_background_id() { sd "taskbar_background_id.*$" "taskbar_background_id = ${1}" ${COLORIZER_FILES} } taskbar_active_background_id() { sd "taskbar_active_background_id.*$" "taskbar_active_background_id = ${1}" ${COLORIZER_FILES} } taskbar_name_background_id() { sd "taskbar_name_background_id.*$" "taskbar_name_background_id = ${1}" ${COLORIZER_FILES} } taskbar_name_active_background_id() { sd "taskbar_name_active_background_id.*$" "taskbar_name_active_background_id = ${1}" ${COLORIZER_FILES} } taskbar_distribute_size(){ sd "taskbar_distribute_size.*$" "taskbar_distribute_size = ${1}" ${T2CONFFILE} } tasks_align(){ sd "task_align .*$" "task_align = ${1}" ${T2CONFFILE} } taskbar_name(){ sd "taskbar_name .*$" "taskbar_name = ${1}" ${T2CONFFILE} } systray_background_id(){ sd "systray_background_id.*$" "systray_background_id = ${1}" ${COLORIZER_FILES} } clock_background_id(){ sd "clock_background_id.*$" "clock_background_id = ${1}" ${COLORIZER_FILES} } tooltip_background_id(){ sd "tooltip_background_id.*$" "tooltip_background_id = ${1}" ${COLORIZER_FILES} } launcher_background_id(){ sd "launcher_background_id.*$" "launcher_background_id = ${1}" ${COLORIZER_FILES} } allelements(){ button_background_id "$1" task_background_id "$1" task_active_background_id "$1" taskbar_active_background_id "$1" taskbar_background_id "$1" taskbar_name_active_background_id "$1" taskbar_name_background_id "$1" launcher_name_background_id "$1" systray_background_id "$1" clock_background_id "$1" } preset(){ case "$1" in bright) panel_background_id 3 allelements 0 task_background_id 1 task_active_background_id 4 taskbar_name_background_id 1 taskbar_name_active_background_id 4 systray_background_id 4 clock_background_id 4 font_color '#222222' clockcolor "#111111" ;; brightened2) panel_background_id 2 allelements 0 task_background_id 1 task_active_background_id 3 taskbar_name_background_id 1 taskbar_name_active_background_id 3 systray_background_id 4 clock_background_id 4 font_color '#111111' ;; brightened) panel_background_id 1 allelements 0 task_active_background_id 4 taskbar_name_active_background_id 4 systray_background_id 4 clock_background_id 4 font_color '#dddddd' ;; darkened) panel_background_id 4 allelements 0 task_active_background_id 4 taskbar_name_active_background_id 4 systray_background_id 4 clock_background_id 4 font_color '#bbbbbb' ;; darkened2) panel_background_id 5 allelements 0 task_active_background_id 5 taskbar_name_active_background_id 5 systray_background_id 5 clock_background_id 5 font_color '#bbbbbb' ;; dark) panel_background_id 6 allelements 0 task_background_id 1 font_color '#dddddd' clock_background_id 6 clockcolor "#f4a300" ;; translighter) panel_background_id 0 allelements 0 task_active_background_id 1 taskbar_background_id 0 taskbar_active_background_id 0 taskbar_name_background_id 0 taskbar_name_active_background_id 1 font_color '#dddddd' ;; transdarker) panel_background_id 0 allelements 0 task_active_background_id 4 taskbar_background_id 0 taskbar_active_background_id 0 taskbar_name_background_id 0 taskbar_name_active_background_id 4 clock_background_id 5 systray_background_id 5 font_color '#222222' ;; grad_dark) panel_background_id 7 gradient "#383838" "#222222" opacityboth 96 allelements 0 task_active_background_id 7 task_background_id 1 taskbar_active_background_id 4 taskbar_name_background_id 7 taskbar_name_active_background_id 0 systray_background_id 7 clock_background_id 7 clockcolor "#3cd425" ;; esac } switchto(){ case "$1" in default) echo "${T2_CONFDIR}/Jaskier.tint2rc" > "${SESS_FILE}";; glyphicons) echo "${T2_CONFDIR}/Jaskier_glyphicons.tint2rc" > "${SESS_FILE}";; basic) echo "${T2_CONFDIR}/Jaskier_basic.tint2rc" > "${SESS_FILE}";; *) #notify-send.sh "AAA" "${1}" if [ -f $1 ];then echo "${1}" > "${SESS_FILE}" fi ;; esac killall tint2 mb-tint2-session } case "$1" in position) pos "$2";; width) width "$2" ;; height) height "$2" ;; shrink) shrink "$2" ;; marginh) marginhor "$2" ;; marginv) marginver "$2" ;; paddingh) paddinghor "$2" ;; paddingv) paddingver "$2" ;; spacing) spacing "$2" ;; autohide) autohide "$2" ;; hideheight) hideheight "$2" ;; icontheme) icontheme "$2" ;; clockline1) clockline1 "$2";; clockline2) clockline2 "$2";; tb_icon)tb_icon "$2";; tb_text)tb_text "$2";; tb_both)tb_both "$2";; tb_centered)tb_centered "$2";; tb_width)tb_width "$2";; tb_tooltip_none)tb_tooltip_none "$2";; tb_tooltip)tb_tooltip "$2";; tb_thumbnail)tb_thumbnail "$2";; mleft)mleft "$2";; mright)mright "$2";; mmiddle)mmiddle "$2";; mup)mup "$2";; mdown)mdown "$2";; mousereset)mousereset "$2";; reset) reset "$2" ;; clock1_fontsize) clock1_fontsize "$2";; clock2_fontsize) clock2_fontsize "$2";; clockcolor) clockcolor "$2";; gradient) gradient "$2" "$3";; color_reverse) color_reverse;; gradienttype) gradienttype "$2";; start_color) start_color "$2";; end_color) end_color "$2";; font_color) font_color "$2";; font_color_tasks)font_color_tasks "$2";; font_color_task_active)font_color_task_active "$2";; font_color_buttons)font_color_buttons "$2";; tooltip_font_color) tooltip_font_color "$2";; menucolors)menucolors;; opacityboth)opacityboth "$2";; postype) postype "$2";; panel_background_id)panel_background_id "$2";; button_background_id)button_background_id "$2";; launcher_background_id)launcher_background_id "$2";; task_background_id)task_background_id "$2";; task_active_background_id)task_active_background_id "$2";; task_iconified_background_id)task_iconified_background_id "$2";; task_fontsize)task_fontsize "$2";; task_fontfamily)task_fontfamily "$2";; taskbar_background_id)taskbar_background_id "$2";; taskbar_active_background_id)taskbar_active_background_id "$2";; taskbar_name_background_id)taskbar_name_background_id "$2";; taskbar_name_active_background_id)taskbar_name_active_background_id "$2";; taskbar_name_fontsize)taskbar_name_fontsize "$2";; taskbar_name_fontfamily)taskbar_name_fontfamily "$2";; taskbar_distribute_size)taskbar_distribute_size "$2";; tasks_align)tasks_align "$2";; taskbar_name)taskbar_name "$2";; systray_background_id)systray_background_id "$2";; clock_background_id)clock_background_id "$2";; tooltip_background_id)tooltip_background_id "$2";; allelements) allelements "$2";; preset) preset "$2";; switchto)switchto "$2";; *) : ;; esac restartt2