Commit Graph

1434 Commits

Author SHA1 Message Date
2d9b00a0d3 vim:keys: Convert decimal numbers with <leader>hex 2025-06-27 13:29:25 +02:00
91fa7fecb0 rofi: Remove unused wifi-menu script
I've added this way back when I started customizing my system but never
used it. The project does not list any license, so this should have
never been in here.
2025-06-27 13:05:35 +02:00
5078b6a63f *.sh: Fix some shellcheck issues 2025-06-27 12:59:13 +02:00
781e3a2f4b vim:keys: Substitute only inside visual selection
When substituting in a visual block selection, the automatically
inserted range `'<,'>` is not enough as the pattern will also match
outside of the selection on the same lines. To only match inside the
selection, insert the `\%V` atom.

Theoretically the pattern will also need the atom before the last
character to make sure that everything is inside the selection, but this
can be inserted manually when needed (see `:h /\%V`).
2025-06-26 16:18:22 +02:00
0e44a7cb12 i3: Fix Telegram executable name
Telegram changed their binary name from 'telegram-desktop' to 'Telegram'
in version 5.15.0.
2025-06-24 12:54:25 +02:00
151ae41b5c git: Add cont alias for continue 2025-06-24 00:17:15 +02:00
4b5dbd161a zsh:autosuggestions: Switch to history strategy
I don't feel as if I'm actively benefiting from match_prev_cmd and it
definitely makes my prompt slower. (One could probably make it faster by
pre-calculating the history events matching the (previously) executed
command in a preexec zsh-hook and then comparing each successor to the
currently typed command instead of repeating all the work every time
BUFFER changes)

With this change my fork is not needed anymore, so switch back to
zsh-users' repo and update it while at it.

This effectively reverts 77b2d63341 ("zsh:autosuggestions: Use own
fork for now").
2025-06-24 00:06:33 +02:00
b7af03770e zsh:alias: Add TYPE column to lsblk output 2025-06-23 22:07:02 +02:00
6dcf97e249 zsh:alias: Add bytestr 2025-06-23 22:04:27 +02:00
3f621617ef less: Open file (also stdin) in vim with e/E
The current file can be edited with `v` already, but this doesn't work
when reading from stdin.
2025-06-20 15:41:35 +02:00
f3d8ea3de0 less: Move $LESS from .zprofile to lesskey 2025-06-20 15:15:07 +02:00
075dbf2431 zsh:diffcmds: Clarify lseek(2) comment 2025-06-20 14:14:03 +02:00
c27bf72fee zsh:diffcmds: Slight refactor & format adjustments 2025-06-20 12:29:19 +02:00
f636479b70 zsh:diffcmds: Improve usage description 2025-06-20 12:24:17 +02:00
2bf7443f52 git: Add scripts -> zsh/autoload/git/ symlink 2025-06-20 11:47:38 +02:00
740c0b2fd7 git: Add git-abort & git-continue
I find typing `git {rebase,merge,...} --{continue,abort}` a bit
annoying, since it is a lot of typing. I have added an alias for `rebase
--continue` (grc), but the problem remained for the other commands.

Add a script that continues or aborts the ongoing process by detecting
it automatically.
2025-06-19 14:03:17 +02:00
9ed2f526da zsh:autoload: Fix loading of symlinked functions
Only plain files were autoloaded because of the glob qualifier. Switch
to no-directories so that symlinks (e.g. git-ssh-and-https) are loaded.
2025-06-19 12:49:01 +02:00
28903758a8 vim:ftdetect: Use C's syntax highlighting for .asl
Make .asl files (ACPI Source Language) belong to the 'c' filetype. Not
perfect, but an easy way to have some colors without a full plugin.

Additionally set the 'asl' filetype too, in case I want to add some
ftplugin in the future.
2025-06-11 12:50:45 +02:00
465e5e1330 kitty: Better font size mappings (current/all)
More fine-grained control and mappings for current terminal only.
2025-06-09 19:17:16 +02:00
616298df72 i3:multi-monitor: Send only one i3-msg command
Moving and then switching in a separate command flickered sometimes.
2025-06-06 12:03:41 +02:00
a67f8c9ec6 i3: Simulate monitor-independent workspaces
Often when I want to open a new workspace, I look at my bar to see which
workspaces are still free. This does not work sometimes when having
multiple monitors connected, as workspace numbers are unique between all
outputs.

Add a script that handles workspace switching/moving by prepending the
index with the index of the current monitor.
2025-06-05 17:43:24 +02:00
e121743d8a zsh:options: Disable CDABLE_VARS
It annoys me too often (I always see the named directories in the
completion menu and had problems with files/folders with the same name).
2025-06-05 11:45:47 +02:00
e451fbdd22 zsh:options: Set C_PRECEDENCES 2025-06-05 11:45:19 +02:00
5212f2a217 zsh:alias: Add calculator with output in hex
I never used the old hex alias.
2025-06-05 11:42:04 +02:00
6b98838f7e vim:keys: Remove unneeded mappings
These were commented out already for longer. For `(` I have delimitMate
and the `<CR>` mapping conflicts with the one from coc.nvim (which
includes the `<C-G>u`)
2025-06-02 20:59:43 +02:00
f0ec75aa9c vim:keys: Map <leader>d also in visual mode 2025-06-02 20:59:43 +02:00
533e82cb81 vim:keys: Add :keeppatterns to substituting vmaps
All of these should not modify @/.
2025-06-02 20:59:43 +02:00
e0e1e5d971 vim:keys: Fix <Cmd> vmaps
When switching to <Cmd> for mappings in fc9874bf97 ("vim:keys: Use
<Cmd> for plain command mappings") I forgot that the previously inserted
selection range marks (i.e. '<,'>) are missing now. This broke vmaps
that used :substitute without having added them manually.

Since <Cmd> has some performance benefits, I want to keep it and add the
missing marks where needed.
2025-06-02 20:59:37 +02:00
04ef69c021 zsh:rationalize-dots: Self-insert when replacing 2025-06-02 11:32:27 +02:00
d0e5d92d2c zprofile: Don't set MBSYNCRC
mbsync reads `$XDG_CONFIG_HOME/isyncrc` now by default.
2025-05-30 14:09:32 +02:00
c89d3b550b i3: Add note about minimal kitty version 2025-05-30 01:34:41 +02:00
6ad28b64a7 firefox: Recognize .nas as valid TLD 2025-05-29 17:36:36 +02:00
f75130ea73 zotero: Add user.js that sets recursiveCollections 2025-05-29 17:34:14 +02:00
9dc8e71ce6 vim:keys: Map <C-w>! to move window to new tab
I memorized tmux's <prefix>! mapping, but always forget how it is done
in vim.
2025-05-28 14:05:40 +02:00
3d3ba75abb git: Use commit.template for a 2nd newline
When I write commit messages in vim, I often use gwap to format the
message body. This breaks if there is no empty line between the body and
the following "Please enter the commit message for your changes..."
comment.

So, to not always have to add this empty line first, I use a
commit.template file that simply contains one empty line.
2025-05-28 14:05:39 +02:00
f2adfbf27d zsh:conf: Set local extendedglob instead of (*)
The * parameter expansion flag was only introduced in zsh-5.9. I
currently use a system that still uses 5.8.1 and thus throws:

    conf:29: error in flags
2025-05-28 13:28:48 +02:00
1f80b616c2 *: Fix some old uses of st as terminal
I replaced st with kitty in 0139294831 ("Use kitty instead of st as
terminal").
2025-05-27 18:25:03 +02:00
a34a00eae6 i3: Fix opening kitty in the current working dir
Since I run kitty with --single-instance, xcwd does not work for it.
Replace it with a short script that retrieves the CWD for the focused
window through the remote-control ls command.

This changes the current behaviour slightly, since now only terminals
are used and not any X window (which I rarely used or needed) and that
the working dir of the shell running in kitty will be used and not of
any deeper children. I'm still unsure if I want the latter back, but
will figure this out in the future.

This is an addendum to 0139294831 ("Use kitty instead of st as
terminal").
2025-05-27 18:24:06 +02:00
0c17ae8280 *: Use xargs instead of while read one-line loops 2025-05-27 17:00:35 +02:00
e9f05d5d08 git: Add ls -> ls-files alias 2025-05-23 18:19:38 +02:00
9836b51e16 zsh:glog: Use execute-silent when copying the hash
This way the screen does not flash.
2025-05-23 18:19:03 +02:00
e3689fe68b zsh:glog: Fix some non-local variables 2025-05-23 18:18:35 +02:00
00d28845a3 zsh:glog: Fix preview with files that were renamed
Previously when calling `glog -- file` with a file that was renamed
sometime in the history, the preview would just be empty for all commits
before the rename, since it's path didn't exist.

Fix this by checking for empty output and falling back to the full patch
in that case.

This also heavily refactors the code around `$fzf_preview` to make it
more readable.

TODO: It would be nice if git-show would fail in this case instead of
      just printing nothing and returning zero
2025-05-23 18:09:02 +02:00
339ef90db0 zsh:glog: Rename $out to $hash 2025-05-23 16:44:24 +02:00
bbc6d5c9e0 git: Fix working directory of shell aliases
In git aliases, shell commands are executed from the top-level directory
of the repo. Because of this, something like `git glog -- file` didn't
work in subdirectories.

Fix this by creating a wrapper script that first changes into
$GIT_PREFIX before executing the script. Since (currently) the only
use-case is to launch the functions in `autoload/git/`, most of the path
could move into the script, making the git config a lot cleaner.
2025-05-23 16:30:58 +02:00
e232c8f37b zsh:glog: Use single quotes for file arguments
Since they get interpreted by a shell again, weird file names (e.g.
including dollar signs) would not be passed literally in double quotes.
2025-05-23 16:01:19 +02:00
9a91b464a8 zsh:alias: Add HEAD to gla
`gla` is meant to be `glog --all` without stashes. Add the missing
`HEAD` to be accurate, as it is needed when in detached HEAD.
2025-05-23 15:13:24 +02:00
9bf853a8d2 git: Fold sections in vim via modeline 2025-05-23 13:33:02 +02:00
7158abd611 git: Reorder aliases
Bring all blocks together and place shorter alias variants behind longer
ones - ignore the shorter ones in the sorting.

Remove the comment above `autosquash` because the command is fairly
descriptive and it is the only comment and I don't really know how to
format the block then (since the comment is at the very top it looks
like it is for the whole block and I don't want to put a newline behind
`autofixup`).
2025-05-23 13:19:25 +02:00
fc60d4baf3 git: Add fetch-tags-only alias 2025-05-23 13:08:24 +02:00