Since I run kitty with --single-instance, xcwd does not work for it.
Replace it with a short script that retrieves the CWD for the focused
window through the remote-control ls command.
This changes the current behaviour slightly, since now only terminals
are used and not any X window (which I rarely used or needed) and that
the working dir of the shell running in kitty will be used and not of
any deeper children. I'm still unsure if I want the latter back, but
will figure this out in the future.
This is an addendum to 0139294831 ("Use kitty instead of st as
terminal").
In git aliases, shell commands are executed from the top-level directory
of the repo. Because of this, something like `git glog -- file` didn't
work in subdirectories.
Fix this by creating a wrapper script that first changes into
$GIT_PREFIX before executing the script. Since (currently) the only
use-case is to launch the functions in `autoload/git/`, most of the path
could move into the script, making the git config a lot cleaner.
It was moved back in 020b39887e ("gpg,git: Move gpg.loopback into
PATH"), because git had problems with the "dynamic" path of HOME. I like
to have everything at one place though (And I searched for this script
in the wrong place, just now).
> Lightning fast left-right movement in Vim.
>
> An always-on highlight for a unique character in every word on a line
> to help you use `f`, `F` and family.
Link: https://github.com/unblevable/quick-scope
> This plugin is inspired by the Narrowing feature of Emacs and means to
> focus on a selected region while making the rest inaccessible. You
> simply select the region, call :NR and the selected part will open in
> a new split window while the rest of the buffer will be protected.
> Once you are finished, simply write the narrowed window (:w) and all
> the changes will be moved back to the original buffer.
I want this to be able to diff two portions of a file without the need
of creating temporary files. (And the ability to automatically bring
back changes sounds nice too.)
Link: https://github.com/chrisbra/NrrwRgn
With commit dd36a4561b0b ("use XDG_DATA_HOME for resurrect-dir path")
the default location of resurrect-dir changed to
$XDG_DATA_HOME/tmux/resurrect as long as $HOME/.tmux does not exist.
This makes manually hard-coding resurrect-dir obsolete.
This script is meant to be used in the future in an interactive fzf
window bound to a key, so that one can quickly cd into the CWD of
another running shell.
The function `die` was redundantly implemented in various files.
Move the function into .local/bin/helpers.sh and source that where
previously implemented.
Also prepend the program's name to the message and always terminate the
message with a newline. The newline was previously needed for a small
but unnecessary hack that prevented the need of the `[ -z "$1" ]` test.