ir33k / tb-keycast Goto Github PK
View Code? Open in Web Editor NEWEmacs keycast minor mode that shows pressed keys in tab bar line.
License: GNU General Public License v3.0
Emacs keycast minor mode that shows pressed keys in tab bar line.
License: GNU General Public License v3.0
Your version of keycast looks nice at the tab-line, except that I do not really want to use the rest of the tab-line.
So, I have customized the tab-line format as the following:
(setq-default tab-bar-format nil)
(set-face-attribute 'tab-bar nil
:inherit 'default
:underline (color-lighten-name (face-foreground 'default) 80))
However, it now feels natural to move the keycast indicator to the left. It would be useful to add such customization.
It looks like width used to calculate position of tb-keycast status is taken from current buffer window width instead of frame width.
To reproduce simple enable tb-keycast-mode
and create split with C-x 3
.
Seeing the last command is indeed nice, but easy to miss at times. It would be useful to add an option to display recent commands in a side window slot in Emacs.
I discover that all calculations of position and width used to align status string to the right and avoid wrapping are incorrect when tab-bar have different font than buffer.
Its because to calculate width of string in pixels string-pixel-width
function is used. It works by inserting string to temporary buffer and takes measurements there. If your buffer font is for example monospace but tab-bar font use proportional font it will return wrong value.
I believe that to fix this all we need is to apply font used in tab-bar to string before string-pixel-width
function is used.
When I run a lambda function from inside helm, I can reliably "freeze" the keycast indicator. It happens because tb-keycast--update
throws and error and Emacs automatically removes it from command hooks.
The error is the following
(wrong-type-argument symbolp (lambda nil (interactive) (helm-select-nth-action 1)))
Current faces setup can be used to customize foreground color and font look but modifying background color will result in gap between parts of status string.
I just tried to increase the tab-bar font height:
(set-face-attribute 'tab-bar nil
:inherit 'default
:underline (color-lighten-name (face-foreground 'default) 80)
:height 2.0)
The result is ugly tab-bar wrapping to second line.
The problem appears to be not in tb-keycast itself, but rather in tab-bar-format-align-right
. I guess it should be reported to Emacs upstream.
It is not currently possible to distinguish between commands called with and without prefix arguments (numeric or C-u). Yet, this information is important to understand what is happening - command behaviour might be significantly changed depending on the prefix argument.
It would be nice to display the non-nil prefix argument in addition to the nominal key sequence.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.