1
0
Fork 0

Kitty und helix redesign

This commit is contained in:
Malte 2022-12-30 20:07:40 +01:00
parent ac06e97e66
commit 05433374b1
8 changed files with 36 additions and 99 deletions

View file

@ -75,7 +75,6 @@ let
./roles/tinkering.nix
./roles/wallpaper.nix
./roles/zettelkasten.nix
./roles/kitty.nix
./roles/leisure.nix
];
orgaExtra = [

View file

@ -1,6 +1,7 @@
{
pkgs,
lib,
config,
...
} @ args: let
hotkeys = import ./hotkeys.nix args;
@ -167,12 +168,12 @@ in {
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/terminal" = {
binding = "<Super>Return";
command = "foot";
command = "${config.home.sessionVariables.TERMINAL}";
name = "Terminal";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/hotkeys" = {
binding = "<Super>space";
command = "foot ${pkgs.wizards-dialog}/bin/hotkeys ${pkgs.writeText "hotkeys.yaml" (builtins.toJSON hotkeys)}";
command = "${config.home.sessionVariables.TERMINAL} ${pkgs.wizards-dialog}/bin/hotkeys ${pkgs.writeText "hotkeys.yaml" (builtins.toJSON hotkeys)}";
name = "Hotkeys";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/standby" = {

View file

@ -40,7 +40,6 @@ in {
programs.helix = {
enable = true;
settings = {
theme = "catppuccin_latte";
keys = let
common_keys = {
"C-s" = ":w";
@ -66,6 +65,11 @@ in {
lsp.display-messages = true;
indent-guides.render = true;
cursorline = true;
cursor-shape = {
insert = "bar";
normal = "underline";
};
file-picker.git-ignore = false;
color-modes = true;
bufferline = "multiple";
auto-save = true;

View file

@ -2,10 +2,6 @@
options = {
m-0 = {
hostName = lib.mkOption {type = lib.types.str;};
terminal = lib.mkOption {
default = "foot";
type = lib.types.str;
};
colors = lib.mkOption {
default = {};
type = lib.types.attrs;

View file

@ -1,7 +1,11 @@
{pkgs, ...}: let
{
pkgs,
config,
...
}: let
fork = cmd: "fork ${cmd}";
edit_dir = dir: "sh -c 'cd ${dir}; hx ${dir}'";
with-mic-check = cmd: fork "sh -c 'foot mic-check; ${cmd}'";
with-mic-check = cmd: fork "sh -c '${config.home.sessionVariables.TERMINAL} mic-check; ${cmd}'";
in [
{
Orga = [
@ -19,7 +23,7 @@ in [
Zotero = fork "zotero";
Open = fork "evince ~/git/promotion/out/print.pdf";
Build = "sh -c 'cd ~/git/promotion; nix develop -c nix run'";
Directory = fork "foot -d ~/git/promotion";
Directory = fork "${config.home.sessionVariables.TERMINAL} -d ~/git/promotion";
Edit = edit_dir "~/git/promotion";
};
}
@ -32,7 +36,7 @@ in [
}
{
SSH = let
ssh = host: "ssh ${host}";
ssh = host: "${config.home.sessionVariables.TERMINAL} +kitten ssh ${host}";
in [
{"hera via vpn" = ssh "hera.vpn.m-0.eu";}
{"fluffy via vpn" = ssh "fluffy.vpn.m-0.eu";}
@ -68,10 +72,8 @@ in [
}
{
Apps = {
Editor = fork "kitty";
Config = edit_dir "~/git/config";
Files = fork "nautilus";
DarkTerminal = fork "foot -o 'colors.background=000000' -o 'colors.foreground=ffffff'";
Accounting = {
Update = "nix run ./git/buchhaltung#update";
Display = "hledger -f ~/git/buchhaltung/buchhaltung.journal ui -- --watch --theme=terminal -X -t -E";

View file

@ -12,7 +12,7 @@
echo "Git repo up-to-date, not doing anything."
exit 0;
else
${pkgs.foot}/bin/foot --hold ${config.home.profileDirectory}/bin/maintenance
${config.home.sessionVariables.TERMINAL} --hold ${config.home.profileDirectory}/bin/maintenance
fi
'';
in {

View file

@ -1,63 +0,0 @@
{pkgs, ...}: let
my-lib = import ../../lib;
theme = my-lib.themes.default;
in {
home.sessionVariables.TERMINAL = "${pkgs.kitty}/bin/kitty";
home.packages = [
#(pkgs.runCommandLocal "fake-gnome-terminal" { } ''
# mkdir -p $out/bin
# ln -s ${pkgs.kitty}/bin/kitty $out/bin/gnome-terminal
#'')
];
programs.kitty = {
enable = true;
keybindings = {
"ctrl+plus" = "change_font_size all +1.0";
"ctrl+minus" = "change_font_size all -1.0";
};
settings = {
linux_display_server = "wayland"; # Causes ugly decorations
hide_window_decorations = true;
window_margin_width = 2;
strip_trailing_spaces = "always";
font_size = "10.5";
inherit (theme.primary) foreground background;
selection_foreground = theme.primary.background;
selection_background = theme.primary.foreground;
# black
color0 = theme.normal.white;
color8 = theme.bright.white;
# red
color1 = theme.normal.red;
color9 = theme.bright.red;
# green
color2 = theme.normal.green;
color10 = theme.bright.green;
# yellow
color3 = theme.normal.yellow;
color11 = theme.bright.yellow;
# blue
color4 = theme.normal.blue;
color12 = theme.bright.blue;
# magenta
color5 = theme.normal.magenta;
color13 = theme.bright.magenta;
# cyan
color6 = theme.normal.cyan;
color14 = theme.bright.cyan;
color7 = theme.normal.black;
color15 = theme.bright.black;
};
};
}

View file

@ -1,31 +1,29 @@
{pkgs, ...}: {
home.sessionVariables.TERMINAL = "${pkgs.foot}/bin/foot";
{
pkgs,
config,
...
}: {
home.sessionVariables.TERMINAL = "${pkgs.kitty}/bin/kitty";
home.packages = [
(pkgs.runCommandLocal "fake-gnome-terminal" {} ''
mkdir -p $out/bin
ln -s ${pkgs.foot}/bin/foot $out/bin/gnome-terminal
ln -s ${config.home.sessionVariables.TERMINAL} $out/bin/gnome-terminal
'')
];
programs.foot = {
programs.kitty = {
enable = true;
keybindings = {
"ctrl+plus" = "change_font_size all +1.0";
"ctrl+minus" = "change_font_size all -1.0";
};
theme = "Tokyo Night";
settings = {
csd = {
preferred = "client";
size = "0";
border-width = "1";
color = "af0000aa";
};
main = {
font = "monospace:size=10.5";
dpi-aware = "no";
include = "${pkgs.foot.themes}/share/foot/themes/selenized-white";
};
mouse = {
hide-when-typing = "yes";
};
scrollback = {
lines = 100000;
};
linux_display_server = "wayland"; # Causes ugly decorations
hide_window_decorations = true;
window_margin_width = 0;
strip_trailing_spaces = "always";
font_size = "10.5";
};
};
}