;;--------------------------------------------------------------------------;; ;; ${XDG_CONFIG_DIR:-/howl/conf}/.stumpwmrc ;; ;;--------------------------------------------------------------------------;; ;; author: milomouse ;; ;;--------------------------------------------------------------------------;; ;; versions used ATOC: ;; ;; | sbcl -> 1.1.1-2 ;; ;; | clx -> 0.7.4-2 ;; ;; | cl-ppcre -> 2.0.3-2 ;; ;; | stumpwm -> 0.9.7-80-gb1271a9 Compiled On Thu Dec 08 10:46:16 ;; ;;-TODO/CHANGELOG:----------------------------------------------------------;; ;; >>>-: create a 'dedicate' and 'catchall' window-rule (remember * *) ;; ;; >>--: create a 'dedicate' and 'catchall' hook for changing focus color ;; ;; >>--: have mifo(mplayer-daemon) prompts use filename completion ;; ;; >---: better resize; if neighbour {above} then +ARG else -ARG, etc. ;; ;; >>>-: show frame-indicator for 'resize' only if no window in frame ;; ;; >>>>? command for dedicating current win/frame as the Master win/frame ;; ;; >---: better command for Master; remember Master thru re{loadrc,start} ;; ;; >>>>! command for swapping current window with the Master win/frame ;; ;; >>>>! exchange two windows but keep focus in current frame ;; ;; >>>>! dynamically dump group|screen|desktop|rules to *data-dir* by type ;; ;; >>>>! dynamically load group|screen|desktop|rules from *data-dir* by type;; ;; >>>>! have my 'undo' use group and check current group for undos first ;; ;; >>>>! create a togglable, on-the-fly scratchpad group ;; ;;--------------------------------------------------------------------------;; ;; files: *data-dir*/../{commands,functions,hooks,key-maps,macros}.lisp ;; ;;--------------------------------------------------------------------------;; (in-package :stumpwm) ;; set a home-dir. not relative *default-pathname-defaults*. ;; set a data-dir for storing debug-file, group and placement dumps, etc. ;; set undo directory to store each group (and desktop) undo states. ;; set scratchpad group name for when it's created on the fly (.NAME to hide) (setf *home-dir* (make-pathname :directory "/howl") *data-dir* (merge-pathnames (make-pathname :directory '(:relative "conf" "stumpwm" "storage")) *home-dir*) *undo-data-dir* (make-pathname :directory "/tmp/user-keep/h") *scratchpad-group-name* ".scratchpad" *debug-level* 1) ;; setup a quick function for redirecting debug information directly to file. ;; (didn't want to use (redirect-all-output) as that's not what i want..) ;; (prefer internal handling as opposed to redirecting via exec $ >>! file) (defvar *debug-restream* nil) (defun redirect-debug (file) "Redirect *debug-stream* directly to a file." (when (typep *debug-restream* 'file-stream) (close *debug-restream*)) (setf *debug-restream* (open file :direction :output :if-exists :append :if-does-not-exist :create) *debug-stream* *debug-restream*)) ;; setup debug-file variable for referencing (e.g. quitting) purposes. (defvar *debug-file* (data-dir-file "log" "lisp")) (redirect-debug *debug-file*) ;; define a background-image-path for random image setting function. ;; (will soon change this to accept optional sub-dir for situations where ;; user wants to use 'work' or 'family' wallpapers instead) (defvar *background-image-path* (merge-pathnames (make-pathname :directory '(:relative "foto" "wall")) *home-dir*)) ;; gravities. (setf *mouse-focus-policy* :click *window-border-style* :thin *message-window-gravity* :top-right *input-window-gravity* :top-right) (set-normal-gravity :top) ; top for terminals (set-maxsize-gravity :center) ; center for floating X apps (set-transient-gravity :center) ; center for save-as/open popups ;; borders. (setf *resize-hides-windows* T *normal-border-width* 3 *maxsize-border-width* 2 *transient-border-width* 2 *float-window-border* 1 *float-window-title-height* 1) (set-msg-border-width 3) ;; fonts/colors. (custom font; full unicode "Fixed" with emphasized numeric 0's <> alphabetic O's) (set-font "-misc-fixedzero-medium-r-semicondensed-*-12-110-75-75-c-60-iso10646-1") ;(set-font "-misc-fixed-medium-r-semicondensed-*-12-110-75-75-c-60-koi8-r") (set-fg-color "grey64") ;(set-bg-color "grey14") (set-bg-color "grey10") (set-focus-color "grey22") ;(set-focus-color "thistle4") ;(set-focus-color "cyan3") ;(set-focus-color "cadetblue") ;(set-focus-color "orchid3") ;(set-unfocus-color "grey16") (set-unfocus-color "grey10") ;(set-border-color "grey44") (set-border-color "grey10") (set-win-bg-color "grey6") (setf *colors* (list "grey9" ; 0 black "deeppink" ; 1 red "chartreuse3" ; 2 green "gold1" ; 3 yellow "steelblue3" ; 4 blue "mediumpurple4" ; 5 magenta "cyan3" ; 6 cyan "honeydew4" ; 7 white "thistle4" ; 8 user "lightskyblue4")); 9 user (update-color-map (current-screen)) ;; text formatting (mode-line unused). (setf *startup-message* ;"^B^5*writers write^7*|^B^4*always^n" ;"^B^5*Make Voyages!^7*|^B^4*Attempt Them!^7*|^B^5There's Nothing Else^n" "^B^5*together we ate the king^7*|^B^4*and laughed ourselves to death^n" *time-format-string-default* "^B^5*%b.%d^n ^7*|^n|^B^7*|^n ^B^4*%T^n ^B^7*|^n|^7*|^n ^B^5*%A^n" *group-format* "^B^0*%t^7*%s^07|^n" *window-format* "^B^87%s^9*%m^0*%16t^n" *screen-mode-line-format* nil *timeout-wait* 6) ;; windows/frames. use more intuitive frame-numbers (with 'fselect'). (setf *default-window-name* "null" *new-frame-action* :empty *min-frame-width* 25 *min-frame-height* 25 *resize-increment* 2 *frame-number-map* "yhjukilop") ;; mode-line and input. (mode-line unused) (setf *mode-line-background-color* "grey5" *mode-line-border-color* "grey10" *mode-line-foreground-color* "azure4" *mode-line-border-width* 1 *mode-line-pad-x* 1 *mode-line-pad-y* 0 *mode-line-timeout* 6000 *mode-line-position* :top *input-history-ignore-duplicates* 0) ;; load external settings files. these are the bulk of setup/optimizations. (loop for file in '("functions" "macros" "commands" "hooks" "key-maps") do (load (merge-pathnames (make-pathname :name file :type "lisp" :directory '(:relative "conf" "stumpwm")) *home-dir*))) ;; restore data from previous exit (state StumpWM was last using), (clear-window-placement-rules) (setf (group-name (first (screen-groups (current-screen)))) "1") (make-groups-bg "2" "3" "4" "5" "6") (if (probe-file (data-dir-file "desktop.lisp")) (restore-from-file (data-dir-file "desktop.lisp"))) (if (probe-file (data-dir-file "tile-rules.lisp")) (restore-window-placement-rules (data-dir-file "tile-rules.lisp"))) (cond ((string-equal (group-name (current-group)) *scratchpad-group-name*) (gother))) #| ;; display a random background image on root window. (display-random-bg) |# #| ;; resize display head and [re]start 'dzen2'. (resize-head 0 0 22 1600 878) (if (probe-file (merge-pathnames (make-pathname :name "dzen4stumpwm" :type "zsh" :directory '(:relative "conf" "stumpwm")) *home-dir*)) (run-shell-command "pkill -9 -g $(ps -C dzen2 hopgrp) &>/dev/null \ ; exec /bin/zsh -c \"source /howl/conf/stumpwm/dzen4stumpwm.zsh &\"")) |# ;; EOF