t2ctl improvements
parent
7be3c59295
commit
af03f5d1a1
38
bin/t2ctl
38
bin/t2ctl
|
@ -16,13 +16,38 @@ killall -SIGUSR1 tint2
|
||||||
}
|
}
|
||||||
|
|
||||||
pos () {
|
pos () {
|
||||||
echo "$1"
|
case "$1" in
|
||||||
sd "^panel_position.*$" "panel_position = ${1} center horizontal" ${T2CONFFILE}
|
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
|
||||||
restartt2
|
restartt2
|
||||||
}
|
}
|
||||||
width () {
|
width () {
|
||||||
read WIDTH HEIGHT <<< "$(grep panel_size ${T2CONFFILE} | cut -d'=' -f2)"
|
read WIDTH HEIGHT <<< "$(grep panel_size ${T2CONFFILE} | cut -d'=' -f2)"
|
||||||
sd "^panel_size.*$" "panel_size = ${1} ${HEIGHT}" ${T2CONFFILE}
|
sd "^panel_size.*$" "panel_size = ${1} ${HEIGHT}" ${T2CONFFILE}
|
||||||
|
sd "^panel_shrink.*$" "panel_shrink = 0" ${T2CONFFILE}
|
||||||
restartt2
|
restartt2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,8 +88,16 @@ shrink () {
|
||||||
}
|
}
|
||||||
autohide () {
|
autohide () {
|
||||||
sd "^autohide .*$" "autohide = ${1}" ${T2CONFFILE}
|
sd "^autohide .*$" "autohide = ${1}" ${T2CONFFILE}
|
||||||
|
sd "^panel_margin.*$" "panel_margin = 0 0" ${T2CONFFILE}
|
||||||
restartt2
|
restartt2
|
||||||
}
|
}
|
||||||
|
hideheight () {
|
||||||
|
sh "^autohide_height.*$" "autohide_height = ${1}" ${T2TCONFFILE}
|
||||||
|
sd "^panel_margin.*$" "panel_margin = 0 0" ${T2CONFFILE}
|
||||||
|
sd "^autohide .*$" "autohide = 1" ${T2CONFFILE}
|
||||||
|
restartt2
|
||||||
|
}
|
||||||
|
|
||||||
reset () {
|
reset () {
|
||||||
case "$LANG" in
|
case "$LANG" in
|
||||||
pl*) LNG=pl ;;
|
pl*) LNG=pl ;;
|
||||||
|
@ -86,6 +119,7 @@ case "$1" in
|
||||||
paddingv) paddingver "$2" ;;
|
paddingv) paddingver "$2" ;;
|
||||||
spacing) spacing "$2" ;;
|
spacing) spacing "$2" ;;
|
||||||
autohide) autohide "$2" ;;
|
autohide) autohide "$2" ;;
|
||||||
|
hideheight) hideheight "$2" ;;
|
||||||
reset) reset "$2" ;;
|
reset) reset "$2" ;;
|
||||||
*) : ;;
|
*) : ;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue