Commit graph

464 commits

Author SHA1 Message Date
Vincent Zhang
22563e68df Refactor. 2021-05-16 22:09:24 +08:00
Vincent Zhang
b5d38aa711 Improve hud bar. 2021-05-15 18:39:53 +08:00
Vincent Zhang
a89ac6c7a1 New option: doom-modeline-hud.
Whether to use hud instead of default bar. It's only respected in GUI.
2021-05-15 03:52:00 +08:00
marienz
7ed4dbdf72
Add a "hud" segment inspired by powerline (#439)
This is a small graphical indicator showing the rough size of and
position in the current buffer. It is not used by default in any
modeline, but is intended to be usable as a replacement of the "bar"
segment.

To avoid performance problems, cache the HUD images as window
parameters. When rendering the modeline, we check if the buffer
position (or size) has changed enough to change the image, and reuse the
image if not. This check should be similar in performance to rendering
buffer size or position. Changing bar width or height forcibly
invalidates all cached images, so they get redrawn as the modeline in
each window is rendered.

This only adds the segment. To use it, define a new modeline.
2021-05-14 23:57:54 +08:00
Vincent Zhang
0531669f59 Format and eliminate warnings. 2021-05-13 22:09:27 +08:00
Naofumi Yasufuku
a7f376d4bb
Show tab-bar workspace-name even if tab-bar-show is nil (#438)
If tab-bar is hidden by setting tab-bar-show nil, tab-bar-mode is nil
but still new tabs can be created by tab-bar-new-tab.  Modeline
workspace-name should be displayed even if tab-bar is hidden.

workspace-name doesn't bother you when tab-bar has only one tab.
2021-05-12 02:29:06 +08:00
marienz
e898c0d396
Support hiding buffer encoding when at default (#435)
Only showing the buffer encoding and EOL style when they are
interesting (not at their default values) makes them stand out more when
needed, and frees up space when not. Users currently cannot hide the
coding-system and EOL segments separately, and would have to watch for
changes to `buffer-file-coding-system` to toggle visibility. Since
doom-modeline reads these values already anyway, we can easily add
support.

Add a new value `'nondefault` for `doom-modeline-buffer-encoding` to
enable this feature.

Add two new settings to set the default. Detecting the user's defaults
is tricky: Emacs does not use a single variable for the default coding
system but a prioritized list, and hooks can (and do, on Windows) change
the defaults. For now, hardcode reasonable "default defaults" and allow
the user to customize them.

Reorganize slightly to minimize work done if we choose not to display a
segment. Behavior when the new feature is not used should be unchanged.
2021-04-27 22:59:10 +08:00
marienz
92f141f91a
Simplify image creation (#432)
Switch from an XPM to a PBM bitmap: PBM is easier to generate and easier
for Emacs to decode. Emacs has PBM support built-in so it's always
available (keep the `image-type-available-p` check in case this changes).

Stop creating a temporary list-of-lists to iterate over.

Rename `doom-modeline--make-xpm` to `doom-modeline--make-image` because
it's no longer creating an XPM, and the type of the bitmap should not
matter to callers.
2021-04-19 17:58:09 +08:00
Waqar Hameed
3433275efe
Add face for notifications (#431)
There is a face for the number part of
notifications (`doom-modeline-unread-number`), however, none for the
notification itself. For symmetry, we introduce
`doom-modeline-notification` as a face for notifications. We also set
the default value to `doom-modeline-warning` to keep the previous
behavior.

Signed-off-by: Waqar Hameed <whame91@gmail.com>
2021-04-12 14:40:01 +08:00
Vincent Zhang
0c2f2f0aa2 Fix #422: Emacs freezes continuously after tramp buffer loses connection.
Don't check if the remote files exist.
2021-03-08 20:12:32 +08:00
Vincent Zhang
5fca2ea926 Fix checkdoc warnings. 2021-01-17 07:44:10 +08:00
Vincent Zhang
f7e50accbf Ensure battery-status-function is valid.
See #408.
2021-01-17 07:39:40 +08:00
tianshu
de34f11b11
Add Meow indicator (#401)
Co-authored-by: shitianshu <doglooksgood@gmail.com>
2021-01-03 16:20:19 +08:00
Vincent Zhang
fb34eb5eb6 Fix invalid faces while displaying lv windows. 2020-11-29 00:59:51 +08:00
Vincent Zhang
6f1864583b Eliminate warnings. 2020-11-21 00:08:34 +08:00
Arnaud Spiwack
ece3007641
Add support for Boon modal states (#388)
[Boon](https://github.com/jyp/boon) is a modal mode for Emacs. This
commit adds support for Boon in the modal segment.

Boon has four states:
- Command (like Evil's normal)
- Insert
- Special (mostly pass-through, much like Evil's Emacs mode)
- Off, used when Boon really doesn't know what to do. There is no real
  equivalent in Evil; this commit uses the same face as Evil's
  operator state for this one. It's arbitrary, but it probably doesn't
  matter too much.
2020-11-12 12:24:23 +08:00
Vincent Zhang
5cfc0251e0 Use buffer-list-update-hook instead of advising select-window.
Fix #386.
2020-11-02 23:55:50 +08:00
Vincent Zhang
86d91e891b [Feature] Add mouse actions to mu4e alert segment.
Close #382.
2020-10-05 21:58:04 +08:00
Vincent Zhang
538017a399 Suppress some segments when the window is small. 2020-10-01 12:38:56 +08:00
Vincent Zhang
214493b8a1 Improve github notification. 2020-08-28 01:10:04 +08:00
Jim Myhrberg
d8d04332f5
Add option to show/hide workspace-name in modeline (#371) 2020-08-24 10:30:46 +08:00
Alex Murray
9235985ff7
Add support for poke-line in buffer position segment 2020-08-18 12:30:58 +09:30
Vincent Zhang
160d7ac278 [Enhancement] support all flycehck error levels.
Support LSP customized levels.
See https://github.com/emacs-lsp/lsp-mode/issues/1961.
2020-08-02 23:32:27 +08:00
Vincent Zhang
5623f161f1 Add dashboard mode-line. 2020-07-25 14:24:18 +08:00
Vincent Zhang
15c859dc4b Fix invalid format in indent-info segment. 2020-07-23 21:35:53 +08:00
Vincent Zhang
df28fb2181 Improve buffer-default-directory segment. 2020-07-23 18:07:10 +08:00
Vincent Zhang
e27473dd23 Display buffer state in buffer-default-directory segment.
See #368.
2020-07-23 16:45:16 +08:00
Vincent Zhang
d7f187efc6
Merge pull request #367 from netromdk/improve-indent-info
Improve indent info by showing correct indent size by major mode
2020-07-22 15:14:43 +08:00
Morten Kristensen
203111a3af
Improve indent info by showing correct indent size by major mode
Instead of using `tab-width` for space indentation size, the correct indentation size variable is
tried detected per major mode. If nothing can be found, it will fall back to `tab-width` as before.
2020-07-21 18:47:19 +02:00
Vincent Zhang
8522d761e3 Integration with dired-narrow.
Close #368.
2020-07-22 00:05:29 +08:00
Vincent Zhang
7495a02f6e Display maximum 50+ for unread notifications due to Github API limitation. 2020-06-19 00:54:43 +08:00
Vincent Zhang
bdb06df001 seq-contains is obsolete since 27. 2020-06-10 22:46:29 +08:00
Eric Dallo
a19a24c8d6
Add repl segment for CIDER 2020-06-09 11:34:32 -03:00
Vincent Zhang
8e1cc53b8c
Merge pull request #344 from ericdallo/fix-debug-session-color-change
[debug] fix modeline color change for all buffers
2020-05-30 15:00:13 +08:00
Eric Dallo
ea53fe8454
Fix defvar-local 2020-05-28 15:02:33 -03:00
Eric Dallo
cf1ac1be52
Change color for all buffers 2020-05-28 14:21:45 -03:00
Vonfry
869564c3f6
gnus: fix seq-contains-p, use seq-contains instead
seq-contains-p is not defined in seq.el version 2.20 and emacs 26.3
2020-05-27 23:27:23 +08:00
Vonfry
285d44f267
gnus: use eval with gnus-group-unread instead of coding the macro here.
I think this is more compatible.
2020-05-27 23:17:23 +08:00
Vincent Zhang
2b30885767 New faces: doom-modeline-input-method and doom-modeline-input-method-alt. 2020-05-13 19:03:49 +08:00
Vincent Zhang
df56aad083 Format codes. 2020-05-02 12:34:44 +08:00
Vincent Zhang
515300f984 Don't trim the tag names in modal segment. 2020-05-01 21:45:48 +08:00
Vincent Zhang
f8214e8661 Eliminate warnings. 2020-05-01 18:26:40 +08:00
Morgan Smith
5090426eb2
Added ability to exclude gnus groups from unread count 2020-04-24 18:55:18 -04:00
Jake Romer
a37333ad7a
Replace and with when 2020-04-23 12:26:11 -04:00
Jake Romer
87de449996
Fix typo 2020-04-23 11:20:47 -04:00
Jake Romer
b44a48312d
Rename variable, omit adjacent space if omitting persp icon
- Rename toggle to `doom-modeline-persp-icon`
- Omits adjacent `doom-modeline-vsp` if omitting persp icon
2020-04-23 11:15:56 -04:00
Jake Romer
46d62072dc
Make persp mode indicator icon toggleable
By default the persp name is displayed with a folder icon. This patch makes the
icon toggleable via `doom-modeline-display-persp-icon'.
2020-04-23 07:38:01 -04:00
Vincent Zhang
828b95d428 Fix incorrect face of pdf-pages while focusing out. 2020-04-18 15:24:20 +08:00
Vincent Zhang
5e3d2da9a7 Improve the face of input-method. 2020-04-16 18:57:24 +08:00
Vincent Zhang
b44955841a Exclude child frames while calculating window numbers. 2020-04-07 22:13:47 +08:00