2025-10-02 18:44:58 -04:00
|
|
|
|
{pkgs, lib, ...}: {
|
2024-07-30 00:09:42 -04:00
|
|
|
|
programs.fish = {
|
|
|
|
|
|
enable = true;
|
2025-12-19 15:37:16 -05:00
|
|
|
|
shellInit = ''
|
|
|
|
|
|
if test -d $HOME/.krew/bin
|
|
|
|
|
|
set -gx PATH $HOME/.krew/bin $PATH
|
|
|
|
|
|
end
|
|
|
|
|
|
'';
|
2024-07-30 00:09:42 -04:00
|
|
|
|
|
|
|
|
|
|
shellAliases = {
|
|
|
|
|
|
# ls aliases
|
2024-09-03 22:24:20 -04:00
|
|
|
|
ls = "eza --color";
|
|
|
|
|
|
la = "eza -l -all --color";
|
|
|
|
|
|
ll = "eza -l --color";
|
|
|
|
|
|
lt = "eza -l --color --git";
|
2024-07-30 00:09:42 -04:00
|
|
|
|
|
|
|
|
|
|
# lazygit alias
|
|
|
|
|
|
lg = "lazygit";
|
|
|
|
|
|
|
|
|
|
|
|
# cat, less, more alias
|
2024-09-03 22:24:20 -04:00
|
|
|
|
cat = "bat";
|
|
|
|
|
|
less = "bat";
|
|
|
|
|
|
more = "bat";
|
2024-08-15 22:38:53 -04:00
|
|
|
|
|
|
|
|
|
|
# top alias
|
|
|
|
|
|
top = "btm";
|
2024-07-30 00:09:42 -04:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
functions = {
|
|
|
|
|
|
fish_greeting = {
|
|
|
|
|
|
body = ''
|
2024-09-03 22:24:20 -04:00
|
|
|
|
set memes \
|
|
|
|
|
|
"Crazy? I was crazy once. They locked me in a room. A rubber room. A rubber room with rats. And rats make me crazy." \
|
|
|
|
|
|
"Daddy, chill!" \
|
|
|
|
|
|
"What the hell is even that?!" \
|
|
|
|
|
|
"Road work ahead? Yeah, I sure hope it does!" \
|
|
|
|
|
|
"Look at all those chickens!" \
|
|
|
|
|
|
"I smell like beef" \
|
|
|
|
|
|
"Say, Coloardo - I'M A GIRAFFE" \
|
|
|
|
|
|
"I didn't get no sleep cause of y'all, y'all not gone get any sleep cause of me!" \
|
|
|
|
|
|
"This is the dollar store, how good can it be?" \
|
|
|
|
|
|
"That was legitness" \
|
|
|
|
|
|
"Deez nuts" \
|
|
|
|
|
|
"I wanna be a cowboy baby" \
|
|
|
|
|
|
"Can I get a waffle? Can I please get a waffle?" \
|
|
|
|
|
|
"I'm lesbian. I thought you were American." \
|
|
|
|
|
|
"You gotta give 'em that 'hawk tuah' and spit on that thang!" \
|
2025-10-21 13:04:18 -04:00
|
|
|
|
"We don't do that here..." \
|
|
|
|
|
|
"What are those?! They are my crocs..." \
|
|
|
|
|
|
"It's an avocado... Thanks!" \
|
|
|
|
|
|
"I am once again asking for your financial support" \
|
|
|
|
|
|
"Is that a weed?" \
|
|
|
|
|
|
"No, this is Patrick!" \
|
|
|
|
|
|
"Come ride, heroes, ride" \
|
|
|
|
|
|
"Away with the tide" \
|
|
|
|
|
|
"Concede your mind unto the fiend" \
|
|
|
|
|
|
"Darkness come, rend the shield of light" \
|
|
|
|
|
|
"The sun is setting, darkness taking over - a date with chaos and you're dressed to the nines" \
|
|
|
|
|
|
"Now kneel overdweller, your lord commands, there's no salvation for the sons of man" \
|
|
|
|
|
|
"Snap click clank whirr whizz wham boom!" \
|
|
|
|
|
|
"Rohs an kyn ala na" \
|
|
|
|
|
|
"If you’ve brought your ivory standard, I’ll be happy to tell you where you can stick it" \
|
|
|
|
|
|
"Speeches? Oh, yes, I love them. There's nothing like a good exposition when you're having trouble sleeping!" \
|
|
|
|
|
|
"Somehow, the boy just isn't very buoyant" \
|
2026-03-18 11:42:59 -04:00
|
|
|
|
"I am...not interested, little sun. Try again when you have become a man" \
|
|
|
|
|
|
"I am rightousness! And rightousness shall previal!" \
|
2026-03-23 21:15:36 -04:00
|
|
|
|
"Ahhh such bliss!" \
|
|
|
|
|
|
"The gods themselves will be my meal. Your dear companions my dessert. Upon this world I'll feast, and death shall follow in my wake. All your hate, all your rage, you will render unto me." \
|
|
|
|
|
|
"Boring, boring, boring" \
|
|
|
|
|
|
"Would you be 'happier' had I a 'good reason'?" \
|
|
|
|
|
|
"A test of your reflexes!"
|
2025-10-21 13:04:18 -04:00
|
|
|
|
|
2024-07-30 00:09:42 -04:00
|
|
|
|
|
2024-09-03 22:24:20 -04:00
|
|
|
|
set choose_meme (random)"%"(count $memes)
|
|
|
|
|
|
set choose_meme $memes[(math $choose_meme"+1")]
|
2024-07-30 00:09:42 -04:00
|
|
|
|
|
2024-09-03 22:24:20 -04:00
|
|
|
|
printf (set_color F90)"%s\n" $choose_meme
|
2024-07-30 00:09:42 -04:00
|
|
|
|
'';
|
|
|
|
|
|
onEvent = "fish_greeting";
|
|
|
|
|
|
};
|
2025-10-02 18:44:58 -04:00
|
|
|
|
} // lib.optionalAttrs pkgs.stdenv.isLinux {
|
|
|
|
|
|
block = {
|
|
|
|
|
|
body = ''
|
|
|
|
|
|
systemd-inhibit --what=sleep --who="$USER" --why="manual invocation" --mode=block sleep infinity &
|
|
|
|
|
|
set -g INHIBIT_PID $last_pid
|
|
|
|
|
|
echo "Sleep inhibited. PID: $INHIBIT_PID"
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
unblock = {
|
|
|
|
|
|
body = ''
|
|
|
|
|
|
if set -q INHIBIT_PID
|
|
|
|
|
|
kill $INHIBIT_PID 2>/dev/null
|
|
|
|
|
|
and echo "Sleep inhibitor removed. PID: $INHIBIT_PID"
|
|
|
|
|
|
or echo "Failed to kill process or already terminated."
|
|
|
|
|
|
set -e INHIBIT_PID
|
|
|
|
|
|
else
|
|
|
|
|
|
echo "No active sleep inhibitor found."
|
|
|
|
|
|
end
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
2024-07-30 00:09:42 -04:00
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
programs.zsh = {
|
|
|
|
|
|
enable = true;
|
2025-05-24 14:08:12 -04:00
|
|
|
|
initContent = ''
|
2024-07-30 00:09:42 -04:00
|
|
|
|
if [[ -z "$BASH_EXECUTION_STRING" ]]; then
|
|
|
|
|
|
if [[ -n "$ZSH_VERSION" ]]; then
|
|
|
|
|
|
LOGIN_OPTION="--login"
|
|
|
|
|
|
else
|
|
|
|
|
|
LOGIN_OPTION=""
|
|
|
|
|
|
fi
|
|
|
|
|
|
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
|
|
|
|
|
fi
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
2024-09-09 09:27:52 -04:00
|
|
|
|
|
|
|
|
|
|
programs.bash = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
initExtra = ''
|
|
|
|
|
|
if [[ -z "$BASH_EXECUTION_STRING" ]]; then
|
|
|
|
|
|
if [[ -n "$ZSH_VERSION" ]]; then
|
|
|
|
|
|
LOGIN_OPTION="--login"
|
|
|
|
|
|
else
|
|
|
|
|
|
LOGIN_OPTION=""
|
|
|
|
|
|
fi
|
|
|
|
|
|
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
|
|
|
|
|
fi
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
2024-07-30 00:09:42 -04:00
|
|
|
|
}
|