Live data from Hacker News

Show HN: Vim-Like Layer for Xorg and Wayland

cedaei.com

1–10 of 64 posts

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#2
As someone who uses Vim daily, I quite like this idea. I would customise it to mimic the original Vim bindings a bit more closely where possible though, to e.g. keep Ctrl-D as page down.

I'm not sure if this would be possible, but it would be fun to have customisable per-application bindings (based on the active window, probably) in addition to the set of global bindings. I can also think of minor cases where motions would be useful, like 3x alt-tab (i.e. 3gt) to switch to a specific application.

I wonder at what point the depth of the mode-ness will become too much, if you were running this, for example, with a vi-mode bash readline.

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#3
I've done a similar thing at the hardware level using a QMK layer. The main benefit for me is being able to use VIM movement keys in every text input.

As I'm using a dual boot setup, it's also pretty handy to have the mapping directly embedded in the keyboard firmware.

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#4
post #2

As someone who uses Vim daily, I quite like this idea. I would customise it to mimic the original Vim bindings a bit more closely where possible though, to e.g. keep Ctrl-D as page down. I'm not sure if this would be possible, but it would be fun to have customisable per-application bindings (based on the active window, probably) in addition to the set of global bindings. I can also think of minor cases where motions…

> e.g. keep Ctrl-D as page down.

I tried doing the same using xdotool by binding Ctrl+F to PageDown but for some reason it didn't work for some reason and I didn't investigate enough.

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#6
I just had a crazy idea based on this- (it's not going to be useful as is, mostly novel and potentially good)

You know how a desktop screen is fixed width and windows cannot be outside of the screen (at least in tiling), I want a single workspace for all windows, where they arrange non-ovrlappingly and screen would just be a view to a fixed point so I can scroll (quickly using hjkl) in 4 directions to look at other windows and even maybe select a group of windows and make them my current view.

Much more dynamic than i3, my current wm.

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#7
post #3

I've done a similar thing at the hardware level using a QMK layer. The main benefit for me is being able to use VIM movement keys in every text input. As I'm using a dual boot setup, it's also pretty handy to have the mapping directly embedded in the keyboard firmware.

Care to share please?

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#8
post #4
post #2

As someone who uses Vim daily, I quite like this idea. I would customise it to mimic the original Vim bindings a bit more closely where possible though, to e.g. keep Ctrl-D as page down. I'm not sure if this would be possible, but it would be fun to have customisable per-application bindings (based on the active window, probably) in addition to the set of global bindings. I can also think of minor cases where motions…

> e.g. keep Ctrl-D as page down. I tried doing the same using xdotool by binding Ctrl+F to PageDown but for some reason it didn't work for some reason and I didn't investigate enough.

I believe a possible reason is that the OP used xkb, which if I'm not mistaken is lower level than xdotool (so xdotool would not suffice)

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#9
post #3

I've done a similar thing at the hardware level using a QMK layer. The main benefit for me is being able to use VIM movement keys in every text input. As I'm using a dual boot setup, it's also pretty handy to have the mapping directly embedded in the keyboard firmware.

Thanks for mentioning QMK [0], it's not something I've heard of before, and it seems like a huge step up from standard keyboard firmware. As far as I can tell only a small number of manufacturers officially support it, but at least one person seems to have made some progress getting a standard cooler master keyboard to run it [1].

[0] https://qmk.fm/ [1] https://github.com/qmk/qmk_firmware/tree/master/keyboards/bp...

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#10
The NEO keyboard layout (https://neo-layout.org/) which I’m using for over a decade, has a similar concept of a number of additional layers.

This is quite handy for having a bunch of special characters for programming readily available (hover over the layers on https://neo-layout.org/ to see).

For any other modal use-cases (e.g. resizing windows, changing music volume), I use i3’s modes: https://i3wm.org/docs/userguide.html#binding_modes

Post reply on HN