You are not logged in.

#1 2010-11-05 21:18:17

Japanlinux
Member
Registered: 2010-05-18
Posts: 173

Pekwm keybind multiple actions?

hello! i'm using pekwm as a window manager (love it ;D) but I'm wondering if someone out there can help me out. I have set up my keybinds in pekwm nicely, but there is one thing i'm wondering about. Can I do one keybind to do 2 things? What i am trying to do is a push a key (Mod4+Right)  and have a window move to the right of a screen and fill half the screen. In this way, I can set up an opposite bind (Mod4+Left) so that i have 2 windows side by side. However, I have 2 issues with this. I have managed to have the bind move to the right side of the screen (MoveToEdge RightEdge), but I am unsure how to have it issue a second command. I have tried several things but can't figure it out.

Secondly, is there a command to fill half the screen. I am aware of the GrowDirection command, but what I want is for it to grow until mid screen. Alternatively, If someone can help me move the window to center then I can just grow to left/right edge. However the centering commands move the CENTER of the window to the point, not the edge of the window, so that wouldn't work so well.

I am aware I could probably use pytyle to do something like this, but I'm determined to have pekwm do it if possible. >:D

Offline

#2 2010-11-06 20:27:58

Japanlinux
Member
Registered: 2010-05-18
Posts: 173

Re: Pekwm keybind multiple actions?

Well, until someone can assist me in the above, I think I'll just have set 2 commands (one to move to screen center, than to fill in direction left/right) and then resize the window so it fill half the screen instead of 50+% (depending on window original size). This is a 3 step process, as opposed to a 1 step that i'm hoping for, but that's life :S

Offline

#3 2010-11-09 20:17:44

BurntSushi
Member
From: Massachusetts
Registered: 2009-06-28
Posts: 362
Website

Re: Pekwm keybind multiple actions?

I'm unfamiliar with PekWM, but this is probably something that PekWM would need to support natively, or at the very least, provide a scripting configuration... But I don't think it does.

Yes, PyTyle could do this, but the best tool for the job for you, I think, is devilspie. It's in the extra repo :-)


Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.

Tu ne cede malis sed contra audentior ito

Offline

#4 2010-11-09 21:08:51

hbekel
Member
Registered: 2008-10-04
Posts: 311

Re: Pekwm keybind multiple actions?

You could also use xdotool:

Assuming a 1024x768 display, bind Mod4-Left to execute

xdotool getwindowfocus windowmove 0 0 windowsize 512 768

and Mod4-Right to

xdotool getwindowfocus windowmove 512 0 windowsize 512 768

Offline

#5 2010-11-09 23:16:47

Japanlinux
Member
Registered: 2010-05-18
Posts: 173

Re: Pekwm keybind multiple actions?

Thank you for the replies. I have never even heard of Devilspie, and boy, that looks like something I could have a lot of fun with xD
Sounds like xdotool will work great for me, thanks! I'll play around with Devilspie and see what I can come up with too ;P

Too bad pekwm doesn't seem to support what I was hoping for, but I'm glad there are some other tools to do what I wanted, while still using pekwm.

Offline

Board footer

Powered by FluxBB