You are not logged in.

#1 2012-06-29 18:08:42

aerosuidae
Member
Registered: 2009-03-10
Posts: 248

simpleswitcher - lightweight EWMH window switcher

While building goomwwm I implemented lightweight window switcher. This is roughly the same code pulled out into a standalone utility called simpleswitcher. It's a popup menu placed center-screen, showing window titles, WM_CLASS, and desktop number. Usage is like dmenu: type to filter, arrows to navigate, Return/Enter to select. It needs no massive libraries, supports multihead, uses Xft fonts, and pretty configurable from the command line... etc...

http://aur.archlinux.org/packages.php?ID=60424

By default F12 shows all windows and F11 shows only windows on the current desktop. See included man page for more detail.

I havn't done a great deal of testing, but it already seems ok on Gnome3, LXDE, and Metacity.

It kind of reminds me of a utility I used and liked a while back called superswitcher, but that project seems mostly abandoned and needed gtk.

screenshot

Last edited by aerosuidae (2012-06-29 18:31:44)

Offline

#2 2012-08-23 15:16:37

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: simpleswitcher - lightweight EWMH window switcher

i would like to use it but I dont know how I can install a PKGBUILD file !  I am on a debian system (Crunchbang)


You can like linux without becoming a fanatic!

Offline

#3 2012-08-23 15:19:44

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: simpleswitcher - lightweight EWMH window switcher

chickenPie4tea wrote:

i would like to use it but I dont know how I can install a PKGBUILD file !  I am on a debian system (Crunchbang)

Just create a debian package.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#4 2012-08-23 22:34:26

avx
Member
Registered: 2011-07-05
Posts: 71

Re: simpleswitcher - lightweight EWMH window switcher

Pretty nice, thanks.

But,
a) the manpage states, the window would open in the middle of the screen? At least that's not the case here running FVWM 2.6.x.
b) while I like the concept, would be nice, if it could also start applications if no hit is found, so 'firefox' either switches to window or starts it.

Offline

#5 2012-08-24 01:43:12

aerosuidae
Member
Registered: 2009-03-10
Posts: 248

Re: simpleswitcher - lightweight EWMH window switcher

@avx, Thanks for the feedback. I've committed changes to fix a) and implement b).

@chickenPie4tea, You could clone and build simpleswitcher from git.

Offline

#6 2012-08-24 02:04:34

avx
Member
Registered: 2011-07-05
Posts: 71

Re: simpleswitcher - lightweight EWMH window switcher

That was quick, thank you smile

Few more things:
a) currently F12 (in the defaults) doesn't work for me, while F11 does; single monitor, FVMW setup to use "DesktopSize         9x1". Can you make it, so F12 would show the same as F11 in this situation?
b) currently the prompt shows ">", would imho make sense to change it to "+" when no hit is found and another command would be executed?
c) option to have everything on a single line like classic dmenu?
d) option to show only window name/class?
e) dunno if it's possible, but allow to sort by last accessed windows? (may be already done, if so, conflicts with g) currently for me)
f) show/hide(quit) with the same key, additionally to using ESC
g) there seems to be a bug: when I've got multiple windows with "URxvt urxvt" open, it always switches to the one last accessed, no matter which entry I choose.

Last edited by avx (2012-08-24 02:06:03)

Offline

#7 2012-08-24 04:11:28

aerosuidae
Member
Registered: 2009-03-10
Posts: 248

Re: simpleswitcher - lightweight EWMH window switcher

avx wrote:

a) currently F12 (in the defaults) doesn't work for me, while F11 does; single monitor, FVMW setup to use "DesktopSize         9x1". Can you make it, so F12 would show the same as F11 in this situation?

I don't understand... why not just use F11 if it works? Or remap them both with -key and -dkey?

avx wrote:

b) currently the prompt shows ">", would imho make sense to change it to "+" when no hit is found and another command would be executed?
c) option to have everything on a single line like classic dmenu?
d) option to show only window name/class?

These will have to go on the feature request list as I'm running out of time today smile

I'm not sold on the (c) idea... will find coffee and think.

avx wrote:

e) dunno if it's possible, but allow to sort by last accessed windows? (may be already done, if so, conflicts with g) currently for me)

This should already be the case as the window list is pulled from _NET_CLIENT_LIST_STACKING (assuming the window manager supports it, which I think fvwm does?).

