3 Commits

Author SHA1 Message Date
4feb5b89e8 wip: got inhibit working but fish_greeting fails 2025-10-01 13:38:54 -04:00
29feb9223e fixed git config
i think i am reverting a false fix, idk
2025-09-21 11:55:46 -04:00
7bc7749f51 fixed focusrite module 2025-09-21 11:55:14 -04:00
3 changed files with 121 additions and 81 deletions

View File

@@ -15,7 +15,7 @@
extraConfig = { extraConfig = {
init.defaultBranch = "master"; init.defaultBranch = "master";
push.autoSetupRemote = true; push.autoSetupRemote = true;
pull.merge = true; pull.rebase = false;
merge.tool = "nvimdiff"; merge.tool = "nvimdiff";
mergetool.keepBackup = false; mergetool.keepBackup = false;
}; };

View File

@@ -1,85 +1,125 @@
{pkgs, ...}: { {
programs.fish = { lib,
enable = true; pkgs,
# initExtra = '' userName,
# export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin" ...
# ''; }: {
programs = {
shellAliases = { fish = {
# ls aliases enable = true;
ls = "eza --color"; shellAliases = {
la = "eza -l -all --color"; # ls aliases
ll = "eza -l --color"; ls = "eza --color";
lt = "eza -l --color --git"; la = "eza -l -all --color";
ll = "eza -l --color";
# lazygit alias lt = "eza -l --color --git";
lg = "lazygit"; # lazygit alias
lg = "lazygit";
# cat, less, more alias # cat, less, more alias
cat = "bat"; cat = "bat";
less = "bat"; less = "bat";
more = "bat"; more = "bat";
# top alias
# top alias top = "btm";
top = "btm";
};
functions = {
fish_greeting = {
body = ''
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!" \
"We don't do that here..."
set choose_meme (random)"%"(count $memes)
set choose_meme $memes[(math $choose_meme"+1")]
printf (set_color F90)"%s\n" $choose_meme
'';
onEvent = "fish_greeting";
}; };
functions =
{
fish_greeting = {
body = ''
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!" \
"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"
set choose_meme (random)"%"(count $memes)
set choose_meme $memes[(math $choose_meme"+1")]
printf (set_color F90)"%s\n" $choose_meme
'';
# onEvent = "fish_greeting";
};
} // (lib.mkIf pkgs.stdenv.isLinux {
block = {
body = ''
echo "Starting systemd-inhibit..."
set inhibit_pid_file /tmp/fish_inhibit_pid_(whoami)
bash -c 'systemd-inhibit --no-ask-password --what=idle --who="'${userName}'" --why="manual invocation" sh & echo $! > '"$inhibit_pid_file"' && disown'
if test -f $inhibit_pid_file
set -g INHIBIT_PID (cat $inhibit_pid_file)
echo "Inhibit process started with PID: $INHIBIT_PID"
else
echo "Failed to start inhibit process"
return 1
end
'';
};
unblock = {
body = ''
set inhibit_pid_file /tmp/fish_inhibit_pid_(whoami)
if test -f $inhibit_pid_file
set INHIBIT_PID (cat $inhibit_pid_file)
echo "Killing inhibit process: $INHIBIT_PID"
kill -SIGTERM $INHIBIT_PID 2>/dev/null; or kill -SIGKILL $INHIBIT_PID 2>/dev/null
rm -f $inhibit_pid_file
set -e INHIBIT_PID
echo "Inhibit process terminated"
else
echo "No inhibit process file found"
end
'';
};
});
}; };
}; zsh = {
enable = true;
programs.zsh = { initContent = ''
enable = true; if [[ -z "$BASH_EXECUTION_STRING" ]]; then
initContent = '' if [[ -n "$ZSH_VERSION" ]]; then
if [[ -z "$BASH_EXECUTION_STRING" ]]; then LOGIN_OPTION="--login"
if [[ -n "$ZSH_VERSION" ]]; then else
LOGIN_OPTION="--login" LOGIN_OPTION=""
else fi
LOGIN_OPTION="" exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi fi
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION '';
fi };
''; bash = {
}; enable = true;
initExtra = ''
programs.bash = { if [[ -z "$BASH_EXECUTION_STRING" ]]; then
enable = true; if [[ -n "$ZSH_VERSION" ]]; then
initExtra = '' LOGIN_OPTION="--login"
if [[ -z "$BASH_EXECUTION_STRING" ]]; then else
if [[ -n "$ZSH_VERSION" ]]; then LOGIN_OPTION=""
LOGIN_OPTION="--login" fi
else exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
LOGIN_OPTION=""
fi fi
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION '';
fi };
'';
}; };
} }

View File

@@ -8,7 +8,7 @@
with lib; let with lib; let
cfg = config.sound.hardware.focusrite; cfg = config.sound.hardware.focusrite;
in { in {
options.focusrite = { options.sound.hardware.focusrite = {
enable = mkEnableOption "Focusrite audio interface support"; enable = mkEnableOption "Focusrite audio interface support";
guiSupport = mkOption { guiSupport = mkOption {
type = types.bool; type = types.bool;