Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 19 Nov 2017, 17:48
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
jwm 2.3.6 aerosnap
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
rufwoof

Joined: 24 Feb 2014
Posts: 2163

PostPosted: Sun 09 Jul 2017, 21:40    Post subject:  jwm 2.3.6 aerosnap  

As of jwm 2.3.6 aerosnap is supported. Add something like
Code:
    <Group>
        <Option>tiled</Option>
        <Option>aerosnap</Option>
    </Group>

to ~/.jwmrc and when you drag a window title to the top of the screen it will resize to full screen. Or drag to the side of screen and it will resize to half screen. (Handy for quickly getting two spreadsheets nicely side by size for comparing cells in the two spreadsheets).

Looks like it is still being refined by Joe and 2.3.7 is planned to have better support for multiple-monitors.
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 411
Location: Connecticut, United States

PostPosted: Sun 09 Jul 2017, 22:02    Post subject:  

Thanks!! that is really cool.....works great on my Tahr 6.0.6 systems....
Back to top
View user's profile Send private message Visit poster's website 
rufwoof

Joined: 24 Feb 2014
Posts: 2163

PostPosted: Sun 09 Jul 2017, 22:33    Post subject:  

Just remember in Puppy you should be editing /etc/xdg/templates/_root_.jwmrc and not ~/.jwmrc (there is a note in the top of that file indicating such IIRC).
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 411
Location: Connecticut, United States

PostPosted: Sun 09 Jul 2017, 23:58    Post subject:  

Yes, thanks I modified /etc/xdg/templates/_root_.jwmrc
I use the aerosnap in some setups now, works well!
Back to top
View user's profile Send private message Visit poster's website 
rufwoof

Joined: 24 Feb 2014
Posts: 2163

PostPosted: Wed 12 Jul 2017, 09:03    Post subject:  

rockedge wrote:
Thanks!! that is really cool.....works great on my Tahr 6.0.6 systems....

I see that its already coded into Tahr 6.0.6 ... Menu, Desktop, JWMDesk Manager ... Window Tab, Snap subsection (Aero Snap tickbox)
s.png
 Description   
 Filesize   74.48 KB
 Viewed   269 Time(s)

s.png

Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 411
Location: Connecticut, United States

PostPosted: Sun 16 Jul 2017, 16:47    Post subject:  

wow your right! that is even cooler....thanks for this tip!
Back to top
View user's profile Send private message Visit poster's website 
stemsee

Joined: 27 Jun 2013
Posts: 1994
Location: In The Way

PostPosted: Thu 26 Oct 2017, 04:33    Post subject:  

Here is pseudo aerosnap should work for all window managers. It uses wmctrl. I use it with sven multimedia keyboard daemon, using win+arrow-keys.
1. Win+Arrow-up toggles full width top half screen, full width bottom half and fill screen (maximise).
2. Win+Arrow-left toggles left-top-quarter/left-bottom-quarter/left-full-height.
3. Win+Arrow-right toggles right-top-quarter / right-bottom-quarter/right-full-height.
4. Win+Arrow-down minimises.
alt+tab to re-maximise

All together nine 9 positions on screen affecting active window.

I named script aerosnap. needs to be run at startup to export functions. call functions like this
Code:
bash -c MTH
bash -c MBH
bash -c ML
bash -c MR

Code:
#!/bin/sh
# uses mctrl for pseudo aerosnap
# by stemsee (C) 2017 Marcos Contant
# use with sven multimedia keyboard daemon
# run aerosnap on Startup to export functions
# win+arrow key, command: bash -c MR|ML|MTH|MBH
#
function MTH () {         # toggles full-width: fill screen  / top half horizontal /bottom half horizontal
res=`xrandr | cut -f8,9,10 -d' ' | cut -f1 -d',' | head -1 | sed 's/ //g'`
XX=`echo $res | cut -f1 -d'x'`
YY=`echo $res | cut -f2 -d'x'`
YY=$((YY / 2 ))
wmctrl -r :ACTIVE: -b remove,maximized_horz,maximized_vert
if [[ ! -e /tmp/MTH && ! -e /tmp/MBH ]]; then
   wmctrl -r :ACTIVE: -e 0,0,0,$XX,$YY
   touch /tmp/MTH
elif [[ -e /tmp/MTH ]]; then
   XX=`echo $res | cut -f1 -d'x'`
   YY=`echo $res | cut -f2 -d'x'`
   rm /tmp/MTH
   wmctrl -r :ACTIVE: -e 0,0,0,$XX,$YY
   touch /tmp/MBH
elif [[ -e /tmp/MBH ]]; then
   wmctrl -r :ACTIVE: -e 0,0,$YY,$XX,$YY
   rm /tmp/MBH
fi
}
export -f MTH

function MBH () {      # minimizes
   res=`xrandr | cut -f8,9,10 -d' ' | cut -f1 -d',' | head -1 | sed 's/ //g'`
XX=`echo $res | cut -f1 -d'x'`
YY=`echo $res | cut -f2 -d'x'`
YY=$((YY / 2))
wmctrl -r :ACTIVE: -b remove,maximized_horz,maximized_vert
wmctrl -r :ACTIVE: -b toggle,hidden
}
export -f MBH

