diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-04-04 13:14:01 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2025-04-04 13:14:01 +0200 |
commit | 64c2c096df97ec7a0dcd601cf92d19af74bbcc43 (patch) | |
tree | 7f5c979cb6a9f11d23c33cb51a8853e81a2e8368 | |
parent | fix(hosts/apzu): Avoid making mouse clicks impossible in river (diff) | |
download | nixos-config-64c2c096df97ec7a0dcd601cf92d19af74bbcc43.zip |
fix(modules/lf/commands/open): Explicitly use `handlr-regex` instead of `xdg-open`
-rw-r--r-- | modules/by-name/lf/lf/commands/default.nix | 5 | ||||
-rwxr-xr-x | modules/by-name/lf/lf/commands/scripts/open.sh | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/modules/by-name/lf/lf/commands/default.nix b/modules/by-name/lf/lf/commands/default.nix index 90b333c6..0c42607b 100644 --- a/modules/by-name/lf/lf/commands/default.nix +++ b/modules/by-name/lf/lf/commands/default.nix @@ -124,6 +124,11 @@ in { dependencies = [pkgs.gnused]; }; + open = async { + name = "open"; + dependencies = [pkgs.handlr-regex]; + }; + trash = pipe { name = "trash"; dependencies = [pkgs.trash-cli]; diff --git a/modules/by-name/lf/lf/commands/scripts/open.sh b/modules/by-name/lf/lf/commands/scripts/open.sh new file mode 100755 index 00000000..b494074f --- /dev/null +++ b/modules/by-name/lf/lf/commands/scripts/open.sh @@ -0,0 +1,15 @@ +# shellcheck shell=sh + +# shellcheck disable=SC2269 +f="$f" +# shellcheck disable=SC2269 +fx="$fx" +# shellcheck disable=SC2269 +fs="$fs" +# shellcheck disable=SC2269 +id="$id" + +# TODO: For some reason, `xdg-utils` tries to open firefox with it's default profile for +# _everything_. Using `handlr-regex` sort-of solves this. <2025-04-04> +handlr open "$f" +# vim: ft=sh |