From 119f8a940b3aee0ac33776cf894db16318f1d8c9 Mon Sep 17 00:00:00 2001 From: xfnw Date: Sun, 14 Feb 2021 17:48:25 -0500 Subject: [PATCH] berry seems to always run autostart with bash --- .config/berry/autostart | 56 ++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.config/berry/autostart b/.config/berry/autostart index a30c532..ea86999 100755 --- a/.config/berry/autostart +++ b/.config/berry/autostart @@ -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" - - -