Some tweaks to increase friendliness of linux kitty

This commit is contained in:
Natsu Kagami 2022-06-11 11:59:56 -04:00
parent 6b18ad64f4
commit dff7e69dab
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
4 changed files with 46 additions and 52 deletions

View file

@ -37,27 +37,27 @@ with lib; {
(x: attrsets.nameValuePair "${cmd}+${toString x}" "goto_tab ${toString x}")
(lists.range 1 9));
extraConfig = mkAfter ''
settings = {
# Tab settings
tab_bar_edge top
tab_bar_style powerline
tab_powerline_style slanted
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.lightgreen}{fmt.bold}[{index}]{fmt.nobold} {fmt.fg.tab}{title}"
active_tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}"
tab_bar_background #555
active_tab_font_style normal
tab_bar_edge = "top";
tab_bar_style = "powerline";
tab_powerline_style = "slanted";
tab_title_template = "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.lightgreen}{fmt.bold}[{index}]{fmt.nobold} {fmt.fg.tab}{title}";
active_tab_title_template = "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}";
tab_bar_background = "#555";
active_tab_font_style = "normal";
# Layouts
## Mouse focus
focus_follows_mouse yes
focus_follows_mouse = true;
## Layout options
# Layouts
enabled_layouts Splits
inactive_text_alpha 0.65
enabled_layouts = "Splits";
inactive_text_alpha = "0.65";
# MacOS specific
macos_option_as_alt = left
'';
macos_option_as_alt = "left";
};
};
}

View file

@ -2,32 +2,11 @@
let
cfg = config.nki.programs.kitty;
# iosevka = pkgs.iosevka.override {
# privateBuildPlan = ''
# [buildPlans.iosevka-kagami]
# family = "Iosevka Kagami"
# spacing = "normal"
# serifs = "sans"
# no-cv-ss = true
# [buildPlans.iosevka-kagami.variants]
# inherits = "ss06"
# [buildPlans.iosevka-kagami.variants.design]
# k = "cursive-serifless"
# [buildPlans.iosevka-kagami.ligations]
# inherits = "haskell"
# '';
# set = "kagami";
# };
cmd = if pkgs.stdenv.isDarwin then "cmd" else "ctrl";
in
with lib;
{
imports = [ ./darwin.nix ];
imports = [ ./darwin.nix ./linux.nix ];
options.nki.programs.kitty = {
enable = mkEnableOption "Enable kitty";
@ -56,28 +35,26 @@ with lib;
theme = "Ayu Light";
extraConfig =
settings =
let
background =
if isNull cfg.background then ''
background_opacity 1
dynamic_background_opacity yes
'' else ''
background_image ${cfg.background}
background_image_layout scaled
background_tint 0.85
'';
in
''
# Background color and transparency
${background}
background =
if isNull cfg.background then {
background_opacity = "0.9";
dynamic_background_opacity = true;
} else {
background_image = cfg.background;
background_image_layout = "scaled";
background_tint = "0.85";
};
in
background // {
# Scrollback (128MBs)
scrollback_pager_history_size 128
scrollback_pager_history_size = 128;
# Disable Shell integration (leave it for Nix)
shell_integration no-rc
'';
shell_integration = "no-rc";
};
keybindings = { };
};

View file

@ -0,0 +1,11 @@
{ config, pkgs, lib, ... }:
let
cfg = config.nki.programs.kitty;
in
with lib;
{
programs.kitty = mkIf (cfg.enable && pkgs.stdenv.isLinux) {
# set the shell
settings.shell = "${config.programs.fish.package}/bin/fish";
};
}

View file

@ -34,6 +34,7 @@
# Enable sway
programs.my-sway.enable = true;
programs.my-sway.fontSize = 14.0;
programs.my-sway.terminal = "${config.programs.kitty.package}/bin/kitty";
# Keyboard support
wayland.windowManager.sway.config = {
input."1278:34:HHKB-Hybrid_3_Keyboard".xkb_layout = "jp";
@ -42,6 +43,11 @@
xkb_layout = "us";
};
};
# Kitty
nki.programs.kitty = {
enable = true;
fontSize = 16;
};
# Multiple screen setup
services.kanshi = {