The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
1

Emacs-like keybinding

asked 2012-08-22 21:17:43 +0000

anonymous user

Anonymous

I would like to make a couple of Emacs-like keybindings. For instance I would like to do $mod-t t ("$mod" and "t" down, release, and then "t") to bring up scrathpad-urxvt and $mod-t e to focus on Emacs.

I can somewhat do this using:

bindsym $mod+t t mode "scratchpad"
mode "scratchpad" {
bindsym t [class="(?i)urxvt"] scratchpad show
bindsym e [class="(?i)emacs"] focus
bindsym f [class="(?i)aurora"] focus
bindsym Return mode "default"
bindsym Escape mode "default"}

But I have to exit the scrathpad-mode using Enter which is annoying. Can I somehow make a "$mod-t t" key binding or make i3 exit a mode after a single one key?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2012-08-22 21:22:01 +0000

Michael gravatar image

updated 2012-09-06 13:23:39 +0000

You can exit the mode like this:

bindsym $mod+t t mode "scratchpad"
mode "scratchpad" {
  bindsym t [class="(?i)urxvt"] scratchpad show; mode "default"
  bindsym e [class="(?i)emacs"] focus; mode "default"
  bindsym f [class="(?i)aurora"] focus; mode "default"
  bindsym Return mode "default"
  bindsym Escape mode "default"
}
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-08-22 21:17:43 +0000

Seen: 933 times

Last updated: Sep 06 '12