mirror of https://gitlab.com/ceda_ei/tz-conky
Rewrite tz.sh to print vertical columns
This commit is contained in:
parent
d0c745f58d
commit
029ce6ed21
23
tz.sh
23
tz.sh
|
@ -1,11 +1,20 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
timezone() {
|
places=(Europe/Vilnius Asia/Tehran Europe/Oslo Europe/Dublin Australia/Victoria)
|
||||||
echo '${font BankGothic Md BT:pixelsize=30}${alignr}'${2}: $(TZ=$1 date +%H:%M)'${font}'
|
names=(Vilnius Tehran Oslo Dublin Victoria)
|
||||||
|
|
||||||
|
n_character(){
|
||||||
|
echo -n "$(python3 -c "print('{:<$1}'.format(\"$2\"))")"
|
||||||
}
|
}
|
||||||
|
|
||||||
timezone Europe/Vilnius Vilnius
|
echo -n '${font Roboto Mono:pixelsize=20}'
|
||||||
timezone Asia/Tehran Tehran
|
for i in ${names[@]}; do
|
||||||
timezone Europe/Oslo Oslo
|
n_character 15 $i
|
||||||
timezone Europe/Dublin Dublin
|
done
|
||||||
timezone Australia/Victoria Victoria
|
echo '${font}'
|
||||||
|
|
||||||
|
echo -n '${font Roboto Mono:pixelsize=30}'
|
||||||
|
for i in ${places[@]}; do
|
||||||
|
n_character 10 $(TZ=$i date +%H:%M)
|
||||||
|
done
|
||||||
|
echo '${font}'
|
||||||
|
|
4
tz_conky
4
tz_conky
|
@ -1,4 +1,4 @@
|
||||||
alignment bottom_right
|
alignment bottom_middle
|
||||||
background no
|
background no
|
||||||
border_width 5
|
border_width 5
|
||||||
default_color ffffff
|
default_color ffffff
|
||||||
|
@ -6,7 +6,7 @@ double_buffer yes
|
||||||
draw_borders no
|
draw_borders no
|
||||||
draw_outline no
|
draw_outline no
|
||||||
draw_shades no
|
draw_shades no
|
||||||
gap_x 50
|
gap_x 0
|
||||||
gap_y 50
|
gap_y 50
|
||||||
maximum_width 1000
|
maximum_width 1000
|
||||||
minimum_size 175
|
minimum_size 175
|
||||||
|
|
Loading…
Reference in New Issue