Coder Social home page Coder Social logo

Comments (4)

kevb1973 avatar kevb1973 commented on June 8, 2024

I have my settings in an external file. Here's how I set it up on NixOS.

  1. Install http-server from nixpkgs.
  2. Copy your Surfingkeys settings to surfingkeys.js.
  3. Set server to autostart on login: http-server -p 8085 -c-1 ~/dotfiles/surfingkeys/surfingkeys.js
  4. In Surfingkeys settings, add http://127.0.0.1:8085/surfingkeys.js in the "Load Settings" box, then click save.

Feel free to change the port and path in step 3 to wherever your surfingkeys.js file is located. The -c-1 part disables the cache so it always shares the current version of the file.

After that, Surfingkeys will automatically load the file from the server.

To make changes to the config:

  1. Edit the file using your text editor and save.
  2. Open Surfingkeys settings (;e) (confirm settings updated if you like)
  3. Click save to apply updated settings and close the tab.

from surfingkeys.

minego avatar minego commented on June 8, 2024

I have my settings in an external file. Here's how I set it up on NixOS.

  1. Install http-server from nixpkgs.
  2. Copy your Surfingkeys settings to surfingkeys.js.
  3. Set server to autostart on login: http-server -p 8085 -c-1 ~/dotfiles/surfingkeys/surfingkeys.js
  4. In Surfingkeys settings, add http://127.0.0.1:8085/surfingkeys.js in the "Load Settings" box, then click save.

Feel free to change the port and path in step 3 to wherever your surfingkeys.js file is located. The -c-1 part disables the cache so it always shares the current version of the file.

After that, Surfingkeys will automatically load the file from the server.

To make changes to the config:

  1. Edit the file using your text editor and save.
  2. Open Surfingkeys settings (;e) (confirm settings updated if you like)
  3. Click save to apply updated settings and close the tab.

I've been playing with doing a similar setup, but I'd really love to find a way to not need to do step 4, since that is the only part that I can't automate entirely. It seems that this is a pretty difficult thing to get setup though. Most extensions don't provide an easy way to do any of this.

Is your nix configuration viewable somewhere? I'd love to see how you handled starting http-server.

One option I've been considering is to have a wrapper for firefox or chromium that copies a base profile that has my settings in it to the new profile the first time it is run. But, that doesn't handle updates very gracefully.

from surfingkeys.

kevb1973 avatar kevb1973 commented on June 8, 2024

Unfortunately, I don't do anything fancy with nix to start the server.. I just start it in my Hyprland config on login. If I used home-manager, I'd probably configure the autostarts there.

Step 4 only needs to be done once, but if your trying the have everything setup automatically by nix during install, I can see why having to manually enter it is undesirable. From what I've read so far, declaring extension configs is difficult as they are stored in an sql database in the firefox profile. Maybe it's possible to add your firefox profile to your config and have it copy it in place during install? Probably need home-manager for that though.

Aside from that, it would be nice if Surfingkeys was able detect a change in the config and load it automatically to save opening the settings page and clicking 'save' each time.

from surfingkeys.

minego avatar minego commented on June 8, 2024

Yeah, most extensions make this very difficult...

The best option I have come up with is to make wrapper for the browser that will copy my settings from somewhere in my nixstore before starting the browser... But, that is very messy. Also, that approach means that anything that could possibly include any sensitive data (like the extension for my password manager) needs to NOT be included.

I'll keep playing with it. The solution that tridactyl uses is nice, but it is messy and error prone too.

I've even considered forking some extensions, including surfingkeys, to add support for loading the settings from a browser policy. It is pretty simple for an extension to do that, but from what I've found very few extensions have implemented this.

from surfingkeys.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.