SEARCH

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

You are not logged in.

#26 2015-08-30 21:21:37

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Python coder needed for bl-aerosnap script!

Unia wrote:

I just figured out why it runs differently for you and I. You're using your system default python, python2 in your case. I run my system default, python3. The xlib modules for both versions are different, and in the python2 case, behave incorrectly. The script will work correctly if you install the python3 xlib module (python-xlib package, I believe).

That was going to be the next thing I try (I should have noticed :8 ). I can just change the first line to

#!/usr/bin/python3

Is python2-xlib installed? There is no EWMH import, it is a class defined in the script itself. Can I see the complete error message?

To be checked...


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

Be excellent to each other!

#27 2015-08-30 21:25:46

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Python coder needed for bl-aerosnap script!

^ Or use:

$ python3 /path/to/script

Do notice my edit in my previous post!

EDIT: For me, the script works correctly regardless of which python version I use. It never moves windows in front of or behind a horizontal tint2 and respects horizontal margins. Vertical stuff is a known issue.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#28 2015-08-30 21:33:47

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Python coder needed for bl-aerosnap script!

Unia wrote:

Do notice my edit in my previous post!

Yep, already seen it wink

BTW, latest commit of my bash version: damo-aerosnap.sh


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#29 2015-08-30 21:43:20

pingu
#! Junkie
Registered: 2014-12-05
Posts: 367

Re: Python coder needed for bl-aerosnap script!

wow.. this made me try to mess with the script and I ended up finding that the command had to be

cb-aerosnap --left/right

instead of --`aero-right/left` as the --help suggests.

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

although that's probably fixed. (the copyright thing says 2004.. and I have no idea if I've gotten from bl or cb, or from somwhere in the forums).
that fixed it for me.. this is the old one though, I'll take a look unia`s version .

I won't be able to help much, if at all, though; I'm neither a python coder, nor a coder. but I think python is fun so I'll check it out. smile

Last edited by pingu (2015-08-30 22:19:25)


"We don't merge kernel code just because user space was written by a retarded monkey on crack."
Linus f****g Trovalds

Offline

#30 2015-08-30 22:11:04

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Python coder needed for bl-aerosnap script!

@damo It can very well be that the --top/--bottom flags are misbehaving because you have margins set in your rc.xml. Try setting them all to 0.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

Offline

#31 2015-08-30 22:32:10

pingu
#! Junkie
Registered: 2014-12-05
Posts: 367

Re: Python coder needed for bl-aerosnap script!

I'm getting crazy results with two monitors of different sizes (with both unia's and damo's scripts), but they are working fine with one screen. it's not respecting tint2  and it's covering it with the --bottom command.


"We don't merge kernel code just because user space was written by a retarded monkey on crack."
Linus f****g Trovalds

Offline

#32 2015-08-30 22:34:11

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Python coder needed for bl-aerosnap script!

pingu wrote:

wow.. this made me try to mess with the script and I ended up finding that the command had to be

cb-aerosnap --left/right

instead of --`aero-right/left` as the --help suggests.

This was fixed for bl-aerosnap


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#33 2015-08-30 22:34:17

ostrołęk
CB Member
Registered: 2015-08-13
Posts: 110

Re: Python coder needed for bl-aerosnap script!

Which bl-aerosnap we are talking about? The one in BunsenLabs github repos, the same as cb-aerosnap or or the one in Unia's BunsenLab github repos?

Offline

#34 2015-08-30 22:47:06

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Python coder needed for bl-aerosnap script!

Unia wrote:

@damo It can very well be that the --top/--bottom flags are misbehaving because you have margins set in your rc.xml. Try setting them all to 0.

No dice. With margin=0 in rc.xml (and theme border=1), and using --left for example, xwininfo gives

[damo@cb-desktop ~]$ xwininfo
...
  Absolute upper-left X:  1
....

With margin=1, xwininfo still gives

[damo@cb-desktop ~]$ xwininfo
...
xwininfo: Window id: 0x3200004 "damo@cb-desktop: ~"

  Absolute upper-left X:  1

Because it is referencing the window frame inside the border, it should say

  Absolute upper-left X:  2

BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#35 2015-08-30 22:49:18

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Python coder needed for bl-aerosnap script!

ostrolk wrote:

Which bl-aerosnap we are talking about? The one in BunsenLabs github repos, the same as cb-aerosnap or or the one in Unia's BunsenLab github repos?

@pingu is asking about cb-aerosnap from waldorf, @Unia is using his forked version. The fix I referred to is in the default bl-aerosnap in bunsenlabs/github


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#36 2015-08-30 22:53:23

damo
#! gimpbanger
From: N51.5 W002.8 (mostly)
Registered: 2011-11-24
Posts: 5,434

Re: Python coder needed for bl-aerosnap script!

pingu wrote:

I'm getting crazy results with two monitors of different sizes (with both unia's and damo's scripts), but they are working fine with one screen. it's not respecting tint2  and it's covering it with the --bottom command.

I know why that is with my script. I haven't tested for different sizes/resolutions, but using "screenwidth/2" :8


BunsenLabs Group on deviantArt
damo's gallery on deviantArt
Openbox themes
Forum Moderator smile

Offline

#37 2015-08-30 23:31:14

Unia
#! Octo-portal-pussy
From: The Netherlands
Registered: 2010-07-17
Posts: 4,634
Website

Re: Python coder needed for bl-aerosnap script!

I'll install BunsenLabs in a VM tomorrow to see if I can reproduce your horizontal margin / --top / --bottom issues.

Other confirmed issues:
* Vertical margins (whether they are from Openbox or a panel) are not respected;
* Multimonitor support is nonexistent, since I always take the default screen. I will work on this once all other issues are resolved.


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

I am a #! forum moderator. Feel free to send me a PM with any question you have!

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.
Server: acrobat

Debian Logo