I have just switched from the default i3 bar to using polybar (running Fedora 30, i3-gaps). I installed polybar following this guide: https://computingforgeeks.com/install-polybar-status-bar-on-fedora/ .
I first tried running the default configuration for polybar and it worked except there was nothing on the left where the workspaces should be. I played around a bit to try to get the to work, but nobody in any forums I came across seemed to have a similar situation.
I ended up copying the polybar config given in this answer, as they seemed to set up their workspaces in the i3 config the same way that I have: https://computingforgeeks.com/install-polybar-status-bar-on-fedora/ , but the result was the same - no workspace module appearing on my polybar.
My polybar config file is:
[global/wm]
margin-top = 100
margin-bottom = 100
[colors]
fg = ${xrdb:color7}
modfg = ${xrdb:color1}
bg = ${xrdb:color0}
white = #d1d1d1
gray = #585858
black = #ce1d1d1d
red = #c795ae
blue = #95aec7
yellow = #c7ae95
green = #aec795
[bar/bar1]
width = 100%
height = 41
top = true
;margin-top = 100
border-top-size = 1 # creating top border space
offset-y = -3 # aligning tray icons with rest of bar
monitor = ${env:MONITOR:}
;background = #141021
background = #000f0f0f # This is the hexcode for transparency (also used in powermenu)
foreground = #c4b7c5
fixed-center = false
font-0 = FontAwesome:pixelsize=10;0
font-1 = PragmataPro Nerd Font:pixelsize=10;0
font-2 = "Font Awesome 5 Free:style=Regular:pixelsize=10;1"
font-3 = "Font Awesome 5 Free:style=Solid:pixelsize=10;1"
font-4 = "Font Awesome 5 Brands:pixelsize=10;1"
modules-left = i3
modules-center = date
modules-right = wireless-network cpu memory filesystem temperature pulseaudio backlight battery powermenu
tray-position = right
;tray-maxsize = 41
tray-background = #000f0f0f
tray-foreground= #000f0f0f
scroll-up = i3wm-wsnext
scroll-down = i3wm-wsprev
overline-size = 2
overline-color = ${colors.white}
underline-size = 4
underline-color = ${colors.white}
;override-redirect = true
;wm-restack = i3
[module/i3]
type = internal/i3
pin-workspaces = false
strip-wsnumbers = true
index-sort = false
enable-scroll = false
format =
format-padding-right = 2
label-unfocused-foreground = #8a7f8f
label-unfocused-padding = 1
label-focused-foreground = #c16772
label-focused-padding = 1
label-urgent-foreground = #e4b226
label-urgent-padding = 1
[module/filesystem]
type = internal/fs
; Mountpoints to display
mount-0 = /
label-mounted = %free%
format-mounted-padding = 2
; Seconds to sleep between updates
; Default: 30
; interval = 10
; Display fixed precision values
; Default: false
fixed-values = true
; Spacing between entries
; Default: 2
spacing = 6
[module/filesystem2]
type = internal/fs
; Mountpoints to display
mount-0 = /media//Data
label-mounted = %free%
format-mounted-padding = 2
; Seconds to sleep between updates
; Default: 30
; interval = 10
; Display fixed precision values
; Default: false
fixed-values = true
; Spacing between entries
; Default: 2
spacing = 6
[module/cpu]
type = internal/cpu
interval = 1
format =
format-padding = 2
label = %percentage%%
[module/memory]
type = internal/memory
interval = 1
format =
format-padding = 2
label = %gb_used% (%percentage_used%%)
[module/temperature]
type = internal/temperature
interval = 1
thermal-zone = 0
warn-temperature = 74
format =
format-padding = 2
format-warn =
format-warn-padding = 2
label = %temperature-c%
label-warn = %temperature-c%
label-warn-foreground = #e4b226
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
[module/date]
type = internal/date
interval = 1
date = %a %b %d,
time = %H:%M:%S
date-alt = %A, %d %B %Y
time-alt = %H:%M:%S
format =
format-padding = 2
label = %date% %time%
[module/battery]
; Note - if battery isn't showing, try BAT0 or BAT1, etc.
type = internal/battery
full-at = 95
battery = BAT1
adapter = ACAD
poll-interval = 5
format-charging =
format-charging-padding = 2
format-discharging =
format-discharging-padding = 2
format-full =
format-full-padding = 2
label-charging = %percentage%%
label-discharging = %percentage%%
label-full = %percentage%%
ramp-capacity-0 =
ramp-capacity-1 =
ramp-capacity-2 =
ramp-capacity-3 =
ramp-capacity-4 =
animation-charging-0 =
animation-charging-1 =
animation-charging-2 =
animation-charging-3 =
animation-charging-4 =
animation-charging-framerate = 500
[module/backlight]
type = internal/backlight
card = intel_backlight
format =
format-padding = 2
label = %percentage%%
[module/pulseaudio]
type = internal/pulseaudio
; List sinks via pactl list sinks
and look at the Name field
sink = alsa_output.pci-0000_00_1b.0.analog-stereo
;interval = 1
format-volume-padding = 2
format-volume =
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
format-muted-padding = 2
label-muted = 0%
[module/powermenu]
type = custom/menu
label-open =
label-close = cancel
label-close-background = #000f0f0f
label-close-foreground = #ffeefc
label-open-padding-left = 4
label-open-padding-right = 3
label-close-padding = 3
menu-0-0 = lock
menu-0-0-exec = ~/scripts/lock.sh
menu-0-0-background = #000f0f0f
menu-0-0-foreground = #c05c47
menu-0-0-padding-right = 3
menu-0-1 = reboot
menu-0-1-exec = menu-open-1
menu-0-1-background = #000f0f0f
menu-0-1-foreground = #c05c47
menu-0-1-padding-right = 3
menu-0-2 = power off
menu-0-2-exec = menu-open-2
menu-0-2-background = #000f0f0f
menu-0-2-foreground = #c05c47
menu-0-2-padding-right = 3
menu-1-0 = reboot?
menu-1-0-exec = reboot
menu-1-0-background = #000f0f0f
menu-1-0-foreground = #e4b226
menu-1-0-padding-right = 3
menu-2-0 = power off?
menu-2-0-exec = poweroff
menu-2-0-background = #000f0f0f
menu-2-0-foreground = #e4b226
menu-2-0-padding-right = 3
[module/wireless-network]
type = internal/network
; Look at ifconfig for interface
interface = wlo1
format-connected =
format-connected-padding = 2
format-disconnected =
format-disconnected-padding = 2
label-connected = %essid%
label-disconnected = None
And my i3 config is:
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:System San Francisco Display 10
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec gnome-terminal #i3-sensible-terminal
#start a browser
bindsym $mod+numbersign exec firefox
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1:"
set $ws2 "2:"
set $ws3 "3:"
set $ws4 "4:"
#set $ws5 "5:a"
set $ws6 "6:"
set $ws7 "7:"
set $ws8 "8:"
set $ws9 "9:"
set $ws10 "10:"
set $ws11 "11:"
#set $ws1 "1"
#set $ws2 "2"
#set $ws3 "3"
#set $ws4 "4"
set $ws5 "5"
#set $ws6 "6"
#set $ws7 "7"
#set $ws8 "8"
#set $ws9 "9"
#set $ws10 "10"
#set $ws11 "11"
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $mod+Control+1 workspace $ws11
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
bindsym $mod+Shift+Control+1 move container to workspace $ws11
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
set $bg-color #44444480
set $inactive-bg-color #44444480
set $text-color #f3f4f5
set $inactive-text-color #676E7D
set $urgent-bg-color #E53935
set $ws-focused-bg #ffc553
# window colors
# border background text indicator
client.focused $bg-color $bg-color $text-color #00ff00
client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.urgent $urgent-bg-color $urgent-bg-color $text-color #00ff00
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
#bar {
# strip_workspace_numbers yes
# status_command i3status
# colors {
# background $bg-color
# separator #757575
## border background text
# focused_workspace $ws-focused-bg $ws-focused-bg $text-color
# inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color
# urgent_workspace $urgent-bg-color $urgent-bg-color $text-color
# }
#}
exec_always --no-startup-id $HOME/.config/polybar/launch.sh
exec compton -f -I 0.06 -O 0.6
#GAPS!!!
gaps inner 10
for_window [class=".*"] border pixel 0
#touchpad touch-ups:
exec_always "~/.config/i3/touchpad_options"
#key swaps:
exec_always ~/.config/i3/key_mappings
#media
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 10 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 10 # decrease screen brightness
# Media player controls
bindsym XF86AudioPlay exec playerctl play-pause
#bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
#HARRY'S COMMANDS:
#desktop background
exec_always feh --bg-fill ~/Pictures/desktop-photos/roundabout-darkened.png
#lock shortcut:
bindsym $mod+shift+x exec i3lock -c 222222
#set dpi for i3 toolbars
exec_always xrdb -merge ~/.Xresources
exec_always xrandr --dpi 120
EDIT:
Done some more troubleshooting and figured out that the issue is in my installation of polybar. If I run it from terminal it tells me that I have no built-in support for internal/i3.
The command polybar -v gives me:
polybar 3.3.0-101-gf0c65e6
Features: +alsa +curl -i3 +mpd +network(libnl) +pulseaudio +xkeyboard
Although this is exactly what the guide (linked above, which claimed to be for installation for i3wm on Fedora) told me I should get as the output, it appears that the -i3 (logically) means it lacks i3 support (ref: https://github.com/polybar/polybar/issues/526) . I don't exactly know how to perform the installation correctly, but I will uninstall polybar and look for some better documentation on how to do it.
Asked by Harry Cooke
(51 rep)
Jul 19, 2019, 04:33 PM
Last activity: Jul 18, 2025, 10:06 AM
Last activity: Jul 18, 2025, 10:06 AM