Giter VIP home page Giter VIP logo

tridactyl_emacs_config's Introduction

Emacs bindings for Tridactyl

Starting point for customizing Tridactyl to mimic Emacs

Installation

First thing you need to change default Firefox bindings like Ctrl-N. It is impossible to change or disable that bindings, but you can change the modifier key used in that bindings instead. Go to about:config page and set ui.key.accelKey to 91 (WinKey). You can find more keycodes here - https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode, but seems like WinKey is optimal choice because both Ctrl- and Alt- bindings are needed.

Install Firefox extension Tridactyl. Now you have two options - use configuration file or applying binding directly from github. For first option you need to install native messenger - it is necessary to be able to use config files. In Tridactyl enter to command mode (Shift-:), enter command “installnative” and follow instructions you’ll receive.

Copy emacs_bindings to ~/.config/tridactyl and add this string to your tridactylrc

source ~/.config/tridactyl/emacs_bindings

Also you can just copy file content to your config directly.

Second option is rather shorter - execute command

source --url https://raw.githubusercontent.com/jumper047/tridactyl_emacs_config/main/emacs_bindings

Later you can update your bindings with M-x ‘emacs-bindings-update’

Contributions

Are welcome! I think of these bindings as a base to someone’s own customization, but if I missed some common default binding, or some nice trick - please open PR/issue!

tridactyl_emacs_config's People

Contributors

evandromurilo avatar gallipo avatar glitzy3033 avatar jborkowski avatar jumper047 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tridactyl_emacs_config's Issues

Select all

Hi, is there a way to bind something like C-x h to select the whole contents of a text field? It's useful when you need to clear it.

Native messenger is optional

:source --url https://raw.githubusercontent.com/jumper047/tridactyl_emacs_config/main/emacs_bindings (should) work fine with no need for the native messenger : )

C-g bind makes escapehatch worse

bind --mode=browser <C-g> composite escapehatch | clearsearchhighlight

As soon as you use composite Firefox doesn't believe that a user truly wanted anything useful to happen and we have to fall back to a worse version of the escapehatch that can't get focus back from the address bar: https://github.com/tridactyl/tridactyl/blob/935fa10efe03d473e9be6d173cb2cf352ad1534e/src/background/user_actions.ts#L14

If you bind only to escapehatch instead we have a special case that means Firefox will execute exactly what you asked: https://github.com/tridactyl/tridactyl/blob/935fa10efe03d473e9be6d173cb2cf352ad1534e/src/background/commands.ts#L13

bind --mode=browser <C-g> escapehatch

Obviously you'd lose the clear searchlight bit.

Document optimal setting for ui.key.accelKey

91 works fine here, but it'd probably be good to be a bit more explicit about what the various settings listed on the reddit page imply.

Awesome work on that initial set of keybindings, BTW :)

Setting `accelKey` to 91 under Hyprland (Wayland) does not work

The README.md says:

... you can change the modifier key used in that bindings instead. Go to about:config page and set ui.key.accelKey to 91 (WinKey).

Unfortunately, this does not seem to work under Wayland. When I set ui.key.accelKey to 91 in Hyprland, keys such as WinKey+f (for searching) or WinKey+q (to quit Firefox) don't do anything, and neither C+f nor C+q work. I didn't find any workaround.

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.