diff --git a/dotdrop b/dotdrop index c026eda..736941a 160000 --- a/dotdrop +++ b/dotdrop @@ -1 +1 @@ -Subproject commit c026edaf3220e1782a775e4332b355cf8403b928 +Subproject commit 736941a147b173b988e0c3510b431c1ca6188424 diff --git a/dotfiles/polybar/config b/dotfiles/polybar/config index 4d81b4e..621fef6 100644 --- a/dotfiles/polybar/config +++ b/dotfiles/polybar/config @@ -1,21 +1,32 @@ -[bar/mybar] -; monitor = DP1 +############################################################################### +[colors] +green = #00d3a8 -font-0 = "Inconsolata:pixelsize=12;0" +accent = ${self.green} +background = #18191E +foreground = #000000 + +############################################################################### +[font] +inconsolata = "Inconsolata:pixelsize=12;0" + +############################################################################### +[bar/laptop] +enable-ipc = false + +font-0 = ${font.inconsolata} bottom = false fixed-center = true width = 100% height = 35 -background = #18191E -foreground = #000000 - -green = #00d3a8 - #padding-left = 0.5 padding-right = 1 +foreground = ${colors.background} +background = ${colors.background} + module-margin = 1 modules-left = i3tabs title @@ -33,8 +44,7 @@ wm-restack = i3 dpi-x = 96 dpi-y = 96 -enable-ipc = false - +############################################################################### [module/i3tabs] type = internal/i3 pin-workspaces = true @@ -43,26 +53,30 @@ enable-click = true enable-scroll = false wrapping-scroll = false +foreground = #00d3a8 +background = #383D41 + label-unfocused = %index% label-unfocused-padding = 2 label-unfocused-foreground = #ffffff label-focused = %index% -label-focused-foreground = #00d3a8 -label-focused-background = #383D41 +label-focused-foreground = ${self.foreground} +label-focused-background = ${self.background} label-focused-underline = #fba922 label-focused-padding = 2 label-urgent = %index% -label-urgent-background = #00d3a8 -label-urgent-foreground = #383D41 +label-urgent-background = ${self.foreground} +label-urgent-foreground = ${self.background} label-urgent-underline = #fba922 label-urgent-padding = 2 label-mode-padding = 2 -label-mode-foreground = #00d3ab -label-mode-background = #65737E +label-mode-foreground = ${self.foreground} +label-mode-background = ${self.background} +############################################################################### [module/date] type = internal/date @@ -79,6 +93,7 @@ label = %date% %time% label-font = 0 label-foreground = #fff +############################################################################### [module/title] type = internal/xwindow label = %title% @@ -88,6 +103,7 @@ label-empty = "Yoroshiku!" format-padding = 2 format-foreground = #fff +############################################################################### [module/battery] type = internal/battery full-at = 99 @@ -106,6 +122,7 @@ format-full = format-full-foreground = #00d3a8 label-full = FULL +############################################################################### [module/volume] type = internal/alsa @@ -119,15 +136,21 @@ format-volume = format-volume-foreground = #fff label-volume = VOL %percentage%% -label-muted = muted +format-muted +format-muted-foreground = #ff0000 +label-muted = MUTED +############################################################################### [module/network] type = internal/network interface = wlo1 -interval = 3.0 +interval = 10.0 format-connected = format-disconnectded = label-connected = WIFI %essid% label-connected-foreground = #fff + +label-disconnected = NO WIFI +label-disconnected-foreground = #fff diff --git a/dotfiles/polybar/start.sh b/dotfiles/polybar/start.sh index 9bde21f..aaf5ecd 100755 --- a/dotfiles/polybar/start.sh +++ b/dotfiles/polybar/start.sh @@ -1,4 +1,12 @@ #!/bin/bash -killall polybar -polybar mybar +# Kill old polybars +killall -q polybar +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Launch +laptop=$(xrandr --query | grep 'eDP-1') + +if [[ ${laptop} = *connected* ]]; then + polybar laptop & +fi