From 6894adf02e6b3ce3156bc687f0d829bce0ab137c Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Sun, 7 Jan 2024 15:37:01 +0100 Subject: [PATCH] Fish: add abbreviations & aliases --- home/features/cli/fish.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/home/features/cli/fish.nix b/home/features/cli/fish.nix index fea4f23..a615248 100644 --- a/home/features/cli/fish.nix +++ b/home/features/cli/fish.nix @@ -12,6 +12,7 @@ hasLazydocker = hasPackage "lazydocker"; hasNixYourShell = hasPackage "nix-your-shell"; hasShellColor = config.programs.shellcolor.enable; + hasWezterm = config.programs.wezterm.enable; shellcolor = "${pkgs.shellcolord}/bin/shellcolor"; in { programs.fish = { @@ -61,6 +62,13 @@ in { slp = "systemctl suspend"; sdn = "shutdown 0"; nrs = "nh os switch ~/.setup"; + + ls = mkIf hasExa "eza"; + ll = mkIf hasExa "eza -l"; + la = mkIf hasExa "eza -la"; + exa = mkIf hasExa "eza"; + + imgcat = mkIf hasWezterm "wezterm imgcat"; }; shellAbbrs = rec { jqless = "jq -C | less -r"; @@ -73,8 +81,13 @@ in { nbn = "nix build nixpkgs#"; nf = "nix flake"; - ls = mkIf hasExa "eza"; - exa = mkIf hasExa "eza"; + glk = "gpg --list-keys --with-keygrip"; + gssh = "gpg --export-ssh-key"; + gnk = "gpg --full-generate-key --expert"; + gek = "gpg --edit-key --expert"; + + udmount = "udisksctl mount -b"; + udumount = "udisksctl unmount -b"; }; functions = { # Disable greeting