;;-------~---~----------~----------~---- ;; ;; .---..---..-..-..-.-.-..---..-.-.-..-.-.-. ;; \ \ `| |'| || || | | || |-'| | | || | | | ;; `---' `-' `----'`-'-'-'`-' `-----'`-'-'-' ;; ;;-------~---~----------~----------~---- ;; ;; last revision: 2012/07/23 ;; ;; + Software used ATOC: ;; |-> sbcl => 1.0.55 ;; |-> clx => 20120520 ;; |-> cl-ppcre => 2.0.3 ;; `-> stumpwm => git: 2012/07/23 ;; ;;-------~---~----------~----------~---- ;; PATCHES ;;-------~---~----------~----------~---- ;; ;; Window-type-override: ;; http://lists.gnu.org/archive/html/stumpwm-devel/2012-07/msg00000.html ;; (cleaned version that actually applies: http://paste.xinu.at/Hle/) ;; ;; Hex-colours: ;; http://www.mail-archive.com/stumpwm-devel@nongnu.org/msg02640.html ;; ;;-------~---~----------~----------~---- ;; THANKS ;;-------~---~----------~----------~---- ;; ;; to Milomouse, for his seriously complete ;; configuration: ;; http://dotshare.it/dots/49 ;; ;; I've recycled quite a bit from there. ;; ;;-------~---~----------~----------~---- (in-package :stumpwm) ;;-------~---~----------~----------~---- ;; Set Directories ;;---~----~-~-------------~---------~--- (setf *home-dir* (make-pathname :directory (getenv "XDG_CONFIG_HOME")) *stump-dir* (merge-pathnames (make-pathname :directory '(:relative "stumpwm")) *home-dir*) *data-dir* (merge-pathnames (make-pathname :directory '(:relative "storage")) *stump-dir*) *load-dir* (merge-pathnames (make-pathname :directory '(:relative "lisp")) *stump-dir*) *undo-data-dir* (make-pathname :directory "/dev/shm/.1009") *debug-file* (merge-pathnames (make-pathname :name "debug") *stump-dir*) *scratchpad-group-name* ".scratch") ;;-------~---~----------~----------~---- ;; Define Variables ;;---~----~-~-------------~---------~--- ;; Change welcome message (setf *startup-message* "Forget Crackers. Polly needs some CRACK! Give Polly some CRACK!") ;; Make run-or-raise act globally instead of current group (setf *run-or-raise-all-groups* t) ;; URxvt, duh! (defvar *terminal* "urxvt" "Command to start a terminal.") (defvar *terminal-smallfont* "urxvt -fn xft:Pragmata:size=7" "Command to start a terminal with small font.") ;;-------~---~----------~----------~---- ;; Appearance ;;---~----~-~-------------~---------~--- ;; Colors (defun color (key) (let ((colors '(:base00 #x1f1b18 :base01 #x090909 :yellow #xefaf63))) (getf colors key))) ;; Font (set-font "-xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso8859-9") ;; Message Bar (set-fg-color (color :yellow)) (set-bg-color (color :base00)) (set-border-color (color :base01)) (setf *message-window-padding* 10 *message-window-gravity* :bottom-right *input-window-gravity* :bottom-right) ;; Modeline ; (setf *mode-line-foreground-color* "oldlace" ; *mode-line-background-color* "dimgray" ; *mode-line-border-color* "oldlace") ;; Borders (setf *maxsize-border-width* 0 *transient-border-width* 2 *normal-border-width* 1 *window-border-style* :thin) (set-focus-color (color :yellow)) (set-unfocus-color (color :base01)) (set-win-bg-color (color :base00)) ;;-------~---~----------~----------~---- ;; Keyboard & Mouse ;;---~----~-~-------------~---------~--- (set-prefix-key (kbd "s-,")) ;; Focus follows Mouse (setq *mouse-focus-policy* :click) ;;-------~---~----------~----------~---- ;; Startup ;;---~----~-~-------------~---------~--- ;; redefine run-shell-command for 'zsh', change :shell "", and fix a typo. (defcommand run-shell-command (cmd &optional collect-output-p) ((:shell "execute: ")) "Run the specified shell command. If @var{collect-output-p} is @code{T} then run the command synchronously and collect the output." (if collect-output-p (run-prog-collect-output *shell-program* "-c" cmd) (run-prog *shell-program* :args (list "-c" cmd) :wait nil))) (setf *shell-program* (getenv "SHELL")) (defcommand-alias exec run-shell-command) ;; Run These (run-shell-command "xsetroot -cursor_name left_ptr") ; (run-shell-command "feh --bg-tile ~/.wall.jpg") (run-shell-command "killall dzen.sh") (run-shell-command (format nil "~A/stumpwm/dzen/dzen.sh &" (getenv "XDG_CONFIG_HOME"))) ;; Space for dzen (resize-head 0 0 0 1280 784) ;; create given groups while keeping focus on current. (defmacro make-groups-bg (&rest names) (let ((ns (mapcar #'(lambda (n) (concatenate 'string "gnewbg " n)) names))) `(run-commands ,@ns))) ;; restore data from previous exit (state StumpWM was last using), (clear-window-placement-rules) (setf (group-name (first (screen-groups (current-screen)))) "main") (make-groups-bg "web") (if (probe-file (data-dir-file "desktop.lisp")) (restore-from-file (data-dir-file "desktop.lisp"))) (restore-window-placement-rules (data-dir-file "tile-rules.lisp")) (cond ((string-equal (group-name (current-group)) *scratchpad-group-name*) (gother))) ;;-------~---~----------~----------~---- ;; Load ;;---~----~-~-------------~---------~--- (loop for file in '("commands" "functions" "hooks" "keymap" "remember" "websearch" "window_rules") do (load (merge-pathnames (make-pathname :name file :type "lisp" :directory '(:relative "my")) *load-dir*)))