forked from fabian/nix_config
config: replace kitty with foot
This commit is contained in:
parent
b89521fb7b
commit
3e9486099d
7 changed files with 121 additions and 145 deletions
|
@ -5,7 +5,7 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./terminal
|
./terminal.nix
|
||||||
./neovim.nix
|
./neovim.nix
|
||||||
./baseline.nix
|
./baseline.nix
|
||||||
./gaming.nix
|
./gaming.nix
|
||||||
|
|
|
@ -62,7 +62,7 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
"application/pdf" = with pkgs; ["qpdfview"];
|
"application/pdf" = with pkgs; ["qpdfview"];
|
||||||
"x-scheme-handler/file" = with pkgs; ["kitty"];
|
"x-scheme-handler/file" = with pkgs; ["foot"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -143,7 +143,7 @@ in {
|
||||||
"${mod}+c" = "focus child";
|
"${mod}+c" = "focus child";
|
||||||
"${mod}+d" = "exec ${bemenuCommand}";
|
"${mod}+d" = "exec ${bemenuCommand}";
|
||||||
"${mod}+l" = "exec ${getExe pkgs.gtklock} -d";
|
"${mod}+l" = "exec ${getExe pkgs.gtklock} -d";
|
||||||
"${mod}+Return" = "exec ${lib.getExe pkgs.kitty} ${lib.getExe pkgs.tmux}";
|
"${mod}+Return" = "exec ${lib.getExe pkgs.foot} ${lib.getExe pkgs.tmux}";
|
||||||
"${mod}+Shift+s" = "exec ${grimshot} copy area";
|
"${mod}+Shift+s" = "exec ${grimshot} copy area";
|
||||||
"${mod}+Shift+a" = "exec ${grimshot} copy output";
|
"${mod}+Shift+a" = "exec ${grimshot} copy output";
|
||||||
"${mod}+Tab" = "focus right";
|
"${mod}+Tab" = "focus right";
|
||||||
|
|
117
home/modules/terminal.nix
Normal file
117
home/modules/terminal.nix
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.local.apps.terminal;
|
||||||
|
in {
|
||||||
|
options.local.apps.terminal.enable = mkEnableOption "terminal emulator settings";
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs = {
|
||||||
|
foot = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
term = "xterm-256color";
|
||||||
|
font = "JetBrains Mono:style=Medium:size=15";
|
||||||
|
font-bold = "JetBrains Mono:style=Bold:size=15";
|
||||||
|
font-italic = "JetBrains Mono:style=Italic:size=15";
|
||||||
|
font-bold-italic = "JetBrains Mono:style=Bold Italic:size=15";
|
||||||
|
dpi-aware = "yes";
|
||||||
|
initial-window-size-pixels = "1200x600";
|
||||||
|
};
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
style = "block";
|
||||||
|
blink = "yes";
|
||||||
|
};
|
||||||
|
|
||||||
|
colors = {
|
||||||
|
background = "000000";
|
||||||
|
regular0 = "616161";
|
||||||
|
regular1 = "ff4d51";
|
||||||
|
regular2 = "35d450";
|
||||||
|
regular3 = "e9e836";
|
||||||
|
regular4 = "5dc5f8";
|
||||||
|
regular5 = "feabf2";
|
||||||
|
regular6 = "24dfc4";
|
||||||
|
regular7 = "ffffff";
|
||||||
|
};
|
||||||
|
|
||||||
|
bell = {
|
||||||
|
system = "no";
|
||||||
|
urgent = "no";
|
||||||
|
notify = "no";
|
||||||
|
visual = "no";
|
||||||
|
command-focused = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
mouse = {
|
||||||
|
hide-when-typing = "no";
|
||||||
|
};
|
||||||
|
|
||||||
|
key-bindings = {
|
||||||
|
clipboard-copy = "Control+Shift+c";
|
||||||
|
clipboard-paste = "Control+Shift+v";
|
||||||
|
font-increase = "Control+Shift+equal";
|
||||||
|
font-decrease = "Control+Shift+minus";
|
||||||
|
font-reset = "Control+Shift+BackSpace";
|
||||||
|
};
|
||||||
|
|
||||||
|
mouse-bindings = {
|
||||||
|
scrollback-up-mouse = "BTN_WHEEL_BACK";
|
||||||
|
scrollback-down-mouse = "BTN_WHEEL_FORWARD";
|
||||||
|
font-increase = "Control+BTN_WHEEL_BACK";
|
||||||
|
font-decrease = "Control+BTN_WHEEL_FORWARD";
|
||||||
|
select-begin = "BTN_LEFT";
|
||||||
|
select-begin-block = "Control+BTN_LEFT";
|
||||||
|
select-extend = "BTN_RIGHT";
|
||||||
|
select-extend-character-wise = "Control+BTN_RIGHT";
|
||||||
|
select-word = "BTN_LEFT-2";
|
||||||
|
select-word-whitespace = "Control+BTN_LEFT-2";
|
||||||
|
select-quote = " BTN_LEFT-3";
|
||||||
|
select-row = "BTN_LEFT-4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
tmux = {
|
||||||
|
enable = true;
|
||||||
|
aggressiveResize = true;
|
||||||
|
clock24 = true;
|
||||||
|
escapeTime = 10;
|
||||||
|
terminal = "xterm-256color";
|
||||||
|
keyMode = "emacs";
|
||||||
|
mouse = true;
|
||||||
|
|
||||||
|
extraConfig = ''
|
||||||
|
set -ga update-environment " LIFT_PID"
|
||||||
|
set -g set-titles on
|
||||||
|
set -g renumber-windows on
|
||||||
|
set -sa terminal-overrides ',xterm-termite:RGB'
|
||||||
|
|
||||||
|
set -g status-style bg=default,fg=colour250
|
||||||
|
set -g pane-border-style fg=colour236
|
||||||
|
set -g pane-active-border-style fg=colour240
|
||||||
|
set -g window-status-format " #I:#W "
|
||||||
|
set -g window-status-style bg=default,fg=colour244
|
||||||
|
set -g window-status-current-format " #I:#W "
|
||||||
|
set -g window-status-current-style bg=colour236,fg=white,bold
|
||||||
|
set -g status-position bottom
|
||||||
|
set -g status-left-length 20
|
||||||
|
set -g status-right-length 60
|
||||||
|
set -g status-left ""
|
||||||
|
set -g window-status-separator ""
|
||||||
|
set -g status-justify left
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
sessionVariables = {
|
||||||
|
"TERMINAL" = "foot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,55 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.local.apps.terminal;
|
|
||||||
in {
|
|
||||||
options.local.apps.terminal.enable = mkEnableOption "terminal emulator settings";
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
programs = {
|
|
||||||
kitty = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = import ./kitty.conf.nix;
|
|
||||||
};
|
|
||||||
|
|
||||||
tmux = {
|
|
||||||
enable = true;
|
|
||||||
aggressiveResize = true;
|
|
||||||
clock24 = true;
|
|
||||||
escapeTime = 10;
|
|
||||||
terminal = "xterm-256color";
|
|
||||||
keyMode = "emacs";
|
|
||||||
mouse = true;
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
set -ga update-environment " LIFT_PID"
|
|
||||||
set -g set-titles on
|
|
||||||
set -g renumber-windows on
|
|
||||||
set -sa terminal-overrides ',xterm-termite:RGB'
|
|
||||||
|
|
||||||
set -g status-style bg=default,fg=colour250
|
|
||||||
set -g pane-border-style fg=colour236
|
|
||||||
set -g pane-active-border-style fg=colour240
|
|
||||||
set -g window-status-format " #I:#W "
|
|
||||||
set -g window-status-style bg=default,fg=colour244
|
|
||||||
set -g window-status-current-format " #I:#W "
|
|
||||||
set -g window-status-current-style bg=colour236,fg=white,bold
|
|
||||||
set -g status-position bottom
|
|
||||||
set -g status-left-length 20
|
|
||||||
set -g status-right-length 60
|
|
||||||
set -g status-left ""
|
|
||||||
set -g window-status-separator ""
|
|
||||||
set -g status-justify left
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home = {
|
|
||||||
sessionVariables = {
|
|
||||||
"TERMINAL" = "kitty";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,87 +0,0 @@
|
||||||
''
|
|
||||||
# Fonts
|
|
||||||
font_family JetBrains Mono Medium
|
|
||||||
bold_font JetBrains Mono Bold
|
|
||||||
italic_font JetBrains Mono Italic
|
|
||||||
bold_italic_font JetBrains Mono Bold Italic
|
|
||||||
|
|
||||||
font_size 10
|
|
||||||
disable_ligatures cursor
|
|
||||||
|
|
||||||
initial_window_width 1200
|
|
||||||
initial_window_height 600
|
|
||||||
|
|
||||||
# Cursor
|
|
||||||
cursor_shape beam
|
|
||||||
cursor_beam_thickness 1.9
|
|
||||||
cursor_stop_blinking_after 0
|
|
||||||
|
|
||||||
# Audio
|
|
||||||
enable_audio_bell no
|
|
||||||
|
|
||||||
# Tabs
|
|
||||||
tab_bar_style separator
|
|
||||||
tab_separator " | "
|
|
||||||
tab_title_template "{index}: {title}"
|
|
||||||
|
|
||||||
# Color
|
|
||||||
# special
|
|
||||||
foreground #ffffff
|
|
||||||
foreground_bold #ffffff
|
|
||||||
cursor #ffffff
|
|
||||||
background #000000
|
|
||||||
background_opacity 1
|
|
||||||
|
|
||||||
# Shortcuts
|
|
||||||
map ctrl+shift+c copy_to_clipboard
|
|
||||||
map ctrl+shift+v paste_from_clipboard
|
|
||||||
map ctrl+shift+s paste_from_selection
|
|
||||||
map shift+insert paste_from_selection
|
|
||||||
|
|
||||||
map ctrl+shift+up scroll_line_up
|
|
||||||
map ctrl+shift+down scroll_line_down
|
|
||||||
map ctrl+shift+page_up scroll_page_up
|
|
||||||
map ctrl+shift+page_down scroll_page_down
|
|
||||||
map ctrl+shift+home scroll_home
|
|
||||||
map ctrl+shift+end scroll_end
|
|
||||||
|
|
||||||
map ctrl+shift+enter new_window
|
|
||||||
map ctrl+alt+enter launch --cwd=current
|
|
||||||
map ctrl+shift+w close_window
|
|
||||||
map ctrl+shift+] next_window
|
|
||||||
map ctrl+shift+[ previous_window
|
|
||||||
map ctrl+shift+1 first_window
|
|
||||||
map ctrl+shift+2 second_window
|
|
||||||
map ctrl+shift+3 third_window
|
|
||||||
map ctrl+shift+4 fourth_window
|
|
||||||
map ctrl+shift+5 fifth_window
|
|
||||||
map ctrl+shift+6 sixth_window
|
|
||||||
map ctrl+shift+7 seventh_window
|
|
||||||
map ctrl+shift+8 eighth_window
|
|
||||||
map ctrl+shift+9 ninth_window
|
|
||||||
map ctrl+shift+0 tenth_window
|
|
||||||
|
|
||||||
map ctrl+shift+right next_tab
|
|
||||||
map ctrl+shift+left previous_tab
|
|
||||||
map ctrl+shift+t new_tab
|
|
||||||
map ctrl+shift+q close_tab
|
|
||||||
map ctrl+shift+. move_tab_forward
|
|
||||||
map ctrl+shift+, move_tab_backward
|
|
||||||
map ctrl+shift+alt+t set_tab_title
|
|
||||||
map ctrl+alt+1 goto_tab 1
|
|
||||||
map ctrl+alt+2 goto_tab 2
|
|
||||||
map ctrl+alt+3 goto_tab 3
|
|
||||||
map ctrl+alt+4 goto_tab 4
|
|
||||||
map ctrl+alt+5 goto_tab 5
|
|
||||||
map ctrl+alt+6 goto_tab 6
|
|
||||||
map ctrl+alt+7 goto_tab 7
|
|
||||||
map ctrl+alt+8 goto_tab 8
|
|
||||||
map ctrl+alt+9 goto_tab 9
|
|
||||||
map ctrl+alt+0 goto_tab 10
|
|
||||||
|
|
||||||
map ctrl+shift+equal change_font_size all +1.0
|
|
||||||
map ctrl+shift+minus change_font_size all -1.0
|
|
||||||
map ctrl+shift+backspace change_font_size all 0
|
|
||||||
|
|
||||||
map ctrl+shift+delete clear_terminal reset active
|
|
||||||
''
|
|
|
@ -31,6 +31,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
apps = {
|
apps = {
|
||||||
|
#todo move some of this to defaultDesktop pack?
|
||||||
terminal.enable = true;
|
terminal.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
gaming.enable = true;
|
gaming.enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue