Commit Graph

614 Commits

Author SHA1 Message Date
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
druckdev
121900c093 zsh: Add mvln() that moves a file but keeps a link 2020-11-03 14:23:54 +01:00
druckdev
d7739bb16a zsh: Add more aliases that enforce XDG Base Dirs 2020-11-03 14:22:22 +01:00
druckdev
ec147dfc43 zsh: Move stuff around
Move all environment variables that do not relate directly to zsh but
(in most cases) enforce the XDG Base Directory specification to
zprofile.
This way they are just exported once on login and not every time the
shell starts again.

Move the lines in zshenv that are not directly responsible for moving
the zsh files into $XDG_CONFIG_HOME to their own zshenv there.
2020-11-03 13:59:54 +01:00
druckdev
983e1b0b0b zsh: Fix copy paste error from fe5a65f
Accidentally exported MANPAGER as neovim as well when neovim does not
exist.
2020-11-03 12:32:29 +01:00
druckdev
13a9b036ff zsh:alias: Set a reasonable time format for date 2020-11-03 01:35:17 +01:00
druckdev
fe5a65fa23 zsh: Make neovim the man pager
And disable vim's spell check in man pages.
2020-11-03 01:11:40 +01:00
druckdev
0fe0679276 all: Update submodules 2020-11-03 00:21:46 +01:00
druckdev
ba0c29e90e zsh:glog: Add pgp signing infos 2020-11-03 00:02:05 +01:00
druckdev
4d1b540778 zsh:ls-show-hidden: Bug fixes around -d flag
Fix behavior to match ls's when the -d flag but no files or directories
were passed.

Fix bug that the function thinks -d is passed when a long option that
contains a 'd' (as --group-directories-first) is specified and thus
just emulates plain `ls` in that case.
2020-11-02 17:46:26 +01:00
druckdev
f487261365 zsh: Reenable stderred with workaround for gpg
Using stderred's blacklist does not work. The new alias simply removes
the stderred library from LD_PRELOAD for the execution.
2020-11-02 15:22:39 +01:00
druckdev
db5fe9fcd3 zsh:alias: Small bug fixes
Use XDG_CONFIG_HOME instead of hardcoding the tmux config path.
Simplify the battery alias a lot.
Fix quotation issues in url{dec,enc}.
2020-11-02 03:42:21 +01:00
druckdev
ff25909ff9 zsh: Disable stderred for now
It seems to be incompatible with my current version of gnupg.
(*** stack smashing deteced ***: terminated)
2020-11-02 02:14:28 +01:00
druckdev
f0a0ba06c2 zsh:functions: Use portable syntax for functions
Use a portable syntax for the function headers.
Since I do not know where these functions could end in the future it
makes it easier and more consistent to use the portable syntax.
2020-11-02 02:04:38 +01:00
druckdev
6eac13011a zsh: Add named directory for work 2020-11-02 02:03:22 +01:00
druckdev
ef13b24e80 zsh:alias: Update named directories
Update named directories location and rewrite the hash for wise and sose
to use a solution without tail but only the zsh glob power.
TODO: Find solution to get rid of the `echo` as well.
2020-10-31 22:34:13 +01:00
druckdev
7b63a148eb zsh: Add zprofile to auto start X on login 2020-10-31 22:34:11 +01:00
druckdev
d1869afff6 zsh:alias,functions: Add lowres, crypt-{,u}mount 2020-10-26 13:46:25 +01:00
druckdev
1b382f4f85 zsh:alias: Do not use aliases dictionary
Just use the command name instead of trying to directly expand
previously defined aliases for the command. Nested aliases still work
like this and using the dictionary breaks some stuff like
syntax-highlighting.

Put xxd into quotes just to be consistent.
2020-10-25 02:20:18 +02:00
druckdev
fbdf7252ec zsh:alias: Remove trash-restore alias
trash renamed the command. The alias is now useless/breaks stuff since
restore-trash does not exist anymore.
2020-10-25 02:12:14 +02:00
druckdev
6b7827dc2e zsh:keys: Add edit binding and use Ctrl
Add binding that opens the current command in the editor.
Use Ctrl instead of Alt for shell bindings to be consistent.
2020-10-24 18:54:24 +02:00
druckdev
f311fc8a35 zsh:keys: Stay with the flow (vim history scroll)
These combine nicely with the bindings in fzf when searching through the
history.
2020-10-24 18:51:13 +02:00
druckdev
38f1fe4677 zsh: Small improvement
Use the aliases dictionary instead of calling the builtin alias command.
Autoload without alias expansion using the zsh style.
2020-10-24 18:46:20 +02:00
druckdev
84d861112a i3: Update config
Divide config into different sections and move all relevant lines into
those.
Use the $TERMINAL variable wherever possible.
Cleanup some stuff and add a couple of comments.
Add vim modeline to indicate filetype.
Set the key repeat rate.
Ditch scratchpad-terminal.sh:
    The reason why I created that script was that I liked to have
    different bindings for showing and hiding the terminal. At this
    point it just brings too much overhead in a dirty way for a feature
    I do not really need. mod+space can still be used to toggle focus
    and with mod+comma the window is now shown/hidden from/to
    scratchpad.
