|
|
@ -1,228 +1,264 @@
|
|
|
|
Content-Type: text/enriched
|
|
|
|
;; -*-lisp-*-
|
|
|
|
Text-Width: 70
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
;;; INDEX ;;;
|
|
|
|
;; <x-color><param>#565766</param>-*-lisp-*-
|
|
|
|
;;; - DEPRECATED - MANIFEST ;;;
|
|
|
|
</x-color>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
;;; - SWANK INTERACTION ;;;
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>INDEX ;;;
|
|
|
|
;;; - GENERAL CONFIG ;;;
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>- DEPRECATED - MANIFEST ;;;
|
|
|
|
;;; - UTILITY FUNCTIONS ;;;
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>- SWANK INTERACTION ;;;
|
|
|
|
;;; - KEY BINDING ;;;
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>- GENERAL CONFIG ;;;
|
|
|
|
;;; - EXECUTION ;;;
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>- UTILITY FUNCTIONS ;;;
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>- KEY BINDING ;;;
|
|
|
|
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>- EXECUTION ;;;
|
|
|
|
|
|
|
|
</x-color>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
|
|
|
|
</x-color>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>DEPRECATED - MANIFEST ;;;
|
|
|
|
|
|
|
|
</x-color>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>without the ability to select localhost-only, we can't use
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>manifest at this time.
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>(defvar *manifest-url*
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>(manifest:start))
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>(defun browse-manifest ()
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>(format nil "exec ~A ~A" *default-browser* *manifest-url*))
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>(define-key *root-map* (kbd "C-d") (browse-manifest))
|
|
|
|
|
|
|
|
</x-color>
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>SWANK INTERACTION ;;;
|
|
|
|
|
|
|
|
</x-color>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>swank interaction allows us to connect to the StumpWM
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>process from emacs while it's running.
|
|
|
|
|
|
|
|
</x-color>
|
|
|
|
|
|
|
|
(ql:quickload <x-color><param>#a3646f</param>:swank</x-color>)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>let</x-color> ((server-running nil))
|
|
|
|
|
|
|
|
(defcommand swank () ()
|
|
|
|
|
|
|
|
<x-color><param>#627e95</param>"Toggle the swank server on/off"</x-color>
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>if</x-color> server-running
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>progn</x-color>
|
|
|
|
|
|
|
|
(swank:stop-server 4005)
|
|
|
|
|
|
|
|
(echo-string
|
|
|
|
|
|
|
|
(current-screen)
|
|
|
|
|
|
|
|
<x-color><param>#627e95</param>"Stopping swank."</x-color>)
|
|
|
|
|
|
|
|
(setf server-running nil))
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>progn</x-color>
|
|
|
|
|
|
|
|
(swank:create-server <x-color><param>#a3646f</param>:port</x-color> 4005
|
|
|
|
|
|
|
|
<x-color><param>#a3646f</param>:style</x-color> swank:*communication-style*
|
|
|
|
|
|
|
|
<x-color><param>#a3646f</param>:dont-close</x-color> t)
|
|
|
|
|
|
|
|
(echo-string
|
|
|
|
|
|
|
|
(current-screen)
|
|
|
|
|
|
|
|
<x-color><param>#627e95</param>"Starting swank. M-x slime-connect RET RET, then (in-packqage stumpwm)."</x-color>)
|
|
|
|
|
|
|
|
(setf server-running t)))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>GENERAL CONFIG ;;;
|
|
|
|
;;; DEPRECATED - MANIFEST ;;;
|
|
|
|
</x-color>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
</x-color>;; <x-color><param>#565766</param>this is where configuration parameters, the frame numbering
|
|
|
|
;; without the ability to select localhost-only, we can't use
|
|
|
|
</x-color>;; <x-color><param>#565766</param>and switching, and other general configuration is set up.
|
|
|
|
;; manifest at this time.
|
|
|
|
</x-color>
|
|
|
|
;; (defvar *manifest-url*
|
|
|
|
(<x-color><param>#93e57c</param>defparameter</x-color> <x-color><param>#9e79b3</param>*default-browser*</x-color> <x-color><param>#627e95</param>"firefox"</x-color>)
|
|
|
|
;; (manifest:start))
|
|
|
|
(<x-color><param>#93e57c</param>defparameter</x-color> <x-color><param>#9e79b3</param>*default-terminal*</x-color> <x-color><param>#627e95</param>"mate-terminal"</x-color>)
|
|
|
|
;; (defun browse-manifest ()
|
|
|
|
|
|
|
|
;; (format nil "exec ~A ~A" *default-browser* *manifest-url*))
|
|
|
|
|
|
|
|
;; (define-key *root-map* (kbd "C-d") (browse-manifest))
|
|
|
|
|
|
|
|
|
|
|
|
;; <x-color><param>#565766</param>make frames 1-numbered (i.e. for getting with ALT-FN)
|
|
|
|
;; "Don't know how to REQUIRE SB-CLTL2"
|
|
|
|
</x-color>(setf *frame-number-map* <x-color><param>#627e95</param>"1234567890"</x-color>)
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
;;; SWANK INTERACTION ;;;
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
;; swank interaction allows us to connect to the StumpWM
|
|
|
|
|
|
|
|
;; process from emacs while it's running.
|
|
|
|
|
|
|
|
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
|
|
|
|
|
|
|
|
(user-homedir-pathname))))
|
|
|
|
|
|
|
|
(when (probe-file quicklisp-init)
|
|
|
|
|
|
|
|
(load quicklisp-init)))
|
|
|
|
|
|
|
|
(ql:quickload :swank)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(let ((server-running nil))
|
|
|
|
|
|
|
|
(defcommand swank () ()
|
|
|
|
|
|
|
|
"Toggle the swank server on/off"
|
|
|
|
|
|
|
|
(if server-running
|
|
|
|
|
|
|
|
(progn
|
|
|
|
|
|
|
|
(swank:stop-server 4005)
|
|
|
|
|
|
|
|
(echo-string
|
|
|
|
|
|
|
|
(current-screen)
|
|
|
|
|
|
|
|
"Stopping swank.")
|
|
|
|
|
|
|
|
(setf server-running nil))
|
|
|
|
|
|
|
|
(progn
|
|
|
|
|
|
|
|
(swank:create-server :port 4005
|
|
|
|
|
|
|
|
:style swank:*communication-style*
|
|
|
|
|
|
|
|
:dont-close t)
|
|
|
|
|
|
|
|
(echo-string
|
|
|
|
|
|
|
|
(current-screen)
|
|
|
|
|
|
|
|
"Starting swank. M-x slime-connect RET RET, then (in-packqage stumpwm).")
|
|
|
|
|
|
|
|
(setf server-running t)))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
;;; GENERAL CONFIG ;;;
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
;; this is where configuration parameters, the frame numbering
|
|
|
|
|
|
|
|
;; and switching, and other general configuration is set up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defparameter *default-browser* "firefox")
|
|
|
|
|
|
|
|
(defparameter *default-terminal* "mate-terminal")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; make frames 1-numbered (i.e. for getting with ALT-FN)
|
|
|
|
|
|
|
|
(setf *frame-number-map* "1234567890")
|
|
|
|
|
|
|
|
|
|
|
|
(run-commands
|
|
|
|
(run-commands
|
|
|
|
<x-color><param>#627e95</param>"gnewbg G2"</x-color> ;; <x-color><param>#565766</param>F2
|
|
|
|
"gnewbg G2" ;; F2
|
|
|
|
</x-color> <x-color><param>#627e95</param>"gnewbg G3"</x-color> ;; <x-color><param>#565766</param>F3
|
|
|
|
"gnewbg G3" ;; F3
|
|
|
|
</x-color> <x-color><param>#627e95</param>"gnewbg G4"</x-color> ;; <x-color><param>#565766</param>F4
|
|
|
|
"gnewbg G4" ;; F4
|
|
|
|
</x-color> <x-color><param>#627e95</param>"gnewbg G5"</x-color> ;; <x-color><param>#565766</param>F5
|
|
|
|
"gnewbg G5" ;; F5
|
|
|
|
</x-color> <x-color><param>#627e95</param>"gnewbg G6"</x-color> ;; <x-color><param>#565766</param>F6
|
|
|
|
"gnewbg G6" ;; F6
|
|
|
|
</x-color> <x-color><param>#627e95</param>"gnewbg G7"</x-color> ;; <x-color><param>#565766</param>F7
|
|
|
|
"gnewbg G7" ;; F7
|
|
|
|
</x-color> <x-color><param>#627e95</param>"gnewbg G8"</x-color> ;; <x-color><param>#565766</param>F8
|
|
|
|
"gnewbg G8" ;; F8
|
|
|
|
</x-color> <x-color><param>#627e95</param>"gnewbg G9"</x-color> ;; <x-color><param>#565766</param>F9
|
|
|
|
"gnewbg G9" ;; F9
|
|
|
|
</x-color> <x-color><param>#627e95</param>"gnewbg G10"</x-color> ;; <x-color><param>#565766</param>F10
|
|
|
|
"gnewbg G10" ;; F10
|
|
|
|
</x-color> <x-color><param>#627e95</param>"gnewbg G11"</x-color> ;; <x-color><param>#565766</param>F11
|
|
|
|
"gnewbg G11" ;; F11
|
|
|
|
</x-color> <x-color><param>#627e95</param>"gnewbg G12"</x-color>
|
|
|
|
"gnewbg G12"
|
|
|
|
<x-color><param>#627e95</param>"gnewbg G13"</x-color>
|
|
|
|
"gnewbg G13"
|
|
|
|
<x-color><param>#627e95</param>"gnewbg G14"</x-color>
|
|
|
|
"gnewbg G14"
|
|
|
|
<x-color><param>#627e95</param>"gnewbg G15"</x-color>
|
|
|
|
"gnewbg G15"
|
|
|
|
|
|
|
|
"gnewbg G16"
|
|
|
|
|
|
|
|
"gnewbg G17"
|
|
|
|
|
|
|
|
"gnewbg G18"
|
|
|
|
|
|
|
|
"gnewbg G19")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<x-color><param>#627e95</param>"gnewbg G16"</x-color>
|
|
|
|
;; Fluxbox-style Alt-F# virtual desktop (group in StumpWM-speak)
|
|
|
|
<x-color><param>#627e95</param>"gnewbg G17"</x-color>
|
|
|
|
;; switching. Modified from:
|
|
|
|
<x-color><param>#627e95</param>"gnewbg G18"</x-color>
|
|
|
|
;; http://hcl-club.lu/svn/development/lisp/.stumpwmrc
|
|
|
|
<x-color><param>#627e95</param>"gnewbg G19"</x-color>)
|
|
|
|
(loop for i from 1 to 9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; <x-color><param>#565766</param>Fluxbox-style Alt-F# virtual desktop (group in StumpWM-speak)
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>switching. Modified from:
|
|
|
|
|
|
|
|
</x-color>;; <x-color><param>#565766</param>http://hcl-club.lu/svn/development/lisp/.stumpwmrc
|
|
|
|
|
|
|
|
</x-color>(<x-color><param>#93e57c</param>loop</x-color> for i from 1 to 9
|
|
|
|
|
|
|
|
do
|
|
|
|
do
|
|
|
|
(<x-color><param>#93e57c</param>progn</x-color>
|
|
|
|
(progn
|
|
|
|
(format t <x-color><param>#627e95</param>"Key: ~A~%"</x-color> i)
|
|
|
|
(format t "Key: ~A~%" i)
|
|
|
|
(define-key *top-map*
|
|
|
|
(define-key *top-map*
|
|
|
|
(kbd (format nil <x-color><param>#627e95</param>"M-~a"</x-color> i))
|
|
|
|
(kbd (format nil "M-~a" i))
|
|
|
|
(format nil <x-color><param>#627e95</param>"gselect ~a"</x-color> i))))
|
|
|
|
(format nil "gselect ~a" i))))
|
|
|
|
|
|
|
|
|
|
|
|
(define-key *top-map* (kbd <x-color><param>#627e95</param>"M-!"</x-color>) <x-color><param>#627e95</param>"gselect 10"</x-color>)
|
|
|
|
(define-key *top-map* (kbd "M-!") "gselect 10")
|
|
|
|
(define-key *top-map* (kbd <x-color><param>#627e95</param>"M-@"</x-color>) <x-color><param>#627e95</param>"gselect 11"</x-color>)
|
|
|
|
(define-key *top-map* (kbd "M-@") "gselect 11")
|
|
|
|
(define-key *top-map* (kbd <x-color><param>#627e95</param>"M-#"</x-color>) <x-color><param>#627e95</param>"gselect 12"</x-color>)
|
|
|
|
(define-key *top-map* (kbd "M-#") "gselect 12")
|
|
|
|
(define-key *top-map* (kbd <x-color><param>#627e95</param>"M-$"</x-color>) <x-color><param>#627e95</param>"gselect 13"</x-color>)
|
|
|
|
(define-key *top-map* (kbd "M-$") "gselect 13")
|
|
|
|
(define-key *top-map* (kbd <x-color><param>#627e95</param>"M-%"</x-color>) <x-color><param>#627e95</param>"gselect 14"</x-color>)
|
|
|
|
(define-key *top-map* (kbd "M-%") "gselect 14")
|
|
|
|
(define-key *top-map* (kbd <x-color><param>#627e95</param>"M-^"</x-color>) <x-color><param>#627e95</param>"gselect 15"</x-color>)
|
|
|
|
(define-key *top-map* (kbd "M-^") "gselect 15")
|
|
|
|
(define-key *top-map* (kbd <x-color><param>#627e95</param>"M-&"</x-color>) <x-color><param>#627e95</param>"gselect 16"</x-color>)
|
|
|
|
(define-key *top-map* (kbd "M-&") "gselect 16")
|
|
|
|
(define-key *top-map* (kbd <x-color><param>#627e95</param>"M-*"</x-color>) <x-color><param>#627e95</param>"gselect 17"</x-color>)
|
|
|
|
(define-key *top-map* (kbd "M-*") "gselect 17")
|
|
|
|
(define-key *top-map* (kbd <x-color><param>#627e95</param>"M-\("</x-color>) <x-color><param>#627e95</param>"gselect 18"</x-color>)
|
|
|
|
(define-key *top-map* (kbd "M-\(") "gselect 18")
|
|
|
|
(define-key *top-map* (kbd <x-color><param>#627e95</param>"M-\)"</x-color>) <x-color><param>#627e95</param>"gselect 19"</x-color>)
|
|
|
|
(define-key *top-map* (kbd "M-\)") "gselect 19")
|
|
|
|
|
|
|
|
|
|
|
|
;; <x-color><param>#565766</param>set FFM
|
|
|
|
;; scale up the font
|
|
|
|
</x-color>(setf *mouse-focus-policy* <x-color><param>#a3646f</param>:sloppy</x-color>)
|
|
|
|
(let ((font-size 22))
|
|
|
|
|
|
|
|
(stumpwm:set-font
|
|
|
|
|
|
|
|
(format nil "-*-*-bold-r-*-*-~D-240-*-*-*-*-*-*"
|
|
|
|
|
|
|
|
font-size)))
|
|
|
|
|
|
|
|
|
|
|
|
;; <x-color><param>#565766</param>show input bar in centre of screen
|
|
|
|
;; set FFM
|
|
|
|
</x-color>(setf *input-window-gravity* <x-color><param>#a3646f</param>:center</x-color>)
|
|
|
|
(setf *mouse-focus-policy* :sloppy)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; show input bar in centre of screen
|
|
|
|
|
|
|
|
(setf *input-window-gravity* :center)
|
|
|
|
|
|
|
|
|
|
|
|
;; <x-color><param>#565766</param>enable the mode-line (and preferably the system tray)
|
|
|
|
;; enable the mode-line (and preferably the system tray)
|
|
|
|
|
|
|
|
|
|
|
|
</x-color>(setf *mode-line-position* <x-color><param>#a3646f</param>:bottom</x-color>)
|
|
|
|
(setf *mode-line-position* :bottom)
|
|
|
|
|
|
|
|
|
|
|
|
(load-module <x-color><param>#627e95</param>"stumptray"</x-color>)
|
|
|
|
;;(load-module "stumptray")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>dolist</x-color>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(dolist
|
|
|
|
(head (screen-heads (current-screen)))
|
|
|
|
(head (screen-heads (current-screen)))
|
|
|
|
|
|
|
|
|
|
|
|
(toggle-mode-line (current-screen) head))
|
|
|
|
(toggle-mode-line (current-screen) head))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; (stumptray::stumptray)
|
|
|
|
|
|
|
|
|
|
|
|
(stumptray::stumptray)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
;;; UTILITY FUNCTIONS ;;;
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defvar *exec-base* #P "/usr/bin/")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defvar *scratchpad* nil)
|
|
|
|
|
|
|
|
(defcommand scratch-pad () ()
|
|
|
|
|
|
|
|
"Create or destroy a new scratchpad group."
|
|
|
|
|
|
|
|
(if *scratchpad*
|
|
|
|
|
|
|
|
(progn
|
|
|
|
|
|
|
|
(gselect *scratchpad*)
|
|
|
|
|
|
|
|
(dolist (window (group-windows (current-group)))
|
|
|
|
|
|
|
|
(delete-window window))
|
|
|
|
|
|
|
|
(gkill)
|
|
|
|
|
|
|
|
(setf *scratchpad* nil)
|
|
|
|
|
|
|
|
(echo "nerfed scratchpad"))
|
|
|
|
|
|
|
|
(progn
|
|
|
|
|
|
|
|
(setf *scratchpad* (gnew "scratchpad"))
|
|
|
|
|
|
|
|
(echo "scratchpad created"))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defvar *scratchpad-float* nil)
|
|
|
|
|
|
|
|
(defcommand scratch-pad-float () ()
|
|
|
|
|
|
|
|
"Create or destroy a new floating scratchpad group."
|
|
|
|
|
|
|
|
(if *scratchpad-float*
|
|
|
|
|
|
|
|
(progn
|
|
|
|
|
|
|
|
(gselect *scratchpad-float*)
|
|
|
|
|
|
|
|
(dolist (window (group-windows (current-group)))
|
|
|
|
|
|
|
|
(delete-window window))
|
|
|
|
|
|
|
|
(gkill)
|
|
|
|
|
|
|
|
(setf *scratchpad-float* nil)
|
|
|
|
|
|
|
|
(echo "nerfed floating scratchpad"))
|
|
|
|
|
|
|
|
(progn
|
|
|
|
|
|
|
|
(setf *scratchpad-float* (gnew "scratchpad-float"))
|
|
|
|
|
|
|
|
(echo "floating scratchpad created"))))
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>UTILITY FUNCTIONS ;;;
|
|
|
|
|
|
|
|
</x-color>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
|
|
|
|
</x-color>
|
|
|
|
|
|
|
|
(defcommand acpi-status () ()
|
|
|
|
(defcommand acpi-status () ()
|
|
|
|
<x-color><param>#627e95</param>"Print ACPI status in the StumpWM message box."</x-color>
|
|
|
|
"Print ACPI status in the StumpWM message box."
|
|
|
|
(stumpwm:echo-string (current-screen)
|
|
|
|
(stumpwm:echo-string (current-screen)
|
|
|
|
(<x-color><param>#93e57c</param>with-output-to-string</x-color> (stream)
|
|
|
|
(with-output-to-string (stream)
|
|
|
|
(sb-ext:run-program
|
|
|
|
(sb-ext:run-program
|
|
|
|
<x-color><param>#627e95</param>"/usr/bin/acpitool"</x-color>
|
|
|
|
(format nil "~A/acpitool" *exec-base*)
|
|
|
|
nil
|
|
|
|
nil
|
|
|
|
<x-color><param>#a3646f</param>:output</x-color> stream))))
|
|
|
|
:output stream))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun stumpwm-run-program (program)
|
|
|
|
|
|
|
|
(sb-ext:run-program
|
|
|
|
|
|
|
|
(format nil "~A/~A" *exec-base* program) nil))
|
|
|
|
|
|
|
|
|
|
|
|
(defcommand lock () ()
|
|
|
|
(defcommand lock () ()
|
|
|
|
<x-color><param>#627e95</param>"Lock the screen by invoking i3lock."</x-color>
|
|
|
|
"Lock the screen by invoking xautolock."
|
|
|
|
(stumpwm:echo-string (current-screen) <x-color><param>#627e95</param>"Locking screen..."</x-color>)
|
|
|
|
(stumpwm:echo-string (current-screen) "Locking screen...")
|
|
|
|
(sb-ext:run-program <x-color><param>#627e95</param>"/usr/bin/i3lock"</x-color> nil))
|
|
|
|
(sb-ext:run-program
|
|
|
|
|
|
|
|
(format nil "~A/~A" *exec-base* "xautolock") "-locknow" nil))
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>defun</x-color> <x-color><param>#beb7f7</param>exec-for-status</x-color> (path <x-color><param>#5992c2</param>&rest</x-color> args)
|
|
|
|
(defun exec-for-status (path &rest args)
|
|
|
|
<x-color><param>#565766</param>"Run the path with args and return the status code."</x-color>
|
|
|
|
"Run the path with args and return the status code."
|
|
|
|
(sb-ext:process-exit-code
|
|
|
|
(sb-ext:process-exit-code
|
|
|
|
(sb-ext:run-program path args <x-color><param>#a3646f</param>:wait</x-color> t)))
|
|
|
|
(sb-ext:run-program path args :wait t)))
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>defun</x-color> <x-color><param>#beb7f7</param>exec-ok</x-color> (path <x-color><param>#5992c2</param>&rest</x-color> args)
|
|
|
|
(defun exec-ok (path &rest args)
|
|
|
|
<x-color><param>#565766</param>"Returns true if path with args ran without error."</x-color>
|
|
|
|
"Returns true if path with args ran without error."
|
|
|
|
(zerop (exec-for-status path args)))
|
|
|
|
(zerop (exec-for-status path args)))
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>defun</x-color> <x-color><param>#beb7f7</param>daemon-is-running</x-color> (daemon)
|
|
|
|
(defun daemon-is-running (daemon)
|
|
|
|
(zerop (exec-for-status <x-color><param>#627e95</param>"/usr/bin/pgrep"</x-color> daemon)))
|
|
|
|
(zerop (exec-for-status "/usr/bin/pgrep" daemon)))
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>defun</x-color> <x-color><param>#beb7f7</param>start-daemon-if-not-running</x-color> (path <x-color><param>#5992c2</param>&rest</x-color> args)
|
|
|
|
(defun start-daemon-if-not-running (path &rest args)
|
|
|
|
<x-color><param>#565766</param>"If the program specified at path isn't running, start it."</x-color>
|
|
|
|
"If the program specified at path isn't running, start it."
|
|
|
|
(<x-color><param>#93e57c</param>when</x-color> (not (daemon-is-running (pathname-name path)))
|
|
|
|
(when (not (daemon-is-running (pathname-name path)))
|
|
|
|
(run-shell-command (<x-color><param>#93e57c</param>if</x-color> (null args)
|
|
|
|
(run-shell-command (if (null args)
|
|
|
|
path
|
|
|
|
path
|
|
|
|
(format nil <x-color><param>#627e95</param>"~A~{ ~A~}"</x-color> path args)))))
|
|
|
|
(format nil "~A~{ ~A~}" path args)))))
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>defun</x-color> <x-color><param>#beb7f7</param>start-program-if-not-running</x-color> (program <x-color><param>#5992c2</param>&rest</x-color> args)
|
|
|
|
(defun start-program-if-not-running (program &rest args)
|
|
|
|
(format t <x-color><param>#627e95</param>"WOULD RUN: nohup ~A~{ ~A~}"</x-color> program args)
|
|
|
|
(format t "WOULD RUN: nohup ~A~{ ~A~}" program args)
|
|
|
|
(<x-color><param>#93e57c</param>when</x-color> (not (exec-ok <x-color><param>#627e95</param>"/usr/bin/pgrep"</x-color> program))
|
|
|
|
(when (not (exec-ok "/usr/bin/pgrep" program))
|
|
|
|
(run-shell-command (format nil <x-color><param>#627e95</param>"nohup ~A~{ ~A~}"</x-color>
|
|
|
|
(run-shell-command (format nil "nohup ~A~{ ~A~}"
|
|
|
|
program args))))
|
|
|
|
program args))))
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>defun</x-color> <x-color><param>#beb7f7</param>with-terminal</x-color> (<x-color><param>#5992c2</param>&key</x-color> (run <x-color><param>#627e95</param>""</x-color> run-p) (term *default-terminal*))
|
|
|
|
(defun with-terminal (&key (run "" run-p) (term *default-terminal*))
|
|
|
|
(concat <x-color><param>#627e95</param>"exec "</x-color> term (<x-color><param>#93e57c</param>if</x-color> run-p <x-color><param>#627e95</param>" -e "</x-color> <x-color><param>#627e95</param>""</x-color>) run))
|
|
|
|
(concat "exec " term (if run-p " -e " "") run))
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>defun</x-color> <x-color><param>#beb7f7</param>with-homedir</x-color> (path)
|
|
|
|
(defun with-homedir (path)
|
|
|
|
(merge-pathnames path (user-homedir-pathname)))
|
|
|
|
(merge-pathnames path (user-homedir-pathname)))
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>#93e57c</param>defun</x-color> <x-color><param>#beb7f7</param>in-homedir-p</x-color> (path)
|
|
|
|
(defun in-homedir-p (path)
|
|
|
|
(probe-file (<x-color><param>#93e57c</param>with-homedir</x-color> path)))
|
|
|
|
(probe-file (with-homedir path)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
</x-color>;;; <x-color><param>#565766</param>DEMON^WKEY BINDING ;;;
|
|
|
|
;;; DEMON^WKEY BINDING ;;;
|
|
|
|
</x-color>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>#565766</param>
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
</x-color>
|
|
|
|
|
|
|
|
(define-key stumpwm:*root-map* (kbd <x-color><param>#627e95</param>"B"</x-color>) <x-color><param>#627e95</param>"exec firefox"</x-color>)
|
|
|
|
|
|
|
|
(define-key stumpwm:*root-map* (kbd <x-color><param>#627e95</param>"c"</x-color>) (<x-color><param>#93e57c</param>with-terminal</x-color>))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd <x-color><param>#627e95</param>"b"</x-color>) <x-color><param>#627e95</param>"acpi-status"</x-color>)
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd <x-color><param>#627e95</param>"RET"</x-color>) (<x-color><param>#93e57c</param>with-terminal</x-color>))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd <x-color><param>#627e95</param>"d"</x-color>) <x-color><param>#627e95</param>"exec dmenu_run"</x-color>)
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd <x-color><param>#627e95</param>"D"</x-color>) <x-color><param>#627e95</param>"exec i3-dmenu-desktop"</x-color>)
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd <x-color><param>#627e95</param>"e"</x-color>) <x-color><param>#627e95</param>"exec emacsclient -c -a \"\""</x-color>)
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd <x-color><param>#627e95</param>"E"</x-color>) (<x-color><param>#93e57c</param>with-terminal</x-color> <x-color><param>#a3646f</param>:run</x-color> <x-color><param>#627e95</param>"'emacsclient -c -nw -a \"\"'"</x-color>))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd <x-color><param>#627e95</param>"g"</x-color>) (<x-color><param>#93e57c</param>with-terminal</x-color> <x-color><param>#a3646f</param>:run</x-color> <x-color><param>#627e95</param>"ghci"</x-color>))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd <x-color><param>#627e95</param>"C-i"</x-color>) (<x-color><param>#93e57c</param>with-terminal</x-color> <x-color><param>#a3646f</param>:run</x-color> <x-color><param>#627e95</param>"ipython"</x-color>))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd <x-color><param>#627e95</param>"l"</x-color>) <x-color><param>#627e95</param>"lock"</x-color>)
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd <x-color><param>#627e95</param>"C-l"</x-color>) (<x-color><param>#93e57c</param>with-terminal</x-color> <x-color><param>#a3646f</param>:run</x-color> <x-color><param>#627e95</param>"rlwrap sbcl"</x-color>))
|
|
|
|
|
|
|
|
(<x-color><param>Purple</param>define-key</x-color> *root-map* (kbd <x-color><param>VioletRed4</param>"M"</x-color>) (<x-color><param>Purple</param>with-terminal</x-color> <x-color><param>dark slate blue</param>:run</x-color> <x-color><param>VioletRed4</param>"htop"</x-color>))
|
|
|
|
|
|
|
|
(<x-color><param>Purple</param>define-key</x-color> *root-map* (kbd <x-color><param>VioletRed4</param>"C-s"</x-color>) <x-color><param>VioletRed4</param>"swank"</x-color>)
|
|
|
|
|
|
|
|
(<x-color><param>Purple</param>define-key</x-color> *root-map* (kbd <x-color><param>VioletRed4</param>"C-v"</x-color>) <x-color><param>VioletRed4</param>"exec pavucontrol"</x-color>)
|
|
|
|
|
|
|
|
(<x-color><param>Purple</param>define-key</x-color> *root-map* (kbd <x-color><param>VioletRed4</param>"w"</x-color>) (<x-color><param>Purple</param>with-terminal</x-color> <x-color><param>dark slate blue</param>:run</x-color> <x-color><param>VioletRed4</param>"nmtui-connect"</x-color>))
|
|
|
|
|
|
|
|
(<x-color><param>Purple</param>define-key</x-color> *root-map* (kbd <x-color><param>VioletRed4</param>"`"</x-color>) <x-color><param>VioletRed4</param>"scratch-pad"</x-color>)
|
|
|
|
|
|
|
|
(<x-color><param>Purple</param>define-key</x-color> *root-map* (kbd <x-color><param>VioletRed4</param>"~"</x-color>) <x-color><param>VioletRed4</param>"scratch-pad-float"</x-color>)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>Firebrick</param>
|
|
|
|
(define-key stumpwm:*root-map* (kbd "B") "exec firefox")
|
|
|
|
</x-color>;;; <x-color><param>Firebrick</param>EXECUTION ;;;
|
|
|
|
(define-key stumpwm:*root-map* (kbd "c") (with-terminal))
|
|
|
|
</x-color>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>Firebrick</param>
|
|
|
|
(define-key *root-map* (kbd "b") "acpi-status")
|
|
|
|
</x-color>
|
|
|
|
(define-key *root-map* (kbd "RET") (with-terminal))
|
|
|
|
(run-shell-command <x-color><param>VioletRed4</param>"ssh-add"</x-color>)
|
|
|
|
(define-key *root-map* (kbd "d") "exec dmenu_run")
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "D") "exec i3-dmenu-desktop")
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "e") "exec emacsclient -c -a \"\"")
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "E") (with-terminal :run "'emacsclient -c -nw -a \"\"'"))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "g") (with-terminal :run "ghci"))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "C-i") (with-terminal :run "ipython"))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "l") "exec i3lock")
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "C-l") (with-terminal :run "rlwrap sbcl"))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "M") (with-terminal :run "htop"))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "C-s") "swank")
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "C-v") "exec pavucontrol")
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "w") (with-terminal :run "nmtui-connect"))
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "`") "scratch-pad")
|
|
|
|
|
|
|
|
(define-key *root-map* (kbd "~") "scratch-pad-float")
|
|
|
|
|
|
|
|
|
|
|
|
(<x-color><param>Purple</param>when</x-color> (in-homedir-p <x-color><param>VioletRed4</param>".fehbg"</x-color>)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
(sb-ext:run-program <x-color><param>VioletRed4</param>"/bin/sh"</x-color> (<x-color><param>Purple</param>with-homedir</x-color> <x-color><param>VioletRed4</param>".fehbg"</x-color>)))
|
|
|
|
;;; EXECUTION ;;;
|
|
|
|
(<x-color><param>Purple</param>when</x-color> (in-homedir-p <x-color><param>VioletRed4</param>".screenlayouts/norminal.sh"</x-color>)
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
(run-shell-command (<x-color><param>Purple</param>with-homedir</x-color> <x-color><param>VioletRed4</param>".screenlayouts/norminal.sh"</x-color>)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>Firebrick</param>
|
|
|
|
(run-shell-command "ssh-add")
|
|
|
|
</x-color>;;; <x-color><param>Firebrick</param>THIS BATTLESTATION IS FULLY OPERATIONAL ;;;
|
|
|
|
|
|
|
|
</x-color>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<x-color><param>Firebrick</param>
|
|
|
|
|
|
|
|
</x-color>(message <x-color><param>VioletRed4</param>"Ready."</x-color>)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;<x-color><param>Firebrick</param>LISP=sbcl
|
|
|
|
(when (in-homedir-p ".fehbg")
|
|
|
|
</x-color>
|
|
|
|
(sb-ext:run-program "/bin/sh" (with-homedir ".fehbg")))
|
|
|
|
|
|
|
|
(when (in-homedir-p ".screenlayouts/norminal.sh")
|
|
|
|
|
|
|
|
(run-shell-command (with-homedir ".screenlayouts/norminal.sh")))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
;;; THIS BATTLESTATION IS FULLY OPERATIONAL ;;;
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
|
|
|
(message "Ready.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;LISP=sbcl
|
|
|
|