summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-06-17 16:21:55 +0200
committerGravatar Tom Willemse2013-06-17 16:21:55 +0200
commiteb06ac12c47379d65278d3508f88a85bcfab4e58 (patch)
treebd6b84d0295910f8b5612772d10cb86a41481f0e
parent916095eb4cdb241a200c5c72cbc66e87393e7172 (diff)
downloaddotfiles-eb06ac12c47379d65278d3508f88a85bcfab4e58.tar.gz
dotfiles-eb06ac12c47379d65278d3508f88a85bcfab4e58.zip
Automatically place Emacs and URxvt in my preferred places
-rw-r--r--.sawfish/rc17
1 files changed, 17 insertions, 0 deletions
diff --git a/.sawfish/rc b/.sawfish/rc
index 9ba9e8d..5f7da7c 100644
--- a/.sawfish/rc
+++ b/.sawfish/rc
@@ -167,3 +167,20 @@ raise it."
(add-window-matcher '((WM_CLASS . "^(Firefox|Conkeror)/Navigator$"))
'((position . north-east)
(maximized . all)))
+
+(define (term-window-position w)
+ (- (screen-width) (window-width w) 1680))
+
+(add-hook 'place-window-hook
+ (lambda (w)
+ (case (intern (window-class w))
+ ((URxvt)
+ (resize-window-with-hints w 79 24)
+ (move-window-to w (term-window-position w) 0)
+ (grow-window-down w)
+ t)
+ ((Emacs)
+ (resize-window-with-hints w 101 24)
+ (move-window-to w 0 0)
+ (grow-window-down w)
+ t))))