summaryrefslogtreecommitdiff
path: root/modeline.el
AgeCommit message (Collapse)Author
2023-07-29modeline: `mode-line-window-selected-p`JSDurand
* modeline.el: (modeline-get-active-window, modeline-active-window, modeline-active-window-p, modeline-set-active-window, modeline-unset-active-window, modeline-refresh-modeline, window-configuration-change-hook, buffer-list-update-hook, after-make-frame-functions, delete-frame-functions, handle-switch-frame): Emacs 29 adds a convenient function `mode-line-window-selected-p` that makes my old manual implementation here obsolete now.
2023-05-28modeline: toggle mode-lineJSDurand
* modeline.el (modeline-toggle): A function to toggle the display of the mode line. (modeline-alt-format): This is used to store the mode line so that we can toggle back. (global-map): Add a global binding: 'C-c T'.
2022-12-30modeline: adapt the face once againJSDurand
* modeline.el (modeline-dashboard-format-right, durand-major-global-mode) (modeline-format-major-mode): Tried some tricks, but I still use a white color in the end.
2022-12-25theme + modeline: adapt to the update of modus-themesJSDurand
* modeline.el: Basically adjust colors to fit the new theme. * theme.el (modus-themes-headings): Make the headings ultra-bold. (modus-themes-after-load-theme-hook, durand-custom-face): To change the mode-line face via a hook. (modus-vivendi-tinted, modus-vivendi): I use the un-tinted version now.
2022-12-23modeline: replace some uses of the doom facesJSDurand
* modeline.el (modeline-format-buffer-status): Use other faces for the mode line.
2022-01-13keycast-conf: Display in the active windowJSDurand
* keycast-conf.el (keycast-window-predicate): Use the function `modeline-active-window-p' from my custom file "modeline.el" to determine whether a window is the currently active window, and then display the key cast information in that active window only. * modeline.el (modeline-get-active-window, modeline-format-keycast): A slight refactor. (modeline-format-keycast): Use bound-and-true-p to test the mode variable, so as to avoid errors when durand-keycast-mode has not yet been loaded.
2022-01-12modeline: silence keycast when deactivatedJSDurand
* modeline.el (modeline-format-keycast): Previously there was a bug that the last key cast message will still appear on the mode line after durand-keycase-mode has been deactivated. Now this is fixed.
2022-01-12Use the package "keycast"JSDurand
Now I can conveniently display my key-bindings in the mode line.
2021-12-19modeline: clean format and use truncate-string-to-widthJSDurand
* modeline.el (modeline-format-main): Using string-width to calculate the widths of strings is more accurate than my previous hand-made function. (modeline-length): This is no longer needed and now marked as obsolete. It is not deleted entirely since per chance some other places are still using it. (modeline-format-minor-modes, modeline-format-buffer-name): Use truncate-string-to-width instead.
2021-06-05modeline: try to reduce the mode line clutterJSDurand
* battery-conf.el (durand-battery-pmset): Whether it is AC or battery should be clear with one letter: A or B. * modeline.el (modeline-minor-modes-name-len-max): minor modes should be more important, as it is not easy to discover which of them are enabled. (modeline-buffer-name-len-max): And the name of the buffer is easily checked by a manual function call, so is less important to me.
2021-06-02modeline: Reduce upper bound for the minor modes.JSDurand
* modeline.el (modeline-minor-modes-name-len-max): Now set to 20. For a long mode line, some compromises are unavoidable. Among the elements of a mode line, I think the information about minor modes should be compromised first. (modeline-format-minor-modes): Reformat.
2021-05-29modeline: do not use bars anymoreJSDurand
* modeline.el (modeline-format-left): Remove the commented line about bars. (modeline-bar-width): (modeline-bar-height): (modeline-bar-color): (modeline-bar-color-inactive): (modeline-bar-img): (modeline-bar-img-inactive): (modeline-refresh-bars): (modeline-format-bar): These are removed.
2021-05-26modeline: Fix an error about matching non-stringsJSDurand
* modeline.el (modeline-length): I was matching a variable whose can be nil. Check if it is a string before matching solves the potential problem. Also remove two files that need not be under version-control.
2021-04-20Calculate the widths of non-Latin characters correctly.JSDurand
* modeline.el (modeline-format-main): Now use the following function to calculate the correct widths. (modeline-length): Use the name and the decomposition of a character to determine if a character should take 1.7 columns instead of 1 column.
2021-04-20Also display time and battery in the dashboardJSDurand
* modeline.el (modeline-format-dashboard): We need a right part to display time and battery. (modeline-dashboard-format-right): The original part (modeline-dashboard-format-left): The time and the battery are displayed here.
2021-02-08Constantly growingJSDurand
A lot of improvements.
2021-01-24More custom functions and adjust for custom completion frameworkJSDurand
* LICENSE: Add GPLv3. * basic.el (durand-enlarge-window): (durand-shrink-window): (durand-enlarge-window-horizontally): (durand-shrink-window-horizontally): Now I can easily maximize or minimize windows. * comb/orderless-conf.el ("orderless"): Now I try to use my own completion framework. * common.el (durand-embark-scroll-down-or-go-to-completions): (durand-embark-scroll-up-or-go-to-completions): (durand-completion-scroll-down-or-go-to-minibuffer): (durand-completion-scroll-up-or-go-to-minibuffer): Move these functions here since they do not belong to the completion framework in my opinion. (register): (register-val-jump-to): Rewrite this method so that it does not have to ask me if I want to open a file while jumping. * completion-conf.el: My intended completion framework, which is still work in progress. * init.el ("comb/orderless-conf.el"): ("completion-conf.el"): Adjust things accordingly. ("durand-simple"): My custom functions for viewing and for opening things. * modeline.el (modeline-propertize): (modeline-format-minor-modes): (modeline-format-major-mode): Now the macro `modeline-propertize' won't override properties that it does not intend to define. This has the effect that the properties of the original constructs will go through and have effect. (modeline-format-main): Make sure the space has a positive length. (modeline-format-buffer-name): Make sure the length does not exceed half the width of the window.
2021-01-22Regular updatesJSDurand
In the course of configuring Emacs there are numerous changes to make. This is one regular step.
2021-01-19QoL changes.JSDurand
* bongo.el: Use header-line now. Try to improve the tick. * dired-conf.el: Require dired-x. * elisp.el: Hide Eldoc on the mode line. * text-conf.el (assq): Hide auto-fill-mode on the mode line. * modeline.el (modeline-format-left): Display minor modes information. (modeline-minor-modes-name-len-max): Max length of displayed minor modes. (modeline-format-minor-modes): Display minor modes information. (durand-mouse-minor-mode-menu): Make the default minor mode menu work with my custom mode line. * rime-conf.el ("emacs-rime"): Bind a key to set the input method to rime in the minibuffer, so that I can use this input method to search the buffer, for example.
2021-01-17Tweak more things.JSDurand
* basic.el (recenter-positions): In effect nothing changed. (prot-pulse-line): Puling the line. (pulse): Useful built-in library. (durand-pulse-pulse-line): My own tweak. (durand-pulse-recenter-top): Recenter and pulse. * init.el (prepare-in-hook-once): Make it interactive. (global-map): Add Org-mode bindings. ("durand-chercher-pdf"): Search PDFs quickly. * modeline.el (modeline-format-left): Remove the vertical bar. * org-conf.el (org-adapt-indentation) (org-modules) (org-hide-emphasis-markers) (org-hide-macro-markers) (org-hide-leading-stars): Steal some configurations from Protesilaos. (global-map) (org-mode-map): Add Org-mode bindings. (durand-pulse-pulse-line): (org-follow-link-hook): Pulse and recenter when following the link.
2021-01-16The first stable versionJSDurand
Fixes: Avoid adding suffix-link repeatedly * embark-conf.el ("embark"): Use view-mode instead of view-file * init.el (load-after-function): Modify the macro so that it no longer redefines built-in functions. (global-map): ("view-conf.el"): Rename view-functions.el to view-conf.el * suffix tree/generalized-suffix-tree.el (gst-edge-length): (gst-add-suffix-link): (gst-canonize): (gst-extend-tree): (gst-build-for-strs): Fixed the bug. * suffix tree/gst debugging platform.txt (strs): Add a new debugging file * suffix tree/gst test ground (2).txt (strs): Do more debugging * tab-conf.el (durand-switch-tab-dwim): Add my own dwim tab function. (global-map): Bind it to the global map. * theme.el Update the modus-themes. * view-conf.el Rename view-functions.el to view-conf.el.
2021-01-14A step in debuggingJSDurand
2021-01-13A temporary intermeidate stepJSDurand
Now I got almost every functionality that we need, including pdf, mu4e, magit, et cetera.
2021-01-09temporary stateJSDurand
2020-12-24More progessJSDurand
2020-12-24Add the right half of the mode line.JSDurand
2020-12-22Initial commitJSDurand