refactor
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
repo = config.repo;
|
||||
facts = config.facts;
|
||||
|
||||
kittySingleInstance =
|
||||
pkgs:
|
||||
@@ -10,10 +10,7 @@ let
|
||||
meta = pkgs.kitty.meta;
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
# Wrap the binary to always launch as a single instance
|
||||
wrapProgram $out/bin/kitty --add-flags "-1"
|
||||
|
||||
# Patch the .desktop file for strict app launchers like Vicinae
|
||||
rm $out/share/applications/kitty.desktop
|
||||
sed 's/Exec=kitty/Exec=kitty -1/g' ${pkgs.kitty}/share/applications/kitty.desktop > $out/share/applications/kitty.desktop
|
||||
'';
|
||||
@@ -28,8 +25,7 @@ in
|
||||
...
|
||||
}:
|
||||
let
|
||||
repoTheme = repo.theme.kanagawa;
|
||||
palette = repoTheme.palette;
|
||||
palette = facts.theme.kanagawa.palette;
|
||||
hex = lib.removePrefix "#";
|
||||
in
|
||||
{
|
||||
@@ -44,8 +40,6 @@ in
|
||||
font-bold-italic = "JetBrains Mono:style=Bold Italic:size=11:fontfeatures=-liga:fontfeatures=-calt";
|
||||
gamma-correct-blending = "yes";
|
||||
pad = "3x3";
|
||||
# vertical-letter-offset = -1;
|
||||
# letter-spacing = -0.2;
|
||||
};
|
||||
|
||||
tweak.box-drawing-base-thickness = 0.1;
|
||||
@@ -92,13 +86,14 @@ in
|
||||
flake.modules.homeManager.terminal-kitty =
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
repoTheme = repo.theme.kanagawa;
|
||||
palette = repoTheme.palette;
|
||||
theme = facts.theme.kanagawa;
|
||||
palette = theme.palette;
|
||||
kitty = kittySingleInstance pkgs;
|
||||
in
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
package = kittySingleInstance pkgs;
|
||||
package = kitty;
|
||||
font = {
|
||||
name = "JetBrains Mono";
|
||||
size = 11;
|
||||
@@ -116,7 +111,7 @@ in
|
||||
# Nerd Fonts v3.4.0
|
||||
symbol_map U+e000-U+e00a,U+e0a0-U+e0a2,U+e0a3,U+e0b0-U+e0b3,U+e0b4-U+e0c8,U+e0ca,U+e0cc-U+e0d7,U+e200-U+e2a9,U+e300-U+e3e3,U+e5fa-U+e6b7,U+e700-U+e8ef,U+ea60-U+ec1e,U+ed00-U+efce,U+f000-U+f2ff,U+f300-U+f381,U+f400-U+f533,U+f0001-U+f1af0 Symbols Nerd Font Mono
|
||||
|
||||
## name: ${repoTheme.displayName}
|
||||
## name: ${theme.displayName}
|
||||
## license: MIT
|
||||
## author: Tommaso Laurenzi
|
||||
## upstream: https://github.com/rebelot/kanagawa.nvim/
|
||||
@@ -165,9 +160,7 @@ in
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
# Use the wrapped package (which already includes -1)
|
||||
# Start it hidden and run an infinite dummy process so the instance stays alive
|
||||
ExecStart = "${lib.getExe (kittySingleInstance pkgs)} --start-as=hidden ${pkgs.coreutils}/bin/tail -f /dev/null";
|
||||
ExecStart = "${lib.getExe kitty} --start-as=hidden ${pkgs.coreutils}/bin/tail -f /dev/null";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
@@ -188,10 +181,13 @@ in
|
||||
|
||||
flake.modules.homeManager.primary-terminal-kitty =
|
||||
{ lib, pkgs, ... }:
|
||||
let
|
||||
kitty = kittySingleInstance pkgs;
|
||||
in
|
||||
{
|
||||
imports = [ config.flake.modules.homeManager.terminal-kitty ];
|
||||
|
||||
facts.desktop.terminalCommand = lib.getExe (kittySingleInstance pkgs);
|
||||
facts.desktop.terminalCommand = lib.getExe kitty;
|
||||
|
||||
xdg.terminal-exec = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user