Update stumpwm config
This commit is contained in:
parent
0d5831fa09
commit
f4574d968b
1 changed files with 48 additions and 45 deletions
|
@ -1,9 +1,7 @@
|
||||||
;; -*- mode: lisp; -*-
|
;; -*- mode: lisp; -*-
|
||||||
; (require 'swank)
|
|
||||||
(require 'cl-ppcre)
|
(require 'cl-ppcre)
|
||||||
|
|
||||||
(in-package :stumpwm)
|
(in-package :stumpwm)
|
||||||
(load "/usr/share/stumpwm/contrib/app-menu.lisp")
|
|
||||||
|
|
||||||
(defmacro elisp (&body body)
|
(defmacro elisp (&body body)
|
||||||
"Run BODY through emacsclient."
|
"Run BODY through emacsclient."
|
||||||
|
@ -13,20 +11,23 @@
|
||||||
:wait nil))
|
:wait nil))
|
||||||
|
|
||||||
;; Naquadah
|
;; Naquadah
|
||||||
;; (defun colour (key)
|
(defun colour (key)
|
||||||
;; (let ((colours (list :lblack #xeeeeec :dblack #x111113
|
(let ((colours (list :gray1 #x111111
|
||||||
;; :lwhite #xa5a5a4 :dwhite #x222224
|
:gray5 #xc2c2c2
|
||||||
;; :lred #xbf6d6d :dred #x744a4a
|
:gray6 #xededed
|
||||||
;; :lorange #xbfa47d :dorange #x73634a
|
:blue3 #x152e54
|
||||||
;; :lyellow #xb2bf6d :dyellow #x6b734a
|
:lwhite #xa5a5a4 :dwhite #x222224
|
||||||
;; :lgreen #x8abf6d :dgreen #x52734a
|
:lred #xbf6d6d :dred #x744a4a
|
||||||
;; :lturquoise #x7dbf97 :dturquoise #x4a735b
|
:lorange #xbfa47d :dorange #x73634a
|
||||||
;; :lcyan #x7dbfbf :dcyan #x4a7373
|
:lyellow #xb2bf6d :dyellow #x6b734a
|
||||||
;; :lblue #x6d97bf :dblue #x4a5b73
|
:lgreen #x8abf6d :dgreen #x52734a
|
||||||
;; :lpurple #x8a7dbf :dpurple #x524a73
|
:lturquoise #x7dbf97 :dturquoise #x4a735b
|
||||||
;; :lmagenta #xb27dbf :dmagenta #x6b4a73
|
:lcyan #x7dbfbf :dcyan #x4a7373
|
||||||
;; :lpink #xbf6da4 :dpink #x734a63)))
|
:lblue #x6d97bf :dblue #x4a5b73
|
||||||
;; (getf colours key)))
|
:lpurple #x8a7dbf :dpurple #x524a73
|
||||||
|
:lmagenta #xb27dbf :dmagenta #x6b4a73
|
||||||
|
:lpink #xbf6da4 :dpink #x734a63)))
|
||||||
|
(getf colours key)))
|
||||||
|
|
||||||
(setf *app-menu* '(("Editor" . "emacs")
|
(setf *app-menu* '(("Editor" . "emacs")
|
||||||
("Browser" . "conkeror")
|
("Browser" . "conkeror")
|
||||||
|
@ -35,7 +36,7 @@
|
||||||
("Gimp" . "gimp")))
|
("Gimp" . "gimp")))
|
||||||
(defvar *conkeror-program* "conkeror"
|
(defvar *conkeror-program* "conkeror"
|
||||||
"The executable to run to start Conkeror.")
|
"The executable to run to start Conkeror.")
|
||||||
(defvar *emacs-program* "emacsclient -c -a emacs"
|
(defvar *emacs-program* "emacsclient -c -a \"\""
|
||||||
"The executable to run to start Emacs.")
|
"The executable to run to start Emacs.")
|
||||||
(defvar *firefox-program* "firefox"
|
(defvar *firefox-program* "firefox"
|
||||||
"The executable to run to start Firefox.")
|
"The executable to run to start Firefox.")
|
||||||
|
@ -47,8 +48,6 @@
|
||||||
"Hook run right before the screen gets locked.")
|
"Hook run right before the screen gets locked.")
|
||||||
(defvar *screen-unlocked-hook* nil
|
(defvar *screen-unlocked-hook* nil
|
||||||
"Hook run right after the screen is unlocked.")
|
"Hook run right after the screen is unlocked.")
|
||||||
(defvar *mpd-was-playing-p* nil
|
|
||||||
"Indicator of whether or not MPD was playing when it was paused.")
|
|
||||||
|
|
||||||
(defun get-mail-count (mailbox &optional (inbox "inbox"))
|
(defun get-mail-count (mailbox &optional (inbox "inbox"))
|
||||||
"Check how many new messages there are in MAILBOX."
|
"Check how many new messages there are in MAILBOX."
|
||||||
|
@ -86,15 +85,16 @@
|
||||||
*jabber-connected*)
|
*jabber-connected*)
|
||||||
(jabber-send-default-presence))))
|
(jabber-send-default-presence))))
|
||||||
|
|
||||||
|
(let (mpd-was-playing)
|
||||||
(defun mpd-pause ()
|
(defun mpd-pause ()
|
||||||
"Pause MPD playback."
|
"Pause MPD playback."
|
||||||
(when (setf *mpd-was-playing-p* (mpd-playing-p))
|
(when (setf mpd-was-playing-p (mpd-playing-p))
|
||||||
(sb-ext:run-program "/usr/bin/mpc" '("pause") :wait nil)))
|
(sb-ext:run-program "/usr/bin/mpc" '("pause") :wait nil)))
|
||||||
|
|
||||||
(defun mpd-play ()
|
(defun mpd-play ()
|
||||||
"Resume MPD playback."
|
"Resume MPD playback."
|
||||||
(when *mpd-was-playing-p*
|
(when mpd-was-playing-p
|
||||||
(sb-ext:run-program "/usr/bin/mpc" '("play") :wait nil)))
|
(sb-ext:run-program "/usr/bin/mpc" '("play") :wait nil))))
|
||||||
|
|
||||||
(defcommand run-emacs () ()
|
(defcommand run-emacs () ()
|
||||||
"Open Emacs"
|
"Open Emacs"
|
||||||
|
@ -134,30 +134,32 @@
|
||||||
(run-hook *screen-unlocked-hook*)))
|
(run-hook *screen-unlocked-hook*)))
|
||||||
|
|
||||||
(defcommand lock-screen () ()
|
(defcommand lock-screen () ()
|
||||||
"Lock the screen using i3lock. Run *lock-screen-hook* before locking
|
"Lock the screen using i3lock.
|
||||||
it and run *screen-unlocked-hook* after it has been unlocked."
|
|
||||||
|
Run `*lock-screen-hook*' before locking it and run
|
||||||
|
`*screen-unlocked-hook*' after it has been unlocked."
|
||||||
(run-hook *lock-screen-hook*)
|
(run-hook *lock-screen-hook*)
|
||||||
(sb-ext:run-program
|
(sb-ext:run-program
|
||||||
"/usr/bin/i3lock" '("-n" "-c" "000000") :wait nil
|
"/usr/bin/i3lock" '("-n" "-c" "000000") :wait nil
|
||||||
:status-hook #'run-stumpwm-hook-on-exit))
|
:status-hook #'run-stumpwm-hook-on-exit))
|
||||||
|
|
||||||
;; (set-bg-color (colour :dwhite))
|
(set-bg-color (colour :dwhite))
|
||||||
;; (set-border-color (colour :lwhite))
|
(set-border-color (colour :lwhite))
|
||||||
;; (set-fg-color (colour :lblack))
|
(set-fg-color (colour :gray5))
|
||||||
;; (set-float-focus-color (colour :lblue))
|
(set-float-focus-color (colour :lblue))
|
||||||
;; (set-float-unfocus-color (colour :dwhite))
|
(set-float-unfocus-color (colour :dwhite))
|
||||||
;; (set-focus-color (colour :lblue))
|
(set-focus-color (colour :lblue))
|
||||||
;; (set-font "-*-tamsyn-medium-r-normal-*-17-*-*-*-*-0-iso8859-1")
|
(set-font "-*-tamsyn-medium-r-normal-*-17-*-*-*-*-0-iso8859-1")
|
||||||
;; (set-unfocus-color (colour :dwhite))
|
(set-unfocus-color (colour :dwhite))
|
||||||
;; (set-win-bg-color (colour :dblack))
|
(set-win-bg-color (colour :gray1))
|
||||||
|
|
||||||
;; (setf *colors* (mapcar #'colour '(:lwhite :lred :lgreen :lyellow :lblue
|
(setf *colors* (mapcar #'colour '(:lwhite :lred :lgreen :lyellow :lblue
|
||||||
;; :lmagenta :lcyan :lblack)))
|
:lmagenta :lcyan :gray5)))
|
||||||
(setf *input-window-gravity* :bottom-left)
|
(setf *input-window-gravity* :center)
|
||||||
(setf *message-window-gravity* :top-right)
|
(setf *message-window-gravity* :top-right)
|
||||||
;; (setf *mode-line-background-color* (colour :dwhite))
|
(setf *mode-line-background-color* (colour :blue3))
|
||||||
;; (setf *mode-line-border-color* (colour :dwhite))
|
(setf *mode-line-border-color* (colour :blue3))
|
||||||
;; (setf *mode-line-foreground-color* (colour :lblack))
|
(setf *mode-line-foreground-color* (colour :gray5))
|
||||||
(setf *shell-program* (getenv "SHELL"))
|
(setf *shell-program* (getenv "SHELL"))
|
||||||
(setf *transient-border-width* 1)
|
(setf *transient-border-width* 1)
|
||||||
(setf *window-border-style* :thin)
|
(setf *window-border-style* :thin)
|
||||||
|
@ -221,4 +223,5 @@ it and run *screen-unlocked-hook* after it has been unlocked."
|
||||||
(concatenate 'string (sb-ext:posix-getenv "HOME")
|
(concatenate 'string (sb-ext:posix-getenv "HOME")
|
||||||
"/.stumpwm.d/desktop.lisp"))
|
"/.stumpwm.d/desktop.lisp"))
|
||||||
|
|
||||||
; (swank:create-server)
|
(ql:quickload "swank")
|
||||||
|
(swank:create-server :dont-close t)
|
||||||
|
|
Loading…
Reference in a new issue