Skip to content

Commit

Permalink
Merge pull request #23 from datsfilipe/ghostty
Browse files Browse the repository at this point in the history
feat: ghostty
  • Loading branch information
datsfilipe authored Jan 9, 2025
2 parents 58fa89e + 8320c58 commit 89581db
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 34 deletions.
30 changes: 0 additions & 30 deletions home/base/gui/terminal/alacritty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,4 @@ with lib; {
};
};
};

# xdg.configFile."alacritty/alacritty.toml".text = ''
# ${fileContents ../../dotfiles/alacritty.toml}
# '';

# xdg.configFile."alacritty/colors.toml".text = ''
# [colors.bright]
# black = "${theme.scheme.colors.black}"
# red = "${theme.scheme.colors.red}"
# green = "${theme.scheme.colors.green}"
# yellow = "${theme.scheme.colors.yellow}"
# blue = "${theme.scheme.colors.blue}"
# magenta = "${theme.scheme.colors.magenta}"
# cyan = "${theme.scheme.colors.cyan}"
# white = "${theme.scheme.colors.white}"
#
# [colors.normal]
# black = "${theme.scheme.colors.black}"
# red = "${theme.scheme.colors.red}"
# green = "${theme.scheme.colors.green}"
# yellow = "${theme.scheme.colors.yellow}"
# blue = "${theme.scheme.colors.blue}"
# magenta = "${theme.scheme.colors.magenta}"
# cyan = "${theme.scheme.colors.cyan}"
# white = "${theme.scheme.colors.white}"
#
# [colors.primary]
# background = "${theme.scheme.colors.bg}"
# foreground = "${theme.scheme.colors.fg}"
# '';
}
29 changes: 29 additions & 0 deletions home/base/gui/terminal/ghostty.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ lib, ghosttypkg, ... }:

with lib; {
programs.ghostty = {
enable = false;
enableFishIntegration = true;
settings = {
command = "fish";
font-size = 14;
font-family = "JetBrainsMono Nerd Font";
font-family-bold = "JetBrainsMono Nerd Font Bold";
font-family-italic = "JetBrainsMono Nerd Font Italic";
font-family-bold-italic = "JetBrainsMono Nerd Font Bold Italic";
window-decoration = false;
bold-is-bright = true;
auto-update = "off";
linux-cgroup = "never";
gtk-single-instance = true;
window-vsync = false;
adjust-cursor-thickness = 25;
window-padding-x = 25;
window-padding-y = 25;
window-padding-balance = true;
gtk-adwaita = false;
background-opacity = 0.8;
background-blur-radius = 20;
};
};
}
4 changes: 2 additions & 2 deletions home/linux/gui/i3/values/picom.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"_GTK_FRAME_EXTENTS"
];

corner-radius = 4;
round-borders = 1;
corner-radius = 0;
round-borders = 0;
rounded-corners-exclude = [
"name = 'Notification'"
"class_g ?= 'Notify-osd'"
Expand Down
8 changes: 8 additions & 0 deletions modules/colorscheme/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
'';
};
enableFishIntegration = lib.mkOption { type = lib.types.bool; default = false; };
enableGhosttyIntegration = lib.mkOption { type = lib.types.bool; default = false; };
};

config =
Expand Down Expand Up @@ -103,6 +104,13 @@
colorscheme = colorscheme;
})
)

(lib.mkIf config.modules.desktop.colorscheme.enableGhosttyIntegration
(import ./integrations/ghostty.nix {
inherit config lib;
colorscheme = colorscheme;
})
)
]))
];
}
30 changes: 30 additions & 0 deletions modules/colorscheme/integrations/ghostty.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ config, lib, colorscheme, ...}: {
programs.ghostty = {
settings.theme = "custom";
themes.custom = {
background = colorscheme.colors.bg;
cursor-color = colorscheme.colors.fg;
foreground = colorscheme.colors.fg;
palette = [
"0=${colorscheme.colors.black}"
"1=${colorscheme.colors.red}"
"2=${colorscheme.colors.green}"
"3=${colorscheme.colors.yellow}"
"4=${colorscheme.colors.blue}"
"5=${colorscheme.colors.magenta}"
"6=${colorscheme.colors.cyan}"
"7=${colorscheme.colors.white}"
"8=${colorscheme.colors.black}"
"9=${colorscheme.colors.red}"
"10=${colorscheme.colors.green}"
"11=${colorscheme.colors.yellow}"
"12=${colorscheme.colors.blue}"
"13=${colorscheme.colors.magenta}"
"14=${colorscheme.colors.cyan}"
"15=${colorscheme.colors.fg}"
];
selection-background = colorscheme.colors.bg;
selection-foreground = colorscheme.colors.bg;
};
};
}
1 change: 1 addition & 0 deletions outputs/x86_64-linux/src/dtsf-pc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
enableFishIntegration = true;
enableCavaIntegration = true;
enableZellijIntegration = true;
enableGhosttyIntegration = false;
};
}
]
Expand Down
4 changes: 2 additions & 2 deletions templates/flake.template.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ in genFlake ./flake.template.nix
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
home-manager = (ext "github:nix-community/home-manager/master");
sops-nix = (ext "github:Mic92/sops-nix/master");
datsnvim = (local ./home/base/tui/editors/neovim/conf);
unix-scripts = (local ./home/linux/base/scripts/conf);
datsnvim = (local ../home/base/tui/editors/neovim/conf);
unix-scripts = (local ../home/linux/base/scripts/conf);
};
outputs = "inputs: import ./outputs inputs";
}

0 comments on commit 89581db

Please sign in to comment.