Commit graph

104 commits

Author SHA1 Message Date
dc71f747da
nu: Copy basic sh aliases
Held back a little by the issue that you can't really set aliases
conditionally (yet?) in nushell, which is kind of fundamental to my
zsh/sh alias setup. If a program exists, we add some nice aliases -- if
not, we simply degrade gracefully and don't add anything.

PR to track issue:
https://github.com/nushell/nushell/issues/5068
2025-11-30 23:05:15 +01:00
4bea6507c0
wezterm: Add key to detach selected pane into new window
`<leader><c-s-Q>` activates the pane selector and lets you decide which
pane to detach from the current _window_ and move to a new one.

This mirrors the `<leader><c-q>` mapping moving a pane to a new tab,
only 'bigger', thus using shift in addition.

The binding is a little awkward, but with how rarely I have needed to
use it this was fine for me so far.
2025-11-30 23:05:12 +01:00
bfecbdcd59
nu: Add space prefix to keybind commands to prevent history adding
To prevent adding any of the keyboard-binding driven commands to the
user's command history, we simply prefix all of them with a single
space.
2025-11-14 14:15:04 +01:00
b305be8ad0
nu: Add partial auto suggestion completion
The suggested history completion on the reedline (i.e. fish-like
autosuggestion) can be fully completed with the `l` key in vi cmd mode.

This change adds the ability to complete the suggestion partially by
completing the current word using `e`. If no history suggestion exists
it moves to the end of the current word as usual.

This mimics the partial completion I have set up in zsh with the help of
the `zsh-autosuggestions` plugin.
2025-11-14 14:15:04 +01:00
26e8cc3ccc
nu: Add job control shortcuts
Using <c-z> when a process is running backgrounds it (default behavior)
using the new nushell job control system (since v0.103).
This change also lets you re-foreground the backgrounded program with
the same <c-z> key mapping.

Additionally we add the `fg` alias which does the same and thus mimics
the fg command of other shells like zsh.
2025-11-14 14:15:03 +01:00
37cc1a3d83
nu: Enable transient prompt
Enabled transient prompt for nushell so we only display the line
character and attempt to display command durations for past prompts.

Not sure if command duration is working correctly. If not, might have to
revert this change.
2025-11-14 14:15:03 +01:00
ae5470a5d8
nu: Add fuzzy tab completion, remove nvim hardcoding
Removed the buffer editor hardcoding to 'nvim', should use the EDITOR
env var instead.

Added the (currently undocumented?) config option to enable fuzzy
completion matching - essentially enables exactly the behavior the
'fzf-tab-complete' plugin does for zsh, only natively in the nushell
program.

See: https://github.com/nushell/nushell/issues/1275#issuecomment-2964573062
2025-11-14 14:15:02 +01:00
07d36e3132
starship: Restyle continuation prompt
When entering multiline commands, display a slightly more pronounced line
prefix so we can recognize faster that it expects more input.
2025-11-14 14:15:01 +01:00
f514ebe008
starship: Enable terraform and typst modules
Explicitly enable terraform and typst version displays (if in directory
with terraform state files or .typ files for typst), and change the
symbol for the typst module to a feather (which is much nicer than the
plain 't' it would display otherwise).
2025-11-14 10:27:02 +01:00
51fd5b51c7
nu: Remove startup banner
Now that we can see at a glance which shell we are running with a
starship shell indicator, we don't need the huge nushell startup banner
anymore.
2025-11-14 10:27:01 +01:00
7f2520ece5
starship: Add shell indicators for bash and nu
Added little single-character displays at the front of the prompt if we
are in a shell different from zsh to remind myself (since they all look
exactly the same with starship).
2025-11-14 10:27:01 +01:00
c1eb686cd3
nu: Add sudo toggling key
Toggle sudo prefix for command line with <alt-s>. Not sure if I will
keep this binding in the long run but it is a good example of command
execution using nushell through a key binding.

From: https://github.com/nushell/nushell/discussions/16043
2025-11-14 10:27:00 +01:00
56916f90d1
nu: Add dot-repeat key mapping
We have to manually enable the <a-.> keybinding for nushell, which
emulates the 'insert last token of last command' functionality of e.g.
zsh.
2025-11-14 10:26:59 +01:00
acc2496bd6
terminal: Move bash and zsh into config directory
With the power of dotter for dotfile management we can move the files we
want to link anywhere in our repository.

So finally we're making use of it to keep the bash config files in the
`terminal/.config/bash` directory, as well as removing the leading dot
from both the zsh configuration files.
2025-10-13 11:26:22 +02:00
fa7e740249
terminal: Add fzf file insertion and zoxide cd key binds
The following is added to all three shells bash, zsh, nushell:

Pressing c-t at any time lets you insert a file/dir at the current
cursor location using fzf. Same for 'T' in vicmd mode.

Pressing alt-c at any time lets you jump to that directory using zoxide,
with the zle editor content intact. Same for 'C' in vicmd mode.

Zsh implementation from: https://github.com/ajeetdsouza/zoxide/issues/357
Bash implementation: https://github.com/ajeetdsouza/zoxide/issues/516

Nushell implementation taken from: https://github.com/junegunn/fzf/issues/4122

TODO: Nushell fzf mapping has one problem in that it does not quote the
selected file in any way. So any file with e.g. a space in it will have
to be manually fixed afterwards.
2025-10-13 11:26:22 +02:00
c3e2720b3c
wezterm: Rename tabs
Rename tabs with `<leader><S-R>`. This will provide a (full-screen)
prompt in which you can exit with esc (not changing anything), provide a
static name for the tab, or hit enter with nothing on the prompt to
return to the default naming behavior.
2025-09-30 14:35:50 +02:00
99fd7a78a5
wezterm: Remove emoji picker key bind
I use my own 'bemoji' picker everywhere, including wezterm.
2025-09-24 10:36:37 +02:00
eb7f47fee5
wezterm: Unmap debug overlay mappings
Unmap the custom set Debug overlay mapping since I haven't had to use it
in absolute ages. Additionally we also unmap the default mapping for the
debug overlay - which frees up the key combination to be passed through
to TUIs.
2025-09-21 10:29:14 +02:00
5a4d0051be
zsh: Fix carapace and fzf-tab compatibility
As mentioned in
https://github.com/carapace-sh/carapace-bin/issues/2819#issuecomment-3092307945,
fzf-tab directory completes are empty if you try to complete on a
directory without any prior input.

I.e.:

`ls -hal ~/.config/a<tab>` shows output (dirs starting with a).
`ls -hal ~/.config/<tab>` is empty.

This fixes the issue by making the query string use the full inserted
value.
2025-09-21 10:29:13 +02:00
4b65069436
terminal: Add carapace completions to all shells
Bash, nushell and zsh all make use of carapace completions by default.
2025-09-05 09:11:07 +02:00
e44baaf207
terminal: Add bash shell indicator to starship prompt
So we know that we are not in a zsh shell currently.
2025-09-05 09:11:07 +02:00
59223d1003
wezterm: By default connect mux to domain called unix
If we start wezterm muxing we now always connect to the same default
domain. This is a tiny step toward true multiplexing with wezterm.
2025-06-06 15:58:40 +02:00
76330c142a
vifm: Add theoretic live preview for videos using chafa
Not used currently because with the current setup (ffmpeg, chafa+sixel,
wezterm) it's too slow but kept as a nice implementation idea
nonetheless.
2025-05-22 13:58:19 +02:00
84ab839612
vifm: Add pdf and webp preview
Added pdf previews using pdftoppm to convert into chafa-readable format,
directly piped to the previewer.
2025-05-09 10:38:52 +02:00
67ac2da785
vifm: Remove chafa preview iterm hard-coding
We are using chafa to preview the image and video files but would always
default to the iterm implementation. This has been removed: The foot
terminal does not support iTerm and hard-coding makes us too tightly
coupled to wezterm. But even wezterm functions well with chafa without
the forced iterm usage - we simply use sixels instead.

Remove video preview frame hard-coded file caching and instead pipe
directly into chafa preview.
2025-05-09 10:38:51 +02:00
9915fcd2bf
wezterm: Fix italic font display
Accidentally displayed as italic and bold by default, now displaying
regular weight except for actually bold italic fonts.
2025-05-04 19:55:08 +02:00
2e9701ea26
services: Fix missing environment variables for user services
We add an additional 'core' user service (i.e. one that gets loaded
before all others by turnstile) which populates the TURNSTILE_ENV_DIR
with all manner of custom set env vars that are important for other
applications.

Most importantly, this sets up the XDG directory compliance for
applications either managed by turnstile or applications started through
turnstile on my system. So, for example `pass` knows to search for its
database in `XDG_DATA_HOME` and river knows to search for binaries in a
PATH which has been prefixed with my custom user binary location.
2025-03-19 21:30:00 +01:00
71c5ac3f19
atuin: Set up configuration 2025-03-15 20:08:49 +01:00
22af0cf46e
nu: Add md and mcd aliases 2025-03-15 20:08:49 +01:00
ab5db2877a
nu: Start setting up new nushell config
Remove most of the old cruft that was left over from nushell version
0.87 - we are now on version 0.102!

Many of the old options are actually not helpful anymore so let's just
get rid of them entirely (never configured the shell for me too much).
Also there was a lot of 'default' commented code which made it harder to
keep an overview rather than help.

For now just set up a minimal shell experience with vi editing mode, and
the trifecta of startship prompt, zoxide movement and atuin history
enabled.
2025-03-15 20:08:48 +01:00
9857cb8953
nvim: Add nushell lsp 2025-03-15 20:08:48 +01:00
e36ed17a97
wezterm: Re-enable wayland mode
While there are errors that pop up when inserting text (_each time_), it
is still much preferable to the unbearable slowdowns that happen after a
while when running it in XWayland mode.
2025-03-06 21:22:01 +01:00
19577a7c83
zsh: Show help when hitting K from vi mode
We load the 'run-help' function to quickly show us documentation for the
command under cursor when we enter vi mode and then hit 'K'.
This mimics the actual vim setup where K will generally show
documentation/hover info/help as well.

The command invocation requires an 'even amount of arguments' which I
don't fully understand but have no time to read into and fix currently,
so it just gets another superfluous 'run-help' tacked on at the end.
2025-03-06 21:21:57 +01:00
9270ec64bd
HACK: wezterm: Disable wayland temporarily
Since wezterm on wayland is an older release (does not track nightlies,
so currently last release is 2024023, a year old) it does not work as
well with wayland as I would hope.

There are two major issues:
- Cursor errors whenever a mouse pointer is above the window (can be
  partly fixed with the xcursor_theme option, though still erroring when
  hovering over links).
- Constant errors that inactive text input is sending updates in river
  logs.

Until those are fixed, or I jump to a nightly version, we keep it
xwayland.
2025-02-25 23:25:24 +01:00
8b4e9f31ba
zsh: Fix loading aliases from .zsh extensions
We should load alias files from .zsh extension files in the alias dir,
not .sh files.
2025-02-25 23:25:22 +01:00
f04340acbd zsh: Use zr plugin manager if it exists
By default we use the 'zr' plugin manager for zsh. It is quick and
painless and takes managing the plugins across two environments not our
problem anymore.
2025-02-24 14:22:36 +01:00
e3742d43ec fonts: Fix for Iosevka on Voidlinux
Prefer regular 'Iosevka' font in most cases, not the highly specific
'Iosevka Nerd Font'. This may break some things back in Archlinux-land
but it is required for iosevka to be correctly displayed in Voidlinux,
and, to be honest, also feels more clean than using such a highly
specialized font for everything.

