Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Hierarchal keybinds (sway/i3 style modes) #1815

Open
Vladimir-csp opened this issue May 14, 2024 · 5 comments
Open

Feature request: Hierarchal keybinds (sway/i3 style modes) #1815

Vladimir-csp opened this issue May 14, 2024 · 5 comments
Labels
enhancement New feature or request later Not priority at the moment

Comments

@Vladimir-csp
Copy link

Vladimir-csp commented May 14, 2024

It is an insanely powerful tool that extends (rather limited) keyboard real estate. Perfect for external tools that have a set of commands for interacions. I suppose under the hood it can be built on top of ToggleKeybinds.

Config mockup for analog of wl-present sway command set:

<keybind key="W-p" >
  <!-- Title content is displayed on OSD while the mode is active -->
  <action name="KeybindMode" Title="Present:\n(m)irror\nset-(o)utput\nset-(r)egion\n(Shift) unset-(r)egion\nset-(s)caling\ntoggle-(f)reeze\n(c)ustom" >
    <keybind key="m">
      <action name="Execute" command="wl-present mirror" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="o">
      <action name="Execute" command="wl-present set-output" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="r">
      <action name="Execute" command="wl-present set-region" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="S-r">
      <action name="Execute" command="wl-present unset-region" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="s">
      <action name="Execute" command="wl-present set-scaling" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="f">
      <action name="Execute" command="wl-present toggle-freeze" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="c">
      <action name="Execute" command="wl-present custom" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="Escape">
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="Enter"
      <action name="ExitKeybindMode" />
    </keybind>
  </action>
</keybind>
@Vladimir-csp
Copy link
Author

Vladimir-csp commented May 14, 2024

Above was not a full analog, that would require decoupling of modes from actions

<keybind key="W-p" >
    <action name="EnterKeybindMode" id="present" />
</keybind>

<!-- Title content is displayed on OSD while the mode is active -->
<keybind_mode id= "present" Title="Present:\n(m)irror\nset-(o)utput\nset-(r)egion\n(Shift) unset-(r)egion\nset-(s)caling\ntoggle-(f)reeze\n(c)ustom" >
    <keybind key="m">
      <action name="Execute" command="wl-present mirror" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="o">
      <action name="Execute" command="wl-present set-output" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="r">
      <action name="Execute" command="wl-present set-region" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="S-r">
      <action name="Execute" command="wl-present unset-region" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="s">
      <action name="Execute" command="wl-present set-scaling" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="f">
      <action name="Execute" command="wl-present toggle-freeze" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="c">
      <action name="Execute" command="wl-present custom" />
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="Escape">
      <action name="ExitKeybindMode" />
    </keybind>
    <keybind key="Enter"
      <action name="ExitKeybindMode" />
    </keybind>
</keybind_mode>

@johanmalm
Copy link
Collaborator

Is this the Openbox equivalent of what you describe? http://openbox.org/wiki/Help:Bindings#Key_chains

@Consolatis
Copy link
Member

This looks *very* complicated for a very niche use-case. And it reminds me more of emacs / vim rather than a stacking compositor / window manager.

@Vladimir-csp
Copy link
Author

Is this the Openbox equivalent of what you describe? http://openbox.org/wiki/Help:Bindings#Key_chains

Can't open openbox.org for some reason, but indirect references suggest this is at least something similar.

@Vladimir-csp
Copy link
Author

Vladimir-csp commented May 15, 2024

Is this the Openbox equivalent of what you describe? http://openbox.org/wiki/Help:Bindings#Key_chains

I've read it, yes this is extremely similar.

@johanmalm johanmalm added enhancement New feature or request later Not priority at the moment labels May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request later Not priority at the moment
Projects
None yet
Development

No branches or pull requests

3 participants