SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#26 2012-04-27 11:21:25

AlanD
#! CrunchBanger
Registered: 2011-05-12
Posts: 116

Re: Hot corners and aero'esque window snapping

Tunafish wrote:
Xlib.protocol.request.QueryExtension
Xlib.protocol.request.QueryExtension

These messages also happens in any of the python xlib examples(at least for me). Its not an error, per se, but rather just an alert. A developer probably left a print statement in their code. It likely does not relate to your problem.

[Edit] I should add that I'm actually using Mint linux.

Last edited by AlanD (2012-04-27 11:29:08)

Offline

Help fund CrunchBang, donate to the project!

#27 2012-04-27 11:35:47

corenominal
root
From: Lincoln, UK
Registered: 2008-11-20
Posts: 4,886
Website

Re: Hot corners and aero'esque window snapping

AlanD wrote:
Tunafish wrote:
Xlib.protocol.request.QueryExtension
Xlib.protocol.request.QueryExtension

These messages also happens in any of the python xlib examples(at least for me). Its not an error, per se, but rather just an alert. A developer probably left a print statement in their code. It likely does not relate to your problem.

Totally, I forgot to mention that the above ouput is normal and expected. smile

Offline

#28 2012-04-27 13:10:27

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,201

Re: Hot corners and aero'esque window snapping

corenominal wrote:

Okay, sounds like an issue with xlib and cursor detection. Could you describe your set-up, screen and input device, etc?

I could, except I don't have much time now. I'm going to London for a couple of days.  smile


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#29 2012-04-27 13:13:09

corenominal
root
From: Lincoln, UK
Registered: 2008-11-20
Posts: 4,886
Website

Re: Hot corners and aero'esque window snapping

Tunafish wrote:
corenominal wrote:

Okay, sounds like an issue with xlib and cursor detection. Could you describe your set-up, screen and input device, etc?

I could, except I don't have much time now. I'm going to London for a couple of days.  smile

Okay, no problem. Enjoy your trip smile

Offline

#30 2012-04-27 20:25:47

Milozzy
#! Die Hard
Registered: 2011-02-22
Posts: 586
Website

Re: Hot corners and aero'esque window snapping

Great idea Boss!!! This is truly a great improvement for our beloved #!

corenominal wrote:

Okay, it now has some basic session management and so undoing aero snapping should work, at least it does on my systems smile

I'm testing it, aero snap work well (without a " window preview" it was a little bit hard to understand it in the first place) but I do not know how to undoing it...drag the window out of the edge of the screen does not help...
Any suggestion?

Thanks!

edit: got it, I have to drag the window toward the edge of the screen again, not away!

with your experiment on the scripts, maybe you can take a look at this too:  http://forum.xfce.org/viewtopic.php?id=6841

Last edited by Milozzy (2012-04-27 20:31:42)

Offline

#31 2012-04-30 18:27:01

drmoris
#! Member
Registered: 2012-04-22
Posts: 53

Re: Hot corners and aero'esque window snapping

~$ cb-wmhacks --daemon &
[3] 5518
[2]   Exit 127                cb-wmhacks --daemon
bash: cb-wmhacks: command not found

((( but I found cb-hotcorners with tabbing. is it that?)))

Offline

#32 2012-04-30 18:37:18

corenominal
root
From: Lincoln, UK
Registered: 2008-11-20
Posts: 4,886
Website

Re: Hot corners and aero'esque window snapping

drmoris wrote:

~$ cb-wmhacks --daemon &
[3] 5518
[2]   Exit 127                cb-wmhacks --daemon
bash: cb-wmhacks: command not found

((( but I found cb-hotcorners with tabbing. is it that?)))

Yes, sorry, I updated the package earlier today, splitting the script into 2. I have removed the aero snapping edge detection for now -- it was too buggy and should probably be handled by the WM. More information about usage can be found here: https://github.com/corenominal/cb-wmhacks

Offline

#33 2012-05-02 14:28:33

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,201

Re: Hot corners and aero'esque window snapping

Back from London smile
After updating cb-wmhacks it was gone hmm    O... I see... it's two different scripts now!
The good news: cb-hotcorners is working perfectly
The bad news: cb-aerosnap doesn't do anything apart from showing the help message.

$ cb-aerosnap --aero-left
cb-aerosnap: usage:
  --help          show this message and exit
  --aero-left     attempt to snap active window to left of screen
  --aero-right    attempt to snap active window to right of screen

Corenominal, maybe you should update your first post if others want to test as well...

Edit: I looked at the code of cb-aerosnap and found out the parameters are changed:
--left instead of --aero-left and --right instead of --aero-right
It works now! The window is moved to the left (or right) half of the screen and vertically maximized.
This also brings some disappointment, as I already have keybindings to do this with openbox. So, what's the profit of the aerosnap script?

Edit2: I didn't look at the instructions on github... it shows the right parameters.

Last edited by Tunafish (2012-05-02 14:54:10)


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#34 2012-05-03 07:23:37

corenominal
root
From: Lincoln, UK
Registered: 2008-11-20
Posts: 4,886
Website

Re: Hot corners and aero'esque window snapping

