Page 1 of 1

wmctrl 1.07

Posted: Thu 19 May 2011, 17:37
by lithpr
Here's a .pet for wmctrl 1.07, built from the lucid .deb file. Tested on Lupu 5.2.5 (caveat: a derivative called RexBang).

Posted: Thu 19 May 2011, 21:13
by Béèm
What does it do?

Posted: Thu 19 May 2011, 21:51
by DPUP5520
wmctrl is a UNIX/Linux command line tool to interact with an EWMH/NetWM compatible X Window Manager.

The tool provides command line access to almost all the features defined in the EWMH specification. It can be used, for example, to get information about the window manager, to get a detailed list of desktops and managed windows, to switch and resize desktops, to make windows full-screen, always-above or sticky, and to activate, close, move, resize, maximize and minimize them.

The command line access to these window management functions makes it easy to automate and execute them from any application that is able to run a command in response to an event.

Please note that wmctrl only works with window managers that implement the EWMH specification. The tool is known to work - either fully or partially - with the following window managers:

blackbox >= 0.70
icewm
kwin (the default WM for KDE)
metacity (the default WM for GNOME)
openbox >= 3
sawfish
fvwm >= 2.5
waimea
pekwm
enlightenment >= 0.16.6
xfce >= 4
fluxbox >= 0.9.6
matchbox
window maker >= 0.91

Posted: Mon 30 May 2011, 20:11
by `f00
wmctrl in general

One of those tools that sometimes gets into an offering (like musher0's wmx wm package) and you overlook it until it comes in handy. For example, I was trying to get a (nicer) graphical pager in ede wm, but most only displayed on one desktop (kind of useless for anything but observation) and the appdir that was sticky was fairly clunky. How to make a window that's usually undecorated sticky (on all desks)? Load something like fbpanel's pager, do a "wmctrl -l" to get some info, then if the desktop info hasn't got a "-1" in that column for "panel" .. "wmctrl -r panel -b toggle,sticky" and voila.

It's not always that simple, but still it can be useful if you've banged your head on most of the options you can think of and the control eludes your grasp when it seems like there should be a way of accomplishing this or that tweak you might want.

Yep, afterstep has its own way for sure :P

Posted: Mon 30 May 2011, 21:02
by lithpr
Very cool `f00!

I've found all sorts of uses for it- not major accomplishments, but little things. I've used it to supplement Openbox's already excellent facilities for controlling application windows, implemenedt a "quake-terminal" type thingie, a window placing/resizing setup ala unity's Super-Keypad, replacing windows with a copy in the same size & position, a script to display a different background image on each virtual desktop... all sorts of fun little stuff.

It is a very cool little utility, and goes very well with xprop & xwininfo.

implementation in jwm

Posted: Mon 02 Feb 2015, 03:55
by recobayu
Hi All,
I do implementation of this wmctrl to the jwm window manager. I use shortcut Ctrl + Alt + Arrow to move window to up, left, down, and right side of screen. I called it stickyjwm. :D Here is the link: http://murga-linux.com/puppy/viewtopic. ... 303#825303

Edit:
I know from this thread:
http://murga-linux.com/puppy/viewtopic. ... 809#796809

Re: implementation in jwm

Posted: Mon 02 Feb 2015, 15:51
by musher0
recobayu wrote:Hi All,
I do implementation of this wmctrl to the jwm window manager. I use shortcut Ctrl + Alt + Arrow to move window to up, left, down, and right side of screen. I called it stickyjwm. :D Here is the link: http://murga-linux.com/puppy/viewtopic. ... 303#825303
Thanks, recobayu, for your useful script. It's not only for jwm, it can help "upgrade"
any older or more limited window manager (such as aewm, wmx2, echinus, etc.).

BFN.

musher0

stickyjwm2

Posted: Mon 16 Mar 2015, 16:46
by recobayu
This is stickyjwm2. So many thanks to you all, thanks to mochimoppel.
the stickyjwm1 is from here:
http://murga-linux.com/puppy/viewtopic. ... 303#825303
Now, this stickyjwm2 is better (i think.. :wink:).
1. It can automatically detect our tray, bottom or top.
2. It will not remove your jwmrc-personal or your wmctrl
3. We can use winkey + arrow to control that
4. It only can walk on the new jwm (that support winkey nicely)

Re: stickyjwm2

Posted: Tue 17 Mar 2015, 01:10
by MochiMoppel
This is MUCH better! :wink:
Also a clever way to include the shortcuts in the user's jwmrc-personal

Now you should really delete links to stickyjwm1. Makes me nervous to see this thing still around :lol:
What I didn't understand: What means "can automatically detect our tray, bottom or top"? It may detect them, but it doesn't care about them. What is stickyjwm2 supposed to do when it detects trays?

Re: stickyjwm2

Posted: Tue 17 Mar 2015, 07:06
by recobayu
MochiMoppel wrote:This is MUCH better! :wink:
Also a clever way to include the shortcuts in the user's jwmrc-personal
39 mochimoppel..
What I didn't understand: What means "can automatically detect our tray, bottom or top"? It may detect them, but it doesn't care about them. What is stickyjwm2 supposed to do when it detects trays?
It is automatically set our window position. So that the window hopely never behind the tray again.
Eventhough our tray is autohide..
:D

Re: stickyjwm2

Posted: Tue 17 Mar 2015, 13:07
by MochiMoppel
recobayu wrote:39
You're welcome :lol:
So that the window hopely never behind the tray again.
It is always behind my 2 trays, so doesn't work for me, but probably works for users with uncustomized tray settings.

Posted: Thu 31 Mar 2016, 20:43
by Subito Piano
I just ran into this post last night. Recobayu -- SWEET!!!! 8) I have LONG wanted all these features, both the easy window tiling and the "back & forth" action of ALT+TAB. THANK YOU!

Note for anyone reading this who prefers to silence the little "zap" sound when executing the tiling feature -- simply edit each of the following files found in /usr/bin:
  • supdownku2
    supleftku2
    suprightku2
    supupku2
Simply change the last three lines of each file from:

Code: Select all

#wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && 
wmctrl -r :ACTIVE: -e 0,$X,$Y,$W,$H &&
aplay /usr/share/audio/tile.wav
to

Code: Select all

#wmctrl -r :ACTIVE: -b remove,maximized_vert,maximized_horz && 
wmctrl -r :ACTIVE: -e 0,$X,$Y,$W,$H
Alternatively, I suppose you could simply delete the file /usr/share/audio/tile.wav, but that seems not as clean a method...

Posted: Wed 01 Jun 2016, 05:01
by recobayu
Thank you Subito.
This is the new stickyjwm. It is only for new jwm. I just tested it in xenialpup.
(maybe it will not work in other version puppy).

Posted: Wed 01 Jun 2016, 13:54
by LazY Puppy
The stickyjwm-3

- up
- left
- right

works in tahr 6.0.2.

- down doesn't work

Posted: Wed 01 Jun 2016, 17:24
by LazY Puppy
Tested this also in Xenial 7.0.1.

No chance to get a window sized/placed to the bottom half of the screen.

All what happens as a result is a centered window with its bottom frame behind the tray.

Edit:

A test using the content of supdownku2 from version 2 within supdownku (just replaced its content) was successful!

Posted: Fri 03 Jun 2016, 09:15
by recobayu
I hope this stickyjwm is success.

Posted: Sat 02 Jul 2016, 14:11
by recobayu
1. Fix for moving llibreoffic's window by setting 1 for gravity of wmctrl
2. Fix for urxvt maximize using win + top arrow (supupku)
3. Faster speed (defining variables)
4. Succes tested on xenialpup

Posted: Thu 30 Aug 2018, 08:06
by recobayu
Hi All.
I have an update of stickyjwm. Now it is able to move to another monitor. The behavior is like windows 10. If we have duplicate screen, stickyjwm will detect the smallest screen. I have tested it on bionic. But I still have a problem in detecting tray. Because upupbb (and maybe the new woof ce puppy) have so many tray. Any help will be appreciate. Feel free to modify or use this code. Thank you so much.

Edit:
Now this is support for duplicate monitor eventhough different resolution. It still not detect tray yet.
so the window always behind the tray. My suggest is autohide all tray.

Posted: Mon 04 Feb 2019, 07:03
by recobayu
I noticed that the tray's location is always on the left monitor. So I decided that the right monitor always produces a fullscreen window (no tray on it).
Image

update 190208
Stickyjwm-19.1 is support resize window by 100px by press winkey + alt + arrow. So now not only half, but more flexible width of window. Here is the complete shortcut. I put it on /root/.jwm/stickyjwm.
win + arrow = stickyjwm
win + shift + arrow = maxleft, maxright, etc (default sticky by jwm)
win + alt + arrow = resize window per 100px