Page 1 of 1

snap app window to L or R screen with keystroke?

Posted: Sun 22 Dec 2019, 17:04
by gychang
Using BionicPup64, version 8. I have setup to move an app to R or L half of screen by using JWMDesk Manager snap function. However I would like to see if it is possible using a keystroke combination (e.g. Ctrl-R arrow) to do the same...

Posted: Mon 23 Dec 2019, 19:19
by HerrBert
I have set keyboardshortcuts in /root/.jwm/jwmrc-personal to:

Code: Select all

<Key mask="4" key="Left">maxleft</Key>
<Key mask="4" key="Right">maxright</Key>
where mask="4" is my keycode 115 = Super_L in /root/.Xmodmap
What it does:
Left Windowskey + (Arrow)Left maximizes active Window to left half of Desktop, left Windodwskey + (Arrow)Right maximize active Window to right half of Desktop.
If you change the "mask=" to "C", it should behave as you suggested...

Posted: Mon 23 Dec 2019, 19:24
by disciple
Edit]beaten to it [/edit]
Wow, I'm so out of the loop - didn't realise jwm supports aero snap now. Does it snap to corners or just sides?
I see what you want is possible if you just edit the jwm config to add key bindings for these actions:

Code: Select all

maxtop	Maximize window to the top half of the screen.
maxbottom	Maximize window to the bottom half of the screen.
maxleft	Maximize window to the left half of the screen.
maxright	Maximize window to the right half of the screen.
But have a look first - there may already be key bindings for them.

Or for other methods (e.g. other window managers, or snapping to corners) see http://murga-linux.com/puppy/viewtopic. ... 316#972316, or perhaps http://murga-linux.com/puppy/viewtopic. ... 579#939579

Posted: Mon 23 Dec 2019, 22:19
by bigpup
JWMDesk Manager>Desktop tab->JWM Hotkey

Posted: Tue 24 Dec 2019, 19:08
by gychang
HerrBert wrote:I have set keyboardshortcuts in /root/.jwm/jwmrc-personal to:

Code: Select all

<Key mask="4" key="Left">maxleft</Key>
<Key mask="4" key="Right">maxright</Key>
where mask="4" is my keycode 115 = Super_L in /root/.Xmodmap
What it does:
Left Windowskey + (Arrow)Left maximizes active Window to left half of Desktop, left Windodwskey + (Arrow)Right maximize active Window to right half of Desktop.
If you change the "mask=" to "C", it should behave as you suggested...
works great!, thanks.

doesn't work in Precise-Light

Posted: Wed 06 May 2020, 16:38
by gychang
I actually had this thread as solved in BionicPup64, now I am on Precise-Lite on a 32bit laptop.

Modifying jwmrc-personal now does not work. any help?

thanks

Posted: Thu 07 May 2020, 10:10
by disciple
Is it actually included by the main jwm config file?
Do other changes in it work?
What do you get if you run `jwm -p` in a terminal?

Posted: Thu 07 May 2020, 10:58
by MochiMoppel
maxleft and maxright are not supported in the JWM version used by Precise.
Try to change the binary /usr/bin/jwm with a newer version (those found in newer 32bit Puppies may work).