Commit graph

202 commits

Author SHA1 Message Date
Vincent Zhang
0531669f59 Format and eliminate warnings. 2021-05-13 22:09:27 +08:00
Vincent Zhang
e1ca326ae9 Fix #437: When visual-fill-column mode is activated perspectives are not shown. 2021-05-10 12:40:08 +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
Bruno Heridet
669cac3839
fix: typos in comments and docstrings (#429) 2021-03-30 23:22:24 +08:00
Nacho Barrientos
0a7b36d7ed
Fix typo (#428) 2021-03-22 23:17:25 +08:00
Vincent Zhang
1a5b142deb Fix #416: Focus does not change properly on switching buffers. 2021-03-02 18:32:36 +08:00
Vincent Zhang
1d8d8f885d Be compatible with mini-frame.
Close #419.
2021-02-28 01:47:57 +08:00
Vincent Zhang
5fe7fd677c Fix #417: Modeline looks unfocused when using exwm. 2021-02-23 17:41:22 +08:00
Vincent Zhang
116c733fd5 Remove redundant advices. 2021-01-25 00:10:37 +08:00
Vincent Zhang
85f653a2b9 Update window-selection-change hook.
Close #412.
2021-01-25 00:02:22 +08:00
Vincent Zhang
26b90b2ec9 Eliminate compilation warnings. 2021-01-24 01:56:27 +08:00
Vincent Zhang
4956606a54 Only set icon widths in UI mode.
See #403.
2021-01-07 22:07:22 +08:00
Jim Myhrberg
d8d04332f5
Add option to show/hide workspace-name in modeline (#371) 2020-08-24 10:30:46 +08:00
Vincent Zhang
ffbaaee832 Activate the mode-line upon changing workspace in EXWM.
Fix #358.
2020-08-19 09:17:34 +08:00
Vincent Zhang
a846653ae6 Fix #369: doom-modeline-segment--lsp signaled wrong-type-argument. 2020-07-31 01:35:50 +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
Nicholas Vollmer
1f3956f6ae Refactor: doom-modeline-propertize-icon use cl-destructuring-bind 2020-07-19 02:14:39 -04:00
Vincent Zhang
1c4711c719 Enhance face: doom-modeline-debug-visual. 2020-07-04 18:56:35 +08:00
Vincent Zhang
40a8abf0cc Declare the proper type for doom-modeline-continuous-word-count-modes.
Fix #361.
2020-07-04 17:14:20 +08:00
Vincent Zhang
a921eeba1e Ignore lv windows while getting the current window.
Fix #227.
2020-07-02 01:17:13 +08:00
Vincent Zhang
f57d1afae8 Refresh font width cache while using emacsclient to make a new frame.
Close #354, #356.
2020-06-21 21:50:14 +08:00
Vincent Zhang
8904f5d631 Fix #352: The modeline interval color of the inactive window is wired. 2020-06-12 21:28:51 +08:00
Vincent Zhang
c90ae9de9b New faces: doom-modeline-spc-face and doom-modeline-vspc-face.
Fix #351.
2020-06-10 22:47:20 +08:00
Eric Dallo
a19a24c8d6
Add repl segment for CIDER 2020-06-09 11:34:32 -03:00
Vincent Zhang
670b06502f Fix invalid face attribute :inherit nil on 26. 2020-06-09 01:41:07 +08:00
Vincent Zhang
5a6785cba0 Fix invalid face attribute :inherit nil on 26. 2020-06-09 01:40:25 +08:00
Vincent Zhang
d009633729 Refactor. 2020-06-08 01:11:07 +08:00
Vonfry
8e1f5dc4f0
Update doom-modeline-core.el 2020-05-28 00:07:10 +08:00
Vonfry
9c3f05a4cc
readme: add gnus custom variable description 2020-05-27 23:49:38 +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
Morgan Smith
5090426eb2
Added ability to exclude gnus groups from unread count 2020-04-24 18:55:18 -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
0ce0acd7bc Minor fix. 2020-04-17 21:15:00 +08:00
ANGkeith
244200f87d buffer-info: add truncate-nil style 2020-04-17 13:39:11 +08:00
Vincent Zhang
a811cb1587 Refresh cache after setting fonts.
See #329.
2020-04-15 23:32:51 +08:00
Vincent Zhang
53bf59d50c Fix #316: error in 25 - Symbol’s value as variable is void: props. 2020-03-06 17:39:55 +08:00
Vincent Zhang
e18b5ea60d Enhance faces. 2020-02-26 14:44:32 +08:00
Vincent Zhang
9508fae617 Ensure the width and height are numbers. 2020-02-26 02:49:36 +08:00
Vincent Zhang
54574d9af3 [Optimize] Check if the buffer is modified timely.
Don't check in the hooks in case some cases are missing.
Moreover calling `buffer-modified-p' is fast.
It doesn't affect performance.
2020-02-25 20:18:01 +08:00
Vincent Zhang
41015d72e7 Change the default value of doom-modeline-window-width-limit. 2020-02-25 04:40:35 +08:00
Vincent Zhang
25b79dff8f Fix warnings. 2020-02-24 20:59:15 +08:00
Vincent Zhang
a25dc7267e [Feature] Simplify buffer name and others when the window is small.
1. Introduce an option: doom-modeline-window-width-limit.
2. Check if the window is small (window-width <=
doom-modeline-window-width-limit) while window size is changed.
3. Only display buffer name when the window is snall.
4. Don't display pers-name when the window is small.
2020-02-23 04:21:58 +08:00
Vincent Zhang
ccc7f973a9 Optimize performance. 2020-02-23 03:41:52 +08:00
Vincent Zhang
4d8d935191 Eliminate warnings. 2020-02-22 16:06:14 +08:00
Vincent Zhang
d355309218 Minor refactor. 2020-02-22 01:44:06 +08:00
Vincent Zhang
333dc074e5 Fix #313: Frame focus error.
doom-modeline-focus-change: Symbol’s function definition is void:
frame-focus-state.

`after-focus-change-function' and `frame-focus-state are introduced' in 27.
2020-02-19 23:51:40 +08:00
Vincent Zhang
4ee3559fb6 [Enhancement] Support buffer names from org-protocol.
Use "%b" instead of "(buffer-name)".
With "auto" style, display buffer name if not in a project.
2020-02-19 17:24:06 +08:00