summaryrefslogtreecommitdiff
path: root/modules/mac/programs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-01-05 00:44:27 -0800
committerFuwn <[email protected]>2025-01-05 00:44:27 -0800
commit797a3c56b23ad2c6f993615e51d09ac8791b8858 (patch)
tree9ac04cdd5149e4fc036b6b8dd6aaa8d9637b5bc2 /modules/mac/programs
parentjust: default target to hostname (diff)
downloadnixos-config-797a3c56b23ad2c6f993615e51d09ac8791b8858.tar.xz
nixos-config-797a3c56b23ad2c6f993615e51d09ac8791b8858.zip
nara: drop fish, configure zsh
Diffstat (limited to 'modules/mac/programs')
-rw-r--r--modules/mac/programs/default.nix1
-rw-r--r--modules/mac/programs/fish.nix85
-rw-r--r--modules/mac/programs/homebrew/brews.nix2
3 files changed, 2 insertions, 86 deletions
diff --git a/modules/mac/programs/default.nix b/modules/mac/programs/default.nix
index eee7817..ebc321b 100644
--- a/modules/mac/programs/default.nix
+++ b/modules/mac/programs/default.nix
@@ -1,7 +1,6 @@
{
imports = [
./homebrew
- ./fish.nix
./gnupg.nix
./vim.nix
];
diff --git a/modules/mac/programs/fish.nix b/modules/mac/programs/fish.nix
deleted file mode 100644
index 50bc837..0000000
--- a/modules/mac/programs/fish.nix
+++ /dev/null
@@ -1,85 +0,0 @@
-{
- programs.fish = {
- enable = true;
- shellInit = "set -g fish_greeting";
-
- # https://github.com/arbourd/prompt
- promptInit = ''
- function fish_prompt -d "Prints left prompt"
- set -l last_status $status
- set -l glyph "\$"
- set -l glyph_color (set_color normal)
- set -l pwd (prompt_pwd)
- set -l pwd_color (set_color blue)
-
- if test (id -u "$USER") -eq 0
- set glyph "#"
- end
-
- if test "$last_status" -ne 0
- set pwd_color (set_color red)
- end
-
- if command git rev-parse --git-dir > /dev/null 2>/dev/null
- if ! command git diff --cached --no-ext-diff --quiet --exit-code 2>/dev/null
- set glyph_color (set_color green)
- else if command git rev-parse --verify --quiet refs/stash > /dev/null 2>/dev/null
- set glyph_color (set_color yellow)
- end
- end
-
- printf "$pwd_color$pwd $glyph_color$glyph "
- end
-
- function fish_right_prompt -d "Prints right prompt"
- function __git_branch_name
- command git symbolic-ref --short HEAD 2>/dev/null \
- || command git describe --tags --exact-match HEAD 2>/dev/null \
- || command git rev-parse --short HEAD 2>/dev/null
- end
-
- function __git_changed
- ! command git diff-index --quiet HEAD 2>/dev/null \
- || count (command git ls-files --others --exclude-standard) >/dev/null
- end
-
- function __git_modified_files
- count (command git status --porcelain --ignore-submodules 2>/dev/null)
- end
-
- function __git_symbol
- command git rev-list --count --left-right @{upstream}...@ 2>/dev/null | read behind ahead
-
- switch "$behind $ahead"
- case " " "0 0"
- case "0 *"
- printf " ↑"
- case "* 0"
- printf " ↓"
- case "*"
- printf " ⥄"
- end
- end
-
- if set branch_name (__git_branch_name)
- set -l git_symbol (__git_symbol)
- set -l git_color
- set -l git_modified_files (__git_modified_files)
- set -l git_changed_files
-
- if __git_changed
- set git_color (set_color red)
- else
- set git_color (set_color cyan)
- end
-
- if test "$git_modified_files" -gt 0
- set git_changed_files (set_color yellow)"$git_modified_files changed "
- end
-
- printf "$git_changed_files$git_color$branch_name$git_symbol"
- end
- end
- '';
- };
-}
diff --git a/modules/mac/programs/homebrew/brews.nix b/modules/mac/programs/homebrew/brews.nix
index af21713..a7747bf 100644
--- a/modules/mac/programs/homebrew/brews.nix
+++ b/modules/mac/programs/homebrew/brews.nix
@@ -7,5 +7,7 @@
"appwrite"
"graphaello"
"mas"
+ "zsh-autosuggestions"
+ "zsh-vi-mode"
];
}