2017-03-04 22:31:11 +00:00
|
|
|
#!/usr/bin/env bash
|
2016-12-11 23:43:09 +00:00
|
|
|
|
|
|
|
pkill admiral
|
|
|
|
|
2017-03-04 22:31:11 +00:00
|
|
|
font="GohuFont:style=Regular:size=10"
|
2016-12-11 23:43:09 +00:00
|
|
|
fallback_font="FontAwesome:size=8"
|
|
|
|
background="#cc111314"
|
|
|
|
foreground="#bcbdc3"
|
|
|
|
a=30
|
|
|
|
|
|
|
|
monitors=$(xrandr | grep -o "^.* connected" | sed "s/ connected//")
|
|
|
|
|
|
|
|
if [[ $1 == "-f" ]]; then
|
|
|
|
# full width, no padding
|
|
|
|
x=1920
|
|
|
|
y=40
|
|
|
|
x_offset=0
|
|
|
|
y_offset=0
|
|
|
|
elif [[ $1 == "-h" ]]; then
|
|
|
|
# half width
|
|
|
|
x=900
|
|
|
|
y=40
|
|
|
|
x_offset=500
|
|
|
|
y_offset=15
|
|
|
|
else
|
|
|
|
x=1880
|
|
|
|
y=40
|
|
|
|
x_offset=20
|
|
|
|
y_offset=15
|
|
|
|
fi
|
|
|
|
|
2017-03-04 22:31:11 +00:00
|
|
|
#for m in $monitors; do
|
2016-12-11 23:43:09 +00:00
|
|
|
#admiral | lemonbar -a $a -g "${x}x${y}+${x_offset}+${y_offset}" -f $font -f $fallback_font -B $background -F $foreground | sh &
|
|
|
|
admiral | lemonbar -a $a -f $font -f $fallback_font -B $background -F $foreground | sh &
|
|
|
|
# the following line gets the width of the current monitor
|
2017-03-04 22:31:11 +00:00
|
|
|
#monitor_width=$(xrandr | grep '*' | ruby -e "puts gets.strip.split[0].split('x')" | head -n 1)
|
|
|
|
#let x_offset+=$monitor_width
|
|
|
|
#echo "Started bar on $m"
|
|
|
|
#done
|