Questions tagged [mode-line]

The mode line is a useful summary information about the buffer shown in the window, including its name and current modes. It is located at the bottom of every Emacs Window aside from MiniBuffer windows.

Filter by
Sorted by
Tagged with
101
votes
4answers
40k views

How do I get a fancier mode line that uses solid colors and triangles?

People occasionally post screenshots with modelines that have solid colors and triangles: How do I replicate this effect?
26
votes
9answers
7k views

Hide list of minor modes in mode-line

I use quite a few minor modes and usually I know which minor mode is enabled in every major mode. If I really want to see the full list, I can run C-h v minor-mode-list. At the same time, my mode ...
24
votes
1answer
2k views

What piece of code in Emacs makes `line-number-mode` print “??” as line number in buffers with long lines?

I'm using line-number-mode to have an indicator of the current line in my modeline, however for large files or rather, files with long lines, it starts displaying two question marks instead of a line ...
21
votes
2answers
329 views

Display list of words along bottom of frame?

I'd like to display 3 lists of words on separate lines horizontally along the bottom (although top would work too) of every emacs frame I have open. I've thought of 6 ways to do this, and they all ...
20
votes
2answers
3k views

A faster method to obtain `line-number-at-pos` in large buffers

The function line-number-at-pos (when repeated about 50 times) is causing a noticeable slow-down in semi-large buffers -- e.g., 50,000 lines -- when point is near the end of the buffer. By slow-down, ...
15
votes
2answers
4k views

How can I set different font sizes for buffers and for the mode-line?

