Reduce busyness of polybar on "low-res" screens
This commit is contained in:
		
							parent
							
								
									47a83eaeb5
								
							
						
					
					
						commit
						6172f45cc1
					
				
					 1 changed files with 73 additions and 5 deletions
				
			
		|  | @ -25,11 +25,19 @@ | |||
| 
 | ||||
|       IFS=$'\n' | ||||
|       for m in $(xrandr --query | grep " connected"); do | ||||
|         MONITOR=$(echo $m | cut -d" " -f1) | ||||
|         BARSUFFIX="" | ||||
| 
 | ||||
|         if [[ $m = *primary* ]]; then | ||||
|           MONITOR=$(echo $m | cut -d" " -f1) polybar --reload bottom_main & | ||||
|         else | ||||
|           MONITOR=$(echo $m | cut -d" " -f1) polybar --reload bottom & | ||||
|           BARSUFFIX=$BARSUFFIX"_main" | ||||
|         fi | ||||
| 
 | ||||
|         if [[ $m = *1920x* ]]; then | ||||
|           BARSUFFIX=$BARSUFFIX"_1920" | ||||
|         fi | ||||
| 
 | ||||
|         echo $BARSUFFIX | ||||
|         MONITOR=$MONITOR polybar --reload "bottom$BARSUFFIX" & | ||||
|       done | ||||
|     ''; | ||||
|     settings = { | ||||
|  | @ -73,6 +81,36 @@ | |||
|         scroll-down = "i3wm-wsprev"; | ||||
|       }; | ||||
| 
 | ||||
|       "bar/bottom_1920" = { | ||||
|         monitor = "\${env:MONITOR:}"; | ||||
|         bottom = true; | ||||
| 
 | ||||
|         radius = 0; | ||||
|         height = 25; | ||||
|         width = "100%"; | ||||
| 
 | ||||
|         padding = 1; | ||||
|         line-size = 3; | ||||
|         module-margin = 1; | ||||
| 
 | ||||
|         background = "\${colors.background}"; | ||||
|         foreground = "\${colors.foreground}"; | ||||
| 
 | ||||
|         font = [ | ||||
|           "fixed:pixelsize=14;1" | ||||
|           "unifont:fontformat=truetype:size=12:antialias=false;0" | ||||
|           "FontAwesome5Free-Solid:weight=heavy:size=12" | ||||
|           #"siji:pixelsize=14;1" | ||||
|         ]; | ||||
| 
 | ||||
|         modules-left = "hostname uptime bspwm i3"; | ||||
|         modules-center = "mpd"; | ||||
|         modules-right = "dirty volume wlan eth memory cpu battery date"; | ||||
| 
 | ||||
|         scroll-up = "i3wm-wsnext"; | ||||
|         scroll-down = "i3wm-wsprev"; | ||||
|       }; | ||||
| 
 | ||||
|       "bar/bottom_main" = { | ||||
|         monitor = "\${env:MONITOR:}"; | ||||
|         bottom = true; | ||||
|  | @ -103,6 +141,36 @@ | |||
|         scroll-down = "i3wm-wsprev"; | ||||
|       }; | ||||
| 
 | ||||
|       "bar/bottom_main_1920" = { | ||||
|         monitor = "\${env:MONITOR:}"; | ||||
|         bottom = true; | ||||
| 
 | ||||
|         radius = 0; | ||||
|         height = 25; | ||||
|         width = "100%"; | ||||
| 
 | ||||
|         padding = 1; | ||||
|         line-size = 3; | ||||
|         module-margin = 1; | ||||
| 
 | ||||
|         background = "\${colors.background}"; | ||||
|         foreground = "\${colors.foreground}"; | ||||
| 
 | ||||
|         font = [ | ||||
|           "fixed:pixelsize=14;1" | ||||
|           "unifont:fontformat=truetype:size=12:antialias=false;0" | ||||
|           "FontAwesome5Free-Solid:weight=heavy:size=12" | ||||
|           #"siji:pixelsize=14;1" | ||||
|         ]; | ||||
| 
 | ||||
|         modules-left = "hostname uptime bspwm i3"; | ||||
|         modules-center = "mpd"; | ||||
|         modules-right = "dirty volume wlan eth memory cpu battery date tray"; | ||||
| 
 | ||||
|         scroll-up = "i3wm-wsnext"; | ||||
|         scroll-down = "i3wm-wsprev"; | ||||
|       }; | ||||
| 
 | ||||
|       "module/tray" = { | ||||
|         type = "internal/tray"; | ||||
|       }; | ||||
|  | @ -119,7 +187,7 @@ | |||
|         label-mounted = "%mountpoint%%{F-} %free% of %total%"; | ||||
|         label-mounted-foreground = "\${colors.foreground-alt}"; | ||||
| 
 | ||||
|         bar-used-width = 5; | ||||
|         bar-used-width = 10; | ||||
|         bar-used-fill = "█"; | ||||
|         bar-used-empty = "█"; | ||||
|         bar-used-indicator = ""; | ||||
|  | @ -224,7 +292,7 @@ | |||
|         format = "<label> <bar-swap-used>"; | ||||
|         format-underline = "#256d7b"; | ||||
| 
 | ||||
|         bar-swap-used-width = 5; | ||||
|         bar-swap-used-width = 10; | ||||
|         bar-swap-used-fill = "█"; | ||||
|         bar-swap-used-empty = "█"; | ||||
|         bar-swap-used-indicator = ""; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue