yqrashawn / GokuRakuJoudo

config karabiner with ease
GNU General Public License v3.0
1.17k stars 120 forks source link

IllegalArgumentException when trying to parse example config #191

Open karanrajpal14 opened 2 years ago

karanrajpal14 commented 2 years ago

Hello,

I'm trying to run this on my MBP and I'm seeing an IllegalArgumentException while trying to parse a simple config like this from one of your examples:

;; main contains multiple manipulators
;; each manipulator has a description and multiple rules

;; main                -> {:main [{:des "..." :rules [rule1 rule2 ...]}]}
;; manipulator         -> {:des "..." :rules [rule1 rule2 ...]}
;; manipulator's rules -> [rule1 rule2 ...]
{:main [{:des "a to 1, b to 2, c to insert 1 2 3"
         :rules [[:a :1] [:b :2] [:c [:1 :2 :3]]]}]}

;; or we can separate them into three manipulators
;; {:main [{:des "a to 1" :rules [[:a :1]]}
;;     {:des "b to 2" :rules [[:b :2]]}
;;     {:des "c to insert 123" :rules [[:c [:1 :2 :3]]]}]}

;; in rules [:a :1] -- [<from> <to>]
;; it means from key a to key 1
;; these keycode is just original karabiner keycode prefix with colon

While running the following command I see the error:

❯ goku -c ~/.config/karabiner/karabiner.edn
The following errors occurred while parsing your command:
Error while parsing option "-c /Users/redacted/.config/karabiner/karabiner.edn": java.lang.IllegalArgumentException: No matching field found: getPath for class java.lang.String

Any idea what I'm doing wrong? Would someone please help me with this? Thank you!

momja commented 1 year ago

I've just envountered this same issue on my MBP (Mac OSX 12.4)

kaushikgopal commented 1 year ago

Try setting it via the environment variable GOKU_EDN_CONFIG_FILE.

You might run into another issue with the caching like I did here https://github.com/yqrashawn/GokuRakuJoudo/issues/208 but it should unblock you.