Skip to content

Version 1 -- Focus and VIM Patch

Compare
Choose a tag to compare
@juliusHuelsmann juliusHuelsmann released this 07 Nov 08:52
· 10 commits to master since this release

Contains the first version of the Alpha-Focus and VIM-Selection patches.

Alpha-Focus Highlight

Changes the alpha value of window when focus is gained / lost.

Bugs

  • In i3WM, the focus event is triggered twice for one specific window on a workspace (could be the root); hence the alpha values are applied twice which appears as blinking.

focus

VIM Browse

Offers the possibility to move through history, search for strings and use VIM-like motions and operations, such as Visual mode (V, v+ block visual mode) / Yank Mode (y) + Motions (j, k, H, M, L, G, l, h, 0, $, w, W, e, E, b, B, /, ?, n ,N, .) and Quantifiers for motions.

  • Search mode: The cursor jumps to the next occurrence (in the selected direction) and highlights all occurrences that are on the screen when arriving at the occurrence.
  • All motions are currently circular (hence if no search result is found, continue at the top [if a string can be found there]).
  • it is possible to use . in order to re-execute the last command.
  • it is possible to define own keys in normal mode by providing a sequence of existing motions.
  • Currently based on the Scrollback patch, this dependency will be removed (see Bugs section).

The own sequence shortcuts are not checked for being circular, so something like

struct NormalModeShortcuts normalModeShortcuts [] = {
	{ 'C', "CC\n" },
}

would trigger an infinite loop as soon 'C' is typed in normal mode. This can only happen deliberately; if the character (C) is part of f.i. a search motion, the shortcut works just fine:

struct NormalModeShortcuts normalModeShortcuts [] = {
	{ 'C', "/Cheese\n" },
}

searches for the next occurrence of "Cheese" in the history.

Use cases

Bugs

  • The following two 'Bugs' will be resolved by removing the dependency on the Scrollback patch which is currently work in progress:
    • Normal mode overrides the output at the cursor position if the current command is still running and outputs text while not in alternate screen mode (not vim / htop etc)
    • in Alternate Screen mode, the current position is reset on repaint (e.g. htop).

vim

Applied Patches

The master branch of https://github.com/juliusHuelsmann/st has both patches and some other patches applied.