I should note my WM is set to raise-on-focus so the stacking order is always the same as the access order. I havn't tested with other types of raise policy.

avx wrote:

f) show/hide(quit) with the same key, additionally to using ESC
g) there seems to be a bug: when I've got multiple windows with "URxvt urxvt" open, it always switches to the one last accessed, no matter which entry I choose.

I committed changes for these two. Thanks for the bug report.

Offline

#8 2012-08-24 12:21:35

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: simpleswitcher - lightweight EWMH window switcher

hya

ive tried it out and looks really cool. it wont actually switch windows under enligtment (e17) though

best

Z.

Offline

#9 2012-08-24 14:10:24

aerosuidae
Member
Registered: 2009-03-10
Posts: 248

Re: simpleswitcher - lightweight EWMH window switcher

@zeltak, thanks for the bug report. Found and fixed.

Offline

#10 2012-08-24 14:37:31

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: simpleswitcher - lightweight EWMH window switcher

Hi aerosuidae

thx for the quick reply. i have updated from git but i still cant seem to get it to work. the window comes up, i get the list of all open window, but i cant get it to switch. i have tried to put all windows in the same virtual workspace and in seperate workspaces and in each case it dosent work.

thx again for you work , it looks really neat and useful

best

Z.

Offline

#11 2012-08-24 15:03:45

aerosuidae
Member
Registered: 2009-03-10
Posts: 248

Re: simpleswitcher - lightweight EWMH window switcher

@zeltak, hmm... window switching on E17 works for me.

I'm testing with whatever default config E17 installed itself. I'm not familiar with it. Is there any setting you can think of that you could be running that may affect such things, that I can test?

Offline

#12 2012-08-24 15:25:11

avx
Member
Registered: 2011-07-05
Posts: 71

Re: simpleswitcher - lightweight EWMH window switcher

@aerosuidae, again, thank you smile

I'm not sold on the (c) idea... will find coffee and think.

As I said, optional of course. My goal would be to let it rise in the same spot where dmenu and dunst are sitting for me.

If you're interested, please make a 0.x release then I could submit two ebuilds (point&live) to Gentoo's portage. Edit, created a discussion thread for it at the Gentoo forums, maybe get somewhat more input.

Edit 2, would you please provide some DEPENDS file or similar, don't really want to dig through ldd and your depends= line surely isn't complete, at least as far as Gentoo's standards would go.

Last edited by avx (2012-08-24 15:32:50)

Offline

#13 2012-08-25 02:57:24

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: simpleswitcher - lightweight EWMH window switcher

Thank for you very much for this program. This makes going panel-less a bit easier for me at least.

Offline

#14 2012-08-25 07:45:22

aerosuidae
Member
Registered: 2009-03-10
Posts: 248

Re: simpleswitcher - lightweight EWMH window switcher

@avx

AFAIK the dependencies are fine for Arch: libc (implied by AUR+base-devel), libx11, libxft, freetype2.  Actually, freetype2 may even be surplus to requirements in the PKGBUILD as I see it is implied by libxft > fontconfig > freetype2.

Can't help much with Gentoo, sorry.

Last edited by aerosuidae (2012-08-25 07:46:08)

Offline

#15 2012-08-25 18:34:45

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: simpleswitcher - lightweight EWMH window switcher

Hi again

so i tested it under kde,various tiling WM and it works really well, just not in enlightment. im new with enlightment but i seem to remember the way they deal with virtual desktops is a bit differnet
thx

Z

Offline

#16 2012-08-25 23:33:54

TheLemonMan
Member
From: Italy
Registered: 2011-09-04
Posts: 214
Website

Re: simpleswitcher - lightweight EWMH window switcher

Really nice, but doesn't seem to work with monsterwm. It doesn't pop up when i press the key nor when i pass the -now option neutral

Offline

#17 2012-08-26 01:31:42

hellomynameisphil
Member
From: /home/phil/Vancouver
Registered: 2009-10-02
Posts: 257
Website

Re: simpleswitcher - lightweight EWMH window switcher

How would I get it to use mod4+tab? It doesn't seem to like, e.g., '-key mod4+tab' or '-key super+tab'.

EDIT: Capitalizing 'Tab' works, though the man page seems to indicate 'tab' would work.

Last edited by hellomynameisphil (2012-08-26 01:37:44)

Offline

