O comando a seguir fornece os nomes das áreas de trabalho : -
gsettings get org.gnome.desktop.wm.preferences workspace-names
Você pode usar xdotool
: -
NAME
xdotool - command-line X11 automation tool
DESCRIPTION
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.
Alguns comandos úteis: -
-
xdotool get_num_desktops
: gera o número atual de desktops -
xdotool get_desktop
: exibe a área de trabalho atual na visualização.
Assim, considere gsettings get org.gnome.desktop.wm.preferences workspace-names
como: ['Name1', 'Name2']
e xdotool get_desktop
outputs 2
, então você está atualmente na segunda área de trabalho cujo nome é Name2
.
Além disso, wmctrl
também pode ajudá-lo: -
NAME
wmctrl - interact with a EWMH/NetWM compatible X Window Manager.
SYNOPSIS
wmctrl [ options | actions ]...
DESCRIPTION
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.