Make polybar float

This commit makes polybar float instead of just cover the top portion of
the screen. In the future, it may be useful to easily change between
these designs, likely using separate bars for each layout.

This commit also adds a way to highlight and / or underline the
different modules.
This commit is contained in:
Donovan Glover 2018-03-06 23:42:48 -05:00
parent 7175867a54
commit cb2773f429
No known key found for this signature in database
GPG Key ID: 8FC5F7D90A5D8F4D

View File

@ -3,6 +3,7 @@
[color] [color]
background = ${xrdb:color0:#19171C} background = ${xrdb:color0:#19171C}
background-alt = ${xrdb:color8:#8B8792}
text = ${xrdb:color7:#8B8792} text = ${xrdb:color7:#8B8792}
highlight = ${xrdb:color2:#AF80AC} highlight = ${xrdb:color2:#AF80AC}
yellow = ${xrdb:color3:#AF80AC} yellow = ${xrdb:color3:#AF80AC}
@ -19,12 +20,25 @@ background = ${color.background}
font-0 = "Fira Mono:size=22" font-0 = "Fira Mono:size=22"
font-1 = "Noto Sans CJK JP:size=22" font-1 = "Noto Sans CJK JP:size=22"
height = 80 # NOTE: You may want to change height to 80 if you don't want float
# Also do a grep for 80 and change the other places as well
height = 90
padding-left = 2 padding-left = 2
padding-right = 2 padding-right = 2
module-margin = 1 module-margin = 1
border-bottom-color = ${color.text} border-color = ${color.text}
#border-bottom-size = 2 #border-color = BE${color.text}
# Make the bar float
# NOTE: offset-x should be the same as window_gap in your bspwmrc
offset-x = 50
offset-y = 30
# NOTE: width = screen resolution - offset-x * 2
width = 3740
# NOTE: border-size should be the same as border_width in your bspwmrc
border-size = 3
#line-size = 8
[module/bspwm] [module/bspwm]
type = internal/bspwm type = internal/bspwm
@ -33,12 +47,14 @@ pin-workspaces = true
label-focused-foreground = ${color.highlight} label-focused-foreground = ${color.highlight}
label-urgent-foreground = ${color.yellow} label-urgent-foreground = ${color.yellow}
label-occupied-foreground = ${color.text} label-occupied-foreground = ${color.text}
label-empty-foreground = ${color.text} label-empty-foreground = ${color.background-alt}
label-focused-padding = 2 label-focused-padding = 2
label-urgent-padding = 2 label-urgent-padding = 2
label-occupied-padding = 2 label-occupied-padding = 2
label-empty-padding = 2 label-empty-padding = 2
label-focused-underline = ${color.highlight}
ws-icon-0 = 1;一 ws-icon-0 = 1;一
ws-icon-1 = 2;二 ws-icon-1 = 2;二
ws-icon-2 = 3;三 ws-icon-2 = 3;三
@ -53,19 +69,28 @@ ws-icon-9 = 10;十
[module/cpu] [module/cpu]
type = internal/cpu type = internal/cpu
label = CPU: %percentage%% label = CPU: %percentage%%
#format-foreground = ${color.yellow}
#format-underline = ${color.yellow}
[module/ram] [module/ram]
type = internal/memory type = internal/memory
label = RAM: %gb_used% label = RAM: %gb_used%
#format-foreground = ${color.blue}
#format-underline = ${color.blue}
[module/date] [module/date]
type = internal/date type = internal/date
date = %d.%m.%y date = %d.%m.%y
#date = %B %d, %Y #date = %B %d, %Y
#date = %A
#format-foreground = ${color.yellow}
#format-underline = ${color.yellow}
[module/time] [module/time]
type = internal/date type = internal/date
date = %H:%M date = %H:%M
#format-foreground = ${color.blue}
#format-underline = ${color.blue}
[module/battery] [module/battery]
type = internal/battery type = internal/battery
@ -78,9 +103,16 @@ label-discharigng = %percentage%
[module/mpd] [module/mpd]
type = internal/mpd type = internal/mpd
#format-offline =
label-song-maxlen = 100
label-song-ellipsis = true
#format-online = <label-song> [<label-time>]
#format-online-foreground = ${color.text}
[module/volume] [module/volume]
type = internal/volume type = internal/volume
label-volume = VOL: %percentage%% label-volume = VOL: %percentage%%
#format-volume-foreground = ${color.highlight}
#format-volume-underline = ${color.highlight}
; vim:ft=dosini ; vim:ft=dosini