Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
machine-setup/stumpwmrc
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
48 lines (33 sloc)
1.63 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*-common-lisp-*- | |
(in-package :stumpwm) | |
(message "Loading RC...") | |
(defcommand switch/register-guy-mcguy () () | |
(message "Filling register form...") | |
(let ((email (format nil "guymcguy~a@mailinator.com" (get-universal-time)))) | |
(window-send-string | |
(format nil "Guy M McGuy ~a ~a" email email)))) | |
(defcommand cap-caps () () | |
(message "Killing caps-lock...") | |
(run-shell-command "setxkbmap -layout us -option ctrl:nocaps")) | |
(defcommand reinit () () (run-commands "reload" "loadrc")) | |
(defcommand dmenu-run () () (run-shell-command "dmenu_run")) | |
(defcommand lock-screen () () (run-shell-command "slock")) | |
(defcommand ssh-add () () (run-shell-command "ssh-add")) | |
(defcommand dunst-server () () (run-shell-command "dunst &")) | |
(defcommand screenshot () () | |
(let ((name (run-shell-command "echo \"$(mktemp -p ~/pictures/screenshots/ --suffix=.png)\"" t))) | |
(message "Screenshotting...") | |
(run-shell-command "import ~/pictures/screenshot.png" t) | |
(run-shell-command (format nil "cp ~~/pictures/screenshot.png ~a" name)) | |
(message (format nil " shot to ~a" name)))) | |
(message " Defining keys...") | |
(define-key *root-map* (kbd "C-s") "switch/register-guy-mcguy") | |
(define-key *root-map* (kbd "C-r") "reinit") | |
(define-key *root-map* (kbd "RET") "exec x-terminal-emulator") | |
(define-key *root-map* (kbd "C-p") "dmenu-run") | |
(define-key *root-map* (kbd "p") "dmenu-run") | |
(define-key *root-map* (kbd "C-l") "lock-screen") | |
(define-key *root-map* (kbd "SunPrint_Screen") "screenshot") | |
(define-key *root-map* (kbd "C-SunPrint_Screen") "screenshot") | |
(message " Running startup functions...") | |
(run-commands "cap-caps" "ssh-add" "dunst-server") |