From 8edbaa50248c701580a6b78bacb31c38e3b2eb43 Mon Sep 17 00:00:00 2001 From: JaeYoo-Im Date: Mon, 8 Apr 2024 20:40:30 +0900 Subject: [PATCH] bspwm : polybar dual monitor --- .config/bspwm/bspwmrc | 3 +- .config/polybar/config.ini | 170 ++++++++++++++----------------------- 2 files changed, 66 insertions(+), 107 deletions(-) diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index 42d7dfb..0fd1892 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -75,6 +75,5 @@ bspc rule -a \* state=tiled if [[ $JUPCID == "HWDEV" ]]; then polybar panel-bspwm --config=~/.config/polybar/config.ini else - polybar panel-bspwm + polybar panel-bspwm-1 & polybar panel-bspwm-2 fi -#polybar panel-bspwm-2 diff --git a/.config/polybar/config.ini b/.config/polybar/config.ini index fcff1a3..0af1bef 100644 --- a/.config/polybar/config.ini +++ b/.config/polybar/config.ini @@ -1,8 +1,6 @@ #################################################################################################### ## Global Settings #################################################################################################### - - [global/wm] margin-top = 0 margin-bottom = 0 @@ -324,6 +322,69 @@ tray-background = ${colors.background} scroll-up = bspwm-desknext scroll-down = bspwm-deskprev +#################################################################################################### +## BSPWM PANEL1 +#################################################################################################### +[bar/panel-bspwm-1] +monitor = DP-4 +;monitor-fallback = HDMI1 +width = 100% +height = 20 +;offset-x = 1% +;offset-y = 1% +radius = 0.0 +fixed-center = true +bottom = false +separator = + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 2 +line-color = #f00 + +wm-restack = bspwm +override-redirect = true + +; Enable support for inter-process messaging +; See the Messaging wiki page for more details. +enable-ipc = true + +border-size = 0 +;border-left-size = 0 +;border-right-size = 25 +;border-top-size = 0 +;border-bottom-size = 25 +border-color = #00000000 + +padding-left = 1 +padding-right = 1 + +module-margin-left = 0 +module-margin-right = 0 + +font-0 = "Ubuntu:style=Bold:size=9;2" +font-1 = "UbuntuMono Nerd Font:style=Bold:size=18;3" +font-2 = "Font Awesome 6 Free:style=Regular:pixelsize=8;1" +font-3 = "Font Awesome 6 Free:style=Solid:pixelsize=8;1" +font-4 = "Font Awesome 6 Brands:pixelsize=8;1" + +modules-left = bspwm xwindow +modules-center = +modules-right = kernel cpu2 memory2 filesystem date networkspeed pacman-updates volume + +tray-detached = false +tray-offset-x = 0 +tray-offset-y = 0 +tray-position = right +tray-padding = 4 +tray-maxsize = 20 +tray-scale = 1.0 +tray-background = ${colors.background} + +scroll-up = bspwm-desknext +scroll-down = bspwm-deskprev + #################################################################################################### ## BSPWM PANEL2 #################################################################################################### @@ -463,16 +524,6 @@ enable-scroll = true reverse-scroll = true pin-workspaces = true -#ws-icon-0 = 1;1: dev -#ws-icon-1 = 2;2: www -#ws-icon-2 = 3;3: sys -#ws-icon-3 = 4;4: doc -#ws-icon-4 = 5;5: vbox -#ws-icon-5 = 6;6: chat -#ws-icon-6 = 7;7: mus -#ws-icon-7 = 8;8: vid -#ws-icon-8 = 9;9: gfx -#ws-icon-9 = 10; ws-icon-0 = 1;1 ws-icon-1 = 2;2 ws-icon-2 = 3;3 @@ -568,30 +619,6 @@ content-font = 2 content-foreground = #8b62a9 content-background = #668bd7 -[module/arch-aur-updates] -type = custom/script -exec = ~/.config/polybar/scripts/check-all-updates.sh -interval = 1000 -label = Updates: %output% -format-prefix = "🗘 " -format-prefix-foreground = ${colors.color2} -format-foreground = ${colors.color2} -format-background = ${colors.background} -format-underline = ${colors.color2} -format-margin = 2 -format-padding = 0 - -[module/aur-updates] -type = custom/script -exec = cower -u | wc -l -interval = 1000 -label = Aur: %output% -format-foreground = ${colors.foreground} -format-background = ${colors.background} -format-prefix = "🗘 " -format-prefix-foreground = #FFBB00 -format-underline = #FFBB00 - [module/backlight-acpi] inherit = module/xbacklight type = internal/backlight @@ -901,14 +928,6 @@ format-underline = ${colors.color2} format-margin = 2 format-padding = 0 -[module/jgmenu] -type = custom/script -interval = 120 -exec = echo "ArcoLinux" -click-left = "jgmenu_run >/dev/null 2>&1 &" -format-foreground = ${colors.foreground} -format-background = ${colors.background} - [module/load-average] type = custom/script exec = uptime | grep -ohe 'load average[s:][: ].*' | awk '{ print $3" "$4" "$5"," }' | sed 's/,//g' @@ -1006,7 +1025,7 @@ type = internal/network ;interface = wlp3s0 ;interface = enp14s0 ;interface = enp0s31f6 -interface = enp6s0 +interface = enp10s0 label-connected = "%upspeed:7% ↓ %downspeed:7%" format-connected = format-connected-prefix = "↑ " @@ -1089,17 +1108,6 @@ label = %output% format-prefix = "  " format-prefix-foreground = #FFBB00 -[module/release] -type = custom/script -exec = (lsb_release -d | awk {'print $2'} ;echo " "; lsb_release -r | awk {'print $2'}) | tr -d '\n' -interval = 6000 - -format-foreground = ${colors.foreground} -format-background = ${colors.background} -format-prefix = "  " -format-prefix-foreground = #62FF00 -format-underline = #62FF00 - [module/sep] ; alternative separator type = custom/text @@ -1109,21 +1117,6 @@ content-background = ${colors.background} format-foreground = ${colors.foreground} format-background = ${colors.background} -[module/spotify] -;https://github.com/NicholasFeldman/dotfiles/blob/master/polybar/.config/polybar/spotify.sh -type = custom/script -exec = ~/.config/polybar/scripts/spotify1.sh -interval = 1 - -;format =