summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stumpwmrc68
1 files changed, 42 insertions, 26 deletions
diff --git a/stumpwmrc b/stumpwmrc
index f4c9cef..c90eecb 100644
--- a/stumpwmrc
+++ b/stumpwmrc
@@ -3,6 +3,29 @@
(in-package :stumpwm)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Variables ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(defvar *my-program-bindings*
+ (let ((m (stumpwm:make-sparse-keymap)))
+ (stumpwm:define-key m (stumpwm:kbd "M") "check-mail")
+ ;; NOTE: this is important
+ m))
+
+(defvar *my-mpc-bindings*
+ (let ((m (make-sparse-keymap)))
+ (define-key m (kbd "s") "mpc-playing")
+ (define-key m (kbd "S") "mpc-stop")
+ (define-key m (kbd "P") "mpc-toggle")
+ (define-key m (kbd "n") "mpc-next")
+ (define-key m (kbd "p") "mpc-previous")
+ (define-key m (kbd "v") "mpc-volume")
+ m))
+
+(defvar *browser*
+ (getenv "BROWSER"))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Functions ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -24,6 +47,10 @@
"run urxvt"
(run-shell-command "urxvt"))
+(defcommand browser () ()
+ "open browser"
+ (run-shell-command *browser*))
+
(defcommand conkeror () ()
"run or raise conkeror"
(run-or-raise "conkeror" '(:class "Conkeror")))
@@ -58,36 +85,19 @@
(defcommand mpc-next () ()
"Tell mpc to go to the next song"
- (run-shell-command "mpc next"))
+ (message (run-shell-command "mpc next | head -n1" t)))
(defcommand mpc-previous () ()
"Tell mpc to go to the previous song"
- (run-shell-command "mpc prev"))
+ (message (run-shell-command "mpc prev | head -n1" t)))
(defcommand mpc-volume (level) ((:string "Volume: "))
"Tell mpc to change the volume"
(run-shell-command (format nil "mpc volume ~a" level)))
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Variables ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defvar *my-program-bindings*
- (let ((m (stumpwm:make-sparse-keymap)))
- (stumpwm:define-key m (stumpwm:kbd "w") "luakit")
- (stumpwm:define-key m (stumpwm:kbd "M") "check-mail")
- ;; NOTE: this is important
- m))
-
-(defvar *my-mpc-bindings*
- (let ((m (make-sparse-keymap)))
- (define-key m (kbd "s") "mpc-playing")
- (define-key m (kbd "S") "mpc-stop")
- (define-key m (kbd "P") "mpc-toggle")
- (define-key m (kbd "n") "mpc-next")
- (define-key m (kbd "p") "mpc-previous")
- (define-key m (kbd "v") "mpc-volume")
- m))
+(defcommand screenshot () ()
+ "Take a screenshot"
+ (run-shell-command "scrot"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; General Settings ;;
@@ -99,6 +109,8 @@
;; Mode-line ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(set-font "-*-dejavu sans-bold-r-*-*-13-*-*-*-*-*-iso8859-1")
+
(setf *mode-line-background-color* "Black")
(setf *mode-line-foreground-color* "White")
(setf *mode-line-timeout* 60)
@@ -127,10 +139,14 @@
;; Keybindings ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(define-key *root-map* (kbd "c") "urxvt")
-(define-key *root-map* (kbd "s-l") "i3lock")
-(define-key *root-map* (kbd "s-p") '*my-program-bindings*)
-(define-key *root-map* (kbd "m") '*my-mpc-bindings*)
+(define-key *root-map* (kbd "c") "urxvt")
+(define-key *root-map* (kbd "s-l") "i3lock")
+(define-key *root-map* (kbd "s-p") '*my-program-bindings*)
+(define-key *root-map* (kbd "m") '*my-mpc-bindings*)
+(define-key *root-map* (kbd "w") "browser")
+(define-key *root-map* (kbd "SunPrint_Screen") "screenshot")
+
+(define-key *top-map* (kbd "M-TAB") "next")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Hooks ;;