Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

FEATURE REQUEST: Export/settings from file #12

Closed
DanBondarenko opened this issue Jul 27, 2017 · 8 comments
Closed

FEATURE REQUEST: Export/settings from file #12

DanBondarenko opened this issue Jul 27, 2017 · 8 comments

Comments

@DanBondarenko
Copy link

Hi! Thanks for the wonderful extension. It has changed the way I use my browser.

However, it is incredibly annoying to repeatedly specify the settings after each update that the extension receives.
One workaround (perhaps just for the period during which Saka key is receiving constant updates) would be to have a button to export/import the settings to/from an external file.

This would greatly improve the experience of actively using the extension, for me at least, since I use bindings which differ quite a bit from the default ones.

@eejdoowad
Copy link
Member

I understand your pain. Henceforth, settings on custom profiles will carry forward until version 2.0, which won't happen for a while. Here are the concrete details:

  • built-in profiles will reset on every release (and automatically have bindings for new commands)
  • custom profiles will never update (so you'll have to manually add bindings for new commands)
  • the active profile for each category will never reset

Hopefully this is a good compromise. I'll also add the option to import/export settings, though this may take longer to release.

Coming up with good default bindings is one of my biggest challenges. I highly appreciate any suggestions. Default bindings for each built-in profile are defined in https://github.com/lusakasa/saka-key/blob/master/src/modes/command/default.json.

Thanks for the feedback!

@DanBondarenko
Copy link
Author

Thank you very-very much!! :)

@gliptak
Copy link
Contributor

gliptak commented Jul 27, 2017

I'm in the process migrating to saka-key from http://5digits.org/help/pentadactyl/index.xhtml

In general, I like the more orthogonal grouping of bindings with saka-key, but I also like the single key shortcuts and the VIM styled binding of pentadactyl.

An approach to allowing customer profiles/overrides would be welcome.

Thanks

@eejdoowad
Copy link
Member

Hi gliptak, you can actually define your own profiles in the current release. Just go to the options page and click on the triple vertical dots at the top right of each settings category and select new. You can then change any settings you wish. The Command category has four built-in profiles. The default one is designed for beginners and contains multi-key bindings so they don't accidentally trigger a command unintentionally. The power profile has single key bindings that should be faster, but a little harder to remember. Thanks for the link to Pendactyl. I'll definitely draw inspiration from those bindings. I'll be sure to update the handbook at http://saka-key.lusakasa.com to make sure it includes all this info.

@gliptak
Copy link
Contributor

gliptak commented Jul 30, 2017

@eejdoowad Thank you for the pointer on the power profile. Multiple profiles do allow for needs of wider groups of users.

@eejdoowad
Copy link
Member

eejdoowad commented Aug 2, 2017

@DanBondarenko I'd like to make one last breaking change to the way settings are stored on the backend to facilitate support for importing and exporting options and simplify the storage logic. Sorry, but this means that you'll have to put up with having your settings reset for one last release. Record your settings somewhere before the next release, which should happen in the next couple days.

The release will include support for importing and exporting settings to/from a json file like the following.

{
  "storageFormatVersion": 1,
  "selectedProfiles": {
    "Basic": "sufyan",
    "Command": "default",
    "Hints": "vimium"
  },
  "customProfiles": [
    {
      "category": "Basic",
      "name": "sufyan",
      "options": {
        "enabled": true,
        "preventStealFocus": true,
        "disablePageShortcuts": false,
        "hintDetectByCursorStyle": true,
        "smoothScroll": true,
        "scrollStep": 26
      }
    },
    {
      "category": "Basic",
      "name": "test",
      "options": {
        "enabled": true,
        "preventStealFocus": true,
        "disablePageShortcuts": true,
        "hintDetectByCursorStyle": true,
        "smoothScroll": true,
        "scrollStep": 10
      }
    },
    {
      "category": "Command",
      "name": "test",
      "options": {
        "physicalKeys": true,
        "ignoreModifierKeys": false,
        "toggleHelpMenu": [
          [{ "code": "Slash", "key": "?", "shiftKey": true }]
        ],
        "toggleOmnibar": [],
        "openLink": [],
        "openLinkInBackgroundTab": [],
        "openLinkInForegroundTab": [],
        "openLinkInNewWindow": [],
        "openLinkInIncognitoWindow": [],
        "downloadLink": [],
        "focusLink": [
          [{ "code": "KeyF", "key": "f"}, { "code": "KeyL", "key": "l" }]
        ],
        "hintChars": "ajskdlgheworuvncm",
        "scrollDown": [
          [{ "code": "KeyD", "key": "d" }],
          [{ "code": "KeyJ", "key": "j" }]
        ],
        "scrollUp": [],
        "scrollLeft": [],
        "scrollRight": [],
        "scrollPageDown": [],
        "scrollPageUp": [],
        "scrollHalfPageDown": [],
        "scrollHalfPageUp": [],
        "scrollToBottom": [],
        "scrollToTop": [],
        "goBack": [],
        "goForward": [],
        "goUp": [],
        "goToRoot": [],
        "nextTab": [],
        "previousTab": [],
        "firstTab": [],
        "lastTab": [],
        "moveTabLeft": [],
        "moveTabRight": [],
        "moveTabFirst": [],
        "moveTabLast": [],
        "closeTab": [],
        "closeOtherTabs": [],
        "closeLeftTabs": [],
        "closeRightTabs": [],
        "newTab": [],
        "restoreTab": [],
        "duplicateTab": [],
        "switchWindow": [],
        "zoomIn": [],
        "zoomOut": [],
        "zoomReset": [],
        "refreshTab": [],
        "refreshAllTabs": [],
        "toggleMuteTab": [],
        "toggleMuteAllTabs": [],
        "togglePinTab": [],
        "passOneKey": [],
        "passAllKeys": [],
        "copyURL": [],
        "clipboardCurrentTab": [],
        "clipboardBackgroundTab": [],
        "clipboardForegroundTab": [],
        "clipboardNewWindow": [],
        "clipboardIncognitoWindow": [],
        "developerMode": []
      }
    }
  ]
}

@DanBondarenko
Copy link
Author

@eejdoowad, Thank you for including this functionality in the update!

@eejdoowad
Copy link
Member

I've released version 1.16. It includes all requested features. Took a lot more time than anticipated. I ended up rewriting all the logic behind how options work (which required modifying about 50 files). The end result is Saka Key should be much more reliable, the code should be much easier to understand, and you can import/export/reset your settings as well as create new blank profiles. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants