help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pinning items on the mode line


From: Narendra Joshi
Subject: Re: Pinning items on the mode line
Date: Sun, 19 Nov 2017 15:06:21 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Emanuel Berg <moasen@zoho.com> writes:

> Narendra Joshi wrote:
>
>> I would like to have `eyebrowse` workspaces
>> and date time always visible on the mode
>> line. Currently, when the other parts of the
>> mode line occupy more space, they are push
>> out of the visible region, e.g. while using
>> Gnus. Is there a simple way to achieve what
>> I want?
>
> You can have whatever mode line you want.
>
> Here is a config with a blank mode line for
> every mode, except for the Buffer-menu-mode,
> where the time is shown.
>
> Go nuts :)
>
> (setq-default mode-line-format
>  `(" "
>    (:eval (when (eq major-mode 'Buffer-menu-mode) (format-time-string " 
> %H:%M")))
>    ))
Thanks for this. Here is my current `mode-line-format'

```
("%e" mode-line-front-space
 mode-line-mule-info
 mode-line-client
 mode-line-modified
 mode-line-remote
 mode-line-frame-identification
 mode-line-buffer-identification
 sml/pos-id-separator
 mode-line-position
 (vc-mode vc-mode)
 sml/pre-modes-separator
 mode-line-modes
 mode-line-misc-info
 mode-line-end-spaces)
```

I do not want to disturb the defaults here. I just want to make sure
that date time is always displayed even if it means truncating the other
parts. 

-- 
Narendra Joshi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]