mihaiolteanu / mugur Goto Github PK
View Code? Open in Web Editor NEWConfigurator for QMK compatible keyboards
License: GNU General Public License v3.0
Configurator for QMK compatible keyboards
License: GNU General Public License v3.0
Trying to set a key to C-0
, or using it in a macro, doesn't work. Digging further, the function mugur--qmk-dashed-modifier
returns nil when acting on numbers.
(mugur--qmk-dashed-modifier 'C-0) ;Returns nil
Could be useful to extend how rules.mk
and config.h
settings can be configured to enable more complete/compact keyboard definitions....
e.g. in parallel to the keymaps, a quoted list of pairs...
(CONSOLE_ENABLE t)
generates CONSOLE_ENABLE = yes
(RGB_MATRIX_ENABLE "WS2812")
→ RGB_MATRIX_ENABLE = WS2812
in config.h
(RGB_MATRIX_MAXIMUM_BRIGHTNESS nil)
→ #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS
(RGB_MATRIX_MAXIMUM_BRIGHTNESS 150)
→ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150
more elaborate, some setf
expander?
Hi! I was working on this to have better error reporting to the user when a keymap has too much/too few items.
I see two approaches here: have a variable with the expected number of items, or guess which is wrong based on the items in all keymaps (if 2 have length 62 and one 63, report this one as probably wrong).
Which approach do you prefer? The second one require less setup but is a guesswork (can't work with only 1 layer, can report useless errors when there are 2 (one of them is wrong, but which one) and might work for more layers). The first approach requires a new defcustom.
Also, is it fine to throw a error since it's not possible for a keymap can have a different number of keys, right?
when no macros are used in a mugur definition, the keymap.c file contains something like:
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch (keycode) {
case EPRM:
eeconfig_init();
return false;
nil
nil
}
}
and
enum custom_keycodes {
EPRM = SAFE_RANGE,
nil,
nil
};
I've been using mugur to generate keymaps for the corne keyboard by formatting the output of the mugur--keymap-*
commands (just mugur-mugur
without writing to any files) which works as expected.
not sure if this covers everything (still having some issues with macros) but it's been useful for testing incremental changes to existing configurations...
(defun mugur-print-keymap (mugur-keymap)
"Use the MUGUR-KEMAP to generate the equivalent qmk C code.
MUGUR-KEYMAP is the user-side keymap with all the mugur-keys and layers."
(let ((qmk-keymap (mugur--transform-keymap mugur-keymap)))
(format"/* Macros */
%s
/* Tap Dances */
%s
/* Leader Keys */
%s
/* Combos */
%s
/* Layer Codes and Matrix */
%s"
(mugur--keymap-c-macros (mugur--qmk-keymap-macros qmk-keymap))
(mugur--keymap-c-tapdances (mugur--qmk-keymap-tapdances qmk-keymap))
(mugur--keymap-c-leader-keys)
(mugur--keymap-c-combo-keys)
(mugur--keymap-c-matrix (mugur--qmk-keymap-layers qmk-keymap)))))
According to this, the correct symbol for keypad plus is KC_KP_PLUS (build was failing for me with KP_PLUS), same goes for other keypad-related symbols.
If anybody can reproduce I will submit a patch
I installed mugur from melpa. After installing it I found no variables, functions or commands with mugur in their name, so I naturally tried to (require 'mugur)
, but this results in the following error:
Debugger entered--Lisp error: (void-function ert-set-test)
ert-set-test(mugur-valid-keycodes #s(ert-test mugur-valid-keycodes nil #[0 "\301C\3021\22\0\303\30\304\305!)\306D0\202\35\0\1\307\240\210\211@\1AD\262\1\310C\311C\312\313\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204;\0\315\1\242!\210\266\4\301C\3161O\0\303\30\304\317!)\306D0\202Z\0\1\307\240\210\211@\1AD\262\1\320C\311C\312\321\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204x\0\315\1\242!\210\266\4\301C\3221\214\0\303\30\304\323!)\306D0\202\227\0\1\307\240\210\211@\1AD\262\1\324C\311C\312\325\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\265\0\315\1\242!\210\266\4\301C\3261\311\0\303\30\304\327!)\306D0\202\324\0\1\307\240\210\211@\1AD\262\1\330C\311C\312\331\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\362\0\315\1\242!\210\266\4\301C\3321\6\1\303\30\304\333!)\334D0\202\21\1\1\307\240\210\211@\1AD\262\1\335C\311C\312\336\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204/\1\315\1\242!\210\266\4\301C\3371C\1\303\30\304\340!)\334D0\202N\1\1\307\240\210\211@\1AD\262\1\341C\311C\312\342\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204l\1\315\1\242!\210\266\4\301C\3431\200\1\303\30\304\344!)\345D0\202\213\1\1\307\240\210\211@\1AD\262\1\346C\311C\312\347\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\251\1\315\1\242!\210\266\4\301C\3501\275\1\303\30\304\351!)\345D0\202\310\1\1\307\240\210\211@\1AD\262\1\352C\311C\312\353\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\346\1\315\1\242!\210\266\4\301C\3541\372\1\303\30\304\355!)\356D0\202\5\2\1\307\240\210\211@\1AD\262\1\357C\311C\312\360\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204#\2\315\1\242!\210\266\4\301C\36117\2\303\30\304\362!)\363D0\202B\2\1\307\240\210\211@\1AD\262\1\364C\311C\312\365\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204`\2\315\1\242!\210\266\4\301C\3661t\2\303\30\304\367!)\370D0\202\177\2\1\307\240\210\211@\1AD\262\1\371C\311C\312\372\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\235\2\315\1\242!\210\266\4\301C\3731\261\2\303\30\304\374!)\375D0\202\274\2\1\307\240\210\211@\1AD\262\1\376C\311C\312\377\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\332\2\315\1\242!\210\266\4\301C\201@\0001\364\2\303\30\304\201A\0!)\201B\0D0\202\377\2\1\307\240\210\211@\1AD\262\1\201C\0C\311C\312\201D\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204!\3\315\1\242!\210\266\4\301C\201E\0001;\3\303\30\304\201F\0!)\201G\0D0\202F\3\1\307\240\210\211@\1AD\262\1\201H\0C\311C\312\201I\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204h\3\315\1\242!\210\266\4\301C\201J\0001\202\3\303\30\304\201K\0!)\201L\0D0\202\215\3\1\307\240\210\211@\1AD\262\1\201M\0C\311C\312\201N\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\257\3\315\1\242!\210\266\4\301C\201O\0001\311\3\303\30\304\201P\0!)\201Q\0D0\202\324\3\1\307\240\210\211@\1AD\262\1\201R\0C\311C\312\201S\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\366\3\315\1\242!\210\266\4\301C\201T\0001\20\4\303\30\304\201U\0!)\201Q\0D0\202\33\4\1\307\240\210\211@\1AD\262\1\201V\0C\311C\312\201W\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204=\4\315\1\242!\210\266\4\301C\201X\0001W\4\303\30\304\201Y\0!)\201Q\0D0\202b\4\1\307\240\210\211@\1AD\262\1\201Z\0C\311C\312\201[\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\204\4\315\1\242!\210\266\4\301C\201\\\0001\236\4\303\30\304\201]\0!)\201Q\0D0\202\251\4\1\307\240\210\211@\1AD\262\1\201^\0C\311C\312\201_\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\313\4\315\1\242!\210\266\4\301C\201`\0001\345\4\303\30\304\201a\0!)\201b\0D0\202\360\4\1\307\240\210\211@\1AD\262\1\201c\0C\311C\312\201d\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\22\5\315\1\242!\210\266\4\301C\201e\0001,\5\303\30\304\201f\0!)\201g\0D0\2027\5\1\307\240\210\211@\1AD\262\1\201h\0C\311C\312\201i\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204Y\5\315\1\242!\210\266\4\301C\201j\0001s\5\303\30\304\201k\0!)\201l\0D0\202~\5\1\307\240\210\211@\1AD\262\1\201m\0C\311C\312\201n\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\240\5\315\1\242!\210\266\4\301C\201o\0001\272\5\303\30\304\201p\0!)\201q\0D0\202\305\5\1\307\240\210\211@\1AD\262\1\201r\0C\311C\312\201s\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\347\5\315\1\242!\210\266\4\301C\201t\0001\1\6\303\30\304\201u\0!)\201v\0D0\202\f\6\1\307\240\210\211@\1AD\262\1\201w\0C\311C\312\201x\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204.\6\315\1\242!\210\266\4\301C\201y\0001H\6\303\30\304\201z\0!)\201v\0D0\202S\6\1\307\240\210\211@\1AD\262\1\201{\0C\311C\312\201|\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204u\6\315\1\242!\210\266\4\301C\201}\0001\217\6\303\30\304\201~\0!)\201v\0D0\202\232\6\1\307\240\210\211@\1AD\262\1\201\177\0C\311C\312\201\200\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\274\6\315\1\242!\210\266\4\301C\201\201\0001\326\6\303\30\304\201\202\0!)\201\203\0D0\202\341\6\1\307\240\210\211@\1AD\262\1\201\204\0C\311C\312\201\205\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\3\7\315\1\242!\210\266\4\301C\201\206\0001\35\7\303\30\304\201\207\0!)\201v\0D0\202(\7\1\307\240\210\211@\1AD\262\1\201\210\0C\311C\312\201\211\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204J\7\315\1\242!\210\266\4\301C\201\212\0001d\7\303\30\304\201\213\0!)\201\214\0D0\202o\7\1\307\240\210\211@\1AD\262\1\201\215\0C\311C\312\201\216\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\221\7\315\1\242!\210\266\4\301C\201\217\0001\253\7\303\30\304\201\220\0!)\201\221\0D0\202\266\7\1\307\240\210\211@\1AD\262\1\201\222\0C\311C\312\201\223\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\330\7\315\1\242!\210\266\4\301C\201\224\0001\362\7\303\30\304\201\225\0!)\201\221\0D0\202\375\7\1\307\240\210\211@\1AD\262\1\201\226\0C\311C\312\201\227\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\37\10\315\1\242!\210\266\4\301C\201\230\00019\10\303\30\304\201\231\0!)\201\232\0D0\202D\10\1\307\240\210\211@\1AD\262\1\201\233\0C\311C\312\201\234\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204f\10\315\1\242!\210\266\4\301C\201\235\0001\200\10\303\30\304\201\236\0!)\201\237\0D0\202\213\10\1\307\240\210\211@\1AD\262\1\201\240\0C\311C\312\201\241\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\255\10\315\1\242!\210\266\4\301C\201\242\0001\307\10\303\30\304\201\243\0!)\201\244\0D0\202\322\10\1\307\240\210\211@\1AD\262\1\201\245\0C\311C\312\201\246\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\364\10\315\1\242!\210\266\4\301C\201\247\0001\16\11\303\30\304\201\250\0!)\201\244\0D0\202\31\11\1\307\240\210\211@\1AD\262\1\201\251\0C\311C\312\201\252\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204;\11\315\1\242!\210\266\4\301C\201\253\0001U\11\303\30\304\201\254\0!)\201\255\0D0\202`\11\1\307\240\210\211@\1AD\262\1\201\256\0C\311C\312\201\257\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\202\11\315\1\242!\210\266\4\301C\201\260\0001\234\11\303\30\304\201\261\0!)\201\262\0D0\202\247\11\1\307\240\210\211@\1AD\262\1\201\263\0C\311C\312\201\264\0\2\4\6\6\6\10%\216\1\314\5\242\5\"\240)\204\311\11\315\1\242!\210\311\207" [signal-hook-function string= ... ert--should-signal-hook mugur--keycode a "KC_A" signal ert-form-evaluation-aborted-32 nil make-closure #[0 "\300\304\305\303\242\302BE\301\242\306=?\205\24\0\307\301\242D\244\301\242\306=?\205,\0\310\311!\211\205*\0\312\313\2\302\"D\262\1\244\240\210\314\300\242!\207" [V0 V1 V2 V3 ... :form ert-form-evaluation-aborted-32 :value ert--get-explainer string= :explanation apply ert--signal-should-execution] 7] apply ert-fail ...] 11] nil :passed nil "/home/lars/.emacs.d/elpa/mugur-20231024.755/mugur.el"))
byte-code("\300\301\302\303\304\301\305\4\305\306\305\307&\10\262\1\"\210\300\310\311\303\304\310\305\4\305\306\305\307&\10\262\1\"\210\300\312\313\303\304\312\314\4\305\306\305\307&\10..." [ert-set-test mugur-valid-keycodes #f(compiled-function () #<bytecode 0x9e77856ec3ca89>) record ert-test nil :passed "/home/lars/.emacs.d/elpa/mugur-20231024.755/mugur...." mugur-invalid-keycodes #f(compiled-function () #<bytecode -0x1b7ee5106b2751ce>) mugur-valid-keymaps #f(compiled-function () #<bytecode -0x1a51c1db3205e3c8>) "Test valid mugur-keymaps." mugur-valid-combos #f(compiled-function () #<bytecode 0x1d3754b9041be73e>) "Test the corect qmk C code generated for combo key..." mugur-invalid-keymaps #f(compiled-function () #<bytecode 0xeb5c1b47b410cf6>) "Test invalid mugur-keymaps."] 12)
require(mugur)
eval-expression((require 'mugur) nil nil 127)
funcall-interactively(eval-expression (require 'mugur) nil nil 127)
command-execute(eval-expression)
Line 814 in b8ebfd1
Hi! Here make-directory
returns nil, so and
returns nil
and concat fails. The second time the function is run, the folder has already been created to it does work
Just adding a t
after it should work
(and (or (file-directory-p it)
(make-directory it)
t)
it)
Hi! I saw in the main file that the version is marked as 1.0, would you mind tagging a release?
I'd like to add this package to guix and we prefer to use tagged releases if possible
Thanks!
Is this Emacs specific way of configuration, or system wide? Afaic you have to configure on Arduino itself (or whatever it is inside) to make it system wide.
Also, how hard it is to support something from 40% series? I can be more specific if needed.
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.