Re: [i3] Get list of workspaces

  • From: Michael Stapelberg <michael@xxxxxxxx>
  • To: Discussions/Questions about the i3 window manager <i3-discuss@xxxxxxxxxxxxx>
  • Date: Wed, 25 Jul 2012 15:40:24 +0200

Hi Anders,

Quoting Anders Bo Rasmussen (2012-07-25 13:31:36)

My next small project to migrate is to make alt-<letter> jump to the
last selected workspace beginning with <letter> and the next workspace
beginning with letter if already on that workspace. The mechanism
therefore has to know both about workspace changes as well as key
presses. To not get too many perl modules to install all the places I
need to run i3, I think it looks like the easiest way is to have one
script monitoring workspace changes with AnyEvent::I3 and save the
changes to a file in /tmp and another script that is referenced in a
bind in .i3/config that receives the letter, reads the file in /tmp
and then select the right workspace with i3-msg. This way perl
shouldn't need to know about X.
Instead of using i3-msg at all, you can do everything using
AnyEvent::I3.

Is there a more easy way to do this?
No, it’s the same way I would do it right now.

Best regards,
Michael

Other related posts: