The officially official Devuan Forum!

You are not logged in.

#1 2020-06-19 14:50:47

HevyDevy
Member
Registered: 2019-09-06
Posts: 263  

desktop / workspaces

How would one find out what desktop or workspaces are currently in use except for the desktop/workspace in use.

Like for example im using workspace 1 and have xterm open there on screen and then i have say two more xterms open in 2 and 3. I want information on workspaces/desktops 2 and 3 not on screen via the terminal.

xdotool and wmctrl seem to only display info on currently showing or active desktop in use.

Ive been through the manpages on both and cant figure it out, any ideas?

Im trying to hack something together which is pretty cool and im nearly there.

edit: better terminology "list inactive desktops that have programs running"

Last edited by HevyDevy (2020-06-19 15:00:23)


When all the trees have been cut down, when all the animals have been hunted, when all the waters are polluted, when all the air is unsafe to breathe, only then will you discover you cannot eat money.
~ Cree Prophecy

Offline

#2 2020-06-19 16:36:01

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 55  

Re: desktop / workspaces

The "Windows Quick List" applet in Cinnamon shows this information (list of names and an icon, by Workspace).
I've never found any source code for these applets though.

Online

#3 2020-06-19 23:48:11

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 431  

Re: desktop / workspaces

Hmm wmctrl -l gives me a list of all windows across all workspaces, detailing window id, workspace number (with a - in some cases for some reason), host name(?), and window title.

Offline

#4 2020-06-20 06:56:43

HevyDevy
Member
Registered: 2019-09-06
Posts: 263  

Re: desktop / workspaces

Thanks Marjorie, i might have to see how some desktop environments do it.

thanks ralph but im interested in someway to list inactive desktops that are being used but hidden from view, similar to how dwm status bar shows all workspaces 1 - 9 but shows you inactive workspaces being used.

I believe wmctrl -l will just list active workspaces but not what workspace number is being used

So right now i have open workspace 1,2 and 9. 1 and 2 have the x-terminal-emulator open and 9 has firefox open.

0x00c00006  0 hostname st
0x00e00006  0 hostname st
0x01200003  0 hostname desktop / workspaces / Off-topic / Dev1 Galaxy Forum - Mozilla Firefox

it would be nice if wmctrl listed the inactive workspace numbers in above output.

Anyhow just curious and the more i think about what i want to achieve with tint2 the more i dont think it is possible. But ill show what ive done so far soon.

Edit: it also might be the window manager im using not having valid/compliant properties.

Last edited by HevyDevy (2020-06-20 07:07:40)


When all the trees have been cut down, when all the animals have been hunted, when all the waters are polluted, when all the air is unsafe to breathe, only then will you discover you cannot eat money.
~ Cree Prophecy

Offline

#5 2020-06-20 07:29:02

ralph.ronnquist
Administrator
From: Clifton Hill, Victoria, AUS
Registered: 2016-11-30
Posts: 431  

Re: desktop / workspaces

Hmm for me it is like:

stolpe% wmctrl -l
0x01000004 -1 stolpe xfce4-panel
0x01200003 -1 stolpe Desktop
0x03000003 -1 stolpe 
0x03400010 -1 stolpe logs - ralph.ronnquist@realthing.com.au - Mozilla Thunderbird
0x030010c7  0 stolpe 
0x02e00003 -1 stolpe gworldclock
0x030013d8  0 stolpe files
0x0360007f  0 stolpe desktop / workspaces / Off-topic / Dev1 Galaxy Forum - Pale Moon
0x0300341e  4 stolpe hello
0x03200003  4 stolpe Xfburn
0x03a00017  3    N/A TkDiff 4.1.4

It appears the second column is the _NET_WM_DESKTOP property of the windows; "-1" means that the window is to be shown on all workspaces, and otherwise it's the workspace where the window is shown. At that time, my monitors show workspace 0.

This is not cinnamon though; it might use some other window property, or it might keep that information elsewhere. The use of _NET_WM_DESKTOP property is in the wm-spec "standard", e.g. at https://specifications.freedesktop.org/ … 6085202544
but there's no compelling reason for cinnamon to  adhere to that standard.

