[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make EMMS display only play/pause/stop info in the modeline?
From: |
Emanuel Berg |
Subject: |
Re: How to make EMMS display only play/pause/stop info in the modeline? |
Date: |
Fri, 16 Jun 2017 15:22:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) |
Marcin Borkowski wrote:
> so I finally got to the place wen I want to
> declutter my modeline. A big part of it is
> EMMS' artist/song info. I really do not need
> that (especially that I control EMMS from
> a hydra which displays that anyway), but some
> short indication whether EMMS is
> playing/paused/stopped would be nice. Is that
> possible without surgery on EMMS'
> source code?
EMMS should have a format string to do that.
If it doesn't, some surgery is perhaps called
for. But you can set it up any way you like.
Here is an example. Looks really messy but the
result is a very clean mode line. I think
I have the most minimalistic one possible save
for disabling the mode line altogether. Here is
a dump:
http://user.it.uu.se/~embe8573/pics/mode-line-example.png
(setq-default mode-line-format
`(" "
(:eval (when (eq major-mode 'Buffer-menu-mode) (format-time-string "
%H:%M")))
(:eval (unless (or buffer-read-only
(member major-mode '(
erc-mode
inferior-emacs-lisp-mode
message-mode
shell-mode
)))
mode-line-modified))
" "
(:eval
(cl-case major-mode
('Buffer-menu-mode "")
('message-mode (buffer-name))
('w3m-mode (format "%s . %s" w3m-current-title w3m-current-url))
(t (cond
(dired-directory dired-directory)
(buffer-file-name (abbreviate-file-name buffer-file-name))
(t mode-line-buffer-identification) ))))
" "
(show-modes mode-line-modes)
(line-number-mode "[%l] ")
(column-number-mode "{%c} ")
))
All code:
http://user.it.uu.se/~embe8573/conf/emacs-init/mode-line.el
--
underground experts united
http://user.it.uu.se/~embe8573