Use a terminal flag to set the window name instead of using escape
sequences at the start of a new shell.
2020-10-23 20:01:30 +02:00
druckdev
36ca182110 zsh:glog: Better handling of small terminals +more
Instead of storing fzf's output and doing something with it (putting
into clipboard/editing buffer/stdout, etc.) there is a new keybinding
that stores the currently selected commit in the clipboard. fzf's output
is not piped or saved anymore since else `less` cannot be executed
inside of fzf. This is necessary for the second new keybinding that
executes the preview command piped into less. This is needed for example
when `glog` is started in a terminal that is too small to display all
information. In that case the peview window is not shown by default
anymore (but can still be toggled).
Since fzf can now only be aborted it always returns 130. Since this is
annoying `glog` returns 0 at the end form now on.

Refactoring:
Make the `commit_hash` regex more robust and by that simultaneously the
`del_ansi` regex obsolete.
Use `$dateshort` in `$date` since it depends from it.
Do not store the color flag in an extra variable. This was done earlier
to keep the lines under 80 characters but is not needed anymore.
2020-10-13 00:45:57 +02:00
druckdev
53622ea223 zsh:autoload:*: Add filetype to vim modeline 2020-10-10 13:27:53 +02:00
druckdev
d8f432655e zsh:glog: Push to editor buffer rather clipboard
This removes the dependency of xclip and makes it more usable since when
I need the commit hash it will almost always be in the next command.
2020-10-10 13:12:19 +02:00
druckdev
1a3a062309 zsh:glog: Small fixes
Commit hashes only contain letters from a-f.
Use heredoc for the fzf preview command for better readability.
2020-10-10 13:10:39 +02:00
druckdev
72159411b9 zsh: Delete unused parts and bits
Delete:
 - transfer.zsh
 - zsh-async
 - telegram helper functions + completion
 - TERM hack for kitty terminal
2020-10-06 22:22:42 +02:00
druckdev
0424941699 zsh: Rename autoloadable function ls
Rename to avoid confusion and make the config more transparent.
2020-10-06 03:54:01 +02:00
druckdev
e339c120c3 zsh:keys: Rework rationalize_dots/_expandDots
Restart from different implementation, since nicoulaj's dotfile repo
seems to be offline and I prefer majutsushi's cleaner version.

Add a slash after the dots since normally I continue on typing the path
and it does not hurt if I don't.
2020-10-06 03:02:55 +02:00
druckdev
5c784dae83 zsh:keys: Refactor and add comment 2020-10-06 02:11:42 +02:00
druckdev
5ca84d8ec9 zsh:alias: Quote nested aliases with single quotes
Use single quotes for nested aliases so that the alias is only then
expanded when the command is used. By that we ensure that the order of
the aliases in alias.zsh is irrelevant.
2020-10-05 21:31:52 +02:00
druckdev
ce10c25a59 zsh:keys: Add vim like text object selection
Add vim like text object selection bindings like ci(, ya", etc..
Copied from softmoth/zsh-vim-mode. Since all the other interesting parts
are already covered (for example by p10k) in my config, sourcing the
entire plugin would not make sense.
2020-10-05 14:56:26 +02:00
druckdev
4cb445c2b5 shell-scripts: Use [[ instead of [ where possible
Replace all occurrences of [ with [[ in bash and zsh scripts and
configs.
Performance wise it makes sense to use the builtin instead of calling an
external command also when from a functionality stand point `test` would
suffice.
2020-10-03 01:29:29 +02:00
druckdev
51797397f6 zsh: Convert all oneline functions into aliases
Convert all functions that are pretty much oneliners and do not contain
any real logic into aliases by using anonymous functions.
I am not too sure if I will keep it this way.
2020-09-28 04:07:56 +02:00
druckdev
2540b917c3 zsh:autoload:ls: Fix behavior when -d is given 2020-09-28 03:23:11 +02:00
druckdev
86ad1a8536 zsh:autoload:ls: Rephrase comment 2020-09-28 03:19:12 +02:00
druckdev
6fbe63be67 zsh:autoload:ls: Set vim filetype 2020-09-28 03:17:20 +02:00
druckdev
0cff51f17d zsh: Add alias for listing zsh options + values 2020-09-28 02:14:22 +02:00
druckdev
285863cb4f zsh:alias: Refactor
Reorder categories.
Remove unused aliases and PATH modification.
Refactor to keep lines under the maximum of 80 columns.
Use brace expansion where an alias has different names.
Simplify method for finding the wise and sose hash.
2020-09-28 02:06:08 +02:00
druckdev
6158900925 zsh: Don't autoload completion and hidden files
Ignore files that are hidden and functions that follow the naming
convention of completion functions.
2020-09-27 18:39:43 +02:00