From 7f72b8f1a05dff57ce0bf3970c160c52b35f88fa Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Tue, 30 Jul 2024 04:12:33 -0700 Subject: [PATCH] feat: switch from zsh to fish --- configuration.nix | 5 ++-- home.nix | 25 ++++++++++++----- prompt.omp.json | 68 ----------------------------------------------- 3 files changed, 22 insertions(+), 76 deletions(-) delete mode 100755 prompt.omp.json diff --git a/configuration.nix b/configuration.nix index 8abf7c8..165c8f1 100755 --- a/configuration.nix +++ b/configuration.nix @@ -219,8 +219,9 @@ nvidiaSettings = true; }; - programs.zsh.enable = true; - users.users.youwen.shell = pkgs.zsh; + programs.zsh.enable = false; + programs.fish.enable = true; + users.users.youwen.shell = pkgs.fish; fonts = { enableDefaultPackages = true; diff --git a/home.nix b/home.nix index 22303b6..62819bf 100755 --- a/home.nix +++ b/home.nix @@ -495,7 +495,8 @@ programs.zoxide = { enable = true; - enableZshIntegration = true; + # enableZshIntegration = true; + enableFishIntegration = true; }; programs.gh = { @@ -505,14 +506,14 @@ programs.oh-my-posh = { enable = true; - enableZshIntegration = true; + # enableZshIntegration = true; + enableFishIntegration = true; enableBashIntegration = true; - settings = with builtins; - fromJSON (unsafeDiscardStringContext (readFile ./prompt.omp.json)); + useTheme = "catppuccin_macchiato"; }; programs.zsh = { - enable = true; + enable = false; enableCompletion = true; autosuggestion.enable = true; syntaxHighlighting.enable = true; @@ -540,7 +541,19 @@ }; }; - programs.bash = { enable = true; }; + programs.fish = { + enable = true; + shellAliases = { + rebuild = "sudo nixos-rebuild switch"; + ls = "eza -l --icons=auto"; + }; + interactiveShellInit = '' + fish_vi_key_bindings + set -g fish_greeting + ''; + }; + + programs.bash.enable = true; programs.librewolf = { enable = true; diff --git a/prompt.omp.json b/prompt.omp.json deleted file mode 100755 index d16ad6d..0000000 --- a/prompt.omp.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", - "palette": { - "os": "#ACB0BE", - "closer": "p:os", - "pink": "#F5BDE6", - "lavender": "#B7BDF8", - "blue": "#8AADF4" - }, - "blocks": [ - { - "alignment": "left", - "segments": [ - { - "foreground": "p:os", - "style": "plain", - "template": "{{.Icon}} ", - "type": "os" - }, - { - "foreground": "p:blue", - "style": "plain", - "template": "{{ .UserName }}@{{ .HostName }} ", - "type": "session" - }, - { - "foreground": "p:pink", - "properties": { - "folder_icon": "..\ue5fe..", - "home_icon": "~", - "style": "agnoster_short" - }, - "style": "plain", - "template": "{{ .Path }} ", - "type": "path" - }, - { - "foreground": "p:lavender", - "properties": { - "branch_icon": "\ue725 ", - "cherry_pick_icon": "\ue29b ", - "commit_icon": "\uf417 ", - "fetch_status": false, - "fetch_upstream_icon": false, - "merge_icon": "\ue727 ", - "no_commits_icon": "\uf0c3 ", - "rebase_icon": "\ue728 ", - "revert_icon": "\uf0e2 ", - "tag_icon": "\uf412 " - }, - "template": "{{ .HEAD }} ", - "style": "plain", - "type": "git" - }, - { - "style": "plain", - "foreground": "p:closer", - "template": "\uf105", - "type": "text" - } - ], - "type": "prompt" - } - ], - "final_space": true, - "version": 2, - "disable_notice": true -}