From 24120f55b23b21f803f09a68cfae10159e7b30f5 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 23 Aug 2025 12:38:45 +0200 Subject: [PATCH 01/11] sh: Use relative alias for cat command Fixes https://github.com/carapace-sh/carapace-bin/issues/2971 until the merge is in the new release version. --- sh/.config/sh/alias.d/batcat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/.config/sh/alias.d/batcat.sh b/sh/.config/sh/alias.d/batcat.sh index 36403e7..040e48f 100644 --- a/sh/.config/sh/alias.d/batcat.sh +++ b/sh/.config/sh/alias.d/batcat.sh @@ -13,8 +13,8 @@ alias rcat="$(which cat)" if command -v batcat >/dev/null 2>&1; then # For Ubuntu and Debian-based `bat` packages # the `bat` program is named `batcat` on these systems - alias cat="$(which batcat)" + alias cat="batcat" elif command -v bat >/dev/null 2>&1; then # For all other systems - alias cat="$(which bat)" + alias cat="bat" fi From 0ce2c1b7daba1b451c956b760ea49ce8f0e03d31 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 13 Oct 2025 17:52:48 +0200 Subject: [PATCH 02/11] jj: Add raw log command alias Added `jlr` which, contrary to all the other jj log commands simply gives quicker access to the actual raw `log` command for custom operations. --- vcs/jj/config/sh/alias.d/jj.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/vcs/jj/config/sh/alias.d/jj.sh b/vcs/jj/config/sh/alias.d/jj.sh index a8033fe..d36e44b 100644 --- a/vcs/jj/config/sh/alias.d/jj.sh +++ b/vcs/jj/config/sh/alias.d/jj.sh @@ -55,6 +55,7 @@ alias jlo="jj log --summary -T builtin_log_compact_full_description -r 'recent() alias JLO="jj log --summary -T builtin_log_compact_full_description -r 'all()'" alias jloo="jj log --patch -r 'recent()'" alias JLOO="jj log --patch -r 'all()'" +alias jlr="jj log" # 'raw' log mode for custom opts alias jol="jj op log" jlf() { jj log -r "description(substring-i:\"$*\")" From 9548bb344158aed5fcb9c52f9b8856e1067e2ffb Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 18 Oct 2025 12:58:43 +0200 Subject: [PATCH 03/11] aerc: Change mail folder with menu --- office/.config/aerc/binds.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/office/.config/aerc/binds.conf b/office/.config/aerc/binds.conf index 9db98df..34aac71 100644 --- a/office/.config/aerc/binds.conf +++ b/office/.config/aerc/binds.conf @@ -107,7 +107,7 @@ rq = :reply -aq rR = :reply rQ = :reply -q -c = :cf +c = :menu -d :cf ! = :term | = :pipe From 72f0651bd96fd2e33e7525913e7623c9d24dd3ba Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 18 Oct 2025 12:58:43 +0200 Subject: [PATCH 04/11] services: Refactor goimapnotify default variables --- services/sv/goimapnotify/run | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/services/sv/goimapnotify/run b/services/sv/goimapnotify/run index e4f4c4a..1ace545 100755 --- a/services/sv/goimapnotify/run +++ b/services/sv/goimapnotify/run @@ -3,8 +3,8 @@ # CONFIG_FILE = full path to goimapnotify config file to be used # PROFILE = name of yaml file in goimapnotify config dir (without extension) # THROTTLE_RATE = amount of time to wait before retrying if connection fails -DEFAULT_PROFILE="goimapnotify" -DEFAULT_THROTTLE_RATE=10 +PROFILE="goimapnotify" +THROTTLE_RATE=10 set -e @@ -15,17 +15,16 @@ if [ "$CONFIG_FILE" != "" ]; then config_path="$CONFIG_FILE" else config_dir="${XDG_CONFIG_HOME:-$HOME/.config}" - config_path="${config_dir}/goimapnotify/${PROFILE:-$DEFAULT_PROFILE}.yaml" + config_path="${config_dir}/goimapnotify/${PROFILE}.yaml" fi # Throttle before running watcher -snooze -H /1 -M /1 -S /1 -t timefile -T "${THROTTLE_RATE:-$DEFAULT_THROTTLE_RATE}" || exit 1 +snooze -H /1 -M /1 -S /1 -t timefile -T "${THROTTLE_RATE}" || exit 1 touch timefile if [ ! -f "$config_path" ]; then - echo "Config path not found: $config_path" + echo "goimapnotify config path not found: $config_path" exit 1 fi -echo "starting program" exec chpst -e "$TURNSTILE_ENV_DIR" goimapnotify -conf "$config_path" 2>&1 From 4e3edc7832f8474c52c179a8173f28dc9581129d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 18 Oct 2025 12:58:43 +0200 Subject: [PATCH 05/11] nvim: Remove manual nushell tresitter installation It is no longer necessary to manually install the nushell tresitter as a lazy plugin spec, according to: https://github.com/nushell/tree-sitter-nu/blob/main/installation/neovim.md Instead we just enable the treesitter 'nu' language in the `languages.lua` file as usual and it works out of the box. --- nvim/.config/nvim/lua/modules/treesitter.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/nvim/.config/nvim/lua/modules/treesitter.lua b/nvim/.config/nvim/lua/modules/treesitter.lua index de2cb9e..02c9921 100644 --- a/nvim/.config/nvim/lua/modules/treesitter.lua +++ b/nvim/.config/nvim/lua/modules/treesitter.lua @@ -20,7 +20,6 @@ return { require("rainbow-delimiters.setup").setup({}) end, }, - { "nushell/tree-sitter-nu", version = false }, }, config = function() local enabled_parsers = {} From 56916f90d1f4e3b17479e98a3b8d81a7575e2d36 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 18 Oct 2025 12:58:43 +0200 Subject: [PATCH 06/11] nu: Add dot-repeat key mapping We have to manually enable the keybinding for nushell, which emulates the 'insert last token of last command' functionality of e.g. zsh. --- terminal/.config/nushell/config.nu | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/terminal/.config/nushell/config.nu b/terminal/.config/nushell/config.nu index ebfefae..48a5fbb 100644 --- a/terminal/.config/nushell/config.nu +++ b/terminal/.config/nushell/config.nu @@ -51,6 +51,16 @@ $env.config.keybindings = [ {send: Enter} ] } + { + name: insert_last_token + modifier: alt + keycode: char_. + mode: ["emacs", "vi_normal", "vi_insert"] + event: [ + { edit: InsertString, value: "!$" } + { send: Enter } + ] + } { name: open_editor modifier: control From c1eb686cd32ccf78f3d0500ca1c2c9686e3b96ed Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 18 Oct 2025 12:58:43 +0200 Subject: [PATCH 07/11] nu: Add sudo toggling key Toggle sudo prefix for command line with . 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 --- terminal/.config/nushell/config.nu | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/terminal/.config/nushell/config.nu b/terminal/.config/nushell/config.nu index 48a5fbb..2a97801 100644 --- a/terminal/.config/nushell/config.nu +++ b/terminal/.config/nushell/config.nu @@ -70,6 +70,16 @@ $env.config.keybindings = [ send: OpenEditor } } + { + name: toggle_sudo + modifier: alt + keycode: char_s + mode: [emacs vi_insert vi_normal] + event: { + send: executehostcommand + cmd: "let cmd = (commandline); commandline edit (if $cmd starts-with sudo { $cmd | str replace -r '^sudo ' '' } else { 'sudo ' ++ $cmd });" + } + } { name: run_zoxide modifier: alt From 7f2520ece5b0534da1241292bf72655e5d94d26f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 18 Oct 2025 12:58:43 +0200 Subject: [PATCH 08/11] 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). --- terminal/.config/starship.toml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/terminal/.config/starship.toml b/terminal/.config/starship.toml index e8031d0..4ffc47f 100644 --- a/terminal/.config/starship.toml +++ b/terminal/.config/starship.toml @@ -82,8 +82,12 @@ style = 'bold yellow' format = "[$symbol]($style)" [custom.shell_bash_indicator] -command = 'echo 󱆃' -when = ''' test "$0" = "/usr/bin/bash" ''' +command = 'echo ' +when = ' test "$STARSHIP_SHELL" = "bash" ' + +[custom.shell_nushell_indicator] +command = 'echo ' +when = ' test $env.STARSHIP_SHELL "==" "nu" ' # TODO: Would be lovely to have jujutsu support here # An example implementation: https://github.com/jj-vcs/jj/wiki/Starship From 51fd5b51c771b5ceef5ea13579be8b2abd5b2da8 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 18 Oct 2025 12:58:43 +0200 Subject: [PATCH 09/11] 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. --- terminal/.config/nushell/config.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terminal/.config/nushell/config.nu b/terminal/.config/nushell/config.nu index 2a97801..def3a4a 100644 --- a/terminal/.config/nushell/config.nu +++ b/terminal/.config/nushell/config.nu @@ -9,7 +9,7 @@ # # This file is loaded after env.nu and before login.nu # -$env.config.show_banner = true # TODO: FOR TESTING PURPOSES +$env.config.show_banner = false # TODO: FOR TESTING PURPOSES $env.config.edit_mode = "vi" $env.config.buffer_editor = "nvim" From f514ebe0084ad37888063116049c15c8e81ba7b5 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 18 Oct 2025 12:58:43 +0200 Subject: [PATCH 10/11] 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). --- terminal/.config/starship.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/terminal/.config/starship.toml b/terminal/.config/starship.toml index 4ffc47f..de7e41d 100644 --- a/terminal/.config/starship.toml +++ b/terminal/.config/starship.toml @@ -21,6 +21,8 @@ $go\ $lua\ $nodejs\ $python\ +$terraform\ +$typst\ $package """ @@ -81,6 +83,13 @@ symbol = " 󱍔 " style = 'bold yellow' format = "[$symbol]($style)" +[terraform] +disabled = false + +[typst] +disabled = false +symbol = '󰛓 ' + [custom.shell_bash_indicator] command = 'echo ' when = ' test "$STARSHIP_SHELL" = "bash" ' From b6e3af4593ca71681dc016015e79c44039d7dc21 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 18 Oct 2025 12:58:43 +0200 Subject: [PATCH 11/11] taskwarrior: Split today alias into scheduled and due `td` will display things that are either due today or in the past, or scheduled today or in the past. `TD` will _only_ display things that are explicitly due today or in the past. --- office/.config/sh/alias.d/taskwarrior.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/office/.config/sh/alias.d/taskwarrior.sh b/office/.config/sh/alias.d/taskwarrior.sh index 9546974..3be2877 100644 --- a/office/.config/sh/alias.d/taskwarrior.sh +++ b/office/.config/sh/alias.d/taskwarrior.sh @@ -23,7 +23,8 @@ alias tal="task log" alias tan="task annotate" alias tn="task next +READY" -alias td="task +TODAY or +OVERDUE" +alias td="task +TODAY or +OVERDUE or sched.before:tom" # scheduled and due for today or before +alias TD="task +TODAY or +OVERDUE" # DUE today or before alias tun="task next urgency \> 4" if exist timew; then