Guest User

Untitled

a guest
Aug 19th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. ;;;; -*- Mode: Lisp -*-
  2.  
  3. (setf stumpwm::*debug-level* 10)
  4.  
  5. ;; unbelievably badass
  6. (require 'swank)
  7. (swank:create-server :dont-close t)
  8.  
  9. (in-package :stumpwm)
  10.  
  11. ;; c-t is crucial for emacs transpose, c-i is something i don't use in emacs
  12. (set-prefix-key (kbd "C-i"))
  13.  
  14. ;; Customize bars and modeline.
  15. (setf *message-window-gravity* :center)
  16. (setf *input-window-gravity* :center)
  17.  
  18. ;; Turn on mode line.
  19. (toggle-mode-line (current-screen) (current-head))
  20. (setf *screen-mode-line-format*
  21. (list "%w | "
  22. '(:eval (run-shell-command "date | tr -d '[:cntrl:]'" t))))
  23.  
  24. ;;; it's hard to imagine something more awesome than lisp macros
  25. ;; combine the stumpwm defcommand and definekey
  26. ;; it sounded like defcon3 to me
  27. (defmacro defcon3 (symbolname keystroke command
  28. &key (keymap *root-map*) (doc "generic documentation"))
  29. `(progn
  30. (defcommand ,symbolname () ()
  31. ,doc
  32. ,command)
  33. (define-key ,keymap (kbd ,keystroke)
  34. (string-downcase (string ',symbolname)))
  35. nil))
  36.  
  37. (defcon3 firefox "C-f" (run-or-raise "firefox" '(:class "Firefox")))
  38. (defcon3 xterm "C-c" (run-or-raise "xterm" '(:class "XTerm")))
  39. (defcon3 open-browser-with-selection "x"
  40. (run-shell-command (concatenate 'string "exec firefox "
  41. (get-x-selection))))
  42.  
  43. ;;; some X windows stuff that I like to run
  44. ;; sets the color of xterms, fonts, and other like stuff
  45. (run-shell-command "xrdb /home/rob/.Xresources")
  46. ;; make the keyboard repeat rate faster
  47. (run-shell-command "xset r rate 200 50")
  48. ;; turn keyboard beeping off
  49. (run-shell-command "xset b off")
  50. (run-shell-command "xset b 0 0 0")
Add Comment
Please, Sign In to add comment