Commit graph

1281 commits

Author SHA1 Message Date
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
a62a95d49a Update comments and page breaks. 2021-05-13 22:26:04 +08:00
Vincent Zhang
5cb0ff7a38 Bump version. 2021-05-13 22:10:14 +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
Vincent Zhang
e1ca326ae9 Fix #437: When visual-fill-column mode is activated perspectives are not shown. 2021-05-10 12:40:08 +08:00
Naofumi Yasufuku
12f1ab19b9
Fix doom-modeline-env command to display python version under pipenv (#436)
This reverts "pipenv run <python> --version" command generation code
removed by #391 patch.
2021-05-02 00:28:01 +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
Vincent Zhang
00bc89b8de Update ci. 2021-03-25 15:25:58 +08:00
Nacho Barrientos
0a7b36d7ed
Fix typo (#428) 2021-03-22 23:17:25 +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
Nacho Barrientos
0c5ce0d0d5
Fix spelling mistake (#423) 2021-03-08 09:56:54 +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
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
Vincent Zhang
4956606a54 Only set icon widths in UI mode.
See #403.
2021-01-07 22:07:22 +08:00
Vincent Zhang
49816da1a6 Disable cask package due to ci issue. 2021-01-05 21:11:47 +08:00
Vincent Zhang
e7ce0c65d1 [Feature] Support two-column buffers. 2021-01-03 21:35:22 +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
af5f61888e Update ci workflow/
See https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/.
2020-12-13 02:43:26 +08:00
Vincent Zhang
5032c7acf0 Format codes. 2020-12-13 02:23:29 +08:00
Wang Kai
c1475ba6ae
Add pyenv version-name (#391)
see: #109
2020-12-13 02:21:06 +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
ae2862a033 Update docs. 2020-09-28 22:54:08 +08:00
baracunatana
9ad0d47911
Update README.md (#380)
Missing ) in customization documentation
2020-09-28 22:48:05 +08:00
Vincent Zhang
aa056cfca6 Update README.
See #374.
2020-09-09 20:36:55 +08:00
Vincent Zhang
52e77ffd91 Trigger ci on PR. 2020-08-31 01:43:17 +08:00
Vincent Zhang
7f2581debd Trigger ci on push. 2020-08-31 01:18:41 +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
Vincent Zhang
ffbaaee832 Activate the mode-line upon changing workspace in EXWM.
Fix #358.
2020-08-19 09:17:34 +08:00
Vincent Zhang
0384ce08ce Update docs. 2020-08-18 11:53:01 +08:00
Vincent Zhang
f0312f8794
Merge pull request #370 from alexmurray/poke-line-support
Add support for poke-line in buffer position segment
2020-08-18 11:49:19 +08:00
Alex Murray
9235985ff7
Add support for poke-line in buffer position segment 2020-08-18 12:30:58 +09:30
Vincent Zhang
386d75274c Support 27.1 in CI. 2020-08-11 15:56:28 +08:00