Skip to content

Instantly share code, notes, and snippets.

@ghifarit53
Last active November 6, 2023 20:54
Show Gist options
  • Save ghifarit53/dd3916f838a8a00237910f6e051e73cb to your computer and use it in GitHub Desktop.
Save ghifarit53/dd3916f838a8a00237910f6e051e73cb to your computer and use it in GitHub Desktop.
fancybar config
[colors]
black = #1A1D45
bblack = #2c3073
white = #D7B7BB
red = #FF4EA5
green = #7EB564
yellow = #F5B569
blue = #7A89EC
magenta = #B66CDC
cyan = #6CAC99
[bar/mainbar]
monitor = "eDP-1"
background = ${colors.black}
foreground = ${colors.white}
font-0 = JetBrains Mono:size=9;3
font-1 = Font Awesome 5 Free Solid:size=8;3
font-2 = Font Awesome 5 Brands:size=8;3
font-3 = Sans:size=5;3
wm-restack = bspwm
border-size = 5
border-color = ${colors.black}
height = 20
modules-left = bspwm
modules-right = wtitle s music s network s bat s vol s date s time
[module/s]
type = custom/text
content = "%{T4} %{T-}"
content-background = ${colors.black}
[module/wtitle]
type = internal/xwindow
label = "%title% "
label-empty = "Desktop "
label-maxlen = 40
[module/bspwm]
type = internal/bspwm
format = <label-state>
label-occupied-foreground = ${colors.white}
label-focused-foreground = ${colors.black}
label-empty-foreground = ${colors.bblack}
label-occupied-background = ${colors.bblack}
label-focused-background = ${colors.white}
label-focused = "%icon% %name%"
label-occupied = "%icon% %name%"
label-empty = "%icon% %name%"
label-focused-padding = 1
label-occupied-padding = 1
label-empty-padding = 1
label-separator = "%{T4} %{T-}"
ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
[module/music]
type = internal/mpd
host = 127.0.0.1
port = 6600
format-online = <label-song>
format-playing = ${self.format-online}
format-paused = ${self.format-online}
format-stopped = ${self.format-online}
format-offline = ${self.label-offline}
label-song = "  %artist% - %title% "
label-offline = "  Offline "
label-song-foreground = ${colors.black}
label-song-background = ${colors.green}
format-offline-foreground = ${colors.black}
format-offline-background = ${colors.green}
[module/vol]
type = internal/pulseaudio
sink = alsa_output.pci-0000_00_1b.0.analog-stereo
format-volume = <label-volume>
format-muted = <label-muted>
label-muted = "  Muted "
label-volume = "  %percentage%% "
format-volume-background = ${colors.blue}
format-volume-foreground = ${colors.black}
format-muted-background = ${colors.blue}
format-muted-foreground = ${colors.black}
[module/bat]
type = internal/battery
bat = BAT0
adapter = ADP0
format-charging = <label-charging>
format-discharging = <label-discharging>
label-discharging = "  %percentage%% "
label-charging = "  %percentage%% "
label-discharging-background = ${colors.magenta}
label-charging-foreground = ${colors.black}
label-charging-background = ${colors.magenta}
label-discharging-foreground = ${colors.black}
[module/network]
type = internal/network
interface = wlp2s0
label-disconnected = "  No wifi "
label-connected = "  %essid% "
label-connected-foreground = ${colors.black}
label-connected-background = ${colors.red}
label-disconnected-foreground = ${colors.black}
label-disconnected-background = ${colors.red}
[module/date]
type = internal/date
format-foreground = ${colors.black}
format-background = ${colors.cyan}
date = "  %a, %b %d "
[module/time]
type = internal/date
format-foreground = ${colors.black}
format-background = ${colors.yellow}
date = "  %H:%M "
@SoftVibes
Copy link

How do you get the top and bottom padding for each module? I am talking about the tiny space above and below each module.

@ghifarit53
Copy link
Author

hi @SoftVibes! Sorry for the late reply
Honestly I can't really remember as I haven't touched my polybar config for over a year, but I'm pretty certain it comes from border-size option in the bar/mainbar section. Let me know if it works for you

@Suavevillain
Copy link

This post helped me a ton at least get basic understanding of what I'm doing a bit more thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment