diff --git a/sawfish/rc b/sawfish/rc index ec24efc..c5dd0b4 100644 --- a/sawfish/rc +++ b/sawfish/rc @@ -1,4 +1,5 @@ (require 'sawfish.wm.defaults) +(require 'sawfish.wm.ext.match-window) ;;; Programs to run on startup (system "setxkbmap dvorak") @@ -16,9 +17,9 @@ (defun launch-app (app) (case app ('chrome (system "google-chrome --disable-gpu-compositing &")) - ('term-code (system "gnome-terminal -t Code &")) - ('term-quick (system "gnome-terminal -t Quick &")) - ('term-std (system "gnome-terminal &")) )) + ('term-code (system "gnome-terminal --role code --geometry=120x34 &")) + ('term-quick (system "gnome-terminal --role quick --geometry=80x24 &")) + ('term-std (system "gnome-terminal --role terminal --geometry=100x28 &")) )) ; Note that the documentation for 'insert-workspace' is wrong, and we insert ; *after* the provided value, not before @@ -41,19 +42,6 @@ (defun send-workspace-to-top () (move-workspace current-workspace (- (cdr (workspace-limits)) current-workspace)) ) -(defun configure-basic-terminal (window) - (progn - (resize-window-to window 1350 800) - (move-window-to window (- (screen-width) 1355) (- (screen-height) 855)) )) - -(defun configure-quick-terminal (window) - (move-window-to window 1811 0) ) - -(defun configure-code-terminal (window) - (progn - (resize-window-to window 1600 1024) - (move-window-to window (- (screen-width) 1605) (- (screen-height) 1074)) )) - (defun build-new-workspace () (progn (launch-app-in-new-workspace 'chrome) @@ -142,9 +130,9 @@ ;;; Hooks (add-hook 'idle-hook delete-empty-workspaces) -(add-hook 'after-add-window-hook - (lambda (window) - (if (string-match "Terminal" (window-name window)) (configure-basic-terminal window)) - (if (string-match "Quick" (window-name window)) (configure-quick-terminal window)) - (if (string-match "Code" (window-name window)) (configure-code-terminal window)) -)) +;;; Window Matching +(add-window-matcher '((WM_WINDOW_ROLE . "^code|terminal$")) + '((position . south-east)) ) + +(add-window-matcher '((WM_WINDOW_ROLE . "^quick$")) + '((position . north-east)) )