Additionally, we generally make use of both where possible, defaulting
to the more specific 'Nerd Font' family variant but falling back to
regular old Iosevka.

One exception is 'wezterm' which, though it nicely includes a font
fallback option (and a very configurable one at that), _always_ produces
a warning when the first font in a fallback list is not found -- even
when the specific 'warn_about_missing_glyphs' option is ticked. No clue
why but for now this works well enough for me.
2025-02-24 14:22:36 +01:00
af7aaa068c eza: Fix aliases pointing to old exa executable 2025-02-23 13:41:24 +01:00
72eda6a992
vifm: Fix Makefile and yaml icons 2025-02-22 19:35:40 +01:00
f3fb0998f5
vifm: Replace glow with bat markdown preview
For some reason (glow 2.0.0 release?) markdown preview with glow does
_not_ work anymore within my vifm. It regresses to showing errors all
over the place instead.
2025-02-18 22:41:39 +01:00
14e3364155
starship: Remove general custom component display 2025-02-14 10:47:53 +01:00
a0802d69f8
terminal: Add starship prompt configuration
I have been relying on my starship configuration for a *long* time now,
but seemingly never added it into my dotfiles. This rectifies that.
2025-01-04 14:37:10 +01:00
6bc3f0e8c1
vifm: Make external commands conditional on executables
Only create shortcuts for external commands if those have associated
executables on the system. If we don't have an `atool` installed, it
does not make sense to have shortcuts for invoking it - likewise for
vidir, find, and so on.
2025-01-04 14:36:23 +01:00
086ad20add
vifm: Switch from vidir to edir invocation
edir is a slightly improved version of the morutils tool 'vidir'. We
switch to it to change directories, files and only sub-directories
(Invoked with ,rr / ,rf / ,rd respectively).
2025-01-04 14:19:44 +01:00
2c1487ab93
repo: Remove traces of tmux configuration
While I never disliked tmux I have not been using it for absolute ages
now, ever since starting to multiplex with wezterm. Wezterm can (at
least with my current setup) *not* replace all tmux functionality -
especially running multiple sessions in a detachable way on a remote
server - but I have never needed those in a long time now.

Detachable sessions I can create instead with `abduco`.
2025-01-04 10:57:48 +01:00
dc067c860d
vifm: Add zoxide integration
If zoxide is found on the system, vifm will automatically add any paths
traversed into the zoxide database.
It will also have a new internal command 'zoxide' with which you can
open a menu to search all zoxide-known paths - it is also added as a
mapping to <space>z.
2025-01-04 10:45:06 +01:00
81bf5b46e5
vifm: Prefer vimiv to other viewers 2025-01-03 22:33:16 +01:00
94b0d93926
wezterm: Add experimental tab naming mapping
This is something I used to use quite a bit in tmux. I have a feeling I
will not be making extensive use of it in wezterm, but can always remove
it if I reach the point of forgetting the mapping later.
2024-08-13 22:55:14 +02:00
2dd5f6e02d
wezterm: Change pane movement mappings
Added mapping `<leader><c-q>` to select a pane which will be moved out
to a new tab.

Slightly changed pane switching on `<leader><s-q>` to keep focus on the
pane instead of switching to the other pane.

Finally, added two simple relative tab movement maps to cycle forward
with `<leader>.` and reverse with `<leader>,`. This replaces the old tab
movement (moving the actual tab around) left and right which are now on
`<leader><s-,>` and `<ledaer><s-.>` respectively.
2024-08-13 22:53:27 +02:00
9deacabbef
vifm: Add batch file modification shortcut
Use `,r` to enter an $EDITOR instance in which you can
rename/delete/modify the files in the current directory. (using vidir
program under the hood)
2024-07-20 16:45:55 +02:00