From c202666c0d5334bb989e10d88363f01b3419acf0 Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Thu, 2 May 2024 14:45:19 +0200 Subject: [PATCH] shell ++ git extra commands --- home-modules/shell/fish.nix | 16 +++++++++++----- home-modules/shell/starship.nix | 2 +- home.nix | 1 - 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/home-modules/shell/fish.nix b/home-modules/shell/fish.nix index a52431b..7f26a23 100644 --- a/home-modules/shell/fish.nix +++ b/home-modules/shell/fish.nix @@ -1,10 +1,11 @@ { config, pkgs, lib, system, user, allowed, secrets, ... }: { - home.packages = [ - pkgs.fish + home.packages = with pkgs; [ + fish + any-nix-shell - (pkgs.writeShellScriptBin "nxfetch" '' + (writeShellScriptBin "nxfetch" '' logo=$(echo -e " ⠀⠀⠀⠀⠰⣿⣧⠀⠀⠹⣿⣧⠀⣴⣿⠆⠀⠀⠀⠀ OS @@ -65,6 +66,8 @@ glg = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' --all"; gll = "git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'"; gmt = "git_monitor"; + gsw = "git switch"; + gft = "git fetch"; ns = "nix-shell"; code = "codium"; @@ -73,8 +76,11 @@ }; interactiveShellInit = '' set -g fish_greeting - nxfetch + if not set -q IN_NIX_SHELL + nxfetch + end ${pkgs.starship}/bin/starship init fish | source + # ${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source ''; }; -} \ No newline at end of file +} diff --git a/home-modules/shell/starship.nix b/home-modules/shell/starship.nix index f9fc9f4..ad7b53e 100644 --- a/home-modules/shell/starship.nix +++ b/home-modules/shell/starship.nix @@ -119,7 +119,7 @@ memory_usage.format = "[\\[$symbol[$ram( | $swap)\\]]($style)"; meson.format = "[\\[$symbol$project\\]]($style)"; nim.format = "[\\[$symbol($version)\\]]($style)"; - nix_shell.format = "[\\[$symbol$state( \\($name\\))\\]]($style)"; + nix_shell.format = "[\\[󱄅 $state \\($name\\)\\]]($style)"; nodejs.format = "[\\[$symbol($version)\\]]($style)"; ocaml.format = "[\\[$symbol($version)(\\($switch_indicator$switch_name\\))\\]]($style)"; openstack.format = "[\\[$symbol$cloud(\\($project\\))\\]]($style)"; diff --git a/home.nix b/home.nix index f541bcf..b24cdbb 100644 --- a/home.nix +++ b/home.nix @@ -72,7 +72,6 @@ element sssnake pipes dig - nodejs gnumake cmake