-
Notifications
You must be signed in to change notification settings - Fork 0
/
.stumpwmrc
66 lines (50 loc) · 2.18 KB
/
.stumpwmrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
(in-package :stumpwm)
;; change the prefix key to something else
(set-prefix-key (kbd "C-m"))
;; prompt the user for an interactive command. The first arg is an
;; optional initial contents.
(defcommand colon1 (&optional (initial "")) (:rest)
(let ((cmd (read-one-line (current-screen) ": " :initial-input initial)))
(when cmd
(eval-command cmd t))))
(define-key *root-map* (kbd "b") "colon1 exec firefox http://www.")
(define-key *root-map* (kbd "C-s") "colon1 exec xterm -e ssh ")
(defmacro make-web-jump (name prefix)
`(defcommand ,(intern name) (search) ((:rest ,(concatenate 'string name " search: ")))
(substitute #\+ #\Space search)
(run-shell-command (concatenate 'string ,prefix search))))
(make-web-jump "google" "firefox http://www.google.fr/search?q=")
(define-key *root-map* (kbd "M-s") "google")
(define-key *root-map* (kbd "x") "firefox")
(defcommand firefox () ()
"start firefox or switch to it if already running."
(run-or-raise "firefox" '(:class "Firefox")))
(define-key *root-map* (kbd "C-h") "hipchat")
(defcommand hipchat () ()
"start hipchat or switch to it if already running."
(run-or-raise "hipchat" '(:class "HipChat")))
(define-key *root-map* (kbd "m") "geary")
(defcommand geary () ()
"start geary or switch to it if already running."
(run-or-raise "geary" '(:class "Geary")))
(define-key *root-map* (kbd "C-E") "eclipse")
(defcommand eclipse () ()
"start geary or switch to it if already running."
(run-or-raise "eclipse" '(:class "Eclipse")))
(define-key *root-map* (kbd "c") "terminal")
(define-key *root-map* (kbd "C-c") "terminal")
(defcommand terminal () ()
"start terminal or switch to it if already running."
(run-or-raise "xfce4-terminal" '(:class "Terminal")))
(define-key *root-map* (kbd "M-TAB") "pull-hidden-next")
;; Load swank.
;; *prefix-key* ; swank will kick this off
(load "~/.emacs.d/elpa/slime-20160204.1506/swank-loader.lisp")
(swank-loader:init)
(defcommand swank () ()
(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-package stumpwm)."))
(swank)