Giter Site home page Giter Site logo

Comments (5)

meliache avatar meliache commented on September 24, 2024 1

With emacs 29 getting full emoji support I decoreated some of my hydra heads with emoji, which looks really nice but also breaks the alignment. E.g. with the current pretty-hydra the following hydra

  (pretty-hydra-define org-clock-hydra
    (:color blue :title "Org Clock ⏱️️")
    ("Clock"
     (("i" org-clock-in "in ")
      ("o" org-clock-out "out ")
      ("l" org-clock-in-last "in last")
      ("s" my/org-clock-in-select "select")
      ("t" org-clock-hydra-into-time-sink/body "timesink")
      ("p" org-pomodoro "pomodoro 🍅"))
     "Edit"
     (("e" org-clock-modify-effort-estimate "set effort 🏋🏻‍♀️")
      ("x" org-pomodoro-extend-last-clock "extend last")
      ("c" org-clock-cancel "cancel clock 🚫")
      ("v" #'org-resolve-clocks  "resolve"))
     "Summary"
     (("g" org-clock-goto "goto clock 🚶🏾‍♀️")
      ("d" org-clock-display "display 🖥️")
      ("r" org-clock-report "report 📜")
      ("?" (org-info "Clocking commands") "info"))))

looks like the following:
grafik
With the fix from the comment by @imakado I get the following result:
grafik
Looks like I might also need to look into the code more and check where else equality of length and width is assumed.

from major-mode-hydra.el.

imakado avatar imakado commented on September 24, 2024

Sorry for the crappy report. I'm still reading the source code...

from major-mode-hydra.el.

jerrypnz avatar jerrypnz commented on September 24, 2024

Thanks for reporting this. I don't personally use CJK characters in my setup but I understand it's annoying when columns don't align properly.
Do you think if you can raise a pull request for your suggested change?

from major-mode-hydra.el.

jerrypnz avatar jerrypnz commented on September 24, 2024

I have a feeling it highly depends on the font. I'll look into it a bit more.

from major-mode-hydra.el.

meliache avatar meliache commented on September 24, 2024

I was quite active on the issues here and initiated some PR's but also disappeared for a bit. The main reason being that I switchend to Transient for menus with automatic layouts. The recent Transient versions have the option transient-align-variable-pitch, which implements pixel-alignment:
https://github.com/magit/transient/blob/04f87b4ab3c7448a78f452cadaaf5d9e7a216d1d/lisp/transient.el#L315-L330
Not sure is what @imakado suggested above does the same. If interested you might look into the transient code for inspiration. In transient the option is nil by default because of the associated performance penalty.

from major-mode-hydra.el.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.