1

I have a Centos-6 machine with multiple openbox desktops configured (8 or 16). I have things running on each desktop.

I wish to have tint2 display always what workspace I am on.

I tried changing the taskbar mode to "multi_desktop" from "single_desktop" but this doesn't display what workspace I am currently on.

For tint2, how do you configure the taskbar to always display what workspace you are on?

1 Answer 1

3

The in-a-nutshell, solution:

  1. in your Openbox config (or other window manager), assign a name for each desktop (may require Openbox restart)
  2. 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.

  1. 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
  2. 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.

6
  • taskbar_distribute_size may help in that case, but you need to set the desktop names (in your window manager's config) as "1", "2" etc. and not "Desktop 1" or "Workspace 1" to take less space. Also taskbar_hide_if_empty can get you more space.
    – o9000
    Feb 10, 2017 at 10:25
  • @o9000 your suggestions are in regards to using "multi_desktop" or "single_desktop" mode too? Feb 10, 2017 at 14:16
  • Regarding "single_desktop" vs "multi_desktop": I chose taskbar_mode = single_desktop because I have 8 or 16 desktops and so the multi_desktop was not helpful. The multi_desktop mode splits the taskbar into N widgets where N is the number of desktops. And then inside each widget each GUI process is displayed. (When N is 2 or 4, the multi_desktop is helpful. But with N = 8 or 16 there isn't enough pixels to display all the processes in each desktop.) Feb 10, 2017 at 14:31
  • Do you really have so many applications running? As in one or more for each desktop? taskbar_distribute_size will collapse empty desktops, that's why I said it would help.
    – o9000
    Feb 10, 2017 at 18:09
  • I can't get this working with single_desktop. When I use multi_desktop there are labels for desktops I am not on but the one I'm using is hidden. When I use single_desktop there are no labels.
    – AnnanFay
    Oct 28, 2017 at 16:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .