From 6d0f430ba3fcc86316ce3297dafbdd29de0621e4 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 9 Jan 2025 00:50:07 +0100 Subject: [PATCH] lxterminal -> ghostty --- profiles/desktop/gnome/default.nix | 3 ++- users/pbsds/home/profiles/desktop/default.nix | 3 ++- .../home/profiles/desktop/ghostty/default.nix | 12 +++++++++ .../profiles/desktop/ghostty/ghosty.config | 26 +++++++++++++++++++ .../desktop/gnome/dconf-gnome-bindings.nix | 8 +++--- .../profiles/desktop/lxterminal/default.nix | 8 ++++++ 6 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 users/pbsds/home/profiles/desktop/ghostty/default.nix create mode 100644 users/pbsds/home/profiles/desktop/ghostty/ghosty.config diff --git a/profiles/desktop/gnome/default.nix b/profiles/desktop/gnome/default.nix index 1a10185..9f6ab88 100644 --- a/profiles/desktop/gnome/default.nix +++ b/profiles/desktop/gnome/default.nix @@ -23,7 +23,8 @@ environment.systemPackages = with pkgs; [ firefox pavucontrol - lxterminal + lxterminal # TODO: remove? + ghostty (pkgs.gnome-tweaks or pkgs.gnome.gnome-tweaks) # TODO: shadow gnome-terminal ffmpegthumbnailer diff --git a/users/pbsds/home/profiles/desktop/default.nix b/users/pbsds/home/profiles/desktop/default.nix index 3fa7cd7..d483b8d 100644 --- a/users/pbsds/home/profiles/desktop/default.nix +++ b/users/pbsds/home/profiles/desktop/default.nix @@ -3,7 +3,8 @@ { imports = [ - ./lxterminal + /* ./lxterminal */ + ./ghostty ./pulsar ./zed ./mime.nix diff --git a/users/pbsds/home/profiles/desktop/ghostty/default.nix b/users/pbsds/home/profiles/desktop/ghostty/default.nix new file mode 100644 index 0000000..fe9d9ae --- /dev/null +++ b/users/pbsds/home/profiles/desktop/ghostty/default.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + home.packages = [ pkgs.ghostty ]; + home.file.".config/ghostty/config".source = ./ghosty.config; + home.file.".config/ghostty/config".force = true; + + dconf.settings."org/gnome/desktop/default-applications/terminal" = { + /* exec = lib.getExe pkgs.ghostty; */ + exec = "ghostty"; + exec-arg = "-e"; + }; +} diff --git a/users/pbsds/home/profiles/desktop/ghostty/ghosty.config b/users/pbsds/home/profiles/desktop/ghostty/ghosty.config new file mode 100644 index 0000000..57fa60f --- /dev/null +++ b/users/pbsds/home/profiles/desktop/ghostty/ghosty.config @@ -0,0 +1,26 @@ +font-size = 14 +font-family = Monospace Regular +theme = Builtin Tango Dark +foreground = #d3d7cf +#palette = 0=#d3d7cf +#window-decoration = false +gtk-wide-tabs = false + +#font-synthetic-style = true +#font-style = false +#font-thicken = false +#bold-is-bright = false +#font-variation = "wght=100" + +shell-integration-features = no-cursor +cursor-style = block +cursor-color = #d3d7cf + +confirm-close-surface = true + +keybind = ctrl+comma=unbind +keybind = ctrl+shift+comma=unbind +keybind = ctrl+shift+page_down=move_tab:+1 +keybind = ctrl+shift+page_up=move_tab:-1 +keybind = ctrl+shift+up=scroll_page_lines:-1 +keybind = ctrl+shift+down=scroll_page_lines:1 diff --git a/users/pbsds/home/profiles/desktop/gnome/dconf-gnome-bindings.nix b/users/pbsds/home/profiles/desktop/gnome/dconf-gnome-bindings.nix index 284591f..541410b 100644 --- a/users/pbsds/home/profiles/desktop/gnome/dconf-gnome-bindings.nix +++ b/users/pbsds/home/profiles/desktop/gnome/dconf-gnome-bindings.nix @@ -117,7 +117,7 @@ with lib.hm.gvariant; "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { binding = "t"; - command = "lxterminal"; + command = "ghostty"; name = "Open Terminal"; }; @@ -135,13 +135,13 @@ with lib.hm.gvariant; "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom11" = { binding = "space"; - command = "lxterminal -e nix repl ''"; + command = "ghostty -e nix repl ''"; name = "nixpkgs repl"; }; "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom12" = { binding = ""; - command = "sh -c \"lxterminal -e python3 -i $HOME/.local/opt/sympy-interactive-imports.py\""; + command = "sh -c \"ghostty -e python3 -i $HOME/.local/opt/sympy-interactive-imports.py\""; name = "Open SymPy terminal"; }; @@ -171,7 +171,7 @@ with lib.hm.gvariant; "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5" = { binding = "space"; - command = "sh -c \"lxterminal -e `command -v ptpython || echo python3` -i $HOME/.local/opt/python-interactive-imports.py\""; + command = "sh -c \"ghostty -e `command -v ptpython || echo python3` -i $HOME/.local/opt/python-interactive-imports.py\""; name = "Open Python Terminal"; }; diff --git a/users/pbsds/home/profiles/desktop/lxterminal/default.nix b/users/pbsds/home/profiles/desktop/lxterminal/default.nix index 437a8fd..80996f9 100644 --- a/users/pbsds/home/profiles/desktop/lxterminal/default.nix +++ b/users/pbsds/home/profiles/desktop/lxterminal/default.nix @@ -3,4 +3,12 @@ home.packages = with pkgs; [ lxterminal ]; home.file.".config/lxterminal/lxterminal.conf".source = ./lxterminal.conf; home.file.".config/lxterminal/lxterminal.conf".force = true; + + /* + dconf.settings."org/gnome/desktop/default-applications/terminal" = { + exec = "lxterminal"; + exec-arg = "-e"; + }; + */ + }