The in-a-nutshell, solution:
- in your Openbox config (or other window manager), assign a name for each desktop (may require Openbox restart)
- in your
tint2rc
.
# enable a text label widget that displays in the tint2 taskbar
taskbar_name = 1
# choose a color for the font that differs from the background
taskbar_name_font_color = #0005ff 100
The longer story:
After reading the tint2 documentation/wiki, I tried doing just taskbar_name = 1
. But I failed to see any label for the desktop.
Fortunately I discovered that there is a tint2conf
GUI application that shows all the tint2 config options and allows you to "apply" and "save" your changes to your tint2 config file. I experimented a bunch and eventually found something that worked.
- make sure each desktop/workspace has a string name
- in my case, I am using Openbox
- copy the Openbox config file from the system installed location to
$HOME/.config/openbox/rc.xml
and navigate the to the xml element named <desktops>
where you need to
- navigate to the
<number>
and choose a positive value N
- navigate to the
<names>
and create a new xml element <name>
for each of the N
desktops
- if there is no
<name>
for each desktop --> then tint2
will get an empty string and display an empty string --> then will be unable to tell what desktop/workspace you are on (i.e. bad)
- make sure to restart Openbox before messing with
tint2
- edit the
tint2
config
- when
tint2
starts it copies the tint2rc config file to your user's home at location: $HOME/.config/tint2/tint2rc
- edit the
tint2rc
--> navigate to the section starting with the comment # Taskbar
--> make sure the following key/value pairs are in the config
.
taskbar_name = 1
taskbar_name_font_color = #0005ff 100
- restart
tint2
(I killed the tint2
process then started it again in the background with nohup
)
- verify visually you can see the name of the desktop you are on
- done
The reason I failed initially was because I only enabled the taskbar_name
and the default font color was the same as the background --> so I couldn't see the text.
Once I picked a color, red in this example, that was different from the background I was able to see the desktop name.