Fish: add abbreviations & aliases

This commit is contained in:
GHOSCHT 2024-01-07 15:37:01 +01:00
parent 8c2ed133c3
commit 6894adf02e
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82

View file

@ -12,6 +12,7 @@
hasLazydocker = hasPackage "lazydocker"; hasLazydocker = hasPackage "lazydocker";
hasNixYourShell = hasPackage "nix-your-shell"; hasNixYourShell = hasPackage "nix-your-shell";
hasShellColor = config.programs.shellcolor.enable; hasShellColor = config.programs.shellcolor.enable;
hasWezterm = config.programs.wezterm.enable;
shellcolor = "${pkgs.shellcolord}/bin/shellcolor"; shellcolor = "${pkgs.shellcolord}/bin/shellcolor";
in { in {
programs.fish = { programs.fish = {
@ -61,6 +62,13 @@ in {
slp = "systemctl suspend"; slp = "systemctl suspend";
sdn = "shutdown 0"; sdn = "shutdown 0";
nrs = "nh os switch ~/.setup"; 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 { shellAbbrs = rec {
jqless = "jq -C | less -r"; jqless = "jq -C | less -r";
@ -73,8 +81,13 @@ in {
nbn = "nix build nixpkgs#"; nbn = "nix build nixpkgs#";
nf = "nix flake"; nf = "nix flake";
ls = mkIf hasExa "eza"; glk = "gpg --list-keys --with-keygrip";
exa = mkIf hasExa "eza"; 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 = { functions = {
# Disable greeting # Disable greeting