You are not logged in.
@markp1989
You should call the script with a parameter like swap,simple,maximize etc ....
that was a fast reply, i tried simple , maximize and swap and i still get the same output.
could this have anything to do wiht me running dual monitors? two 1440*900 ?
Desktop: E8400@4ghz - DFI Lanparty JR P45-T2RS - 4gb ddr2 800 - 30gb OCZ Vertex - Geforce 8800 GTS - 2*19" LCD
Server/Media Zotac GeForce 9300-ITX I-E - E5200 - 4gb Ram - 2* ecogreen F2 1.5tb - 1* wd green 500gb - PicoPSU 150xt - rtorrent - xbmc - ipazzport remote - 42" LCD
Offline
May be.. which windowmanager are you using? can you post the outputs of wmctrl -d and wmctrl -lG
Offline
im running openbox.
[mark@markspc ~]$ wmctrl -d
0 * DG: N/A VP: N/A WA: N/A desktop 1
[mark@markspc ~]$ wmctrl -lG
0x00600003 4294967295 0 874 2880 26 markspc panel
0x00800001 4294967295 1438 771 1442 103 markspc Conky (markspc)
0x00a00001 4294967295 -1 771 1442 103 markspc Conky (markspc)
[mark@markspc ~]$
edit: wmctrl -lG doenst list my other windows, like firefox, or xterm?
btw thats for your speedy replys
Last edited by markp1989 (2009-03-31 20:55:21)
Desktop: E8400@4ghz - DFI Lanparty JR P45-T2RS - 4gb ddr2 800 - 30gb OCZ Vertex - Geforce 8800 GTS - 2*19" LCD
Server/Media Zotac GeForce 9300-ITX I-E - E5200 - 4gb Ram - 2* ecogreen F2 1.5tb - 1* wd green 500gb - PicoPSU 150xt - rtorrent - xbmc - ipazzport remote - 42" LCD
Offline
I tried this in XFWM 4.6, and it didn't work. The borders all overlapped.
Offline
@smartboy .. you have to adjust the border and titlebar widths in the config file to match your window decorations.
Offline
I wrote an addon that changes the width factor in .stilerrc by a percentage. Useful for something like Mod4+h and Mod4+l in Awesome.
#! /usr/bin/python
import os, sys, ConfigParser, commands
rcfile = os.getenv('HOME')+"/.stilerrc"
config = ConfigParser.RawConfigParser()
config.read(rcfile)
MwFactor = config.getfloat("default","MwFactor")
MwFactor += float(sys.argv[1]) *.01
config.set("default","MwFactor",MwFactor)
cfg = open(rcfile,'w')
config.write(cfg)
cfg.close()
commands.getoutput("stiler swap")
It just takes a positive or negative percent as an argument. Note that this changes your width factor on every desktop.
: () { : | :& } ;:
Offline
Soulfx has sent me a few patches for dual monitor support and for a grid option like in the grid plugin of compiz where you can move/resize a window to any part of the window grid. I have pulled all the patches into a new branch "grid". Partly because i don't use dual monitor much and partly because of inherent laziness, that part remains mostly untested. So all of you who are interested in dual monitor support , please try it out and give your comments/bug reports.
http://github.com/TheWanderer/stiler/tree/grid
I'm a big fan of the compiz grid plugin, but at work I don't have a
computer that can run compiz. This patch adds grid like functionality
to stiler similarly to compiz's grid plugin. To make using the grid
functionality a little easier I've included a sample xbinkeysrc file
that I use. Ctrl+Alt+Numpad1 - Numpad9 correspond to the different
grid positions a window can be placed into. Repeatedly pressing the key
combination selects different grid widths for the window.While integrating the grid functionality into stiler I fixed a few bugs
I encountered while running it on metacity. Mainly there is an issue
where wmctrl isn't able to perform both a resize and move in the same
command.I've also added in a filter_excluded function for excluding certain
types of windows from being tiled. Currently it filters out UTILITY
windows and windows that are minimized. More filters could be added
if needed.
I have a dual monitor setup at work running nvidia's TwinView. I've added
support to the grid options for a dual monitor setup. More than two monitors
could probably be supported, but right now the math only handles two.I am very happy with the results.
Thanks for creating this wonderful script and sharing it with us!
@soulfx
Thanks a lot for the patches
Offline
Really useful script, thanks! I'm using it right now with openbox.
I tried the grid branch and found it extremely slow compared with the main one: 0.2ms vs 0.08ms, the lag is noticeable. I have only one monitor btw.
Thanks again
Offline
I have noticed the lag as well (especially on my computer at work). A large portion of the lag comes from the filter_excluded function. A patch has been sent to u_no_hu that disables window filtering when it isn't needed.
Offline
Uhm, you are right soulfx. I tried a few prints and filter_excluded is not even working here.
Code:
for win in Windows:
print win
window_type = commands.getoutput("xprop -id "+win+" _NET_WM_WINDOW_TYPE | cut -d_ -f10").split("\n")[0]
print window_type
window_state = commands.getoutput("xprop -id "+win+" WM_STATE | grep \"window state\" | cut -d: -f2").split("\n")[0]
print window_state
output:
0
xprop: error: Invalid window id format: 0.
xprop: error: Invalid window id format: 0.
x
xprop: error: Invalid window id format: x.
xprop: error: Invalid window id format: x.
3
X Error of failed request: BadWindow (invalid Window parameter)
X Error of failed request: BadWindow (invalid Window parameter)
6
[ten lines more with the same errors]
If a leave just "return Windows" everything works fine without lag.
Edit:
def filter_excluded(Windows):
print Windows
print len(Windows)
$ stiler_slow.py top_left
0x3600009
9
I have two terminals, firefox and gvim open
Edit 2:
line 72
def get_active_window():
active_window_list = str(hex(int(commands.getoutput("xdotool getactivewindow 2>/dev/null").split()[0])))
return filter_excluded(active_window_list)
get_active_window() only return one number, it shouldn't pass it through filter_excluded(), which expect a list.
Last edited by Thor (2009-04-09 14:19:43)
Offline
Hi,
I have updated the grid/dualscreen branch with new patches.[Disclaimer: Not tested thoroughly]
I disabled the window filtering to improve performance a little. There is an
option in the stilerrc to enable it again if needed. The README file has been
updated to explain the stilerrc options a little better. A bug where maximized
windows were not capable of being tiled has been fixed.
- disabled window filtering and added option to enable it
- windows are filtered only when option is enabled and using the simple
layout
- simplified argument checking and option execution
- updated README to explain stilerrc options and known issues
- default stilerrc is automatically generated from ConfigParser
defaults
- unmaximize windows before attempting to resize and move them
Offline
Hi, a bug report can be ?
top, left, bottom and right ignore the existence of the panel making the windows be put under it, looking at the code I found in top(),left(),bottom() and right() respectively that it assign
PosY=TopPadding
while simple() (which works fine) assign it to OrigY. If I put
PosY=TopPadding+OrigY
it works as expected. I'm using gnome-panel with openbox
Edit: I'm using the grid branch
Last edited by Thor (2009-04-11 08:45:54)
Offline
Thanks for the detailed bug reports Thor. I'll roll up the fix into a patch that will be sent out later this week.
Offline
just cloned git and I'm having this problem:
joao@oi ~/git/stiler $ python stiler.py simple
stiler.py:74: Warning: 'with' will become a reserved keyword in Python 2.6
File "stiler.py", line 74
with open(file, 'w') as f:
^
SyntaxError: invalid syntax
ps: I've installed gracefully xdotool and wmctrl.
joao@oi /tmp/stiler $ wmctrl -d
0 * DG: 1024x768 VP: 0,0 WA: 0,0 1024x734 desktop 1
1 - DG: 1024x768 VP: 0,0 WA: 0,0 1024x734 desktop 2
2 - DG: 1024x768 VP: 0,0 WA: 0,0 1024x734 desktop 3
3 - DG: 1024x768 VP: 0,0 WA: 0,0 1024x734 desktop 4
4 - DG: 1024x768 VP: 0,0 WA: 0,0 1024x734 desktop 5
Offline
I was using a stable version os python, prior to 2.6
Apparently it won't work in < 2.6.
Offline
@joqueza
from __future__ import with_statement
that will fix it
Offline
@joqueza
from __future__ import with_statement
that will fix it
This was already answered in page 3, I'm sorry.
Nice work. For some strange reason, Vertical/Horizontal tilling was only working in Ubuntu's xdotool (ver. 20080606-1) in the virtual screen number 1, not in the other ones. So to upgrade to the latest version, all I had to do was simply:
sudo apt-get install libxtst-dev libx11-xcb-dev wmctrl; make; sudo make install
Btw, do you plan on having something like: Alt+H Alt+L to resize the window either vertically/horizontally?
Thanks
Last edited by joqueza (2009-04-14 15:55:36)
Offline
Btw, do you plan on having something like: Alt+H Alt+L to resize the window either vertically/horizontally?
Thanks
Look up 9 posts above you, josomebody posted a script that does that and it works great.
Offline
First, thanks, it's a really neat application!
But I'm having a slight problem with the empathy contactwindow.
When the contactwindow is minimized to the tray, wmctrl still thinks it is visible. In the output of "wmctrl -lG" tt has a width and height, so it can't really see the difference.
Can anybody think of a solution? :-)
--( anduril )--[ ~ ]--
--> wmctrl -lG
0x00e00003 -1 0 0 1280 25 anduril Uitgeschoven bovenrandpaneel
0x00e00037 -1 0 1552 1280 24 anduril Uitgeschoven onderrandpaneel
0x0100001e -1 0 0 1280 800 anduril x-nautilus-desktop
0x01003008 0 0 79 1280 724 anduril jeepee - File Browser
0x04400004 0 420 79 860 518 anduril Terminal
0x0460002b 0 834 329 446 224 anduril Ghostbusters 2.avi - GNOME MPlayer
0x02c00037 0 2 106 522 398 anduril Contactenlijst
0x03a00003 0 0 79 1280 724 anduril Arch Linux Forums / Poor man's Tiling Window manager - Opera
Offline
Hi jeepee,
The grid branch has an option that will filter out minimized and utility windows from being tiled. Can you try out the grid branch and see if enabling windowfilter helps? I don't think wmctrl can be used to tell the status of a window (ie. that it is minimized). The grid branch uses xprop WM_STATE to determine if a window is minimized.
Offline
Hi,
I like the idea but I can't use stiler (maybe I'm just too stupid for it?)
For example I bound W-g to "stiler swap" but nothing happens. The only thing that works is stiler left/right which enlarges the termina from that I call it and moves it to the left/right.
When I call stiler swap from the terminal It gives me:
$ stiler swap
Traceback (most recent call last):
File "/usr/bin/stiler", line 302, in <module>
swap()
File "/usr/bin/stiler", line 246, in swap
winlist.remove(active)
ValueError: list.remove(x): x not in list
I'm using openbox and when I type wmctrl -l it doesn't list all my opened apps
$ wmctrl -l
0x00400001 4294967295 molungus stalonetray
0x01200001 4294967295 molungus Conky (molungus)
0x01000001 4294967295 molungus Conky (molungus)
0x01c00025 0 molungus (96%) K3b - The CD and DVD Kreator
This is the output with urxvt, gajim, firefox, k3b and thunar opened.
What I don't get too is how to "edit the script" from what I've read a lot in this thread. Is there also a manual for editing the ~/.stilerrc?
Thanks in advance
Last edited by Barghest (2009-04-25 20:47:48)
Offline
Hi Barghest,
Do you have xdotool installed? Does the command "xdotool getactivewindow" work, if so what does it return? If you don't have xdotool installed you can try installing it.
Last edited by soulfx (2009-04-25 21:08:32)
Offline
Hi Barghest,
Do you have xdotool installed? Does the command "xdotool getactivewindow" work, if so what does it return? If you don't have xdotool installed you can try installing it.
Thanks for the swift reply. Yes xdotool is installed:
$ xdotool getactivewindow
14680071
Offline
@Barghest you are encountering a bug in wmctrl as noted on https://bugzilla.redhat.com/show_bug.cgi?id=426383. If possible I would try and install another version of wmctrl. stiler won't work unless wmctrl is working correctly.
Offline
Thanks...there already was a comment in the packet description:
this patch is needed for x86_64:
"
--- main.c.orig 2005-01-29 04:31:33.000000000 +0100
+++ main.c 2009-01-31 16:52:09.000000000 +0100
@@ -1441,6 +1441,8 @@/* null terminate the result to make string handling easier */
tmp_size = (ret_format / 8) * ret_nitems;
+ /* Correct 64 Architecture implementation of 32 bit data */
+ if(ret_format==32) tmp_size *= sizeof(long)/4;
ret = g_malloc(tmp_size + 1);
memcpy(ret, ret_prop, tmp_size);
ret[tmp_size] = '\0';
"
Since I don't know how to apply such a patch to a PKGBUILD I just downloaded the source and edited the file in the archive (noob inside ;b)
Nevertheless, it works now
Thanks!
Offline