Jump to content

Andy Winecki

Member
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Andy Winecki

  1. Hello there. I've fixed the ordering in karabiner.json file – it's now keeping the original keys order intact. It turned to be an easy fix with python. Hope it's more useful now! Here's the download link (make sure you're getting version 1.2): http://www.packal.org/workflow/karabiner-elements-profile-switcher.
  2. Alright. Well, I probably won't support older Karabiner Elements, but feel free to change the karabiner.json file path in the scripts files as you wish. As per lines ordering, I agree it'd be better to keep it intact. I might update the script to do this when I find a moment. Keep an eye open for updates ;-)
  3. The script should not touch `~/.karabiner.d/configuration/karabiner.json`. It's written to work only with `~/.config/karabiner/karabiner.json` path, which I believe is the right one in the latest Karabiner Elements. As per shifting lines around – the script parses the JSON file into a python dictionary, then changes it, and then converts the dict into JSON again. So I'd assume the keys in the output JSON would be sorted A-Z. It could be done without changing lines, but I didn't find that important as everything worked out normally for me. I did one change though after publishing the initial workflow, it's not re-uploaded into version 1.1 – I added pretty formatting the output JSON so it's at least readable and editable by hand again. My macOS version: 10.12.2 My Alfred version: 3.2.1 My Karabiner-Elements version: 0.90.76 Is your problem just the lines order, or the whole workflow not working at all for you?
  4. The fresh macOS Sierra rewrite of the original Karabiner, the Karabiner Elements qietly supports multiple profiles, which has been one of the core features, historically speaking. Although, as of now, you can define multiple profiles in the ~/.config/karabiner/karabiner.json file, but you can't switch between them easily. This is an important features for people that regularly switch between internal / Apple keyboard and an external USB one, which usually have different layout, hence the need for 2+ profiles. Karabiner Elements listens for changes in karabiner.json config file, and there is a setting that specifies which profile is currently active – selected: true. This workflow does the following: Type keprofile (you can change this if you like), to fetch your profiles defined in karabiner.json and list them in Alfred Once you select a profile you want to switch to, hit ENTER and the workflow script will edit your karabiner.json file so that the selected profile becomes active Note that after you switch to a different profile, you can adjust its settings inside Karabiner Elements preferences window, save them and it'll all work seamlessly; the workflow only changes selected: true|false attribute, nothing else. Commands keprofile - lists your profiles; then ENTER to switch to one Download: http://www.packal.org/workflow/karabiner-elements-profile-switcher Example Workflow You can freely edit settings of each profile after switching to it Thanks to @tekezo for creating an awesome key switcher application for OSX / macOS – Karabiner Elements. @bennypowers for a fresh Karabiner Elements logotype, as submitted in this pull request. @deanishe for creating an amazing, easy to use Alfred Workflow creation framework – Alfred-Workflow.
×
×
  • Create New...