diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-06-23 21:56:25 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-06-23 21:56:28 +0900 |
| commit | bc00e1896801b68fb1ceeb7cafd84ef6667c5a35 (patch) | |
| tree | 3bddd217b5e0b503d85a1e6c80545069d1a9e67a /home-manager | |
| parent | de9093bf6a8a3982c6b2f25bc5fa529c9b89f4b2 (diff) | |
| download | dotfiles-bc00e1896801b68fb1ceeb7cafd84ef6667c5a35.tar.gz dotfiles-bc00e1896801b68fb1ceeb7cafd84ef6667c5a35.tar.zst dotfiles-bc00e1896801b68fb1ceeb7cafd84ef6667c5a35.zip | |
fish: fix config.fish
Diffstat (limited to 'home-manager')
| -rw-r--r-- | home-manager/config/fish/config.fish | 16 | ||||
| -rw-r--r-- | home-manager/modules/common.nix | 3 |
2 files changed, 7 insertions, 12 deletions
diff --git a/home-manager/config/fish/config.fish b/home-manager/config/fish/config.fish index 57c27e3..e5b318b 100644 --- a/home-manager/config/fish/config.fish +++ b/home-manager/config/fish/config.fish @@ -1,7 +1,3 @@ -set -l has_nvim (type -q nvim) -set -l has_fd (type -q fd) -set -l on_darwin (test (uname) = "Darwin") - function fish_greeting; end # Abbreviations @@ -29,7 +25,7 @@ alias view 'nvim -R' alias vim 'nvim' alias vimdiff 'nvim -d' -if [ -n $on_darwin ] +if test (uname) = "Darwin" alias tac 'tail -r' end @@ -88,10 +84,6 @@ function pwgen --wraps pwgen end end -if [ -n $has_fd ] - set -gx FZF_DEFAULT_COMMAND "fd --type f --strip-cwd-prefix --hidden --exclude .git" -end - function ee if [ (count $argv) -eq 0 ] set selection (fzf --reverse) @@ -133,9 +125,9 @@ end # Usage: notify <title> <message> function notify - if [ -n $on_darwin ] - osascript -e "display notification \"$2\" with title \"$1\"" + if test (uname) = "Darwin" + osascript -e "display notification \"$argv[2]\" with title \"$argv[1]\"" else - notify-send "$1" "$2" + notify-send "$argv[1]" "$argv[2]" end end diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix index 3cc28b1..e5ef2cb 100644 --- a/home-manager/modules/common.nix +++ b/home-manager/modules/common.nix @@ -119,6 +119,9 @@ in # Bat BAT_THEME = "base16"; + # Fzf + FZF_DEFAULT_COMMAND = "fd --type f --strip-cwd-prefix --hidden --exclude .git"; + # Hgrep HGREP_DEFAULT_OPTS = "--theme=Nord"; }; |
