It is not possible to configure i3bar
to not show specific workspaces. You could hide all workspace buttons with workspace_buttons no
in the bar configuration, but that's in all likelihood not what you want.
You could move your browser and music player to scratchpad windows. Perhaps like this:
for_window [class="^BrowserName$"] move scratchpad
bindsym $mod+b [class="^BrowserName$"] scratchpad show
This moves any browser window with class "BrowserName" to a scratchpad window and with $mod+b you can switch it on and off.
Obviously this depends on the browser used, for Firefox it would be "Firefox". You can use xprop to get the class name. It is one of the values of WM_CLASS (for me, only the second one, with upper case characters, works)
If you don't want to move every browser window to a scratchpad you could bind an extra key for moving a specific window there:
bindsym $mod+Shift+b mark browser; [con_mark="^browser$"] move scratchpad
bindsym $mod+b [con_mark="^browser$"] scratchpad show
This marks the current window and moves it to a scratchpad. The mark is also used to toggle the visible state. (Note: only one window may have a specific mark. If a already present mark is set on a window it is unset from the other window)
Using scratchpad has some drawbacks:
- On the initial move to scratchpad the window is resized to 50% of the screen width and 75% of the height, but resizing is possible and the new size is remembered during visibility toggles.
- It is a floating window (after all, we do use i3 for a reason, don't we)
- When having several scratchpad windows matching the same criteria (class, title) each window is toggled at the same time. Cycling through all windows seems only possible with the vanilla
scratchpad show
(Without criteria. It shows one scratchpad on the first call, then hides it on the next. If called once again it shows the next scratchpad.)
On the plus side:
- Does not take up space on the i3bar.
- You have access to your browser window on every workspace.
If scratchpad is not for you and you only want to save space on the i3bar, I'd suggest using a single character for the workspace names. If you don't like names like 'B' you could always use " " or any other character with low visual impact (Unicode provides ;) ) so that the buttons are not that visible.