Commit Graph

775 Commits

Author SHA1 Message Date
b61429a176 zsh:funcs:pgrep: Format + rephrase comment 2022-07-12 21:00:03 +02:00
13ebd97d8e git: Set interactive.diffFilter to diff-so-fancy
Pipe patches through diff-so-fancy in interactive commands (e.g. `git
add -p`) too.
2022-07-12 21:00:03 +02:00
c1cfd29420 meta:install: Update mandb 2022-07-12 21:00:02 +02:00
891cb063e6 git:filter-repo: Build manpage on installation 2022-07-12 21:00:02 +02:00
6c802cc70f meta:hooks:pre-commit: Check for broken symlinks
Check that added/moved symlinks are not broken.
2022-07-12 21:00:02 +02:00
d136658888 git: Update alias section
Move `signoff` out of the 'external' subsection as the script [got
replaced by the native way][1].

Update 'external' subsection's comment as it does not contain only zsh
functions.

[1]: bb21c4df7844 ("git: Replace git-signoff with `rebase --signoff`")
2022-07-12 21:00:02 +02:00
03163a92a4 git:filter-repo: Add to $PATH 2022-07-12 21:00:02 +02:00
40416ebd9c *: Move third-party plugins into .local/share/
Move all submodules that were under .config/ into .local/share/ (alias
XDG_DATA_HOME). I got convinced that they feel out of place in .config/.

Instead of updating the paths from which they are sourced (e.g.
`TMUX_PLUGIN_MANAGER_PATH` or `packpath`), keep a symlink in the old
location that points to the new one. This has the benefit that
everything related to one program remains mostly accessible from the
same place instead of spreading everything out.

I am still unsure if I really like the new location as I affiliate user
**data** more with something that has to be backed up as it is
non-recreatable. And moving them out of .config/ had the reasoning that
they are not my config files but rather data from the internet that
could be retrieved when deleting. But using XDG_CACHE_HOME seems
unreasonable as well.
We'll see.

Move the fzf-repo from ./local/bin/ to .local/share/.

Update all relative symlinks' (e.g. fzf) targets.
2022-07-12 21:00:01 +02:00
2e6052cd3c i3: Remove vim modeline
Remove the vim modeline that sets the filetype to `i3`, as I do not have
a i3.vim filetype plugin. Now it is recognized as `ft=conf`, providing
at least highlighting of strings.
2022-07-12 21:00:01 +02:00
6fae630b6f i3: Forgot a backslash when wrapping lines at 80
Fixes: e7f0e8b5969b ("*: Wrap lines at 80 columns where appropriate")
2022-07-12 21:00:01 +02:00
127cce45a1 zsh:p10k: Add vim modeline 2022-07-12 21:00:01 +02:00
09ef4d4d93 git: Replace git-signoff with rebase --signoff
Replace my custom git-signoff script with the native `--signoff` flag
for `git rebase`.
2022-07-12 21:00:00 +02:00
1dbd24fcf9 meta:install: Update meta/archive description
Meanwhile meta/archive backups everything that is going to be replaced
with links, not only the content of .config/
2022-07-12 21:00:00 +02:00
1fbdc60b6b glog: Disable --quit-if-one-screen in $LESS
Make glog always open the output of `git show` in a **real** pager by
disabling `--quit-if-one-screen`.
2022-07-12 21:00:00 +02:00
ac0987719f git:submodule: Parallel with a reasonable amount
Git should decide on a reasonable default for how many fetch/clone jobs
should run in parallel.
2022-07-12 21:00:00 +02:00
f13acebdb2 vim:keys: Format current paragraph with Q 2022-07-12 21:00:00 +02:00
3512199fce git:spull: Rename to ssync
As I rarely use git-pull(1) and instead fetch and act manually, I'd
rather have it to just sync the submodules.
2022-07-12 20:59:59 +02:00
706c55acc1 git:alias: Reorder zsh functions into own block 2022-07-12 20:59:59 +02:00
c22fcf5fce git,zsh:autoload: Move spull into own function
Move `git-track` into its own autoloadable function.

This way it is better maintainable as in one-liner format and brings the
possibility of having more complexity (e.g. for better portability).

