Comments (5)
No it's not possible currently but it seems nice to have. I'll have a think about it.
from major-mode-hydra.el.
Had a look at the code. Something like this should do it:
Handle :separator
different if it is a list like ("-" " ")
and use the cdr
as the separator between columns like so:
-
Change
pretty-hydra--gen-heads-docstring
major-mode-hydra.el/pretty-hydra.el
Line 133 in d9fb688
Add this to let of the function:(separator (or (and (listp separator) (car separator)) separator))
And change the line above to this:
(s-pad-right width separator "^^"))
(Note: with the old code the separator is as it looks actually too wide. Is this on purpose?)
-
Change
pretty-hydra--gen-heads-docstring
major-mode-hydra.el/pretty-hydra.el
Line 153 in d9fb688
Add this to let of the function:(separator (or (and (listp separator) (cadr separator)) separator)) (col-separator (s-pad-right (length separator) " " ""))
And change that line to:
(s-join (if (= i 1) separator col-separator)
Like this one can even use a separator longer than one character :separator ("─" " │ ")
:
What you think? I can make a pull request. Would this also affect the tests?
from major-mode-hydra.el.
Oh I thought you'd want the column separator to appear on every row, not just the separator row. If this is really what you want, your proposed solution sounds good to me (otherwise I'd probably introduce a separate property :col-separator
).
A PR is definitely welcome!
from major-mode-hydra.el.
had time to work on this:
https://github.com/hubisan/major-mode-hydra.el/tree/feature/col-separator
:col-separator a string or a list of two strings used to separate the columns. If it is a list, the second string is used as column separator at the separator line. If the strings in the list are of unequal length the shorter string is centered by adding spaces.
So this accepts " │ "
or '(" │ " "───")
. If a list the effect is the following, using '("x│x" "=X=")
:
Added a .travis.yml for automated testing against emacs 25 and 26. Test in 25 unfortunately fail, caadr and caaddr (used in pretty-hydra--normalize-args
) were introduced in emacs 26. Can you change this on develop? Will rebase, add some tests for the :col-separator and make the pull request.
from major-mode-hydra.el.
@hubisan That's awesome! Looking forward to your PR.
from major-mode-hydra.el.
Related Issues (20)
- Pretty hydras not getting a big enough posframe HOT 4
- How to implement inheritance and mixing? HOT 2
- Hydras and global key bindings HOT 4
- Dynamic Title with pretty hydra HOT 2
- Calling a pretty hydra gives "wrong type argument" error HOT 3
- pretty-hydra: The caret character "^" is not displayed properly HOT 3
- major-mode-hydra: Unrecognized keyword mode-hydra in use-package HOT 3
- missing one line with posframe HOT 4
- Differences between hydra and pretty-hydra? HOT 2
- pretty-hydra: columns cannot left-justified, how to solve it? HOT 7
- macro argument HOT 3
- Composing hydras / minor mode support again HOT 4
- Checking duplicate letter HOT 3
- how to add a head but hide it from the actual menu HOT 2
- What is with-faicon? HOT 2
- Multibyte characters will be displayed incorrectly. HOT 5
- Add customizable title formatter
- Hide menu? HOT 1
- ⛔ Error (use-package): use-package: Unrecognized keyword: :pretty-hydra HOT 10
- Hydra Generator Helper Function
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from major-mode-hydra.el.