mirror of
https://github.com/ItsDrike/nixdots
synced 2024-12-25 16:54:35 +00:00
Add terminal emulators
This commit is contained in:
parent
dcfbbeec27
commit
046ebaf5b7
|
@ -4,5 +4,6 @@ _: {
|
|||
./tools
|
||||
./editors
|
||||
./file-managers
|
||||
./emulators
|
||||
];
|
||||
}
|
||||
|
|
12
home/programs/terminal/emulators/default.nix
Normal file
12
home/programs/terminal/emulators/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Note: Pretty much all of these configurations were copied from
|
||||
# https://git.notashelf.dev/NotAShelf/nyx, there may be some small
|
||||
# adjustments made to them but the majority of the credit goes to
|
||||
# notashelf.
|
||||
_: {
|
||||
imports = [
|
||||
./foot.nix
|
||||
./kitty.nix
|
||||
];
|
||||
}
|
||||
|
||||
|
65
home/programs/terminal/emulators/foot.nix
Normal file
65
home/programs/terminal/emulators/foot.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs',
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
libsixel # for displaying images
|
||||
];
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
# window settings
|
||||
app-id = "foot";
|
||||
title = "foot";
|
||||
locked-title = "no";
|
||||
term = "xterm-256color";
|
||||
pad = "16x16 center";
|
||||
shell = "zsh";
|
||||
|
||||
# notifications
|
||||
notify = "notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
|
||||
selection-target = "clipboard";
|
||||
|
||||
# font and font rendering
|
||||
dpi-aware = false; # this looks more readable on a laptop, but it's unreasonably large
|
||||
font = "Iosevka Nerd Font:size=14";
|
||||
font-bold = "Iosevka Nerd Font:size=14";
|
||||
vertical-letter-offset = "-0.90";
|
||||
};
|
||||
|
||||
scrollback = {
|
||||
lines = 10000;
|
||||
multiplier = 3;
|
||||
};
|
||||
|
||||
tweak = {
|
||||
font-monospace-warn = "no"; # reduces startup time
|
||||
sixel = "yes";
|
||||
};
|
||||
|
||||
cursor = {
|
||||
style = "beam";
|
||||
beam-thickness = 2;
|
||||
};
|
||||
|
||||
mouse = {
|
||||
hide-when-typing = "yes";
|
||||
};
|
||||
|
||||
url = {
|
||||
launch = "xdg-open \${url}";
|
||||
label-letters = "sadfjklewcmpgh";
|
||||
osc8-underline = "url-mode";
|
||||
protocols = "http, https, ftp, ftps, file";
|
||||
uri-characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+=\"'()[]";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
78
home/programs/terminal/emulators/kitty.nix
Normal file
78
home/programs/terminal/emulators/kitty.nix
Normal file
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig) modules;
|
||||
inherit (modules.style.colorScheme) colors;
|
||||
in {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# General
|
||||
background_opacity = "0.85";
|
||||
font_family = "monospace";
|
||||
font_size = 14;
|
||||
disable_ligatures = "never";
|
||||
cursor_shape = "underline";
|
||||
cursor_blink_interval = "0.5";
|
||||
cursor_stop_blinking_after = "15.0";
|
||||
scrollback_lines = 10000;
|
||||
click_interval = "0.5";
|
||||
select_by_word_characters = ":@-./_~?&=%+#";
|
||||
remember_window_size = false;
|
||||
allow_remote_control = true;
|
||||
initial_window_width = 640;
|
||||
initial_window_height = 400;
|
||||
repaint_delay = 15;
|
||||
input_delay = 3;
|
||||
visual_bell_duration = "0.0";
|
||||
url_style = "double";
|
||||
open_url_with = "default";
|
||||
confirm_os_window_close = 0;
|
||||
enable_audio_bell = false;
|
||||
window_padding_width = 15;
|
||||
window_margin_width = 10;
|
||||
};
|
||||
keybindings = {
|
||||
"ctrl+c" = "copy_or_interrupt";
|
||||
"ctrl+alt+c" = "copy_to_clipboard";
|
||||
"ctrl+alt+v" = "paste_from_clipboard";
|
||||
"ctrl+shift+v" = "paste_from_clipboard";
|
||||
|
||||
"ctrl+shift+up" = "increase_font_size";
|
||||
"ctrl+shift+down" = "decrease_font_size";
|
||||
"ctrl+shift+backspace" = "restore_font_size";
|
||||
|
||||
"ctrl+shift+enter" = "new_window";
|
||||
"ctrl+shift+n" = "new_os_window";
|
||||
"ctrl+shift+w" = "close_window";
|
||||
"ctrl+shift+]" = "next_window";
|
||||
"ctrl+shift+[" = "previous_window";
|
||||
"ctrl+shift+f" = "move_window_forward";
|
||||
"ctrl+shift+b" = "move_window_backward";
|
||||
"ctrl+shift+`" = "move_window_to_top";
|
||||
"ctrl+shift+1" = "first_window";
|
||||
"ctrl+shift+2" = "second_window";
|
||||
"ctrl+shift+3" = "third_window";
|
||||
"ctrl+shift+4" = "fourth_window";
|
||||
"ctrl+shift+5" = "fifth_window";
|
||||
"ctrl+shift+6" = "sixth_window";
|
||||
"ctrl+shift+7" = "seventh_window";
|
||||
"ctrl+shift+8" = "eighth_window";
|
||||
"ctrl+shift+9" = "ninth_window";
|
||||
"ctrl+shift+0" = "tenth_window";
|
||||
|
||||
"ctrl+shift+right" = "next_tab";
|
||||
"ctrl+shift+left" = "previous_tab";
|
||||
"ctrl+shift+t" = "new_tab";
|
||||
"ctrl+shift+q" = "close_tab";
|
||||
"ctrl+shift+l" = "next_layout";
|
||||
"ctrl+shift+." = "move_tab_forward";
|
||||
"ctrl+shift+," = "move_tab_backward";
|
||||
"ctrl+shift+alt+t" = "set_tab_title";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in a new issue