berry seems to always run autostart with bash

This commit is contained in:
xfnw 2021-02-14 17:48:25 -05:00
parent 392cc60966
commit 119f8a940b

View file

@ -3,6 +3,27 @@
# start the keyboard combination daemon
sxhkd -c ~/.config/berry/sxhkdrc &
# Set decoration geometry
berryc border_width 5
berryc inner_border_width 4
berryc title_height 20
berryc top_gap 20
# Set decoration colors
berryc focus_color 292D3E
berryc unfocus_color 292D3E
berryc inner_focus_color 56aa79
berryc inner_unfocus_color 565679
berryc text_focus_color ffffff
berryc text_unfocus_color eeeeee
# Other options
berryc smart_place "true"
berryc draw_text "true"
berryc edge_lock "true"
berryc set_font "Dina-9"
# set the screen resolution if you are in a vm
xrandr --listmonitors | grep -q 'Virtual-1 1024/271x768/203+0+0' &&
xrandr --output Virtual-1 --mode 1360x768
@ -11,14 +32,11 @@ xrandr --listmonitors | grep -q 'Virtual-1 1024/271x768/203+0+0' &&
feh --randomize --bg-fill ~/Pictures/wall
# start the bar
if which lemonbar
then
pkill -x lemonbar
batterysec(){
GRML_BATTERY_LEVEL=''
zsh -c '
GRML_BATTERY_LEVEL=""
local batteries bat capacity
batteries=( /sys/class/power_supply/BAT*(N) )
batteries=`echo /sys/class/power_supply/BAT*`
if (( $#batteries > 0 )) ; then
for bat in $batteries ; do
if [[ -e $bat/capacity ]]; then
@ -47,35 +65,17 @@ if (( $#batteries > 0 )) ; then
done
fi
echo "$GRML_BATTERY_LEVEL %{B#292D3E}"
' 2>/dev/null
}
if which lemonbar
then
pkill -x lemonbar || true
while sleep 1
do
echo ' %{c}'`date -R`' %{r}'`batterysec`' '`uptime | cut -d' ' -f12 | cut -b-4`' '
done | lemonbar -g x20 -B '#292D3E' -F '#CCCCCC' -f 'Fira Code:size=9:antialias=true' &
fi
# Set decoration geometry
berryc border_width 5
berryc inner_border_width 4
berryc title_height 20
berryc top_gap 20
# Set decoration colors
berryc focus_color 292D3E
berryc unfocus_color 292D3E
berryc inner_focus_color 56aa79
berryc inner_unfocus_color 565679
berryc text_focus_color ffffff
berryc text_unfocus_color eeeeee
# Other options
berryc smart_place "true"
berryc draw_text "true"
berryc edge_lock "true"
berryc set_font "Dina-9"