Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defvar *volume* 100)
- (defvar *mutedp* nil)
- (define-key paredit-mode-map [(control ?\j)] nil)
- (define-key paredit-mode-map (kbd "RET") 'paredit-newline)
- (global-set-key (kbd "<XF86AudioPlay>") (lambda () (cond (emms-player-playing-p
- (minibuffer-message "Pausing your playlist")
- (emms-start))
- ((not emms-player-playing-p)
- (minibuffer-message "Resuming your playlist")
- (emms-start)))))
- (global-set-key (kbd "<XF86Save>") 'save-buffer)
- (global-set-key (kbd "<SunOpen>") 'find-file)
- (global-set-key (kbd "<XF86New>") 'fine-file)
- (defun change-volume (downp)
- (cond (downp (if (< 0 (- *volume* 1))
- (setf *volume* (- *volume* 1))))
- ((not downp) (if (>= 100 (+ *volume* 1))
- (setf *volume* (+ *volume* 1)))))
- (shell-command-to-string
- (format "amixer set Master %d%% unmute" *volume*))
- (minibuffer-message (format "Set volume to %d%%" *volume*)))
- (defun mute ()
- (interactive)
- (cond ((not *mutedp*)
- (shell-command-to-string "amixer set Master mute")
- (minibuffer-message "Muted the speakers")
- (setf *mutedp* t))
- (*mutedp*
- (shell-command-to-string "amixer set Master unmute")
- (minibuffer-message "Unmuted the speakers")
- (setf *mutedp* nil))))
- (global-set-key (kbd "<XF86AudioMute>") 'mute)
- (global-set-key (kbd "<XF86AudioLowerVolume>") (lambda () (interactive) (change-volume t)))
- (global-set-key (kbd "<XF86AudioRaiseVolume>") (lambda () (interactive) (change-volume nil)))
- (global-set-key (kbd "<XF86Favorites>") (lambda () (interactive) (flet ((y-or-n-p (a) nil)) (slime))))
- (global-set-key (kbd "<XF86Documents>") 'magit-status)
- (global-set-key (kbd "<XF86Close>") (lambda () (interactive)
- (if (yes-or-no-p "Would you like to save this buffer?")
- ((lambda ()
- (save-buffer)
- (kill-this-buffer)))
- (kill-this-buffer))))
- (global-set-key (kbd "<f31>") (lambda () (interactive)
- (find-file "~/programming/lisp/how/how.asd")
- (find-file "~/programming/lisp/how/packages.lisp")
- (find-file "~/programming/lisp/how/src/sprite.lisp")
- (find-file "~/programming/lisp/how/src/health.lisp")
- (find-file "~/programming/lisp/how/src/image.lisp")))
- (global-set-key (kbd "<f32>") (lambda () (interactive)
- (find-file "~/programming/lisp/juggler/juggler.asd")
- (find-file "~/programming/lisp/juggler/simple-sdl-init.lisp")
- (find-file "~/programming/lisp/juggler/src/juggler.lisp")
- (find-file "~/programming/lisp/juggler/src/materials.lisp")
- (find-file "~/programming/lisp/juggler/src/globals.lisp")
- (find-file "~/programming/lisp/juggler/src/render.lisp")))
Add Comment
Please, Sign In to add comment