Switch to Kitty to try it out

This commit is contained in:
Thomas Avé 2024-10-22 17:06:42 +02:00
parent 4c9272c685
commit e5410cc440
6 changed files with 27 additions and 23 deletions

View File

@ -42,19 +42,19 @@
font = {
size = pkgs.lib.mkDefault 15;
bold = {
family = "Iosevka Extended";
family = "FiraCode Nerd Font";
style = "Bold";
};
bold_italic = {
family = "Iosevka Extended";
family = "FiraCode Nerd Font";
style = "Bold Italic";
};
italic = {
family = "Iosevka Extended";
family = "FiraCode Nerd Font";
style = "Italic";
};
normal = {
family = "Iosevka Extended";
family = "FiraCode Nerd Font";
style = "Regular";
};
};

View File

@ -5,7 +5,8 @@ let
nautilus = "${pkgs.nautilus}/bin/nautilus";
gnome-calendar = "${pkgs.gnome-calendar}/bin/gnome-calendar";
wpctl = "${pkgs.wireplumber}/bin/wpctl";
alacritty = "${pkgs.alacritty}/bin/alacritty";
terminal-name = ".kitty-wrapped";
terminal = "${pkgs.kitty}/bin/kitty";
swaylock = "${pkgs.swaylock-fancy}/bin/swaylock-fancy";
rofi = "${pkgs.rofi}/bin/rofi";
jq = "${pkgs.jq}/bin/jq";
@ -25,7 +26,7 @@ let
# workspace_command_prefix = "";
# hyprland_plugins = [];
launch_alacritty = pkgs.writeShellScriptBin "launch_alacritty" ''
launch_terminal = pkgs.writeShellScriptBin "launch_terminal" ''
function find_leaf_pid(){
local PID=$1
local CHILD_PID=$(pgrep -P "$PID")
@ -50,21 +51,21 @@ let
CLIENT=$(echo "$SSH_COMMAND" | awk '{ print $5 }')
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$LEAF_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
SSH_SESSION_ID=$RANDOM
${alacritty} -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
${terminal} -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
else
${alacritty} -e zsh -c "ssh -t \"$(echo "$SSH_COMMAND" | awk '{ print $2 }')\""
${terminal} -e zsh -c "ssh -t \"$(echo "$SSH_COMMAND" | awk '{ print $2 }')\""
fi
else # Not an ssh session
if [ "$(ps -p "$1" -o comm=)" == "alacritty" ]; then
if [ "$(ps -p "$1" -o comm=)" == "${terminal-name}" ]; then
CWD=$(readlink -e /proc/"$LEAF_PID"/cwd)
if [ "$CWD" != "" ]; then
${alacritty} --working-directory "$CWD"
${terminal} --working-directory "$CWD"
else
${alacritty}
${terminal}
fi
else
${alacritty}
${terminal}
fi
fi
'';
@ -106,7 +107,7 @@ in {
];
env = [
"WLR_NO_HARDWARE_CURSORS,1"
"TERMINAL,${alacritty}"
"TERMINAL,${terminal}"
"WLR_RENDERER_ALLOW_SOFTWARE,1"
];
debug = { disable_logs = false; };
@ -172,8 +173,8 @@ in {
"$mainMod, mouse:273, resizewindow"
];
bind = [
"$mainMod, return, exec, ${launch_alacritty}/bin/launch_alacritty $(hyprctl activewindow -j | ${jq} .pid)"
"$mainMod SHIFT, return, exec, ${alacritty}"
"$mainMod, return, exec, ${launch_terminal}/bin/launch_terminal $(hyprctl activewindow -j | ${jq} .pid)"
"$mainMod SHIFT, return, exec, ${terminal}"
"$mainMod, Q, killactive,"
"$mainMod, A, exec, ${nautilus}"
"$mainMod, S, exec, LC_TIME=\"en_GB.UTF-8\" ${gnome-calendar}"

View File

@ -1,18 +1,20 @@
{ config, pkgs, ... }:
{ config, pkgs, lib, ... }:
{
programs.kitty = {
enable = true;
shellIntegration.enableZshIntegration = true;
font = {
name = "Iosevka Extended";
size = 15;
name = "'ZedMono Nerd Font' style='Extended Light' features=+ss05";
size = lib.mkDefault 15;
};
settings = {
cursor_shape = "block";
cursor_beam_thickness = 10;
cursor_beam_thickness = 1;
scrollback_lines = 100000;
enable_audio_bell = "no";
"modify_font" = "cell_height 115%";
# Theme
background = "#000010";

View File

@ -20,8 +20,8 @@ return {
color_overrides = {
mocha = {
-- this 16 colors are changed to onedark
base = "#11121D",
text = "#abb2bf",
base = "#1A1B26",
text = "#A6ADD2",
rosewater = "#b6bdca",
lavender = "#ed8897",
red = "#e06c75",

View File

@ -5,7 +5,7 @@ return {
},
build = ":TSUpdate",
opts = {
ensure_installed_sync = { "typst", "cpp", "c", "lua", "vim", "dockerfile", "python", "java", "cmake", "diff", "gitcommit", "html", "css", "javascript", "json", "rust", "sql", "yaml", "markdown", "markdown_inline", "nix" },
ensure_installed_sync = { "typst", "cpp", "c", "lua", "vim", "dockerfile", "python", "java", "cmake", "diff", "gitcommit", "html", "css", "javascript", "json", "rust", "sql", "yaml", "markdown", "markdown_inline", "nix", "bibtex" },
auto_install = true,
highlight = {
enable = true,

View File

@ -35,7 +35,8 @@
iosevka
roboto
font-awesome
(nerdfonts.override { fonts = [ "FiraCode" "Ubuntu" ]; })
nerdfonts
# (nerdfonts.override { fonts = [ "FiraCode" "Ubuntu" ]; })
];
environment.systemPackages = with pkgs; [