Often when I want to open a new workspace, I look at my bar to see which
workspaces are still free. This does not work sometimes when having
multiple monitors connected, as workspace numbers are unique between all
outputs.
Add a script that handles workspace switching/moving by prepending the
index with the index of the current monitor.
These were commented out already for longer. For `(` I have delimitMate
and the `<CR>` mapping conflicts with the one from coc.nvim (which
includes the `<C-G>u`)
When switching to <Cmd> for mappings in fc9874bf97 ("vim:keys: Use
<Cmd> for plain command mappings") I forgot that the previously inserted
selection range marks (i.e. '<,'>) are missing now. This broke vmaps
that used :substitute without having added them manually.
Since <Cmd> has some performance benefits, I want to keep it and add the
missing marks where needed.
When I write commit messages in vim, I often use gwap to format the
message body. This breaks if there is no empty line between the body and
the following "Please enter the commit message for your changes..."
comment.
So, to not always have to add this empty line first, I use a
commit.template file that simply contains one empty line.
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").
Previously when calling `glog -- file` with a file that was renamed
sometime in the history, the preview would just be empty for all commits
before the rename, since it's path didn't exist.
Fix this by checking for empty output and falling back to the full patch
in that case.
This also heavily refactors the code around `$fzf_preview` to make it
more readable.
TODO: It would be nice if git-show would fail in this case instead of
just printing nothing and returning zero
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.
Bring all blocks together and place shorter alias variants behind longer
ones - ignore the shorter ones in the sorting.
Remove the comment above `autosquash` because the command is fairly
descriptive and it is the only comment and I don't really know how to
format the block then (since the comment is at the very top it looks
like it is for the whole block and I don't want to put a newline behind
`autofixup`).
I decided to merge this without fast-forward (but still after a rebase)
to better keep the context of the block of commits needed after the
switch.
* kitty:
README: Change terminal used to kitty
kitty: Change to beam cursor
kitty: Update mouse_maps to use Alt as kitty_mod
kitty: Only set the mappings I need/use
kitty: Change color scheme to modified Tango
kitty: Enable close_on_child_death
kitty: Make kitty startup fast
i3: Switch to kitty
i3: Save terminal related stuff in variables
i3: Remove unneeded window class flag to st
dircolors: Use a non-system color for DIR
kitty: Configure to align with my st settings
kitty: Add v0.42.0 default config
Starting a new kitty process is quite slow. With --single-instance "new
invocations will instead create a new top-level window in the existing
kitty instance"[^1] to allow "kitty to share a single sprite cache on
the GPU"[^1], so that startup is almost instant.
For this to work best, launch one hidden "daemon" instance at startup so
that the kitty process is always running, even when no OS windows
exists.
[^1]: kitty(1)
Link: https://github.com/kovidgoyal/kitty/issues/330