function ML () {      # Toggles, Left - top quarter/ bottom quarter/ full-height
   res=`xrandr | cut -f8,9,10 -d' ' | cut -f1 -d',' | head -1 | sed 's/ //g'`
XX=`echo $res | cut -f1 -d'x'`
YY=`echo $res | cut -f2 -d'x'`
XX=$((XX / 2))
YY=$((YY))
wmctrl -r :ACTIVE: -b remove,maximized_horz,maximized_vert
if [[ ! -e /tmp/ML && ! -e /tmp/LM ]]; then
   wmctrl -r :ACTIVE: -e 0,0,0,$XX,$YY
   touch /tmp/ML
elif [[ -e /tmp/ML ]]; then
   YY=$((YY / 2))
   rm /tmp/ML
   wmctrl -r :ACTIVE: -e 0,0,$YY,$XX,$YY
   touch /tmp/LM
elif [[ -e /tmp/LM ]]; then
XX=`echo $res | cut -f1 -d'x'`
YY=`echo $res | cut -f2 -d'x'`
XX=$((XX / 2))
YY=$((YY / 2))
wmctrl -r :ACTIVE: -e 0,0,0,$XX,$YY
rm /tmp/LM
fi
}
export -f ML

function MR () {      # Toggles, Right - top quarter / bottom quarter / full-height
   res=`xrandr | cut -f8,9,10 -d' ' | cut -f1 -d',' | head -1 | sed 's/ //g'`
XX=`echo $res | cut -f1 -d'x'`
YY=`echo $res | cut -f2 -d'x'`
XX=$((XX / 2))
YY=$((YY))
wmctrl -r :ACTIVE: -b remove,maximized_horz,maximized_vert
if [[ ! -e /tmp/MR && ! -e /tmp/RM ]]; then
   wmctrl -r :ACTIVE: -e 0,$XX,0,$XX,$YY
   touch /tmp/MR
elif [[ -e /tmp/MR ]]; then
   YY=$((YY / 2))
   rm -f /tmp/MR
   wmctrl -r :ACTIVE: -e 0,$XX,$YY,$XX,$YY
   touch /tmp/RM
elif [[ -e /tmp/RM ]]; then
   XX=`echo $res | cut -f1 -d'x'`
   YY=`echo $res | cut -f2 -d'x'`
   XX=$((XX / 2))
   YY=$((YY / 2))
   wmctrl -r :ACTIVE: -e 0,$XX,0,$XX,$YY
   rm /tmp/RM
fi
}
export -f MR


Code needs tweaking to accomodate decoration on openbox at least. Still better than nothing!
xscreenshot-20171027T131706.png
Description 
png

 Download 
Filename  xscreenshot-20171027T131706.png 
Filesize  213.14 KB 
Downloaded  30 Time(s) 
xscreenshot-20171027T131831.png
Description 
png

 Download 
Filename  xscreenshot-20171027T131831.png 
Filesize  251.63 KB 
Downloaded  27 Time(s) 
xscreenshot-20171027T131850.png
Description 
png

 Download 
Filename  xscreenshot-20171027T131850.png 
Filesize  148.11 KB 
Downloaded  25 Time(s) 
xscreenshot-20171027T131908.png
Description 
png

 Download 
Filename  xscreenshot-20171027T131908.png 
Filesize  250 KB 
Downloaded  22 Time(s) 
xscreenshot-20171027T132002.png
Description 
png

 Download 
Filename  xscreenshot-20171027T132002.png 
Filesize  91.17 KB 
Downloaded  28 Time(s) 

Last edited by stemsee on Wed 08 Nov 2017, 07:38; edited 7 times in total
Back to top
View user's profile Send private message MSN Messenger 
recobayu


Joined: 15 Sep 2010
Posts: 278
Location: indonesia

PostPosted: Thu 26 Oct 2017, 05:07    Post subject:  

Hi Stemsee. I try that code. I make a script file: aerosnap in /usr/bin then I copy all of your code. Then I link symbolic to /root/Startup. After that I restart x win. Then I open terminal and type: bash -c MR. But the text "bash: MR: command not found" appear. How to run that?

I also make a stickyjwm like this in here:
http://murga-linux.com/puppy/viewtopic.php?p=910550#910550
That also use wmctrl.
Very Happy
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 1994
Location: In The Way

PostPosted: Thu 26 Oct 2017, 08:19    Post subject:  

make the script executable
Code:
chmod 755 /usr/bin/aerosnap


Also install wmctrl package from repository
Back to top
View user's profile Send private message MSN Messenger 
stemsee

Joined: 27 Jun 2013
Posts: 1994
Location: In The Way

PostPosted: Thu 26 Oct 2017, 10:01    Post subject:  

On windows aerosnap provides a central adjuster bar down the middle of the screen. When the cursor grips the bar and is dragged left or right, the affected window narrows accordingly, and after that the remaining window re-maximises to its resized area. I wonder how to do that?
Back to top
View user's profile Send private message MSN Messenger 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0505s ][ Queries: 13 (0.0077s) ][ GZIP on ]