dotfiles/home/modules/tui/shell/fish/functions.nix

25 lines
865 B
Nix
Raw Normal View History

2024-12-04 04:21:17 +00:00
{ config, ... }: {
programs.fish.functions = {
# cht.sh integration
cht = "curl cheat.sh/$argv";
# Disable greeting
fish_greeting = "";
2024-12-20 01:30:06 +00:00
get-local-ip =
"ip addr show $(ip route | grep default | awk '{print $5}') | grep 'inet ' | awk '{print $2}' | cut -d/ -f1";
2024-12-04 04:21:17 +00:00
ssh = "TERM=xterm command ssh $argv";
# Rebuild home-manager
2024-12-20 01:30:06 +00:00
switch-home =
"home-manager switch -b backup --flake ${config.home.homeDirectory}/.dotfiles#$USER@$(hostname -s)";
switch-nix =
"sudo nixos-rebuild switch --flake ${config.home.homeDirectory}/.dotfiles";
upgrade-nix =
"nix-channel --update; nix-env --install --attr nixpkgs.nix nixpkgs.cacert";
2024-12-04 04:21:17 +00:00
# Trees
2024-12-20 01:30:06 +00:00
tt = ''
cbonsai -S -t 0.25 -c "&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,&,🌸,🌺,💮"'';
2024-12-04 04:21:17 +00:00
};
2024-12-05 21:35:21 +00:00
}