Jeff Abrahamson on Wed, 3 Sep 2003 21:42:06 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] .sawfish/rc


As per request from tonight's meeting, here is my sawfish init file.

-- 
 Jeff

 Jeff Abrahamson  <http://www.purple.com/jeff/>
 GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B
(autoload 'prompt-for-string "sawfish/wm/util/prompt-extras")
(require 'sawfish.wm.util.prompt)


(defun my_readfile (file-name)
  (setq definition nil)
  (let ((fd (open-file file-name 'read)) (reading t))
        (while reading
            (let ((line (read-line fd)))
                  (if line
                    (setq definition (concat definition line "\n"))
                    (progn (setq reading nil) (close-file fd))))))
  definition)

(defun print-command-to-screen (string_command)
    (system (concat string_command " > /tmp/.sawfish.out 2> /tmp/.sawfish.err"))
    (display-message (my_readfile "/tmp/.sawfish.out")))


; (bind-keys global-keymap "C-S-_" 'size-window-subtract-row)
; (bind-keys global-keymap "C-S-+" 'size-window-add-row)

; Implicit shift for +/-
(bind-keys global-keymap "C-_" 'size-window-subtract-row)
(bind-keys global-keymap "C-+" 'size-window-add-row)

(bind-keys global-keymap "C-S-Up" 'grow-window-up)
(bind-keys global-keymap "C-S-Down" 'grow-window-down)
(bind-keys global-keymap "C-S-Left" 'grow-window-left)
(bind-keys global-keymap "C-S-Right" 'grow-window-right)

(bind-keys global-keymap "C-S-n" (lambda () (display-message nil)))
(bind-keys global-keymap "C-S-k" 'describe-key-to-screen)
(bind-keys global-keymap "C-S-t" (lambda () (print-command-to-screen "date")))
(bind-keys global-keymap "C-S-c" (lambda () (print-command-to-screen "cal")))
(bind-keys global-keymap "C-S-d" (lambda ()
				   ((let ((dictword (prompt-for-string "Find word: ")))
				      (print-command-to-screen (concat "dict -m " dictword))))))
(bind-keys global-keymap "C-S-e" (lambda ()
				   ((let ((dictword (prompt-for-string "Define word: ")))
				      (print-command-to-screen (concat "dict " dictword))))))

(bind-keys global-keymap "C-S-F9" '(run-shell-command "xscreensaver-command -lock"))

;(bind-keys global-keymap "C-M-j" '(run-shell-command "jpilot"))
(bind-keys global-keymap "C-S-j" '(run-shell-command "jpilot"))
;(bind-keys global-keymap "C-M-m" '(run-shell-command "mozilla"))
(bind-keys global-keymap "C-S-m" '(run-shell-command "mozilla"))

;(bind-keys global-keymap "C-M-x" '(run-shell-command "bin/xt"))
(bind-keys global-keymap "C-S-x" '(run-shell-command "bin/xt"))
; (bind-keys global-keymap "C-S-x" '(run-shell-command "bin/xt"))
;(bind-keys global-keymap "C-M-g"
;	   '(run-shell-command "gnome-terminal --use-factory --start-factory-server"))
(bind-keys global-keymap "C-S-g"
 	   '(run-shell-command "gnome-terminal --use-factory --start-factory-server"))'

Attachment: pgpMuMRKDPgpr.pgp
Description: PGP signature