From 743a3f8f26c9884e70976a21084226658754f06b Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Thu, 13 Feb 2020 18:25:00 +0100 Subject: [PATCH] fix: polybar and bspwm config per host --- .config/bspwm/bspwmrc | 18 +- .config/polybar/config | 638 +++++++++++++++++++------------------- .config/polybar/launch.sh | 12 +- 3 files changed, 334 insertions(+), 334 deletions(-) diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index c4fbddf..da55c8e 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -2,13 +2,21 @@ sxhkd & -bspc monitor HDMI-1 -d 01 02 03 04 05 06 07 -bspc monitor DVI-D-1 -d 08 09 10 +host_name=$(hostname) +if [[ $host_name == "portalo" ]]; then + bspc monitor HDMI-1 -d 01 02 03 04 05 06 07 + bspc monitor DVI-D-1 -d 08 09 10 + + bspc desktop ^7 --layout monocle + bspc desktop ^9 --layout monocle + bspc desktop ^10 --layout monocle +elif [[ $host_name == *"laptop"* ]]; then + bspc monitor eDP1 -d 01 02 03 04 05 06 07 08 09 10 +else + bspc monitor primary -d 01 02 03 04 05 06 07 08 09 10 +fi bspc desktop ^1 --layout monocle -bspc desktop ^7 --layout monocle -bspc desktop ^9 --layout monocle -bspc desktop ^10 --layout monocle bspc config border_width 1 bspc config window_gap 10 diff --git a/.config/polybar/config b/.config/polybar/config index e7cf137..645bee7 100644 --- a/.config/polybar/config +++ b/.config/polybar/config @@ -1,442 +1,428 @@ [colors] -background = #222 -background-alt = #444 -foreground = #dfdfdf -foreground-alt = #555 -primary = #ffb52a -secondary = #e60053 -alert = #bd2c40 + background = #222 + background-alt = #444 + foreground = #dfdfdf + foreground-alt = #555 + primary = #ffb52a + secondary = #e60053 + alert = #bd2c40 -[bar/primary] -monitor = HDMI-1 -width = 100% -height = 27 -;offset-x = 1% -;offset-y = 1% -radius = 0.0 -fixed-center = false -bottom = true +[bar/base] + width = 100% + height = 27 +; offset-x = 1% +; offset-y = 1% + radius = 0.0 + fixed-center = true + bottom = true -background = ${colors.background} -foreground = ${colors.foreground} + background = ${colors.background} + foreground = ${colors.foreground} -line-size = 3 -line-color = #f00 + line-size = 3 + line-color = #f00 -border-size = 0 -border-color = #00000000 + border-size = 0 + border-color = #00000000 -padding-left = 0 -padding-right = 2 + padding-left = 0 + padding-right = 2 -module-margin-left = 1 -module-margin-right = 2 + module-margin-left = 1 + module-margin-right = 2 -font-0 = fixed:pixelsize=10;1 -font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = siji:pixelsize=10;1 + font-0 = fixed:pixelsize=10;1 + font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 + font-2 = siji:pixelsize=10;1 + font-3 = Font Awesome 5 Pro Regular:size=12 + font-4 = Font Awesome 5 Pro Light:size=12 + font-5 = Font Awesome 5 Pro Solid:size=12 + font-6 = Font Awesome 5 Brands:size=12 -modules-left = bspwm i3 -modules-center = mpd -modules-right = pulseaudio memory cpu eth temperature date powermenu + monitor = -tray-position = right -tray-padding = 2 + tray-position = right + tray-padding = 2 -wm-restack = bspwm -;wm-restack = i3 + wm-restack = bspwm +; wm-restack = i3 -;override-redirect = true +; override-redirect = true -scroll-up = bspwm-desknext -scroll-down = bspwm-deskprev + scroll-up = bspwm-desknext + scroll-down = bspwm-deskprev -cursor-click = pointer -cursor-scroll = normal + cursor-click = pointer + cursor-scroll = normal -[bar/secondary] -monitor = DVI-D-1 -width = 100% -height = 27 -;offset-x = 1% -;offset-y = 1% -radius = 0.0 -fixed-center = false -bottom = true +[bar/portalo-primary] + inherit = bar/base -background = ${colors.background} -foreground = ${colors.foreground} + monitor = HDMI-1 -line-size = 3 -line-color = #f00 + modules-left = bspwm i3 + modules-center = mpd + modules-right = pulseaudio memory cpu eth temperature date powermenu -border-size = 0 -border-color = #00000000 +[bar/portalo-secondary] + inherit = bar/base -padding-left = 0 -padding-right = 2 + monitor = DVI-D-1 -module-margin-left = 1 -module-margin-right = 2 + modules-left = bspwm i3 + modules-center = mpd + modules-right = pulseaudio memory cpu eth temperature date powermenu -font-0 = fixed:pixelsize=10;1 -font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = siji:pixelsize=10;1 + tray-position = none -modules-left = bspwm i3 -modules-center = mpd -modules-right = pulseaudio memory cpu eth temperature date powermenu +[bar/laptop-primary] + inherit = bar/base -wm-restack = bspwm -;wm-restack = i3 + monitor = eDP1 -;override-redirect = true - -scroll-up = bspwm-desknext -scroll-down = bspwm-deskprev - -cursor-click = pointer -cursor-scroll = normal + modules-left = bspwm i3 + modules-center = + modules-right = pulseaudio battery xbacklight memory cpu temperature wlan eth date powermenu [module/xwindow] -type = internal/xwindow -label = %title:0:30:...% + type = internal/xwindow + label = %title:0:30:...% [module/xkeyboard] -type = internal/xkeyboard -blacklist-0 = num lock + type = internal/xkeyboard + blacklist-0 = num lock -format-prefix = " " -format-prefix-foreground = ${colors.foreground-alt} -format-prefix-underline = ${colors.secondary} + format-prefix = " " + format-prefix-foreground = ${colors.foreground-alt} + format-prefix-underline = ${colors.secondary} -label-layout = %layout% -label-layout-underline = ${colors.secondary} + label-layout = %layout% + label-layout-underline = ${colors.secondary} -label-indicator-padding = 2 -label-indicator-margin = 1 -label-indicator-background = ${colors.secondary} -label-indicator-underline = ${colors.secondary} + label-indicator-padding = 2 + label-indicator-margin = 1 + label-indicator-background = ${colors.secondary} + label-indicator-underline = ${colors.secondary} [module/filesystem] -type = internal/fs -interval = 25 + type = internal/fs + interval = 25 -mount-0 = / + mount-0 = / -label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% -label-unmounted = %mountpoint% not mounted -label-unmounted-foreground = ${colors.foreground-alt} + label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% + label-unmounted = %mountpoint% not mounted + label-unmounted-foreground = ${colors.foreground-alt} [module/bspwm] -type = internal/bspwm + type = internal/bspwm -label-focused = %index% -label-focused-background = ${colors.background-alt} -label-focused-underline= ${colors.primary} -label-focused-padding = 2 + label-focused = %index% + label-focused-background = ${colors.background-alt} + label-focused-underline= ${colors.primary} + label-focused-padding = 2 -label-occupied = %index% -label-occupied-padding = 2 + label-occupied = %index% + label-occupied-padding = 2 -label-urgent = %index%! -label-urgent-background = ${colors.alert} -label-urgent-padding = 2 + label-urgent = %index%! + label-urgent-background = ${colors.alert} + label-urgent-padding = 2 -label-empty = %index% -label-empty-foreground = ${colors.foreground-alt} -label-empty-padding = 2 + label-empty = %index% + label-empty-foreground = ${colors.foreground-alt} + label-empty-padding = 2 -; Separator in between workspaces -; label-separator = | +; Separator in between workspaces +; label-separator = | [module/i3] -type = internal/i3 -format = -index-sort = true -wrapping-scroll = false + type = internal/i3 + format = + index-sort = true + wrapping-scroll = false -; Only show workspaces on the same output as the bar -;pin-workspaces = true +; Only show workspaces on the same output as the bar +; pin-workspaces = true -label-mode-padding = 2 -label-mode-foreground = #000 -label-mode-background = ${colors.primary} + label-mode-padding = 2 + label-mode-foreground = #000 + label-mode-background = ${colors.primary} -; focused = Active workspace on focused monitor -label-focused = %index% -label-focused-background = ${colors.background-alt} -label-focused-underline= ${colors.primary} -label-focused-padding = 2 +; focused = Active workspace on focused monitor + label-focused = %index% + label-focused-background = ${colors.background-alt} + label-focused-underline= ${colors.primary} + label-focused-padding = 2 -; unfocused = Inactive workspace on any monitor -label-unfocused = %index% -label-unfocused-padding = 2 +; unfocused = Inactive workspace on any monitor + label-unfocused = %index% + label-unfocused-padding = 2 -; visible = Active workspace on unfocused monitor -label-visible = %index% -label-visible-background = ${self.label-focused-background} -label-visible-underline = ${self.label-focused-underline} -label-visible-padding = ${self.label-focused-padding} +; visible = Active workspace on unfocused monitor + label-visible = %index% + label-visible-background = ${self.label-focused-background} + label-visible-underline = ${self.label-focused-underline} + label-visible-padding = ${self.label-focused-padding} -; urgent = Workspace with urgency hint set -label-urgent = %index% -label-urgent-background = ${colors.alert} -label-urgent-padding = 2 +; urgent = Workspace with urgency hint set + label-urgent = %index% + label-urgent-background = ${colors.alert} + label-urgent-padding = 2 -; Separator in between workspaces -; label-separator = | +; Separator in between workspaces +; label-separator = | [module/mpd] -type = internal/mpd -format-online = + type = internal/mpd + format-online = -icon-prev =  -icon-stop =  -icon-play =  -icon-pause =  -icon-next =  + icon-prev =  + icon-stop =  + icon-play =  + icon-pause =  + icon-next =  -label-song-maxlen = 25 -label-song-ellipsis = true + label-song-maxlen = 25 + label-song-ellipsis = true [module/xbacklight] -type = internal/xbacklight + type = internal/xbacklight -format =