Commit Graph

747 Commits

Author SHA1 Message Date
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
6a538101a2 vim:plugs:tmux-navigator: Disable on zoomed pane
Disable tmux navigator when zooming the Vim pane.
2022-06-23 23:58:47 +02:00
4cf0eedd56 vim,tmux:plugs: Add vim-tmux-navigator
[vim-tmux-navigator][1]:

> Seamless navigation between tmux panes and vim splits

Add the hybrid vim/tmux plugin `vim-tmux-navigator` to switch between
tmux panes and vim splits with `C-[hjkl]`.

Add vim-tmux-navigator as a submodule in tmux/plugins and create a
symlink from vim/pack/plugins/start.

Get rid of similar switching keymappings in the vim and tmux configs.

[1]: https://github.com/christoomey/vim-tmux-navigator
2022-06-23 23:58:46 +02:00
49a6985f35 tmux: Tweak theme by using *bright*yellow
Change all styles that used yellow to brightyellow and use 'default'
instead of black as background where appropriate to not mess up a
transparent terminal background.
2022-06-23 23:58:45 +02:00
9ff939a4fd tmux: Sort plugins list 2022-06-23 23:58:44 +02:00
53837bc2b3 tmux: Set renumber-windows
[renumber-windows][1]:

> If on, when a window is closed in a session, automatically renumber
> the other windows in numerical order. This respects the base-index
> option if it has been set. If off, do not renumber the windows.

[1]: tmux(1)
2022-06-23 23:58:44 +02:00
0c8992b232 tmux: Get rid of Unicode symbols in status line
Instead of putting the window id and name in filled rounded "boxes" with
the help of Unicode characters, display simply the text on neutral
background and change only the foreground. This makes the status line
more minimal while also "supporting" terminals without a patched
Nerd-font.
2022-06-23 23:58:43 +02:00
4b421f6b78 vim:funcs: Silence checktime call
The checktime command is not available in the command line window. As
the `CheckTime` function runs every second, the command line window
spits out an error message every second making it practically unusable.

This patch silences the `checktime` call to fix this.
2022-06-23 23:58:43 +02:00
846d0fc6c6 gitmodules: Set foldmethod=expr per modeline
Fold away every submodule entry.

Add section headers.
2022-06-23 23:58:42 +02:00
464d4de64b vim:plugs: Add vim-sort-folds
> Sorting folds is not easily possible in vanilla vim. You could join
> all lines in a fold, sort and split them up again; however, it is time
> consuming and tedious.
>
> This little plugin solves that issue: It sorts a visually selected
> region while keeping closed folds intact. Since folds can be created
> in a variety of ways, it is therefore straight-forward to sort
> arbitrary groups of text based on their first line.
2022-06-23 23:58:41 +02:00
8107bc6ec0 zsh:funcs: Get rid of double comment prefixes ## 2022-06-23 23:58:41 +02:00
626ba1c345 vim:plugs: Add vim-textobj-comment
> This Vim plugin provides text objects for comments.
>
> `ac` selects a comment including the comment delimiters and `ic`
> selects just the comment content. (There's also a third text object,
> `aC`, which selects a comment including trailing or leading
> whitespace.) These mappings are available in Visual and
> Operator-pending mode.
>
> This plugin uses the `comments` and `commentstring` settings to
> determine what a comment looks like for a given filetype. It works
> with both `/* paired */` and `// simple` comment delimiters.
>
> This plugin depends on the textobj-user plugin.
2022-06-23 23:58:40 +02:00
4d8921c1c1 vim:plugs: Add vim-textobj-user 2022-06-23 23:58:39 +02:00
8cd490ea0a zsh: Move 'change directory into repo root' logic
Add an alias that switches directories into the repository root, instead
of having the normal `cd` command behave like that.

Sadly this is not possible (AFAIK) with a git alias as that will always
spawn a subshell.
2022-06-23 23:58:39 +02:00
e97ade48e2 zsh:alias: Add py for python3 2022-06-23 23:58:38 +02:00
476081e2a2 git: Set log.follow
I always want to 'follow' if possible.
2022-06-23 23:58:37 +02:00
2133d52fc8 zsh:funcs:git-log-staged-files: Add log.follow 2022-06-23 23:58:36 +02:00
1149424d0d git:alias: Add autofixup and autosquash
Automatically fixup/squash marked commits without opening the
git-rebase-todo.
2022-06-23 23:58:36 +02:00
f76d16f01b git: Move user.config include block to EOF 2022-06-23 23:58:35 +02:00
c2390f5fcd vim:fugitive: Fix committing with locked gpg-key 2022-06-23 23:58:34 +02:00
f620e6d577 meta:hooks:commit-msg: Improve body recognition
Before, the commit-msg hook would not catch too long lines when
squashing commits, as the provided message starts immediately with a
commented line.

Instead of simply using all lines until the first comment, use all lines
until git's cut-line and remove all commented lines in between.

Do not hard-code git's commentary character but rather use
`core.commentChar`. `auto` is depending of the context interpreted as
'any character' or `#`.
2022-06-23 23:58:34 +02:00
7126a40c71 meta:hooks:commit-msg: Allow {fixup,squash} prefix
Allow the "fixup! " and "squash! " prefix' created by the
`--fixup`/`--squash` flags to `git-commit`
2022-06-23 23:58:33 +02:00
f387b08d78 zsh:funcs: Add git-log-staged-files
Display the log for the staged files (excluding additions, as they do
not have a history and I prefer the full log instead of nothing in that
case).
2022-06-23 23:58:32 +02:00
6119d8634f zsh:alias: Use single quotes 2022-06-23 23:58:32 +02:00
5f52d8b463 zsh:alias: Add gch for git checkout 2022-06-23 23:58:31 +02:00
1bd7c959e0 zprofile: Fix typo by dropping trailing character 2022-06-23 23:58:30 +02:00
e594799835 git:ignore: Add Obsession.vim session files 2022-06-23 23:56:53 +02:00
ce4dae3b1a zsh:comp: Complete insensitive between - and _ 2022-06-23 23:56:53 +02:00
e13ab8e855 zk: Add a horizontal ruler before the modeline
When using the zettel as a commit message this is also convenient as git
will ignore everything behind it. (Which also means that all horizontal
rulers in a zettel should use atleast 4 dashes)
2022-06-23 23:56:53 +02:00