-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] C++ port Proof of Concept #3
base: reintegrate-v2
Are you sure you want to change the base?
Conversation
b57afba
to
78f83a5
Compare
1496ffb
to
f50af0e
Compare
I haven't looked at the commits but in general I'm a fan of the idea of switching to C++. It doesn't look like upstream is willing to switch, so this would have to be done in a permanent fork. |
I don't really see any reason against. Maybe I was too rude after all. If it's memory usage on some embedded system, dynamic allocations in C++ only work in favor on C++. I have already significantly reduced static memory usage. Because with dynamic alloc you only pay more memory as your config grows bigger. |
Also optimize `chord` struct size a bit. Looping over small array should be easily unrolled/vectorized.
Also allow includes to have non-.conf extensions.
Also split table to reduce memory size.
Use RTTI on listener socket.
Improve indicator on Wayland (resist forced changes). Optimize layer_indicator performance. Fix previous unnecessary LED setting. Compatible with previous settings because CAPS_LOCK equals 1. Based on pull-request initially proposed by @plague-spreader
Macro no longer allowes "words" (char sequences without delimiters). In order to write "Hello" it must be written as macro(H e l l o). Alternatively, it can be t(Hello) or type(Hello). Shell commands can't execute via `keyd do`. Example: macro(cmd(echo 1))
Also allow implicit layer creation on bindings.
Add leftctrl/leftsuper-alike key aliases. Allow ctrl as layer name equal to control. Allow multiname aliases in alias section.
0a1b768
to
4ee374b
Compare
Refactor config_backup class. Also use C++20 'using enum class'.
`keyd do` or `keyd bind` will copy user's credentials. Loaded .conf file will use keyd process credentials. Don't kill child processes in systemd config. Allow a train of IPC messages for optimization.
Remove full `*` wildcard support. Initially `m:*` was proposed by @jyn514 Additional wildcard `a:` to include abs pointer devices. When using `m:` those devices are excluded.
3fd49dc
to
b675fa4
Compare
These commands may be useful to execute at user session startup. User bindings are loaded by explicit calling `keyd reload` from user. User bindings are located at `~/.config/keyd/bindings.conf`.
d824515
to
14ee0f1
Compare
Implement file_reader class (simple fd->container). Some options allow significantly reduce executable size. Static part of libstdc++ now is only 130~150 Kb.
Not for merge.
Fixes issues with capslock indicator being reset (in Wayland, for example) (feel free to cherry-pick).
Fixes cursed issues with C fixed arrays by using C++ (partially).
The fact these issues exist is infuriating. Fixing this in pure C will only waste a lot of time.