ghostty: fix config
This commit is contained in:
parent
b414e7c2af
commit
2b9a8a4f3b
3 changed files with 137 additions and 24 deletions
|
@ -6,6 +6,8 @@
|
|||
}: let
|
||||
inherit (lib.lists) elem;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.strings) concatStringsSep;
|
||||
|
||||
inherit (config.meta.mainUser.defaultShell) name package;
|
||||
inherit (config.modules.style.colorScheme) slug;
|
||||
|
@ -17,30 +19,59 @@
|
|||
then name
|
||||
else "none";
|
||||
|
||||
ghostty-settings = pkgs.writeText "config" ''
|
||||
font-family = JetBrainsMono Nerd Font Mono
|
||||
window-padding-x = 8
|
||||
window-padding-y = 8
|
||||
background-opacity = 0.85
|
||||
gtk-single-instance = true
|
||||
font-size = 14
|
||||
theme = ${slug}
|
||||
resize-overlay-duration = 0s
|
||||
cursor-style-blink = false
|
||||
confirm-close-surface = false
|
||||
copy-on-select = true
|
||||
term = xterm-256color
|
||||
ghostty-settings = {
|
||||
font-family = "JetBrainsMonoNerdFont";
|
||||
font-family-bold = "JetBrainsMonoNerdFontBold";
|
||||
font-family-italic = "JetBrainsMonoNerdFontItalic";
|
||||
font-family-bold-italic = "JetBrainsMonoNerdFontBoldItalic";
|
||||
font-size = 14;
|
||||
|
||||
shell-integration = ${shell-integration}
|
||||
command = ${getExe package}
|
||||
'';
|
||||
window-padding-x = 8;
|
||||
window-padding-y = 8;
|
||||
background-opacity = 0.85;
|
||||
gtk-single-instance = "true";
|
||||
gtk-tabs-location = "bottom";
|
||||
gtk-wide-tabs = false;
|
||||
window-padding-balance = true;
|
||||
window-decoration = "none";
|
||||
theme = slug;
|
||||
resize-overlay-duration = "0s";
|
||||
cursor-style-blink = "false";
|
||||
confirm-close-surface = "false";
|
||||
mouse-hide-while-typing = "true";
|
||||
|
||||
window-theme = "ghostty";
|
||||
bold-is-bright = "true";
|
||||
term = "xterm-256color";
|
||||
|
||||
app-notifications = "no-clipboard-copy";
|
||||
shell-integration-features = "cursor,sudo,no-title";
|
||||
# window-padding-y = 10;
|
||||
cursor-style = "block";
|
||||
|
||||
# Whether to automatically copy selected text to the clipboard. true will prefer to copy to the selection clipboard, otherwise it will copy to the system clipboard.
|
||||
# The value clipboard will always copy text to the selection clipboard as well as the system clipboard.
|
||||
copy-on-select = "clipboard";
|
||||
|
||||
shell-integration = shell-integration;
|
||||
command = getExe package;
|
||||
};
|
||||
|
||||
settingsFile = pkgs.writeText "config" <| concatStringsSep "\n" <| mapAttrsToList (name: value: "${name} = ${toString value}") ghostty-settings;
|
||||
|
||||
ghostty = pkgs.ghostty.overrideAttrs (_: {
|
||||
preBuild = ''
|
||||
shopt -s globstar
|
||||
sed -i 's/^const xev = @import("xev");$/const xev = @import("xev").Epoll;/' **/*.zig
|
||||
shopt -u globstar
|
||||
'';
|
||||
});
|
||||
ghostty-wrapped = pkgs.symlinkJoin {
|
||||
name = "ghostty-wrapped";
|
||||
paths = [pkgs.ghostty];
|
||||
paths = [ghostty];
|
||||
nativeBuildInputs = [pkgs.makeWrapper];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/ghostty --add-flags "--config-file=${ghostty-settings}"
|
||||
wrapProgram $out/bin/ghostty --add-flags "--config-file=${settingsFile}"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue