Modify terminal configs to be simpler and to work with modern gnome-terminal. The 'position' property in the window matching needs work, but this is better than the non-feature I had before.

This commit is contained in:
Anna Rose 2015-08-31 15:33:17 -04:00
parent 9e0415ccc4
commit a1defec029

View File

@ -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)) )