I have a bunch of workspaces in workspace 2.30.2 (I have no idea if that's old on not, it's what they gave me) It used to be that if I had a workspace switcher in the panel that only showed the current workspace and had it show the name, it would size itself so that it was big enough to display the name, and I was happy.

However, something changed (we moved from centOS 6.3 to centOS 6.6, but I'm not sure if that was the cause), and now the workspace switcher doesn't resize, and it's too small for my workspace names.

Is there a way to force the switcher to get wider? or is there a way to with a key-stroke have it display the current workspace name?

  • I can change the names, but the widget doesn't resize to show the whole text... – Brian Postow May 4 '15 at 21:19
  • Which widget? could you post a screenshot? – Peque May 6 '15 at 7:34
  • if you right-click the workspace switcher, does it have an option to "un/lock" the widget? If so, unlock it so that it can be moved/resized. Alternatively, move/resize the adjacent widgets so that your workspace switcher can be resized. (Just guessing, it's been a long while since I've used gnome-panel.) – michael May 7 '15 at 6:19

Following command gives the names of workspaces:-

gsettings get org.gnome.desktop.wm.preferences workspace-names

You can use xdotool:-

       xdotool - command-line X11 automation tool

       xdotool lets you programatically (or manually) simulate keyboard input and mouse activity, move and resize
       windows, etc. It does this using X11's XTEST extension and other Xlib functions.

       There is some support for Extended Window Manager Hints (aka EWMH or NetWM).  See the "EXTENDED WINDOW MANAGER
       HINTS" section for more information.

Some useful commands:-

  • xdotool get_num_desktops : Output the current number of desktops
  • xdotool get_desktop : Output the current desktop in view.

Thus, consider gsettings get org.gnome.desktop.wm.preferences workspace-names output like: ['Name1', 'Name2'] and xdotool get_desktop outputs 2 then you are currently on 2nd workspace of which name is Name2 .

Inaddition, wmctrl may also help you :-

       wmctrl - interact with a EWMH/NetWM compatible X Window Manager.

       wmctrl [ options | actions ]...

       wmctrl  is  a  command  that  can  be  used  to  interact with an X Window manager that is compatible with the
       EWMH/NetWM specification.  wmctrl can query the window manager for information, and it can request  that  cer‐
       tain window management actions be taken.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.