rougier / nano-modeline

GNU Emacs / N Λ N O Modeline
GNU General Public License v3.0
170 stars 29 forks source link

Invisible dedicated-window marker on Windows11 #71

Closed TomoeMami closed 8 months ago

TomoeMami commented 8 months ago

What's the symbol of this marker? I can't see it in both browser and Emacs GUI.

(propertize (if (window-dedicated-p) (or symbol " ") "") 'face (nano-modeline-face 'secondary)))

I have to re-defun it in my config.el, cause it takes several seconds to load my popper.el.

In browser:

image

In Emacs:

image

image

etern commented 8 months ago

install Symbols Nerd Font, and use it for this charater: (set-fontset-font t '(#xeba0 . #xeba0) "Symbols Nerd Font Mono")

rougier commented 8 months ago

Maybe the dedicated marker needs to be customizable and we could check if it is available (if not, fallback to a text marker like "D"). But I don't remember the function to test if a glyph is available.

TomoeMami commented 8 months ago

Maybe the dedicated marker needs to be customizable and we could check if it is available (if not, fallback to a text marker like "D"). But I don't remember the function to test if a glyph is available.

Maybe we can search Symbols Nerd Font as an alternative approach.

(member "Symbols Nerd Font" (font-family-list))

rougier commented 8 months ago

In my case, I've Installed "Roboto Mono Nerd" so I'm not sure your code would work. And I suspect most user would want their own symbol such that a custom character might b the easy way. What do you think ?

TomoeMami commented 8 months ago

I agree. Customization is the soul of Emacs.

In fact, I redefined the function nano-modeline-window-dedicated, replacing the PIN symbol with a more universal but less precising symbol .

(defun nano-modeline-window-dedicated (&optional symbol)
  "Pin symbol when window is dedicated"

  (propertize (if (window-dedicated-p) (or symbol "▼ ") "")
              'face (nano-modeline-face 'secondary)))

image

rougier commented 8 months ago

Done.