1 ;;; --------------------------------------------------------------------------
2 ;;; CLFSWM - FullScreen Window Manager
4 ;;; --------------------------------------------------------------------------
5 ;;; Documentation: Music Player Daemon (MPD) interface
6 ;;; --------------------------------------------------------------------------
8 ;;; (C) 2009 Philippe Brochard <hocwp@free.fr>
10 ;;; This program is free software; you can redistribute it and/or modify
11 ;;; it under the terms of the GNU General Public License as published by
12 ;;; the Free Software Foundation; either version 3 of the License, or
13 ;;; (at your option) any later version.
15 ;;; This program is distributed in the hope that it will be useful,
16 ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;;; GNU General Public License for more details.
20 ;;; You should have received a copy of the GNU General Public License
21 ;;; along with this program; if not, write to the Free Software
22 ;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 ;;; Documentation: Handle the XMMS player
25 ;;; This code needs xmmsctrl.
26 ;; If you want to use this file, just add this line in
27 ;;; your configuration file:
29 ;;; (load-contrib "xmms.lisp")
31 ;;; --------------------------------------------------------------------------
35 (format t
"Loading XMMS code... ")
39 (open-menu (find-menu 'xmms-menu
)))
43 (do-shell "xmmsctrl launch"))
45 (defun show-xmms-status ()
46 "Show the current xmms status"
47 (info-on-shell "XMMS status:" "xmmsctrl cur"))
49 (defun show-xmms-playlist ()
50 "Show the current xmms playlist"
51 (info-on-shell "XMMS Playlist:" "xmmsctrl playlist"))
53 (defun xmms-next-track ()
54 "Play the next XMMS track"
55 (do-shell "xmmsctrl next")
59 (defun xmms-previous-track ()
60 "Play the previous XMMS track"
61 (do-shell "xmmsctrl previous")
65 (defun xmms-load-file ()
66 "open xmms \"Load file(s)\" dialog window."
67 (do-shell "xmmsctrl eject"))
69 (unless (find-menu 'xmms-menu
)
70 (add-sub-menu 'help-menu
"x" 'xmms-menu
"XMMS menu")
72 (add-menu-key 'xmms-menu
"r" 'launch-xmms
)
73 (add-menu-key 'xmms-menu
"s" 'show-xmms-status
)
74 (add-menu-key 'xmms-menu
"l" 'show-xmms-playlist
)
75 (add-menu-key 'xmms-menu
"n" 'xmms-next-track
)
76 (add-menu-key 'xmms-menu
"p" 'xmms-previous-track
)
77 (add-menu-key 'xmms-menu
"e" 'xmms-load-file
))