macos fish setup

main
Zynh Ludwig 2024-07-21 12:26:22 -07:00
parent ac2c989dbb
commit 4dad83e4ae
3 changed files with 20 additions and 5 deletions

View File

@ -6,7 +6,7 @@ in
{ {
options.snowhawk.alacritty = { options.snowhawk.alacritty = {
enable = lib.mkEnableOption "alacritty home-manager module"; enable = lib.mkEnableOption "alacritty home-manager module";
macOs = lib.mkEnableOption "macos specific tweaks"; macos = lib.mkEnableOption "macos specific tweaks";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -15,8 +15,8 @@ in
settings = { settings = {
window = { window = {
opacity = 0.98; opacity = 0.98;
decorations = lib.mkIf cfg.macOs "buttonless"; decorations = lib.mkIf cfg.macos "buttonless";
option_as_alt = lib.mkIf cfg.macOs "Both"; option_as_alt = lib.mkIf cfg.macos "Both";
}; };
colors = { colors = {
primary.background = "#050505"; primary.background = "#050505";

View File

@ -6,10 +6,12 @@ in
{ {
options.snowhawk.fish = { options.snowhawk.fish = {
enable = lib.mkEnableOption "fish"; enable = lib.mkEnableOption "fish";
macos = lib.mkEnableOption "macos specific tweaks";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.bash = { programs.bash = lib.mkIf (!cfg.macos) {
enable = true; enable = true;
initExtra = '' initExtra = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
@ -20,6 +22,18 @@ in
''; '';
}; };
programs.zsh = lib.mkIf cfg.macos {
enable = true;
initExtra = ''
if [[ $(${pkgs.procps}/bin/ps $(${pkgs.procps}/bin/ps -p $$ -co "ppid=") -co "comm=") != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
# shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
# exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
exec ${pkgs.fish}/bin/fish
fi
'';
};
programs.fish = { programs.fish = {
enable = true; enable = true;
shellAbbrs = { shellAbbrs = {

View File

@ -15,8 +15,9 @@
}; };
snowhawk.alacritty = { snowhawk.alacritty = {
enable = true; enable = true;
macOs = true; macos = true;
}; };
snowhawk.fish.macos = true;
programs.alacritty.settings = { programs.alacritty.settings = {
font.size = lib.mkForce 16.0; font.size = lib.mkForce 16.0;