Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;; -*- Mode: Lisp -*-
- (setf stumpwm::*debug-level* 10)
- ;; unbelievably badass
- (require 'swank)
- (swank:create-server :dont-close t)
- (in-package :stumpwm)
- ;; c-t is crucial for emacs transpose, c-i is something i don't use in emacs
- (set-prefix-key (kbd "C-i"))
- ;; Customize bars and modeline.
- (setf *message-window-gravity* :center)
- (setf *input-window-gravity* :center)
- ;; Turn on mode line.
- (toggle-mode-line (current-screen) (current-head))
- (setf *screen-mode-line-format*
- (list "%w | "
- '(:eval (run-shell-command "date | tr -d '[:cntrl:]'" t))))
- ;;; it's hard to imagine something more awesome than lisp macros
- ;; combine the stumpwm defcommand and definekey
- ;; it sounded like defcon3 to me
- (defmacro defcon3 (symbolname keystroke command
- &key (keymap *root-map*) (doc "generic documentation"))
- `(progn
- (defcommand ,symbolname () ()
- ,doc
- ,command)
- (define-key ,keymap (kbd ,keystroke)
- (string-downcase (string ',symbolname)))
- nil))
- (defcon3 firefox "C-f" (run-or-raise "firefox" '(:class "Firefox")))
- (defcon3 xterm "C-c" (run-or-raise "xterm" '(:class "XTerm")))
- (defcon3 open-browser-with-selection "x"
- (run-shell-command (concatenate 'string "exec firefox "
- (get-x-selection))))
- ;;; some X windows stuff that I like to run
- ;; sets the color of xterms, fonts, and other like stuff
- (run-shell-command "xrdb /home/rob/.Xresources")
- ;; make the keyboard repeat rate faster
- (run-shell-command "xset r rate 200 50")
- ;; turn keyboard beeping off
- (run-shell-command "xset b off")
- (run-shell-command "xset b 0 0 0")
Add Comment
Please, Sign In to add comment