Offline

#6 2020-06-20 10:16:22

HevyDevy
Member
Registered: 2019-09-06
Posts: 263  

Re: desktop / workspaces

I see, so my issue is with dwm as it is not compliant for _NET_WM_DESKTOP.

Ive discovered a new dwm like window manager called yaxwm that is from one of the devs at archlabs, im not a member there i just like browsing nix forums for new things.

So here is the wm https://bitbucket.org/natemaia/yaxwm/src/master/

Ive managed to get tint2 to display similar to dwm in yaxwm if i was hiding vacant tags or similar to standard i3wm statusbar.

see image here: https://i.postimg.cc/ZnydGdKP/2020-06-2 … -scrot.png

Im not using any taskbar in tint2 instead im using an executor and wmctrl to show me what workspace im on with below command.

wmctrl -d | grep "*" | awk '{print $9}'

Now ive kind of figured out how to list inactive workspace being used with below command, just need to figure out how to integrate it in some sort of script as i will need to factor in workspaces go from 0 - 10 - with 0 being the first workspace.

wmctrl -l | sed 's/^...........//g' | awk '{print $1}' | grep -o ^1

When all the trees have been cut down, when all the animals have been hunted, when all the waters are polluted, when all the air is unsafe to breathe, only then will you discover you cannot eat money.
~ Cree Prophecy

Offline

#7 2020-06-20 11:00:39

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 55  

Re: desktop / workspaces

Looks like my Cinnamon applet is based on wmctrl.

This is the sorted output (stripping Col 1) of wmctrl. The applet  formats this, though in a different order within workspace (and pulls in an app icon). Workspace -1 is my Desktop (shown on all the others too), Workspace 3 and 4 are unused.

$ sudo wmctrl -l | cut -b 11- | sort -n
 -1 grendel Desktop
  0 grendel Inbox (3 unread) — Evolution
  0 grendel John Martyn - Outside In (Paused)
  0 grendel /var/log/syslog.1
  1 grendel BBC iPlayer - Mozilla Firefox
  1 grendel BiPAC 8900X R2 - Mozilla Firefox
  1 grendel Calculator
  1 grendel desktop / workspaces / Off-topic / Dev1 Galaxy Forum - Mozilla Firefox
  1 grendel e-post.meeble.net/rspamd/ - Rspamd Web Interface - Mozilla Firefox
  1 grendel How to create an AppArmor Profile | Ubuntu - Mozilla Firefox
  1 grendel How to enable hibernate option in Ubuntu 20.04? - Ask Ubuntu - Mozilla Firefox
  1 grendel marjorie@grendel: ~
  1 grendel marjorie@grendel: ~
  1 grendel marjorie@grendel: /etc/apparmor.d
  1 grendel Newest 'nftables' Questions - Server Fault - Mozilla Firefox
  1 grendel Online Challenges & Races - British Rowing - Mozilla Firefox
  1 grendel Redis configuration – Redis - Mozilla Firefox
  1 grendel Sound
  1 grendel /var/log/syslog
  1 grendel Your account | PremierPlayer.tv - Mozilla Firefox

Online

#8 2020-06-20 11:04:58

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 761  
Website

Re: desktop / workspaces

Tags in dwm are not the same as workspaces: https://github.com/w0ng/wongdev.com/blo … kspaces.md

You should join the ArchLabs forums and ask Nate about yaxwm, he is an extraordinarily helpful person.

Last edited by Head_on_a_Stick (2020-06-20 11:05:49)


"Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher." — Antoine de Saint-Exupéry

Offline

#9 2020-06-20 11:29:39

HevyDevy
Member
Registered: 2019-09-06
Posts: 263  

Re: desktop / workspaces

Yeah i think i will Hoas.

Tint2 is usable with yaxwm but the taskbar needs some work to get it to play nice, not very suited though but something could be hacked together using executors for sure, just not how im doing it probably lol!

Cheers


When all the trees have been cut down, when all the animals have been hunted, when all the waters are polluted, when all the air is unsafe to breathe, only then will you discover you cannot eat money.
~ Cree Prophecy

Offline

Board footer