ice-wm / icewm

IceWM releases only, see Wiki
https://github.com/ice-wm/icewm/releases
Other
289 stars 16 forks source link

Workspace names not setting #2

Closed RobChrystie closed 2 years ago

RobChrystie commented 5 years ago

I'm currently trying to set the workspace names in 1.5.3. In my preferences file I set

WorkspaceNames="1", "2", "3", "4"

and they display as "Workspace 1" "Workspace 2" "Workspace 3" and 'Workspace 4" in the taskbar. In the previous version we were using (1.3.8) the workspaces would display properly in the taskbar.

gijsbers commented 5 years ago

In the source I can't find anything which could do this. What happens if you change it to become:

WorkspaceNames="  Abcdef  ", "  0123  ",   " +*!  "

What happens if you comment it out? Not setting it.

From which distribution did you create your system?

RobChrystie commented 5 years ago

If I set it to WorkspaceNames=" Abcdef ", " 0123 ", " +*! " I get "Workspace 1" "Workspace 2" and "Workspace 3"

If I comment it out I get just "Workspace 1"

Seems to setting the correct number of workspaces just not naming them properly.

I'm using RHEL 7.6

RobChrystie commented 5 years ago

I started icewm-session on the command line: xinit /usr/bin/icewm-session -- :2 vt2 and the workspaces showed properly with what you had me set them to. Weird? This does not work however at startup. Wonder why?

gijsbers commented 5 years ago

Are you sure PATH is the same in both cases and that it runs the same executables? Was the 1.3.8 release fully removed before installing 1.5.3? Could it be that WorkspaceNames is somehow defined multiple times? I notice now there is an issue with defining it more than once.

gijsbers commented 5 years ago

The reason why you see these unexpected names is because something else sets them on the root window before your icewm-session is started. To prove this you could do:

xprop -root -remove _NET_DESKTOP_NAMES -remove _WIN_WORKSPACE_NAMES
icesh restart

If this is the case you need to run it from env file. See icewm-env(1). icewm has the curious habit of wanting to adopt existing workspace names on startup.

RobChrystie commented 5 years ago

I'm almost positive that 1.3.8 was completely removed. After running rpm -e icewm --nodeps I checked in /usr/bin for any ice binaries and made sure /etc/icewm and /usr/share/icewm was empty before installing the 1.5.3 I built.

As far as I know the PATH is the same and that its running the same executable. I will look into this more.

Running those commands puts the correct namespace names. What do I need to add to the env file?

gijsbers commented 5 years ago

To me that confirms that something else was setting those names before icewm-session starts.

For the env trick to work your icewm needs to be configured with wordexp support. Check icewm --configured. Then add some shell command expansion to the env file like

zzz=`xprop -root -remove _NET_DESKTOP_NAMES -remove _WIN_WORKSPACE_NAMES`

Experiment a bit and check the icewm-env man page.

You could also run this command before you start icewm-session. That would be cleaner actually.

It would still be interesting to know what is setting those old names.

RobChrystie commented 5 years ago

Thanks this "hack" worked! Not sure what is setting the workspace names prior to icewm-session but we are content with this work around.

Code7R commented 5 years ago

What are the remaining TODOs here? @RobChrystie if improving documentation is something you expect the please pinpoint at the exact locations, otherwise please close this ticket, or tell us what to do with it otherwise.