News for hackers. Stuff that matters.
Re:Show HN: Vim-Like Layer for Xorg and Wayland by codethief on Thursday August 27, 2020 @04:35AM (#24291339)
I've been thinking about doing something like this for quite a while. One question that's been bothering me is: How will I know what mode I'm in? Can I somehow change the cursor system-wide? Can I add some sort of notification to my i3bar?

EDIT: I just noticed that the article mentions this as a "bonus" at the end. Does this work reliably with i3status-rust? In case of i3bar at least there'd always be a delay coming from the low refresh rate of (in my case) 5s.

Re:Show HN: Vim-Like Layer for Xorg and Wayland by discreteevent on Thursday August 27, 2020 @12:23PM (#24295246)
I wrote a keyboard hook in C for Windows (I was using AHK but it was unreliable). Initially it was modal but I found over time that I would get caught out. So now it's not modal. I hold down capslock and then use ijkl to navigate etc. The only thing left that is modal is spacebar for select/visual mode but I still a have to hold down capslock for that (e.g. capslock down, space bar, ijkl to select text, capslock up). Also I was using hjkl but switched to ijkl to match the arrow keys. I don't use vim enough anymore to justify hjkl.

Holding down capslock turns out to not be a problem in practice. The main benefit of vim style navigation for me is not leaving the home row.

Re:Show HN: Vim-Like Layer for Xorg and Wayland by codethief on Thursday August 27, 2020 @01:14PM (#24295921)
> Also I was using hjkl but switched to ijkl to match the arrow keys. I don't use vim enough anymore to justify hjkl.

Same here. ijkl is so much better!

> So now it's not modal. I hold down capslock and then use ijkl to navigate etc.

Hmm… maybe I should try that. Then again, I am afraid of getting the Emacs pinky all over again…

Re:Show HN: Vim-Like Layer for Xorg and Wayland by ceda_ei on Thursday August 27, 2020 @04:53AM (#24291461)
In my case, the interval is set to 0.5 which has a slight delay but enough for me to not mind. I usually have a mental idea of what mode I am in at all times.

> Can I somehow change the cursor system-wide?

Check the arch wiki article on Cursor themes[0]. Generally,, DEs have nice support for switching cursor themes after startup. In either case, you would need to modify `xkb_swapper.sh` to set a cursor theme whenever the mode is changed.

[0]: https://wiki.archlinux.org/index.php/Cursor_themes

Re:Show HN: Vim-Like Layer for Xorg and Wayland by codethief on Thursday August 27, 2020 @01:15PM (#24295942)
Oh cool, I hadn't noticed that you were actually around here on HN! Thanks so much responding!

> In my case, the interval is set to 0.5

I noticed that more frequent updates of the status bar do eat away at the battery, though. :\