Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Toggle EXWM char-mode automatically in GTK 3 text fields

License

NotificationsYou must be signed in to change notification settings

sinic/autocharmode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This proof of concept is in an unpolished state,but turned out to be so useful in day-to-day usagethat I'm publishing it regardless.

In short:EXWM's simulation keyscan remap an X application's keybindings, so that it is possible to,for example, control Firefox using vi-like keybindings,purely through the window manager and without resorting to any add-ons.

One unfortunate drawback compared to browser add-ons, however, isthat state internal to applications is invisible to EXWM:with the cursor in the address bar or in a web page's text field,one would expect input to show up verbatim, but for that,one has to switch fromline-mode (i.e., simulation keys) tochar-modemanually!It's easy to imagine (and experience!) thatforgetting about toggling input modes wreaks havoc on a browsing session.

The Solution

This program (ab)uses GTK's input method mechanism,which is normally used to open an on-screen keyboardwhen text is about to be entered anywhere in a GTK application,and to close it afterwards.Here, instead,emacs-client is called to togglechar-mode for the appropriate window.Now it is hardly ever necessary to toggle input modes manually!

Usage

  1. Make sure that an Emacs server runsby executing theserver-start command in your EXWM session.

  2. Build this project withmake andstart Firefox (or any other GTK 3 application of your choice)so that it uses the new input method module, adapt the path as necessary:

GTK_IM_MODULE_FILE=$HOME/autocharmode/immodules.cache GTK_IM_MODULE=autocharmode firefox
  1. Confirm that the input mode toggles automatically,for example by selecting the address bar.

About

Toggle EXWM char-mode automatically in GTK 3 text fields

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp