Skip to content

Commit

Permalink
seth/fish: use hydro for prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
getchoo committed Feb 4, 2025
1 parent c437465 commit 957e95b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 46 deletions.
2 changes: 1 addition & 1 deletion users/seth/programs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
./bash.nix
./chromium.nix
./firefox
./fish
./fish.nix
./gh.nix
./git.nix
./gpg.nix
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
...
}:
let
Expand All @@ -9,6 +10,9 @@ in
{
options.seth.programs.fish = {
enable = lib.mkEnableOption "Fish configuration";
hydro.enable = lib.mkEnableOption "Hydra prompt" // {
default = true;
};
};

config = lib.mkIf cfg.enable (
Expand All @@ -19,7 +23,6 @@ in

functions = {
last_history_item.body = "echo $history[1]";
fish_prompt = lib.readFile ./fish_prompt.fish;
};

shellAbbrs = {
Expand All @@ -32,6 +35,21 @@ in
};
}

(lib.mkIf cfg.hydro.enable {
programs.fish = {
interactiveShellInit = ''
set --global hydro_symbol_prompt ">"
'';

plugins = [
{
name = "hydro";
inherit (pkgs.fishPlugins.hydro) src;
}
];
};
})

# TODO: do i still need this weird sourcing?
(lib.mkIf config.seth.standalone.enable {
programs.fish = {
Expand Down
44 changes: 0 additions & 44 deletions users/seth/programs/fish/fish_prompt.fish

This file was deleted.

0 comments on commit 957e95b

Please sign in to comment.