I have this line in my init.el file to set the size of the font in all frames: (push '(font . "DejaVu Sans Mono-10") default-frame-alist) It works but i'd like to have a bigger font in all buffers ...
14
votes
5answers
10k views

How to count characters in buffer including spaces?

I need to see, how many characters contains my text, as I type. I found this pages of Emacs Wiki: Word count, and there is a solution very close to what I need: I used the second solution from this ...
14
votes
2answers
3k views

Moving the mode line and minibuffer to the top

Is there any way I can move the mode line and the minibuffer from the bottom to the top of the screen? The minibuffer is covered by the previous question How to display the content of minibuffer in ...
13
votes
4answers
874 views

Make a new frame with only mode-line

I want to create a new frame that contains nothing but the mode-line. Especially not a file buffer. Why do I need this? I use org-mode's clocking to time my work. Org-mode displays the timer for the ...
12
votes
2answers
645 views

Can I use an image in my modeline lighter?

My modeline is cluttered. Can I make it display pictures instead of mode names? I could use unicode Emoji (such as 🐍 for Python or 🐓 for Coq), but some machines on which I use my Emacs config do ...
11
votes
3answers
3k views

How can I display the parent directory of the current file in the modeline?

I would like to be able to see the location of the current file's parent directory, independent of the current buffer name.
10
votes
2answers
1k views

Transiently adjust text size in mode line and minibuffer?

When working with others around a shared monitor or via screen-sharing (e.g. Google Hangout), I often use text-scale-adjust (C-x C-+) to let others more easily read my screen. I would love to be able ...
10
votes
1answer
280 views

More than one line in mode-line?

I would like to make modeline display all information not in one line but in two - for example first for cursor info, buffer, file, git and flycheck, and on second line - modes info (major and minor ...
10
votes
1answer
1k views

Show something in active mode line instead of all mode lines

I set up an org-timer indicator in the mode line with this. (setq-default mode-line-format (quote ( ;; org-timer (:eval (unless (not org-timer-countdown-timer) (propertize (let* ((...
9
votes
4answers
3k views

How to right align some items in the modeline?

Given the following modeline configuration: (setq-default mode-line-format (list ;; Current buffer name "%b " ;; Major mode "[%m] " ;; Modified status "[%*] " ;; Cursor ...
9
votes
2answers
2k views

Single mode line for all windows

Is it possible to have only one mode line (sometimes referred as "statusbar") for all windows? I'd like to make this single mode line show information about the currently selected buffer.
9
votes
2answers
857 views

How to append string that get's updated to mode line?

I would like to append some information (that changes over time) to the mode line format and then use it in the title. My thought being is that once a minute I would set the frame-title-format to be ...
9
votes
2answers
1k views

Make the mode-line display percentage and not “Top/Bottom/All”

Mode line's %p displays the percentage of the current view of the buffer: %p The percentage of the buffer text above the top of window, or ‘Top’, ‘Bottom’ or ‘All’. Note that the default mode ...
9
votes
1answer
710 views

Can I show a clock in the echo area?

Most of the time my echo area sits empty while the modeline of each of my windows displays plenty of redundant redundant information (current time, system load, and various other buffer-independent ...
8
votes
2answers
1k views

Display battery information only when unplugged?

display-battery-mode displays battery information, but I only want to use it when my computer is unplugged and running off battery power. Is there a way to set the display mode according to the power ...
7
votes
1answer
820 views

Which class or method or function am I in?

When navigating a source file with incremental search, I often find myself jumping into some context that is taller than the window. This raises the question: "Which class am I in?". Or, if the ...
7
votes
3answers
2k views

Customize vc-mode appearance in mode-line

I use vc-mode to show information about the current VC state in my mode line, like this: (setq mode-line-format '(… (vc-mode vc-mode) …)) However, I find the default format of vc-mode pretty verbose....
7
votes
2answers
441 views

How can I find out exactly what my modeline is telling me?

I'd like to know exactly what my modeline is telling me and how it's derived. Right now, if I'm working with a graphical terminal I can hover over each modeline entry in turn, and if I'm lucky, a ...
6
votes
3answers
1k views

Make names of major modes shorter in the mode-line

I want to make names of major modes shorter. No longer than three characters. Is there any packages that do something like that? It's better to shorten mode names in automatic fashion, so one doesn't ...
6
votes
2answers
816 views

display in the mode-line the number of characters in the selection

I'm used to have display of the number of selected characters in the mode line when there is an active selection (in vim). Is it possible to achieve this in emacs? I managed to display the column ...
6
votes
1answer
142 views

Indicate whether file has uncommited changes in mode line

In my mode line I can see if a buffer has unsaved changes (**- or a red x in my case, since I am using smart-mode-line). Is there a similar way to display whether or not the file visited by the ...
6
votes
3answers
2k views

How to remove elements from the spacemacs mode-line

I'd like to remove certain elements from the mode-line: To the left, the 802 is the buffer size in bytes, if I'm not mistaken. I could not care less about that. To the right, it tells me the buffer ...
6
votes
2answers
1k views

How to re arrange things in mode line?

I have installed nyan-mode and mode line looks like this. I would like to move nyan cat to end of mode line and arrange all other items like column number, file name, modes to left side leaving empty ...
6
votes
1answer
329 views

How to abbreviate version control information in the mode line?

Q: how can I abbreviate the version control information in the mode line? Buffers visiting a file under version control display branch information in the mode line as VCtype-branch. That's fine, but ...
6
votes
1answer
492 views

Hide mode-line for minimap buffers

I know that I can hide the modebar for the current buffer using M - : (setq mode-line-format nil) However, I'd like to hide the mode-line for the 'MINIMAP' buffer created by the minimap package, ...
6
votes
1answer
753 views

How to change mode line color based on host?

For terminal, there is an app called byobu which shows different mode line based on host. If I open terminal in system 1, mode line will be like this. If I ssh into system2 from system1, mode line ...
6
votes
1answer
3k views

How to increase the size of the mode-line

I was watching this video on someone's emacs configuration, and I noticed that his mode line seemed a lot better to look at than mine, but he didn't explain it in the video. Is there a way to ...
6
votes
3answers
921 views

Hide modeline in all bottom windows while helm is active?

I'm trying to hide the modeline whenever helm pops up. I have configure helm to always show up at the bottom. It should look like this (two windows above the helm completion window): Opposed of the ...
6
votes
2answers
474 views

How to remove the projectile project name after the file name

I am attempting to clean up my modeline due to overcrowding. In my quest I have come across a problem I cannot figure out, namely projectile. By this I mean the project name after the file name, it ...
5
votes
2answers
159 views

Info: Display the current node name in the buffer-list or uniquify *info* buffers

Is there a way to get info to display the current node in any of buffer-list/ibuffer/helm-buffers, especially when there are multiple info buffers ? Ideally uniquify should be sufficient to ...
5
votes
2answers
378 views

Timer on modeline: how to update modeline every second?

As part of my custom mode-line, I've included a feature that displays a countdown timer (timers are created using the chronos package) when it recognises that there is one running. Works great, but ...
5
votes
2answers
121 views

local keymap in mode-line doesn't work in terminal

I'm having trouble with getting local keymap:s to work in the mode-line, but only in terminals (with xterm-mouse-mode enabled). This applies to both the standard mode-line entries (like mode-line-...
5
votes
1answer
3k views

How to customize mode-line-format?

I want to customize mode-line-format using if or cond etc., to let it show different text conditionally. Here is a demo that I tried: (setq-default mode-line-format (quote ( (:eval (cond ...
5
votes
2answers
352 views

Temporarily show a message in the modeline?

How can I print a message for a period of time to the mode line and restore the default format afterwards?
5
votes
1answer
904 views

How can I see total time today on _all projects_ in the modeline?

The variable org-clock-modeline-total gives me several options for what time to show in the modeline, but they limited to time clocked into the current task. I would like to show the total time clock ...
5
votes
1answer
152 views

Increasing the frequency of modeline redisplay

Q: Is there a way to (temporarily) increase the rate at which the mode line is redisplayed? I was trying to write a package that adds a spinner to the mode line (to indicate ongoing operations), but ...
5
votes
0answers
98 views

Customize modeline to display name of prev/next buffer

As topic says - I'm using tabbar + tabbar-forward-tab to quickly switch between recent buffers right now, but I don't really like it. I'd rather have the names of the previous and next buffer show up ...
4
votes
3answers
444 views

How to show the sticky(lock) window status in the mode line?

I got the following snippet in my init.el: (define-minor-mode sticky-buffer-mode "Make the current window always display this buffer." nil " locked" nil (set-window-dedicated-p (selected-window)...
4
votes
2answers
2k views

Padding around modeline text?

The text in my modeline fits exactly in the modeline, I would like to have some more padding above and below the text, couldn't find an option for it and don't know much about text properties in Emacs....
4
votes
1answer
3k views

How to display time in seconds in the mode line?

By default display-time-mode shows the time only in minutes. How I can display time in seconds? Something like 18:34:45".
4
votes
2answers
577 views

How to make mode-line text look like a link/button on hover

What face/text/other property should I use to have mode-line text look like a button/link/stuff to click on while I am hovering over it with the cursor? Some examples: different background, 3D-like ...
4
votes
2answers
198 views

Toggle button on modeline

How to create a toggle button in the modeline, like a play / pause button ? for now, I've got the following : (setq-default mode-line-format '( (:eval (propertize " ⏸ " ...
4
votes
2answers
1k views

how to disable automatic dos mode?

Many versions ago, if you opened a dos-line-end file on Linux you would see the extra ^M codes. Now it automatically recognizes the situation and puts "DOS" in the info bar and hides the extra ^Ms. ...
4
votes
1answer
240 views

Version control information out of sync with certain modes

Sometimes, though seemingly not in a consistent way, some modes that use version control information do not get updated correctly after git commands are run (e.g.,diff-hl-mode or git-gutter-mode ...
4
votes
1answer
401 views

how to direct spaceline to display “Narrowed” in the mode-line?

I'm using Spacemacs, which by default includes spaceline. I'd like the mode-line to indicate whether I'm in a narrowed buffer or not. So when I do org-narrow-to-subtree, for instance, spaceline could ...