macos fish setup

This commit is contained in:
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 = {
enable = lib.mkEnableOption "alacritty home-manager module";
macOs = lib.mkEnableOption "macos specific tweaks";
macos = lib.mkEnableOption "macos specific tweaks";
};
config = lib.mkIf cfg.enable {
@ -15,8 +15,8 @@ in
settings = {
window = {
opacity = 0.98;
decorations = lib.mkIf cfg.macOs "buttonless";
option_as_alt = lib.mkIf cfg.macOs "Both";
decorations = lib.mkIf cfg.macos "buttonless";
option_as_alt = lib.mkIf cfg.macos "Both";
};
colors = {
primary.background = "#050505";

View file

@ -6,10 +6,12 @@ in
{
options.snowhawk.fish = {
enable = lib.mkEnableOption "fish";
macos = lib.mkEnableOption "macos specific tweaks";
};
config = lib.mkIf cfg.enable {
programs.bash = {
programs.bash = lib.mkIf (!cfg.macos) {
enable = true;
initExtra = ''
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 = {
enable = true;
shellAbbrs = {

View file

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