fix(ghostty): add cairo wrapper and make it the default terminal
This commit is contained in:
parent
987aee1c5b
commit
2e58a2d4ad
5 changed files with 17 additions and 8 deletions
|
|
@ -29,7 +29,7 @@ let
|
|||
name = "com.mitchellh.ghostty";
|
||||
desktopName = "Terminal";
|
||||
genericName = "Terminal Emulator";
|
||||
exec = "ghostty";
|
||||
exec = "ghostty-cairo";
|
||||
icon = "com.mitchellh.ghostty";
|
||||
categories = [
|
||||
"System"
|
||||
|
|
@ -37,7 +37,7 @@ let
|
|||
"Utility"
|
||||
];
|
||||
terminal = false;
|
||||
comment = "Fast GPU-accelerated terminal";
|
||||
comment = "Terminal (Cairo renderer fallback)";
|
||||
};
|
||||
in
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ in
|
|||
|
||||
"org/gnome/shell/extensions/logo-menu" = {
|
||||
menu-button-icon-image = lib.gvariant.mkInt32 51;
|
||||
menu-button-terminal = "ghostty";
|
||||
menu-button-terminal = "ghostty-cairo";
|
||||
menu-button-system-monitor = "missioncenter";
|
||||
menu-button-extensions-app = "com.mattjakeman.ExtensionManager.desktop";
|
||||
hide-softwarecentre = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
ghosttyCairo = pkgs.writeShellScriptBin "ghostty-cairo" ''
|
||||
export GSK_RENDERER=cairo
|
||||
exec ghostty "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
# Baseline system tools available everywhere; users run Home Manager standalone.
|
||||
config.environment.systemPackages = lib.mkAfter [
|
||||
|
|
@ -11,6 +17,7 @@
|
|||
pkgs.fastfetch
|
||||
pkgs.flatpak
|
||||
pkgs.ghostty
|
||||
ghosttyCairo
|
||||
pkgs.git
|
||||
pkgs.home-manager
|
||||
pkgs.just
|
||||
|
|
|
|||
|
|
@ -24,9 +24,11 @@ in
|
|||
];
|
||||
|
||||
# Use Ghostty as the default terminal emulator.
|
||||
# On some machines Ghostty may fail to acquire an OpenGL context; `ghostty-cairo`
|
||||
# forces GTK4's Cairo renderer (CPU) and is more hardware-agnostic.
|
||||
environment.sessionVariables = {
|
||||
TERMINAL = "${pkgs.ghostty}/bin/ghostty";
|
||||
DEFAULT_TERMINAL = "${pkgs.ghostty}/bin/ghostty";
|
||||
TERMINAL = "ghostty-cairo";
|
||||
DEFAULT_TERMINAL = "ghostty-cairo";
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue