[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[STUMP] Re: A Simple Hack.
From: |
Elliott Johnson |
Subject: |
[STUMP] Re: A Simple Hack. |
Date: |
Sat, 24 Jul 2004 19:56:16 -0700 |
[Shawn> Can you please post this diff to the mailing list so it get's logged?
Sure. Welcome back :)
--- user.lisp.~1.3.~ 2004-04-23 22:49:28.000000000 -0700
+++ user.lisp 2004-07-15 14:01:32.715690088 -0700
@@ -34,6 +34,8 @@
"Put the default bindings in the key-bindings hash table."
(set-key-binding #\n '() 'focus-next-window)
(set-key-binding #\n '(:control) 'focus-next-window)
+ (set-key-binding #\m '() 'music-command)
+ (set-key-binding #\M '() 'kill-music)
(set-key-binding #\p '() 'focus-prev-window)
(set-key-binding #\p '(:control) 'focus-prev-window)
(set-key-binding #\w '() 'echo-windows)
@@ -168,6 +170,19 @@
(unless (null cmd)
(port:run-prog *shell-program* :args (list "-c" cmd) :wait nil))))
+(defvar music nil "This is here to stop warnings!")
+
+(defun music-command (screen)
+ (let ((pl (concatenate 'string "/home/ejohnson/playlists/" (read-one-line
screen "Playlist: ") ".m3u")))
+ (unless (null pl)
+ (setf music (port:run-prog "mpg123" :args (list "-@" pl) :wait nil)))))
+
+(defun kill-music (screen)
+ (let ((r-u-sure (read-one-line screen "Kill it? ")))
+ (unless (null r-u-sure)
+ (if (or (char= (char r-u-sure 0) #\y)
+ (char= (char r-u-sure 0) #\Y)) (cl-user::process-kill music
15)))))
+
(defun horiz-split-frame (screen)
(split-frame screen (lambda (f) (split-frame-h screen f))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [STUMP] Re: A Simple Hack.,
Elliott Johnson <=