Tunafish wrote:

Corenominal, maybe you should update your first post if others want to test as well...

I have now edited the original post to point to GitHub. Sorry for the confusion.

This also brings some disappointment, as I already have keybindings to do this with openbox. So, what's the profit of the aerosnap script?

Well, originally the idea was to have left/right window snapping bound to screen edges, but I am almost sure that this is impossible to implement cleanly outside of the window manager, so now the script is just called via command arguments. hmm

Regarding your keybindings, what commands are you using?

Offline

#35 2012-05-03 11:07:12

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,201

Re: Hot corners and aero'esque window snapping

I have now edited the original post to point to GitHub. Sorry for the confusion.

Thanks for the confusion, gave me a reason to look into the code. I'm trying to learn some python atm.

I changed my keybindings when I became the lucky owner of a T410 Thinkpad. It has two extra keys (Back and Forward). I use these two to have the aerosnap-left and -right behavior. And arrow keys for making the windows 1/4 and moving them around the screen.
The first two keybindings do the same (I think) as cb-aerosnap.

    <keybind key="W-XF86Forward">
      <action name="UnmaximizeHorz"/>
      <action name="MaximizeVert"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <x>-0</x>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-XF86Back">
      <action name="UnmaximizeHorz"/>
      <action name="MaximizeVert"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <x>0</x>
        <y>0</y>
      </action>
    </keybind>    
    <keybind key="W-Left">
      <action name="UnmaximizeHorz"/>
      <action name="UnmaximizeVert"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <x>0</x>
      </action>
    </keybind>
    <keybind key="W-Right">
      <action name="UnmaximizeHorz"/>
      <action name="UnmaximizeVert"/>
      <action name="MoveResizeTo">
        <width>50%</width>
        <x>-0</x>
      </action>
    </keybind>
    <keybind key="W-Up">
      <action name="UnMaximizeHorz"/>
      <action name="UnMaximizeVert"/>
      <action name="MoveResizeTo">
        <height>48%</height>
        <y>0</y>
      </action>
    </keybind>
    <keybind key="W-Down">
      <action name="UnmaximizeVert"/>
      <action name="UnmaximizeHorz"/>
      <action name="MoveResizeTo">
        <height>48%</height>
        <y>-0</y>
      </action>
    </keybind>    
    <keybind key="W-Return">
      <action name="MaximizeFull"/>
    </keybind>

Last edited by Tunafish (2012-05-03 11:10:23)


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#36 2012-05-03 12:07:32

corenominal
root
From: Lincoln, UK
Registered: 2008-11-20
Posts: 4,886
Website

Re: Hot corners and aero'esque window snapping

Tunafish wrote:

The first two keybindings do the same (I think) as cb-aerosnap.

Pretty much, yes, but cb-aerosnap has some basic session management, so hitting the keybind twice will return the window to its original position. smile

Offline

#37 2012-05-03 12:33:04

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,201

Re: Hot corners and aero'esque window snapping

corenominal wrote:
Tunafish wrote:

The first two keybindings do the same (I think) as cb-aerosnap.

Pretty much, yes, but cb-aerosnap has some basic session management, so hitting the keybind twice will return the window to its original position. smile

That's great! I didn't know about this feature. Thanks.


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#38 2012-05-06 10:52:01

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,201

Re: Hot corners and aero'esque window snapping

Hi Philip,
I'm using your aerosnap script now. It works fine, just two remarks:
- every time I 'unsnap' the window moves a bit down from it's original position. this only happens when using an openbox theme with a border. not really a problem though, just wanted to let you know.
- I would prefer to switch from left to right immediately, without the 'undo' in between. Don't know if this is possible though.
Tuna


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#39 2012-05-06 11:31:26

corenominal
root
From: Lincoln, UK
Registered: 2008-11-20
Posts: 4,886
Website

Re: Hot corners and aero'esque window snapping

Tunafish wrote:

Hi Philip,
I'm using your aerosnap script now. It works fine, just two remarks:
- every time I 'unsnap' the window moves a bit down from it's original position. this only happens when using an openbox theme with a border. not really a problem though, just wanted to let you know.

Hmm, I thought I fixed that hmm Roughly how many pixels out is it? If you could use xprop to report the geometry, before and after, that would be great smile

- I would prefer to switch from left to right immediately, without the 'undo' in between. Don't know if this is possible though.
Tuna

It should be doable, I'll take a look at it. Thanks for the feedback smile

Offline

#40 2012-05-06 15:23:15

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,201

Re: Hot corners and aero'esque window snapping

I don't see window geometry with xprop, so here's the output of xwininfo:
Original window

Absolute upper-left X:  257
  Absolute upper-left Y:  279
  Relative upper-left X:  2
  Relative upper-left Y:  22
  Width: 710
  Height: 397
  Border width: 0
  -geometry 99x28+255+257

cb-aerosnap --left:

  Absolute upper-left X:  2
  Absolute upper-left Y:  22
  Relative upper-left X:  2
  Relative upper-left Y:  22
  Width: 640
  Height: 775
  Border width: 0
  Corners:  +2+22  -638+22  -638-3  +2-3
  -geometry 89x55+0+0

