big module system implementation
This commit is contained in:
87
home/modules/terminal/alacritty/default.nix
Normal file
87
home/modules/terminal/alacritty/default.nix
Normal file
@@ -0,0 +1,87 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.terminal.alacritty;
|
||||
in {
|
||||
options = {
|
||||
modules.terminal.alacritty.enable = mkEnableOption "Enables firefox";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Default colors
|
||||
colors.primary = {
|
||||
background = "#282828";
|
||||
foreground = "#d4be98";
|
||||
};
|
||||
colors = {
|
||||
# Normal colors
|
||||
normal = {
|
||||
black = "#3c3836";
|
||||
red = "#ea6962";
|
||||
green = "#a9b665";
|
||||
yellow = "#d8a657";
|
||||
blue = "#7daea3";
|
||||
magenta = "#d3869b";
|
||||
cyan = "#89b482";
|
||||
white = "#d4be98";
|
||||
};
|
||||
# Bright colors (same as normal colors)
|
||||
bright = {
|
||||
black = "#3c3836";
|
||||
red = "#ea6962";
|
||||
green = "#a9b665";
|
||||
yellow = "#d8a657";
|
||||
blue = "#7daea3";
|
||||
magenta = "#d3869b";
|
||||
cyan = "#89b482";
|
||||
white = "#d4be98";
|
||||
};
|
||||
};
|
||||
font = {
|
||||
size = 10;
|
||||
normal = {
|
||||
family = "Input Mono Compressed";
|
||||
style = "Light";
|
||||
};
|
||||
bold = {
|
||||
family = "Input Mono Compressed";
|
||||
style = "Regular";
|
||||
};
|
||||
italic = {
|
||||
family = "Input Mono Compressed";
|
||||
style = "Italic";
|
||||
};
|
||||
};
|
||||
keyboard.bindings = [
|
||||
{
|
||||
action = "Copy";
|
||||
key = "C";
|
||||
mods = "Command";
|
||||
}
|
||||
{
|
||||
action = "Paste";
|
||||
key = "V";
|
||||
mods = "Command";
|
||||
}
|
||||
];
|
||||
window = {
|
||||
dynamic_title = true;
|
||||
opacity = 0.9;
|
||||
padding = {
|
||||
x = 5;
|
||||
y = 5;
|
||||
};
|
||||
dimensions = {
|
||||
columns = 120;
|
||||
lines = 35;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
248
home/modules/terminal/foot/default.nix
Normal file
248
home/modules/terminal/foot/default.nix
Normal file
@@ -0,0 +1,248 @@
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.terminal.foot;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.terminal.foot.enable = mkEnableOption "Enables foot terminal";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
package = pkgs.foot;
|
||||
settings = {
|
||||
# -*- conf -*-
|
||||
|
||||
# shell=$SHELL (if set, otherwise user's default shell from /etc/passwd)
|
||||
# term=foot (or xterm-256color if built with -Dterminfo=disabled)
|
||||
# login-shell=no
|
||||
|
||||
# app-id=foot # globally set wayland app-id. Default values are "foot" and "footclient" for desktop and server mode
|
||||
# title=foot
|
||||
# locked-title=no
|
||||
|
||||
# font=monospace:size=8
|
||||
# font-bold=<bold variant of regular font>
|
||||
# font-italic=<italic variant of regular font>
|
||||
# font-bold-italic=<bold+italic variant of regular font>
|
||||
# font-size-adjustment=0.5
|
||||
# line-height=<font metrics>
|
||||
# letter-spacing=0
|
||||
# horizontal-letter-offset=0
|
||||
# vertical-letter-offset=0
|
||||
# underline-offset=<font metrics>
|
||||
# underline-thickness=<font underline thickness>
|
||||
# box-drawings-uses-font-glyphs=no
|
||||
# dpi-aware=no
|
||||
|
||||
# initial-window-size-pixels=700x500 # Or,
|
||||
# initial-window-size-chars=<COLSxROWS>
|
||||
# initial-window-mode=windowed
|
||||
# pad=0x0 # optionally append 'center'
|
||||
# resize-by-cells=yes
|
||||
# resize-delay-ms=100
|
||||
|
||||
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
|
||||
|
||||
# bold-text-in-bright=no
|
||||
# word-delimiters=,│`|:"'()[]{}<>
|
||||
# selection-target=primary
|
||||
# workers=<number of logical CPUs>
|
||||
# utmp-helper=/usr/lib/utempter/utempter # When utmp backend is ‘libutempter’ (Linux)
|
||||
# utmp-helper=/usr/libexec/ulog-helper # When utmp backend is ‘ulog’ (FreeBSD)
|
||||
|
||||
main = {
|
||||
font = "Input Mono Compressed:size=12";
|
||||
box-drawings-uses-font-glyphs = "yes";
|
||||
dpi-aware = "no";
|
||||
pad = "3x1";
|
||||
term = "xterm-256color";
|
||||
};
|
||||
|
||||
environment = {
|
||||
# name=value
|
||||
};
|
||||
|
||||
bell = {
|
||||
urgent = "no";
|
||||
notify = "no";
|
||||
visual = "no";
|
||||
command = "no";
|
||||
command-focused = "no";
|
||||
};
|
||||
|
||||
scrollback = {
|
||||
lines = "100";
|
||||
# multiplier=3.0
|
||||
# indicator-position=relative
|
||||
# indicator-format=""
|
||||
};
|
||||
|
||||
url = {
|
||||
# launch=xdg-open ${url}
|
||||
# label-letters=sadfjklewcmpgh
|
||||
# osc8-underline=url-mode
|
||||
# protocols=http, https, ftp, ftps, file, gemini, gopher
|
||||
# uri-characters=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]
|
||||
};
|
||||
|
||||
cursor = {
|
||||
style = "block";
|
||||
# color=<inverse foreground/background>
|
||||
blink = "no";
|
||||
# blink-rate=500
|
||||
# beam-thickness=1.5
|
||||
# underline-thickness=<font underline thickness>
|
||||
};
|
||||
|
||||
mouse = {
|
||||
hide-when-typing = "no";
|
||||
# alternate-scroll-mode=yes
|
||||
};
|
||||
|
||||
touch = {
|
||||
# long-press-delay=400
|
||||
};
|
||||
|
||||
colors = {
|
||||
alpha = "0.9";
|
||||
background = "282828";
|
||||
foreground = "ebdbb2";
|
||||
regular0 = "282828";
|
||||
regular1 = "cc241d";
|
||||
regular2 = "98971a";
|
||||
regular3 = "d79921";
|
||||
regular4 = "458588";
|
||||
regular5 = "b16286";
|
||||
regular6 = "689d6a";
|
||||
regular7 = "a89984";
|
||||
bright0 = "928374";
|
||||
bright1 = "fb4934";
|
||||
bright2 = "b8bb26";
|
||||
bright3 = "fabd2f";
|
||||
bright4 = "83a598";
|
||||
bright5 = "d3869b";
|
||||
bright6 = "8ec07c";
|
||||
bright7 = "ebdbb2";
|
||||
};
|
||||
|
||||
csd = {
|
||||
# preferred=server
|
||||
# size=26
|
||||
# font=<primary font>
|
||||
# color=<foreground color>
|
||||
# hide-when-maximized=no
|
||||
# double-click-to-maximize=yes
|
||||
# border-width=0
|
||||
# border-color=<csd.color>
|
||||
# button-width=26
|
||||
# button-color=<background color>
|
||||
# button-minimize-color=<regular4>
|
||||
# button-maximize-color=<regular2>
|
||||
# button-close-color=<regular1>
|
||||
};
|
||||
|
||||
key-bindings = {
|
||||
# scrollback-up-page=Shift+Page_Up
|
||||
# scrollback-up-half-page=none
|
||||
# scrollback-up-line=none
|
||||
# scrollback-down-page=Shift+Page_Down
|
||||
# scrollback-down-half-page=none
|
||||
# scrollback-down-line=none
|
||||
# scrollback-home=none
|
||||
# scrollback-end=none
|
||||
# clipboard-copy=Control+Shift+c XF86Copy
|
||||
# clipboard-paste=Control+Shift+v XF86Paste
|
||||
# primary-paste=Shift+Insert
|
||||
# search-start=Control+Shift+r
|
||||
# font-increase=Control+plus Control+equal Control+KP_Add
|
||||
# font-decrease=Control+minus Control+KP_Subtract
|
||||
# font-reset=Control+0 Control+KP_0
|
||||
# spawn-terminal=Control+Shift+n
|
||||
# minimize=none
|
||||
# maximize=none
|
||||
# fullscreen=none
|
||||
# pipe-visible=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||
# pipe-scrollback=[sh -c "xurls | fuzzel | xargs -r firefox"] none
|
||||
# pipe-selected=[xargs -r firefox] none
|
||||
# pipe-command-output=[wl-copy] none # Copy last command's output to the clipboard
|
||||
# show-urls-launch=Control+Shift+o
|
||||
# show-urls-copy=none
|
||||
# show-urls-persistent=none
|
||||
# prompt-prev=Control+Shift+z
|
||||
# prompt-next=Control+Shift+x
|
||||
# unicode-input=Control+Shift+u
|
||||
# noop=none
|
||||
};
|
||||
|
||||
search-bindings = {
|
||||
# cancel=Control+g Control+c Escape
|
||||
# commit=Return
|
||||
# find-prev=Control+r
|
||||
# find-next=Control+s
|
||||
# cursor-left=Left Control+b
|
||||
# cursor-left-word=Control+Left Mod1+b
|
||||
# cursor-right=Right Control+f
|
||||
# cursor-right-word=Control+Right Mod1+f
|
||||
# cursor-home=Home Control+a
|
||||
# cursor-end=End Control+e
|
||||
# delete-prev=BackSpace
|
||||
# delete-prev-word=Mod1+BackSpace Control+BackSpace
|
||||
# delete-next=Delete
|
||||
# delete-next-word=Mod1+d Control+Delete
|
||||
# extend-char=Shift+Right
|
||||
# extend-to-word-boundary=Control+w Control+Shift+Right
|
||||
# extend-to-next-whitespace=Control+Shift+w
|
||||
# extend-line-down=Shift+Down
|
||||
# extend-backward-char=Shift+Left
|
||||
# extend-backward-to-word-boundary=Control+Shift+Left
|
||||
# extend-backward-to-next-whitespace=none
|
||||
# extend-line-up=Shift+Up
|
||||
# clipboard-paste=Control+v Control+Shift+v Control+y XF86Paste
|
||||
# primary-paste=Shift+Insert
|
||||
# unicode-input=none
|
||||
# quit=none
|
||||
# scrollback-up-page=Shift+Page_Up
|
||||
# scrollback-up-half-page=none
|
||||
# scrollback-up-line=none
|
||||
# scrollback-down-page=Shift+Page_Down
|
||||
# scrollback-down-half-page=none
|
||||
# scrollback-down-line=none
|
||||
# scrollback-home=none
|
||||
# scrollback-end=none
|
||||
};
|
||||
|
||||
url-bindings = {
|
||||
# cancel=Control+g Control+c Control+d Escape
|
||||
# toggle-url-visible=t
|
||||
};
|
||||
|
||||
text-bindings = {
|
||||
# \x03=Mod4+c # Map Super+c -> Ctrl+c
|
||||
};
|
||||
|
||||
mouse-bindings = {
|
||||
# scrollback-up-mouse=BTN_BACK
|
||||
# scrollback-down-mouse=BTN_FORWARD
|
||||
# selection-override-modifiers=Shift
|
||||
# primary-paste=BTN_MIDDLE
|
||||
# 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
|
||||
};
|
||||
|
||||
# vim: ft=dosini
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
107
home/modules/terminal/kitty/default.nix
Normal file
107
home/modules/terminal/kitty/default.nix
Normal file
@@ -0,0 +1,107 @@
|
||||
{ config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.terminal.kitty;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
modules.terminal.kitty.enable = mkEnableOption "Enables kitty terminal";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# include = "theme.conf";
|
||||
enable_audio_bell = false;
|
||||
open_url_with = "firefox-nightly";
|
||||
font_family = "Input Mono Compressed Extra Light";
|
||||
bold_font = "auto";
|
||||
italic_font = "auto";
|
||||
bold_italic_font = "auto";
|
||||
font_size = "11.0";
|
||||
cursor_blink_interval = 0;
|
||||
copy_on_select = "clipboard";
|
||||
background_opacity = "0.95";
|
||||
background_blur = "32";
|
||||
window_padding_width = 3;
|
||||
# tab_bar_min_tabs = 1;
|
||||
# tab_bar_edge = "bottom";
|
||||
tab_bar_style = "separator";
|
||||
tab_bar_margin_width = "0.0";
|
||||
tab_bar_margin_height = "0.0 0.0";
|
||||
active_tab_font_style = "normal";
|
||||
inactive_tab_font_style = "normal";
|
||||
# tab_title_max_length = 30;
|
||||
# # colors
|
||||
# active_tab_foreground = "#32302f";
|
||||
# active_tab_background = "#282828";
|
||||
# inactive_tab_foreground = "#282828";
|
||||
# inactive_tab_background = "#504945";
|
||||
tab_bar_background = "#504945";
|
||||
tab_bar_min_tabs = 1;
|
||||
tab_bar_edge = "bottom";
|
||||
# tab_powerline_style = "slanted";
|
||||
};
|
||||
extraConfig = ''
|
||||
kitty_mod shift+ctrl
|
||||
map kitty_mod+q close_tab
|
||||
map ctrl+shift+c copy_to_clipboard
|
||||
map ctrl+shift+v paste_from_clipboard
|
||||
tab_separator ""
|
||||
tab_title_template "{fmt.fg._504945}{fmt.bg.default}▓{fmt.fg._282828}{fmt.bg.default}{index}{fmt.fg._282828}{fmt.bg._504945} {title[:15] + (title[15:] and '…')} {fmt.fg._504945}{fmt.bg.default}▓ "
|
||||
active_tab_title_template "{fmt.fg._282828}{fmt.bg.default}▓{fmt.fg._A89984}{fmt.bg._282828}{fmt.fg._A89984}{fmt.bg._282828} {title[:40] + (title[40:] and '…')} {fmt.fg._282828}{fmt.bg.default}▓ "
|
||||
|
||||
# vim:ft=kitty
|
||||
## name: Gruvbox Material Dark Cnst
|
||||
## author: Sainnhe Park
|
||||
## license: MIT
|
||||
## upstream: https://raw.githubusercontent.com/rsaihe/gruvbox-material-kitty/main/colors/gruvbox-material-dark-medium.conf
|
||||
## blurb: A modified version of Gruvbox with softer contrasts
|
||||
|
||||
background #282828
|
||||
foreground #d4be98
|
||||
|
||||
selection_background #d4be98
|
||||
selection_foreground #282828
|
||||
|
||||
cursor #a89984
|
||||
cursor_text_color background
|
||||
|
||||
# Black
|
||||
color0 #665c54
|
||||
color8 #928374
|
||||
|
||||
# Red
|
||||
color1 #ea6962
|
||||
color9 #ea6962
|
||||
|
||||
# Green
|
||||
color2 #a9b665
|
||||
color10 #a9b665
|
||||
|
||||
# Yellow
|
||||
color3 #e78a4e
|
||||
color11 #d8a657
|
||||
|
||||
# Blue
|
||||
color4 #7daea3
|
||||
color12 #7daea3
|
||||
|
||||
# Magenta
|
||||
color5 #d3869b
|
||||
color13 #d3869b
|
||||
|
||||
# Cyan
|
||||
color6 #89b482
|
||||
color14 #89b482
|
||||
|
||||
# White
|
||||
color7 #d4be98
|
||||
color15 #d4be98
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
44
home/modules/terminal/wezterm/default.nix
Normal file
44
home/modules/terminal/wezterm/default.nix
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
enable_wayland = "true";
|
||||
# weztermPkg = pkgs.wezterm;
|
||||
weztermFlake = inputs.wezterm.packages.${pkgs.system}.default;
|
||||
in {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
package = weztermFlake;
|
||||
extraConfig = ''
|
||||
local wezterm = require 'wezterm';
|
||||
|
||||
local config = {
|
||||
-- font = wezterm.font("Input Mono Compressed"),
|
||||
font_size = 12,
|
||||
check_for_updates = false,
|
||||
color_scheme = 'Gruvbox Material (Gogh)',
|
||||
default_cursor_style = 'SteadyBar',
|
||||
enable_scroll_bar = true,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
scrollback_lines = 10000,
|
||||
window_background_opacity = 0.9,
|
||||
}
|
||||
if wezterm.target_triple == "x86_64-pc-windows-msvc" then
|
||||
config.default_prog = { "powershell.exe" }
|
||||
else
|
||||
config.enable_wayland = ${enable_wayland}
|
||||
-- config.window_decorations = "TITLE"
|
||||
config.window_close_confirmation = "NeverPrompt"
|
||||
-- config.freetype_load_target = "Light"
|
||||
-- config.freetype_render_target = "HorizontalLcd"
|
||||
local f = wezterm.font_with_fallback({
|
||||
{family="Input Mono Compressed", weight="Light"},
|
||||
{family="Input Sans Narrow", weight="Light"},
|
||||
})
|
||||
config.font = f;
|
||||
end
|
||||
return config
|
||||
'';
|
||||
};
|
||||
}
|
||||
25
home/modules/terminal/wezterm/default.nixbak
Normal file
25
home/modules/terminal/wezterm/default.nixbak
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
programs.wezterm = {
|
||||
enable = true;
|
||||
package = inputs.wezterm.packages.${pkgs.system}.default;
|
||||
|
||||
extraConfig = ''
|
||||
return {
|
||||
enable_wayland = true,
|
||||
font = wezterm.font("Input Mono Compressed"),
|
||||
font_size = 12,
|
||||
check_for_updates = false,
|
||||
color_scheme = 'Gruvbox Material (Gogh)',
|
||||
default_cursor_style = 'SteadyBar',
|
||||
enable_scroll_bar = true,
|
||||
hide_tab_bar_if_only_one_tab = true,
|
||||
scrollback_lines = 10000,
|
||||
window_background_opacity = 0.9,
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
89
home/modules/terminal/zellij/default.nix
Normal file
89
home/modules/terminal/zellij/default.nix
Normal file
@@ -0,0 +1,89 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.modules.terminal.zellij;
|
||||
in {
|
||||
options = {
|
||||
modules.terminal.zellij.enable = mkEnableOption "Enables zellij";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
enableZshIntegration = false;
|
||||
};
|
||||
home.shellAliases = {
|
||||
zr = "zellij run --";
|
||||
zrf = "zellij run --floating --";
|
||||
ze = "zellij edit";
|
||||
zef = "zellij edit --floating";
|
||||
};
|
||||
|
||||
xdg.configFile."zellij/config.kdl".text = ''
|
||||
default_layout "compact"
|
||||
mouse_mode true
|
||||
copy_on_select true
|
||||
copy_command "wl-copy"
|
||||
simplified_ui false
|
||||
scrollback_editor "/home/cnst/.nix-profile/bin/nvim"
|
||||
pane_frames true
|
||||
on_force_close "detach"
|
||||
|
||||
ui {
|
||||
pane_frames {
|
||||
rounded_corners false
|
||||
}
|
||||
}
|
||||
|
||||
keybinds {
|
||||
normal {
|
||||
bind "Alt m" {
|
||||
LaunchPlugin "file:~/.config/zellij/plugins/monocle.wasm" {
|
||||
in_place true
|
||||
kiosk true
|
||||
};
|
||||
SwitchToMode "Normal"
|
||||
}
|
||||
bind "Ctrl f" {
|
||||
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/monocle.wasm" {
|
||||
floating true
|
||||
}
|
||||
SwitchToMode "Normal"
|
||||
}
|
||||
bind "Alt 1" { GoToTab 1;}
|
||||
bind "Alt 2" { GoToTab 2;}
|
||||
bind "Alt 3" { GoToTab 3;}
|
||||
bind "Alt 4" { GoToTab 4;}
|
||||
}
|
||||
|
||||
shared_except "locked" {
|
||||
bind "Ctrl y" {
|
||||
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/room.wasm" {
|
||||
floating true
|
||||
ignore_case true
|
||||
}
|
||||
}
|
||||
}
|
||||
unbind "Ctrl b" "Ctrl h" "Ctrl g" "Alt j"
|
||||
}
|
||||
|
||||
themes {
|
||||
gruvbox-dark {
|
||||
bg "#282828"
|
||||
fg "#D5C4A1"
|
||||
black "#3C3836"
|
||||
red "#CC241D"
|
||||
green "#98971A"
|
||||
yellow "#D79921"
|
||||
blue "#458588"
|
||||
magenta "#B16286"
|
||||
cyan "#689D6A"
|
||||
white "#FBF1C7"
|
||||
orange "#D65D0E"
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user