Commit Graph

100 Commits

Author SHA1 Message Date
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
druckdev
9ae3de7d64 zsh: Add git alias for commiting with last message 2020-09-27 18:36:35 +02:00
druckdev
7aed147400 zsh: Do not complete arguments twice for trash
Also cleanup the comments around that section a bit.
2020-09-25 01:36:40 +02:00
druckdev
d7fc680abe zsh: Refactor functions
Combine functions{Pre,Post}.zsh into functions.zsh. There is no reason
or sense in splitting the functions like that and differentiating
between functions that should be loaded before and after sourcing the
aliases.

Rename the functions from funcPre, making their aliases superfluous.
2020-09-25 01:26:17 +02:00
druckdev
11ec8b93fb zsh: Heavy improvements to ls_show_hidden
Autoload the function instead of declaring it directly.
Add functionality for multiple targets. It should now pretty much
perform like `command ls`.
Refactored code to use more zsh extensions like globbing instead of
parsing the output of `ls` making it a lot faster.
2020-09-25 01:09:59 +02:00
druckdev
c00d8df9d0 zsh: Update dotfile hash 2020-09-24 03:45:46 +02:00
druckdev
f69efff5c0 zsh:glog: Pipe preview through diff-so-fancy 2020-09-24 03:30:53 +02:00
druckdev
a285fe2a1c zsh:p10k: Disable time on right side 2020-09-23 02:44:01 +02:00
druckdev
04ea8e9a89 zsh: Cleanup conf() a bit
Add more editor fallback values.
Cleanup comments and fix indentation.
Do not check for existence of specified config file. (Since the config
file can now be created that way)
"Downgrade" all file checks for readability to checks for existence,
since this should be handled on the editor layer.
2020-09-23 02:36:11 +02:00
druckdev
95300f221c zsh: Remove remnant from d5dda4d
Forgot to remove the source of zsh-history-substring-search in d5dda4d.
2020-09-22 01:23:28 +02:00
druckdev
0788926c8c zsh: Autoload big functions 2020-09-22 00:28:28 +02:00
druckdev
16896efa02 Replace cformat() with a clang-format wrapper
Replace the function with extra functionality with a wrapper for
clang-format that looks for the style flag and substitutes a given
filename with its parsed content.
2020-09-21 22:51:03 +02:00
druckdev
fdfa8a5f8a Cleanup zsh functions and add unbkp()
Add unbkp() that reverses bkp().
Use shorter zsh syntax for disowning a background job.
Add usage string to mangrep.
Expect clang-format config to be in XDG_CONFIG_HOME. Add functionality
of comments.
Use `command` where we want a command to be taken as external.
2020-09-21 18:06:55 +02:00
druckdev
da90d3f744 Deactivate sorting in fzf when using glog 2020-09-21 17:44:45 +02:00
druckdev
253501a230 Add git-submodule-rm
Add function git-submodule-rm that deinits and removes a submodule from
a git repo.
2020-09-13 17:14:50 +02:00