Skip to content

Commit

Permalink
treewide: replace xdg-open with open for darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerschtli committed Jan 15, 2024
1 parent 14e13d9 commit da805ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions home/programs/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,6 @@ let

rg = "rg --ignore-case --sort=path";

open = "xdg-open";

pwgen = "pwgen -cns";
pgen = "pwgen 30 1";

Expand All @@ -137,6 +135,9 @@ let
treea = "tree -a";
treei = "treea -I '.git|.idea'";
}
// (optionalAttrs (!config.custom.base.general.darwin) {
open = "xdg-open";
})
// cfg.shellAliases
// (optionalAttrs (dynamicShellInit != "") {
refresh-shell = "source ${pkgs.writeText "refresh-shell" dynamicShellInit}";
Expand Down
12 changes: 8 additions & 4 deletions home/programs/tmux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,14 @@ in
[
{
plugin = fingers;
extraConfig = ''
set -g @fingers-compact-hints 0
set -g @fingers-ctrl-action '${pkgs.findutils}/bin/xargs ${pkgs.xdg-utils}/bin/xdg-open > /dev/null 2>&1'
'';
extraConfig =
let
open = if config.custom.base.general.darwin then "open" else "${pkgs.xdg-utils}/bin/xdg-open";
in
''
set -g @fingers-compact-hints 0
set -g @fingers-ctrl-action '${pkgs.findutils}/bin/xargs ${open} > /dev/null 2>&1'
'';
}
] ++ optionals cfg.urlview [ urlview ]
);
Expand Down

0 comments on commit da805ef

Please sign in to comment.