By that it is also now executable as `git-spull` as well as `git spull`
as before.
2022-07-12 20:59:59 +02:00
0146956dd4 git:core.pager:,less: Use long flag variants 2022-07-12 20:59:59 +02:00
d5350276dc less: Add --quit-if-one-screen
Before v530 `less` would need the -X flag as well for -F to be useful.
With v530 it does not enter alternate mode if the content fits in one
screen.
2022-07-12 20:59:59 +02:00
58daf17e79 vim:keys: Add fugitive version of <leader>gcd
Add a fugitive version of the `<leader>gcd` mapping to jump to the root
of the repo.
2022-07-12 20:59:58 +02:00
9e18f6db16 vim:keys: Make git mappings fugitive independent
Make the git {add,stash,checkout} mappings independent of fugitive.vim.
2022-07-12 20:59:58 +02:00
733481900f vim:keys: Fix commit reference when at EOL
Fix the commit reference mapping `<leader>grc` in the case that nothing
follows the commit hash on the line. In that case the join would add a
trailing space.

`gJ` is not suitable as that would break in the other case that text
follows. When splitting the line behind the commit hash, the space in
front of whatever follows is deleted. Thus when joining everything
together at the end, there would be no space between the closing
parentheses and the rest.

Using the `system()` was the only solution I found to insert the subject
directly behind the hash without destroying the formatting and the text
behind it.

For this to work the trailing newline had to be cut off of git's output.
2022-07-12 20:59:58 +02:00
158dcb4b96 vim:keys: Add mapping to insert commit subject
Insert a commit's subject behind the SHA1 that the cursor is currently
on with `<leader>grc`.

Mnemonic: "git reference commit"
2022-06-23 23:59:02 +02:00
c86b1b765a git:core.pager: Update flags
Remove `-g` as it was put in place for a better experience with the
search pattern that `less` was started with.

Readd `-F` as it was explicitly unset when the search pattern was
introduced.

Do not readd `-X` as I like output that is too long (e.g. `log`, `show`)
to be kept in alternate mode and out of my scrollback buffer.

See:

- 17433d0528 ("git:core.pager: Remove the search pattern")

> This gets really annoying as it complains in many cases that it cannot
> find a match for the pattern when the pager is used for other things
> than commits.

- 093c3a6f9c ("git: Highlight current match in pager")

- 7e0e0f5baf ("git: Enable jumps between different files in diff")

> Jump between file sections and commits by using n and N. Taken from:
> https://github.com/so-fancy/diff-so-fancy/blob/eef379ee43f/pro-tips.md
>
> Remove FX flags since they are incompatible with the pattern search:
> When showing a small change that fits on less than the screen height,
> the rest of the screen is filled with ~ lines instead of quitting the
> pager. This behaviour is annoying and thus the flags are deactivated.
> Since git adds them per default they have to be explicitly disabled.
2022-06-23 23:59:02 +02:00
932c2eee35 git:checkout-worktree: Format description comment 2022-06-23 23:59:01 +02:00
00927c8921 *: Use tabs for indentation where appropriate
I am a big supporter of the approach to indent with tabs and align with
spaces. (Read [here][1] f.e.) Thus at some places a simple `s/ {4}/\t/g`
(replace 4 with whatever fits) is not enough and a bit more thought is
needed. Because of that there are still places where I plan to
substitute the whitespace in the future.

This patch contains exclusively whitespace changes. Check for yourself
with `git diff --ignore-all-space`.

[1]: https://dmitryfrank.com/articles/indent_with_tabs_align_with_spaces
2022-06-23 23:59:01 +02:00
b96d32996b *: Wrap lines at 80 columns where appropriate
Wrap lines at 80 columns where appropriate and I had the energy to think
about how/where to wrap.

There are still lines longer than that, which I plan to wrap in the
future. But that is enough for now.
2022-06-23 23:59:00 +02:00
3ced540d3a i3: Unmute on Audio{Raise,Lower}Volume presses 2022-06-23 23:58:59 +02:00
9a018d6835 zsh:funcs:shellcheck: Fall back to web service
Add a shellcheck wrapper that falls back to the web service if
shellcheck is not installed.
2022-06-23 23:58:59 +02:00
6458a45461 zsh:keys: Bind ^W to backward-kill-word
For deleting a word while in the shell, I find it easier/faster to use
emacs bindings or Ctrl-Backspace and backward-kill-word instead of the
vi version.

In tmux, Ctrl-H (same esacape sequnce as Ctrl-Backspace) is used for
switching panes since f11b7fa56545 ("vim,tmux:plugs: Add
`vim-tmux-navigator`"), so I need to use Ctrl-W.

As that is bound to vi-backword-kill-word, rebind it to use the emacs
version.
2022-06-23 23:58:58 +02:00
d51cf9d5e1 git: Set some fetch options
Use [compact output][1]:

> In compact output mode, specified with configuration variable
> fetch.output, if either entire <from> or <to> is found in the other
> string, it will be substituted with * in the other string. For
> example, master -> origin/master becomes master -> origin/*.

Automatically prune branches and tags.

Set parallelization to use a value set by git as otherwise it defaults
to 1.

[1]: git-fetch(1)
2022-06-23 23:58:57 +02:00
25771018a8 git: Alias changes to log HEAD...FETCH_HEAD
I would have liked to call the alias `whatchanged` but am not able to as
git brings a command named liked that (for backwards compatibility) and
alias cannot override builtins.
2022-06-23 23:58:56 +02:00
bea16a170c git: Add alias to glog 2022-06-23 23:58:56 +02:00
b7d333ef81 tmux: Make window-navigation bindings repeatable
This way the prefix only has to be pressed once. (As long as the key is
repeated in `repeat-time`)
2022-06-23 23:58:55 +02:00
b096b30bbf etc: Add locale.gen
Add the configuration file for locale-gen. This is primarily meant as a
little help/template, I will probably not include it in the files that
are symlinked by dotbot.
2022-06-23 23:58:54 +02:00
020b39887e gpg,git: Move gpg.loopback into PATH
Move gpg.loopback into PATH as git's `gpg.program` does not handle paths
with `~` or other environment variables very well.
2022-06-23 23:58:54 +02:00
a9debfe7cd X11: Add keyboard definition for alt-intl-unicode
Use keyboard variant `alt-intl-unicode` of the `us` layout.

Also directly use the option to switch caps and escape instead of doing
it via Xmodmap.
2022-06-23 23:58:54 +02:00
ef3e3387b7 git: Remove core.excludesfile option
Remove the `core.excludesfile` option as it only sets the default value
`${XDG_CONFIG_HOME:-$HOME/.config}/git/ignore` but while hardcoding the
default value `~/.config` for `XDG_CONFIG_HOME`.
2022-06-23 23:58:53 +02:00
4954576496 i3,picom: Deactivate gaps and rounded corners
While installing i3 (not i3-gaps, as not easily available) on an Ubuntu
system with my dotfiles, I had to deactivate the gaps.

I think I prefer this look now, as it gives more screen real estate and
looks cleaner in my opinion.

Also deactivate rounded corners through picom as they only really make
sense with gaps enabled.
2022-06-23 23:58:53 +02:00
afd4b933a2 tmux: Enter copy-mode w/o prefix on PageUp
Enter copy-mode and scroll one page up directly with PageUp without the
need of the prefix. This binding exists per default already in the
prefix keytable.
2022-06-23 23:58:53 +02:00
a3ede8f8bc vim: Use gitgutter's foldtext()
Use `gitgutter`'s `foldtext()` to display an indicator if a fold
contains lines that have been changed.
This is necessary as {,neo}vim does not display signs next to folded
lines.
2022-06-23 23:58:52 +02:00
c46a352c35 tmux: Add tmux-yank
[tmux-yank][1]:

> Tmux plugin for copying to system clipboard. Works on OSX, Linux and
> Cygwin.

[1]: https://github.com/tmux-plugins/tmux-yank
2022-06-23 23:58:51 +02:00
a3ec1a7a35 tmux: Use $XDG_CONFIG_HOME instead of hardcoding 2022-06-23 23:58:51 +02:00
b316bf6683 tmux: Save sessions before detaching 2022-06-23 23:58:50 +02:00
ce4b8fa3dd zsh: Only source *.zsh files
Only source `*.zsh` files to prevent confusion or errors on startup.

Rename all files in 90-external-plugins accordingly.
2022-06-23 23:58:49 +02:00
a912530f6f zsh:p10k: Modify context segment format template
Display only `user` when not in a remote shell and `user@hostname` when
connected.

Display the content in bold when running with privileges (no SSH & SSH).
2022-06-23 23:58:49 +02:00
33f9a34895 zsh:p10k: Move bg-jobs, exec-time & status to end
Have those three always the furthest right in the `RPROMPT`. Also
reorder them to be in this order (up -> down : left -> right):

    - background_jobs
    - command_execution_time
    - status
2022-06-23 23:58:48 +02:00
b819abc7b6 tmux:plugs: Update tmux-resurrect to v4.0.0
> git log --oneline --no-merges v3.0.0..v4.0.0
    e87d7d592cac v4.0.0
    1ad109d3a832 Adds support for saving and restoring pane titles.
    027960ad2589 Explain delayed pane content cleanup
2022-06-23 23:58:47 +02:00