Skip to main content
8 votes

What's :eval (colon eval) in defcustom?

The doc string tells you this: "Mode line lighter for Github Notifier." You couldn't otherwise know for sure what the code is about, or what :eval means in that context. That is, you ...
Drew's user avatar
  • 78k
6 votes
Accepted

Abbreviate "/home/user/file" to "~/file" in formatted fields (frame-title-format, etc.)

Use function abbreviate-file-name. C-h f tells us: abbreviate-file-name is a compiled Lisp function in files.el. (abbreviate-file-name FILENAME) Return a version of FILENAME shortened using directory-...
Drew's user avatar
  • 78k
5 votes

Toggle button on modeline

I don't have much experience customizing the mode line, but the following seems working from here. It displays the status of column-number-mode using ON and OFF, when you click the text, the mode will ...
xuchunyang's user avatar
  • 14.6k
4 votes

What's :eval (colon eval) in defcustom?

This has nothing to do with defcustom: if you look at the doc string of defcustom it says: (defcustom SYMBOL STANDARD DOC &rest ARGS) In this case, the SYMBOL is github-notifier-mode-line, the ...
NickD's user avatar
  • 30.9k
3 votes
Accepted

vc-mode doesn't evaluate when mode-line-format is set with setq-default

When the code in your init file runs, there are no open files at all. vc-mode is only set when a file is finally opened and determined to be in version–controlled. This means that when it runs your ...
db48x's user avatar
  • 18.4k
3 votes

What's :eval (colon eval) in defcustom?

Run C-h f defcustom RET to show the help information for defcustom. This will tell you what arguments it expects. In particular, is says that this is the expected signature: (defcustom SYMBOL STANDARD ...
db48x's user avatar
  • 18.4k
3 votes

Emacs modeline and minor modes in a list

The minions package does exactly this and is, apparently, compatible with the doom modeline.
Fran Burstall's user avatar
2 votes
Accepted

Show only major mode in the modeline but keep it clickable

Just have a look at mode-line-modes in bindings.el. There you find for the major mode the value used in the following snippet: (setq mode-line-format `(:propertize ("" mode-name) ...
Tobias's user avatar
  • 33.3k
2 votes

Toggle button on modeline

This is a solution I found, don't know if it's the right way, but it works : (defvar music-paused nil) (setq-default mode-line-format '( (:eval (if (eq music-paused t) (propertize " ⏸ " '...
boehm_s's user avatar
  • 193
2 votes
Accepted

How to display window number in my mode-line?

You might try this (have not tested, because I don't installed window-numbering, it found it in source code https://github.com/nschum/window-numbering.el/blob/master/window-numbering.el#L228.) (setq-...
stardiviner's user avatar
  • 1,948
1 vote

Mode line and vertical split windows

the tooltips are always showing the buffer name for the selected buffer Indeed -- after all, you're just calling (buffer-name). I think you're after something like this? (defun my-buffer-...
phils's user avatar
  • 51.7k
1 vote
Accepted

How do I display time in the modeline for the UTC timezone?

Here's how to change the timezone: (setenv "TZ" "UTC0") See Time Zone Rules in the Emacs Lisp Reference manual.
roomworoof's user avatar
1 vote

Change the order of Minor Modes on the Modeline

The order in which the mode line strings appears to correspond to their locations in minor-mode-alist (?). Yes, and in a very direct sense -- minor-mode-alist is literally the mode line component ...
phils's user avatar
  • 51.7k
1 vote
Accepted

How to move the time and date displayed in the tab-bar a couple of character to the left

I have found the solution to my problem. I have redefined tab-bar-format-align-right and subtracted a few pixels, like @link0ff suggested. I have replaced :align-to (- right ,hpos) with :align-to (- ...
Emperor_Udan's user avatar
1 vote

config modeline

Try this: (add-to-list 'mode-line-misc-info '(" " ime-state)) C-hv mode-line-format will show you where in your format value the mode-line-misc-info value appears, and the documentation ...
phils's user avatar
  • 51.7k
1 vote
Accepted

Disable Evil-mode's state indication on mode line

Customize evil-mode-line-format to nil for that. Make sure to set it before Evil is enabled, as it only prevents the state indicator from being added to the mode line.
wasamasa's user avatar
  • 22.2k
1 vote
Accepted

How to customize Helm buffers' mode-line

Spaceline helped me customize the mode-line for Helm buffers (uses helm-alive-p).
Mathieu Marques's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible