This likely breaks hostname setting when accessing via SSH, but:
* it's first version that is at least somehow readable,
* and also WE *MAY* have fixed the long-standing PITA escaping
errors that we used to get in urxvt if BASH_COMMAND had backslashes
in it!
* Remove excess comments and optional syntax (eg. EOL `;`),
* use non-conflict function names,
* simplify PS1 generation,
* close PROMPT_COMMAND setup into function,
Revert "Don't put taskwarrior commands to history"
This reverts commit 55a4088d807c5ca0552e89c3240ec1d3c88842f6.
Turns out this makes it too hard to explore and learn the vast potentials
of taskwarrior CLI.
AFK and GONE have dedicated key bindings, so they don't need to be
first. BACK is never meant to be called manually anyway.
UNDOCKING and ZLEEPING may often be needed in hurry, though, DOCKING
normally comes soon after them.
Since task IDs are dynamic in taskwarrior, commands like `task 4 delete`
and `task 4 done` can be destructive with hard-to-trace damage if
inadverently repeated.
Better to avoid that, even at cost of not remembering anything.
(Note that `task` without arguments is still remembered; there's no harm
in repeating that, and it still can be convenient eg. w/ ^L).
Use the newer, smarter, xclose rather than the crude gxkill
xclose just closes window instead of killing its owner, which would tear
down all this owner's windows along.
Uses different utilities with a different set of drawbacks, though:
* wmctrl(1) needs to be installed.
* [slop][1] can be optionally installed from source but can be unreliable
when selecting some windows, e.g. urxvt.
* If slop is missing, xwininfo is used, which, unlike xkill(1), has no
way of cancelling the user action (r-click selects a window just the
same as l-click). We work around it using timeout(1), which is
rather inconvenient, though.
But all in all, we're still better off than with xkill(1).
[1]: https://github.com/naelstrof/slop
This should enable reading upper parts of window even while the output
is still being produced (tail -f).
IOW, the auto-scroll is disabled after scrolling back manually using
S-PageUp or S-PageDown, and re-enabled on another keypress such as
typing when a prompt is expected at the bottom.
Turns out low_threshold is in minutes, not in percent, by default.
Needless to say, time estimates are grossly unreliable here and 10
minutes left is too late anyway.
Sorry, but $mod+BackSpace is too close to Alt+BackSpace
... which means "delete last word" in Bashese/Emacese so I often press
it several times in succession,
Although I should not tolerate own typos, I'm also really getting tired
of accidentally tearing down random windows. Sorry, this is just too
destructive.
Remove 'n' keybindings for keyboard switching (keep code-57)
Code 57 normally means N, so this layout started (rightfully, I admit)
generating conflict errors. Assigning key is probably more reliable,
though, so we'll keeo that one.
Nerf colors Vim uses for MatchParen and Search highlighting
This is a pretty ugly hack to work around the problem that any attempts
to influence highlight colors in Vim using the `highlight` command were
ignored by Urxvt (not by Xfce4 terminal and few others I tried).