#18 2012-08-26 05:49:51

aerosuidae
Member
Registered: 2009-03-10
Posts: 248

Re: simpleswitcher - lightweight EWMH window switcher

@TheLemonMan, there seems to be not enough EWMH support in monsterwm.

@hellomynameisphil, "Tab" with uppercase T is indeed the proper X key name. The man page has been corrected. Thanks for pointing it out.

Offline

#19 2012-08-26 08:15:14

avx
Member
Registered: 2011-07-05
Posts: 71

Re: simpleswitcher - lightweight EWMH window switcher

@aerosuidae, would you please add an install-target to your makefile? Seems there's no point creating it/patching the build-process locally. While you're at it, maybe a proper LICENSE file, too? Thanks.

Edit, found your fork of pixelclock, pretty nice, has a bug though: For me in FVMW, using -bottom places it at the top.
(now to write some scripts to get times from my calendar...)

Last edited by avx (2012-08-26 10:12:13)

Offline

#20 2012-08-27 10:20:38

aerosuidae
Member
Registered: 2009-03-10
Posts: 248

Re: simpleswitcher - lightweight EWMH window switcher

@avx, both requests committed.

I'll test pixelclock -bottom. Thanks for the bug report.

Offline

#21 2012-08-27 10:37:09

avx
Member
Registered: 2011-07-05
Posts: 71

Re: simpleswitcher - lightweight EWMH window switcher

Thanks, ebuild for Gentoo commited for review to the bugtracker here.

What's imho missing is the ability to do absolute positioning, giving a starting position for the first line, so something like -geometry additionaly to/replacing width/height.


//OT: more about pixelclock:
Edit, after using pixelclock for some time now, I think I know what "my" bug is. It's rendering as a real window(don't know the specific term), thus FVWM decorates it (titlebars, ...) and as such also enforces my chosen placement policy which is min-overlap-placement and thus the window is placed wherever possible, but not always where it's been requested.
In order to fix that, either I need to be able to set a -geometry string directly or enforce FVWM to place it based on window name/class or it must behave more like, f.e. conky.

Three feature wishes, if I may:
a) horizontal sizing, f.e. so I can place it next to a systray
b) allow to define the thickness of the bars
c) most importantly for me, a "follow"-mode. Meaning to always have the current time in the center position. I find it annoying to have to move my head left->right or up->down over the course of the day to find the marker instead of always looking to the same position and the events closing in on me.
//OT END

Last edited by avx (2012-08-27 15:01:09)

Offline

#22 2012-08-28 01:33:57

aerosuidae
Member
Registered: 2009-03-10
Posts: 248

Re: simpleswitcher - lightweight EWMH window switcher

@avx, pixelclock asks to be a dock/panel (_NET_WM_WINDOW_TYPE_DOCK), which also happens to be undecorated and placed as requested on the WMs I've tested with. But, FVWM was not one of them and I'm not very familiar with its foibles. Perhaps there is a way you can cause it to be unmanaged?

pixelclock feature requests noted, but don't hold your breath. It's way down my list atm smile

simpleswitcher -geometry sounds fine and should be straight forward to do. I'll look into it.

Offline

#23 2012-08-28 10:48:00

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: simpleswitcher - lightweight EWMH window switcher

sorry but I typed man superswitcher in terminal but found nothing.
? how can I change keybinding - I have guake installed and F12 sumons guake so how would I change it to F10 for instance?

edit - I just changed Guakes keybindings it was easier, LOL, still interested in how to though.

Last edited by chickenPie4tea (2012-08-28 10:50:28)


You can like linux without becoming a fanatic!

Offline

#24 2012-08-28 11:41:30

aerosuidae
Member
Registered: 2009-03-10
Posts: 248

Re: simpleswitcher - lightweight EWMH window switcher

@chickenPie4tea, the man page is called simpleswitcher.1 in the git repo. If you can't install it on your distro you can always view it directly using nroff:

nroff -man simpleswitcher.1 | less

As for your question, this should work:

simpleswitcher -key F10

(edit: wrong file name)

Last edited by aerosuidae (2012-08-28 11:42:59)

Offline

#25 2012-08-28 12:08:43

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: simpleswitcher - lightweight EWMH window switcher

Thanks there were some good options in the man pages I didn't know about.


You can like linux without becoming a fanatic!

Offline

Board footer

Powered by FluxBB