settings.nix (2844B)
1 { config, ... }: 2 3 let 4 background = config.polybar.colours.background; 5 background-alt = config.polybar.colours.background-alt; 6 foreground = config.polybar.colours.foreground; 7 foreground-alt = config.polybar.colours.foreground-alt; 8 alert = config.polybar.colours.alert; 9 10 in 11 { 12 # Bars 13 "bar/bar" = { 14 font-0 = "HackNerdFont:size=10:antialias=true#3"; 15 16 height = 25; 17 18 background = background; 19 20 wm-restack = "bspwm"; 21 22 padding = 2; 23 24 line-size = 2; 25 26 modules-left = "bspwm"; 27 modules-center = "date"; 28 modules-right = "battery"; 29 }; 30 # Modules 31 32 "module/bspwm" = { 33 type = "internal/bspwm"; 34 35 label-focused = "%index%"; 36 #label-focused = ""; 37 label-focused-background = background-alt; 38 label-focused-underline = config.polybar.colours.wm-underline; 39 label-focused-padding = 2; 40 41 label-occupied = "%index%"; 42 #label-occupied = ""; 43 label-occupied-padding = 2; 44 45 label-urgent = "%index%!"; 46 #label-urgent = ""; 47 label-urgent-background = alert; 48 label-urgent-padding = 2; 49 50 label-empty = "%index%"; 51 #label-empty = ""; 52 label-empty-foreground = foreground-alt; 53 label-empty-padding = 2; 54 55 # Separator in between workspaces 56 #label-separator = "|"; 57 }; 58 59 "module/date" = { 60 type = "internal/date"; 61 interval = 1; 62 63 date = ""; 64 time = "%H:%M"; 65 66 date-alt = "%d/%m/%y"; 67 time-alt = "%H:%M:%S"; 68 69 label = "%date% %time%"; 70 71 format = " <label>"; 72 #format-background = background-alt; 73 format-underline = config.polybar.colours.date-underline; 74 format-padding = 2; 75 }; 76 77 "module/battery" = { 78 type = "internal/battery"; 79 battery = "BAT0"; 80 adapter = "ADP1"; 81 poll_interval = 5; 82 83 format-charging = "<ramp-capacity> <label-charging>"; 84 #format-charging-background = background-alt; 85 format-charging-underline = config.polybar.colours.battery-underline; 86 format-charging-padding = 2; 87 88 format-discharging = "<ramp-capacity> <label-discharging>"; 89 #format-discharging-background = background-alt; 90 format-discharging-underline = config.polybar.colours.battery-underline; 91 format-discharging-padding = 2; 92 93 format-full = "<ramp-capacity> <label-full>"; 94 #format-full-background = background-alt; 95 format-full-underline = config.polybar.colours.battery-underline; 96 format-full-padding = 2; 97 98 ramp-capacity-0 = " "; 99 ramp-capacity-1 = " "; 100 ramp-capacity-2 = " "; 101 ramp-capacity-3 = " "; 102 ramp-capacity-4 = " "; 103 }; 104 105 "settings" = { 106 screenchange-reload = true; 107 #compositing-background = xor 108 #compositing-background = screen 109 #compositing-foreground = source 110 #compositing-border = over 111 #pseudo-transparency = false 112 }; 113 114 "global/wm" = { 115 margin-top = 5; 116 margin-bottom = 5; 117 }; 118 # vim:ft=dosini 119 }