Commit Graph

205 Commits

Author SHA1 Message Date
fa9e8da091 zsh:glog: Show also commit stats in preview 2021-02-17 02:39:59 +01:00
965e725bc2 zsh:alias: Use nvim in vimdiff alias 2021-01-27 02:10:24 +01:00
bd1e968f6f zsh:funcs:cd: Recognize ls suffix in paths 2021-01-25 10:20:55 +01:00
9f616bace6 zsh:glog: Disable echo's backslash interpretation
With it allowed it breaks the preview and copy of commits that contains
such sequences.
2021-01-15 13:40:29 +01:00
1cbf572d42 zsh:p10k: Recognize protonvpn as vpn 2021-01-15 12:41:09 +01:00
5c95111b0f zsh:func:nvim-man: Fail if no manpage found 2021-01-15 12:39:47 +01:00
555e983d1f zsh: Fix truncation of history by bash
As bash uses some environment variables with the same name as zsh it
uses the same history file and potentially truncates it, when there is
no bashrc.
2021-01-07 09:49:37 +01:00
2c30d57573 zsh:keys: Fix fzf abort check
The file should be opened if fzf returned something not the other way
around. This probably happened in the last refactoring session before
committing.
2021-01-05 22:07:07 +01:00
d0cd6ffef0 zsh: Move man wrapper into function for completion 2021-01-04 16:34:16 +01:00
ec2b7d58ed zsh:keys: Simulate <leader>f from vim config 2021-01-03 22:33:23 +01:00
5c91bc23a2 zsh:keys: Increase KEYTIMEOUT a bit 2021-01-02 00:40:01 +01:00
e4677c2626 zsh:completion: Fix completion of ls, git-checkout 2020-12-28 03:17:38 +01:00
ebea6a8a80 zsh: Add WIP fzf-tab configuration adding previews 2020-12-28 03:11:20 +01:00
2b64781000 zsh:alias: Use nvim's Man function instead of pipe
Just setting neovim as the `MANPAGER` practically results in a pipe.
The problem with this is that `man` puts hard line breaks into the text
depending on the current window width. When the width changes afterwards
the input naturally doesn't change.
When using neovim's `Man` function this is resolved.
2020-12-28 03:01:35 +01:00
a440e8b61e zsh: Use dictionary for command existence check
Use the `commands` dictionary from zsh instead of always calling
`command`.

Regex used:
s/command -v \([^ ]*\) &>\/dev\/null/(( $+commands[\1] ))/g
2020-12-28 02:58:46 +01:00
03564cf46f zsh:options: Add new options 2020-12-23 20:10:21 +01:00
fd06f73e01 zsh:options: Add line long group separators 2020-12-23 20:09:16 +01:00
6e29b8b51a vim:crypt-umount(): Continue if already unmounted 2020-12-23 19:53:28 +01:00
ba2e85c988 zsh:options: Reformat
Sort by groups as in zshoptions(1) and keep the full description of the
option above the `setopt` so that the lines remain under the max width.
2020-12-23 16:20:21 +01:00
914e8a1992 repo: Update submodules & cleanup gitmodules
Update all submodules to the newest commit.
Change submodule names in `.gitmodules` from local path to repo names.
Sort and group `.gitmodules` by program that uses it.
Remove the clone of 'fzf-tab' as my pull request got merged.
2020-12-22 16:22:33 +01:00
a9e2e5b847 vim:alias: Vim related aliases + ^Z, fg workflow 2020-12-19 03:01:46 +01:00
5b5fc5eefa zsh:alias: Remove Ubuntu update alias 2020-12-19 02:58:55 +01:00
5cf0f7fdf2 zsh: More XDG! 2020-12-19 02:57:45 +01:00
26ef592129 zsh:glog: Add --stat preview 2020-12-19 02:31:52 +01:00
10ef02c421 zsh:glog: Support arguments
Arguments given to `glog` are directly passed to the `git log` call that
populates the commit list. Useful for example for specifying the
commit/branch.
2020-12-19 02:29:51 +01:00
9276f9427e zsh:glog: Comment bindings and add cancel bind 2020-12-19 02:29:10 +01:00
21014b46ce zsh:glog: Position preview depending on dimensions 2020-12-19 00:14:55 +01:00
d7a126a41f zsh:alias: More git aliases 2020-12-18 23:35:32 +01:00
e1752188b0 zsh:history: Do not save function definitions 2020-12-18 23:35:00 +01:00
380473bda9 zsh:functions:mvln: Bug fix and multiple arguments
Support multiple arguments now with a behaviour similar to `mv`.

Fix that the created symlink did not point to the right file when mvln
was used to rename directories. In that case it pointed to a
subdirectory with the old name. Fixed by moving the directory check of
the target before the `mv` call.
2020-11-28 19:57:22 +01:00
druckdev
6cac0dc53a git: Show patch of the changes in commit message
The changes are only shown in the editor and do not land in the final
commit message.

For that setting the git-commit-last-msg function and the commit-msg
hook had to be updated.
The function is now a standalone function instead of anonymous and
uses every line until the first comment in COMMIT_EDITMSG discarding the
new information too.
The hook breaks now when checking line lengths when the changes start
since for some weird reason they are passed together with the rest of
the message instead of being deleted like the comments.
2020-11-23 01:27:51 +01:00
druckdev
6fed362d4c zsh:functions: Rewrite resolve()
It was a mess and had to be rewritten. The new version is a bit simpler
by dropping unstable features that I never used anyway.
It still supports a verbose flag that prints every step of the process.
2020-11-23 01:23:23 +01:00
druckdev
9d6086740e zsh:safe-remove(): Accept drive names too 2020-11-17 02:51:26 +01:00
druckdev
cd95201d21 zsh:alias:lsblk: Only output useful stuff 2020-11-15 02:00:15 +01:00
druckdev
aed39d0f4c zsh:safe-remove(): Don't fail if already unmounted 2020-11-15 01:22:20 +01:00
druckdev
4f182e9108 fzf: Use rg instead of find when installed
Use rg as it respects possible gitignores.
2020-11-15 01:20:42 +01:00
druckdev
af49c39ba3 zsh: Reorder zshrc components and move stuff
Put the external plugins to the end as well as z-sy-h to the end of the
plugins.
Put the last remaining lines in the zshrc in their own modules.
2020-11-15 01:16:00 +01:00
druckdev
0e5dd20db4 zsh:alias:gpg: Fix zsh-sy-h related freeze 2020-11-12 22:51:16 +01:00
druckdev
bf46c5f687 zsh: Divide zshrc into zshrc.d
Move every file from plugins into zshrc.d as well as all bigger blobs in
the zshrc into their own files there.
Some stuff is still in there that I am not all too sure where it
belongs. TODO: Move.

Because all external plugins are now sourced over a symlink I had to
create a fork of fzf-tab for now that supports that.
See: https://github.com/Aloxaf/fzf-tab/pull/153
2020-11-10 02:58:22 +01:00
druckdev
51643beddf fzf: Add DEFAULT_COMMAND and vim :Files mapping
Add FZF_DEFAULT_COMMAND that displays hidden files as well, but ignores
.git directories.
Add :Files mapping in vim. Because it is bound to <leader>f, the leader
key mapping had to be moved to the top of the file.
2020-11-08 03:19:40 +01:00
druckdev
5c19bd6414 zsh:plugins: Update fzf-tab & p10k submodules 2020-11-07 03:16:15 +01:00
druckdev
75a8af2d14 repo: Move fzf to non zsh-dependant location
Since fzf is not really only a zsh plugin this moves it to .local/bin.
I am not quite sure it will stay there.
The submodule was also updated in this process.

Update all links and references.
Add .local/share directory that contains the man pages. By that dotbot
just globs all of them and symlinks them. This makes it more modular and
a bit more transparent on how an installed system looks like, just by
looking through the repo structure.
2020-11-07 03:07:59 +01:00
druckdev
42cbed25b2 zsh:alias:zathura: Move output redirection to end
Move the output redirection of the zathura-pdf alias from the front to
the end to not confuse zsh-syntax-highlighting.
2020-11-07 02:17:17 +01:00
druckdev
6ff87f1e9c zsh: Add vimdiff alias that displays whitespaces 2020-11-05 14:49:45 +01:00
druckdev
211ef6e047 vscode: Use tabs per default, XDG & gitignore
Use tabs instead of spaces per default. (VSCodium will still respect the
indentation used in the file)
Stop vscode from writing files in HOME.
Since only the settings.json is versioned in this repo but the full
folder is symlinked: Ignore all other files that will be written.
(TODO: Only symlink file)
2020-11-05 14:45:46 +01:00
druckdev
9d166a6097 zsh: Use &>/dev/null 2020-11-05 14:45:05 +01:00
druckdev
76920ea53e zsh: Add cd wrapper for calls without arguments
Add a cd wrapper that when called without arguments, moves into the root
of the current repository instead of HOME. (Except when already there)
2020-11-05 14:42:33 +01:00
druckdev
74dd5de08d zathura: Dark colors + Make default pdf program 2020-11-05 12:51:38 +01:00
druckdev
1491c998a3 zsh:profile: More XDG Base Dir env-vars + wgetrc
Use an environment variable and a wgetrc instead of an alias for wget to
enforce the XDG Base Directory Specification so that script calls
respect it too.
2020-11-05 12:37:19 +01:00
druckdev
ddb2114a87 repo: Add XDG user dirs config + Update zsh hashes
Create named directories to every visible folder in $HOME for greater
portability.
Set the CDABLE_VARS zsh option.
2020-11-03 15:11:30 +01:00