Undo state:

  Absolute upper-left X:  261
  Absolute upper-left Y:  283
  Relative upper-left X:  2
  Relative upper-left Y:  22
  Width: 710
  Height: 397
  Border width: 0
  Corners:  +261+283  -309+283  -309-120  +261-120
  -geometry 99x28+259+261

So, it moved 4 points horizontal and vertical, which is exact the size of the border (2x2points).


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#41 2012-05-06 18:52:00

falldown
#! Samurai
Registered: 2011-09-01
Posts: 1,471

Re: Hot corners and aero'esque window snapping

Cool piese of script corenominal.
Very easy to setup and use!
I'm testing it out now on Waldorf..
and the keybinding makes it a great feature to have! smile


Slightly off topic
Really cool that you updated the xdotools version in the repos. We (and by "we" I mean MrPeachy) have been doing some Interactive conky stuff and the older versions of xdotools was problematic.
Thank you sir!

Last edited by falldown (2012-05-06 19:07:13)

Offline

#42 2012-05-06 20:16:22

kozimodo
#! Member
From: Baltimore, MD
Registered: 2008-11-30
Posts: 58

Re: Hot corners and aero'esque window snapping

Pretty cool and great idea!  Two questions.  First, is it possible to get it to open the menu?  Second, is it possible to get it to minimize/restore windows?

Offline

#43 2012-05-06 20:34:34

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,201

Re: Hot corners and aero'esque window snapping

kozimodo wrote:

Pretty cool and great idea!  Two questions.  First, is it possible to get it to open the menu?  Second, is it possible to get it to minimize/restore windows?

If you have xdotool installed you can open the menu by editing ~/.config/cb-hotcorners/cb-hotcornersrc :

bottom_right_corner_command = xdotool key super+space

sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#44 2012-05-06 21:01:15

kozimodo
#! Member
From: Baltimore, MD
Registered: 2008-11-30
Posts: 58

Re: Hot corners and aero'esque window snapping

Tunafish wrote:

If you have xdotool installed you can open the menu by editing ~/.config/cb-hotcorners/cb-hotcornersrc :

bottom_right_corner_command = xdotool key super+space

Many thanks!

Offline

#45 2012-05-07 07:22:06

Milozzy
#! Die Hard
Registered: 2011-02-22
Posts: 586
Website

Re: Hot corners and aero'esque window snapping

kozimodo wrote:

Pretty cool and great idea!  Two questions.  First, is it possible to get it to open the menu?  Second, is it possible to get it to minimize/restore windows?

Regarding the second question, you could take a look at this other script: http://forum.xfce.org/viewtopic.php?id=6841

I already use it on my machine!

Offline

#46 2012-06-08 13:54:35

zengrapefruit
#! Junkie
Registered: 2009-12-11
Posts: 262

Re: Hot corners and aero'esque window snapping

"Brightside" is available in the repos; it does a similar job to the hotcorners script but also allows desktop switching when the cursor is pushed against the screen edge. GUI config, too.

(Note: I only did a short test (2mins) as it's not something I'd use. Couldn't work out how the Screen Edge thing worked but the corners seemed to work fine.)

Offline

#47 2012-06-08 14:00:42

pvsage
Internal Affairs
From: North Carolina
Registered: 2009-10-18
Posts: 9,001

Re: Hot corners and aero'esque window snapping

^ Brightside works with Openbox?

Description: Add reactivity to the corners and edges of your GNOME desktop
Brightside provides "edge flipping" to allow you to switch to the adjacent workspace
simply by pressing your mouse against the edge of the screen.


while ( ! ( succeed = try() ) );
We've earned a reputation as a nice, friendly community; please help us keep it that way.

Offline

#48 2012-06-08 14:09:49

zengrapefruit
#! Junkie
Registered: 2009-12-11
Posts: 262

Re: Hot corners and aero'esque window snapping

It appears to.

The screen edge thing worked but it didn't feel 'right'. Perhaps it was just me not knowing how to use it properly.

Try it and see. smile

To configure, type 'brightside-properties' into gmrun.

Last edited by zengrapefruit (2012-06-08 14:12:32)

Offline

#49 2012-06-15 14:13:51

ChickenPie4Tea
#! Junkie
Registered: 2012-02-17
Posts: 338

Re: Hot corners and aero'esque window snapping

If I understand this correctly you have 4 corners so can link it to 4 actions?
What about adding a modifyer key which would then give you 8 actions?
Edit: i notice a youtube video on it
http://www.youtube.com/watch?v=kTi14_VA … re=g-all-u

Last edited by ChickenPie4Tea (2012-06-15 14:16:37)


Troll = not a fanatic

Online

Help fund CrunchBang, donate to the project!

#50 2012-06-15 14:21:56

corenominal
root
From: Lincoln, UK
Registered: 2008-11-20
Posts: 4,886
Website

Re: Hot corners and aero'esque window snapping

ChickenPie4Tea wrote:

What about adding a modifyer key which would then give you 8 actions?

That might be nice. Patches welcome smile
https://github.com/corenominal/cb-wmhacks

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo