JWM WinSwitcher

Window managers, icon programs, widgets, etc.
Post Reply
Message
Author
User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

JWM WinSwitcher

#1 Post by MochiMoppel »

WinSwitcher is a menu showing all windows, across all desktops.
It allows to find and access any open window instantly and is designed as a supplement for JWM's tasklist.
May work with other window managers. Openbox users may not need it as Openbox already has a similar menu built in.

Key features:
- Lists all windows, even those not accessible from tasklist (e.g. confirmation dialogs)
- Allows to access or close windows via single-key shortcuts
- Additional context menu allows mouse-only operations
- Can be opened/closed with same desktop/keyboard shortcut.
- Look & feel similar to a JWM pop-up menu (No buttons, no menu bar, closes when clicked or focus lost)
- Adjusts its height dynamically depending on number of items
- Creates no config or temporary files

Installation:
No particular installation needed. It's just 1 file so you may want to put it into /usr/bin.
To access the script easily and quickly, some care should be taken when choosing a suitable trigger.
Recommended: Tray button (see screenshot). Opens the menu neatly above the tray and avoids the "empty desktop" bug (see "Issues")
For placement at right edge of tray edit /root/.jwmrc-tray:
<Clock format="%-H:%M:%S">minixcal</Clock>
<TrayButton label="WinSwitch" >exec:winswitcher</TrayButton>
</Tray>
A keyboard shortcut (e.g. assigned to Windows key) may be the quickest way.

Dependencies:
wmctrl, gtkdialog4

Issues:
- WinSwitcher may not open when triggered by a keyboard shortcut on an empty desktop. Seems to be a bug. Can be prevented by positioning mouse cursor over tray.

Changelog
v.1.2: Added compatibility for puppies using bash versions <3.2 (e.g. Precise 5.6)
v.1.1: First release. Added context menu and help page
v.1.0: Unreleased version
Attachments
winswitcher.png
(47.61 KiB) Downloaded 1521 times
winswitcher_1.2.zip
(3.89 KiB) Downloaded 477 times
Jasper

#2 Post by Jasper »

Hi MochiMoppel,

Thank you very much for your investigations and then providing a version which also works with Precise 5.6 (with bash version 3.0).

My regards

PS Thank you also for your earlier advice (now edited out after your update) to update to bash 4.1 via Slacko 5.6 which I actioned.
User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#3 Post by Puppus Dogfellow »

cool, the official release! :D

still no refresh button? sometimes i like to use it to get to more than one thing at clip. having to reopen it is kinda annoying, but maybe i've become spoiled. i use an older version pretty much every time i sit in front of a computer--it's a great thing you've done here. should be in every puppy, or at least every puppy running JWM.
User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#4 Post by MochiMoppel »

Puppus Dogfellow wrote:still no refresh button?
What for? Menu is "refreshed" when you open it and window close actions refresh the menu instantly. All menus, not only mine, close when you click an item. Then their work is done and without further user action they give up the space they oppupied. Clever concept.

Yes, I deviated from this concept by not closing the menu after window close actions, but that's my personal preference and I'm not always dogmatic :wink:
User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#5 Post by Puppus Dogfellow »

MochiMoppel wrote:
Puppus Dogfellow wrote:still no refresh button?
What for? Menu is "refreshed" when you open it and window close actions refresh the menu instantly. All menus, not only mine, close when you click an item. Then their work is done and without further user action they give up the space they oppupied. Clever concept.

Yes, I deviated from this concept by not closing the menu after window close actions, but that's my personal preference and I'm not always dogmatic :wink:
the space they occupy is of no concern to me--anything more recently clicked will open on top of it and it can always be minimized or closed if its presence becomes annoying. i love the script, Mochi, i just prefer to be able to keep it open. i added a button to your other script so i can launch this one with it, but to be honest, i prefer my hacked version of an earlier version--always on if i want, can be positioned where i want, refreshed as needed...i suppose the close all rox, sticky, and layer buttons make it gaudier in some respects, but i like the grabbable title bar, etc. i have so much respect for your work here that i don't even want to offer up my hack of a hack of it.

i guess the main difference is you see it as a fleeting menu, i see it as a control center of sorts. to me it just seems like something better suited to the type of interface you gave the bookmarks script. bookmarks are a quick way to access your files and so's this. i don't really see why there's a need to take control of the placement, access, position, or duration out of the user's hands.

___

edit: over time i've come to prefer the original to the hacked version.
User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#6 Post by Puppus Dogfellow »

Mochi, neither this nor the speed dials script works in fatdog. is there a workaround? i don't get error codes--neither launches, but both are there according to the which command. any ideas?


edit: wmctrl in fatdog is all kinds of messed up...
User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#7 Post by MochiMoppel »

I looked into it and found that this is caused by the pidof command. Fatdog doesn't use the BusyBox pidof. Fatdog's pidof (version says "procps-ng 3.3.9") uses different command line parameters. I can change the script so that it pleases all (?) Puppy flavors, but then comes the real show stopper. Wmctrl, the version in the fatdog repository, is indeed bug infested. Unreliable at best and and therefore not usable. Sorry, no WinSwitcher for fatdog.
User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

#8 Post by Puppus Dogfellow »

MochiMoppel wrote:I looked into it and found that this is caused by the pidof command. Fatdog doesn't use the BusyBox pidof. Fatdog's pidof (version says "procps-ng 3.3.9") uses different command line parameters. I can change the script so that it pleases all (?) Puppy flavors, but then comes the real show stopper. Wmctrl, the version in the fatdog repository, is indeed bug infested. Unreliable at best and and therefore not usable. Sorry, no WinSwitcher for fatdog.
i tried it in quirky april 7041 64bit and it runs but seems to omit some windows (one out of 8 rox windows, no libreoffice, all the xpad showed up...). not at the machine, but i think the wmctrl readout for desktops and windows was off from what it should've been. it can reposition and resize okay, though.
Post Reply