add the rest of the alacritty settings

This commit is contained in:
Leonardo Eugênio 2022-08-04 11:58:56 -03:00
parent 1eaf206898
commit 2d09c02d4c
2 changed files with 146 additions and 26 deletions

View file

@ -6,7 +6,16 @@
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" "amdgpu" ];
hardware.opengl.driSupport = true;
# For 32 bit applications
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages = with pkgs; [ amdvlk ];
# For 32 bit applications
# Only available on unstable
hardware.opengl.extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-label/BTRFS_ROOT"; device = "/dev/disk/by-label/BTRFS_ROOT";

View file

@ -1,20 +1,26 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
key = { key = {
layout = "colemak";
hints = "arstwfuyneio";
left = "n"; left = "n";
down = "e"; down = "e";
up = "i"; up = "i";
right = "o"; right = "o";
next = "l";
tabL = "u"; tabL = "u";
tabR = "Y"; tabR = "Y";
insertMode = "s";
insertQuit = "kk";
menu = "s";
}; };
font = { font = {
mono = "Hack Nerd Font"; mono = "Hack Nerd Font";
interface = "Liberation Sans"; interface = "Liberation Sans";
size = { size = {
small = "12"; small = 12;
medium = "14"; medium = 14;
big = "16"; big = 16;
}; };
}; };
accents = { accents = {
@ -126,7 +132,7 @@ let
# s selected # s selected
# sc scrollbar # sc scrollbar
set fn "${font.mono} ${font.size.small}" set fn "${font.mono} ${toString font.size.small}"
set tb "${color.bg}${theme.opacityHex}" set tb "${color.bg}${theme.opacityHex}"
set tf "${accent.color}" set tf "${accent.color}"
@ -217,7 +223,9 @@ in {
nerdfonts_fira_hack nerdfonts_fira_hack
# Programming # Programming
vscode vscode
cargo rustup
# cargo
# cargo-edit
rust-analyzer rust-analyzer
gcc gcc
nixfmt nixfmt
@ -262,6 +270,10 @@ in {
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
font = {
size = font.size.small;
normal = { family = font.mono; };
};
colors = { colors = {
primary = { primary = {
background = "${color.bg}"; background = "${color.bg}";
@ -287,6 +299,103 @@ in {
opacity = theme.opacity / 100.0; opacity = theme.opacity / 100.0;
dynamic_padding = true; dynamic_padding = true;
}; };
hints = {
alphabet = key.hints;
enabled = [{
regex = let
mimes =
"(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
# I fucking hate regex, look at this bullshit
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^`'';
in "${mimes}[${delimiters}]+";
command = "xdg-open";
post_processing = true;
mouse = {
enabled = true;
mods = "None";
};
binding = {
key = "U";
mods = "Control|Shift";
};
}];
};
mouse = { hide_when_typing = true; };
key_bindings = [
{
key = lib.toUpper key.up;
mode = "Vi|~Search";
action = "Up";
}
{
key = lib.toUpper key.down;
mode = "Vi|~Search";
action = "Down";
}
{
key = lib.toUpper key.left;
mode = "Vi|~Search";
action = "Left";
}
{
key = lib.toUpper key.right;
mode = "Vi|~Search";
action = "Right";
}
{
key = lib.toUpper key.insertMode;
mode = "Vi|~Search";
action = "ScrollToBottom";
}
{
key = lib.toUpper key.insertMode;
mode = "Vi|~Search";
action = "ToggleViMode";
}
{
key = lib.toUpper key.next;
mode = "Vi|~Search";
action = "SearchNext";
}
{
key = "Up";
mods = "Control|Shift";
mode = "~Alt";
action = "ScrollLineUp";
}
{
key = "Down";
mods = "Control|Shift";
mode = "~Alt";
action = "ScrollLineDown";
}
{
key = "PageUp";
mods = "Control|Shift";
mode = "~Alt";
action = "ScrollHalfPageUp";
}
{
key = "PageDown";
mods = "Control|Shift";
mode = "~Alt";
action = "ScrollHalfPageDown";
}
{
key = "N";
mods = "Control|Shift";
action = "SpawnNewInstance";
}
# {%@@ if key.layout == "colemak" @@%}
{
key = "T";
mode = "Vi|~Search";
action = "SemanticRightEnd";
}
# {%@@ endif @@%}
];
}; };
}; };
programs.helix = { programs.helix = {
@ -449,7 +558,9 @@ in {
style = '' style = ''
/* {%@@ set bg_rgb = hex2rgb(color.bg) @@%} */ /* {%@@ set bg_rgb = hex2rgb(color.bg) @@%} */
* { * {
font: ${font.size.medium}px "${font.interface}", Font Awesome, Fira Code Nerd Font; font: ${
toString font.size.medium
}px "${font.interface}", Font Awesome, Fira Code Nerd Font;
border-radius:0; border-radius:0;
margin:0; margin:0;
padding: 0; padding: 0;
@ -526,7 +637,7 @@ in {
#clock, #clock,
#custom-weather #custom-weather
{ {
font-size: ${font.size.big}px; font-size: ${toString font.size.big}px;
} }
#network, #network,
#pulseaudio, #pulseaudio,
@ -551,12 +662,12 @@ in {
margin: 0; margin: 0;
} }
#language { #language {
font-size: ${font.size.medium}px; font-size: ${toString font.size.medium}px;
color: ${color.bg_light}; color: ${color.bg_light};
} }
#custom-sleep { #custom-sleep {
color: ${accent.color}; color: ${accent.color};
font-size: ${font.size.big}px; font-size: ${toString font.size.big}px;
font-weight: bold; font-weight: bold;
} }
''; '';
@ -767,22 +878,22 @@ in {
}]; }];
}; };
xdg.configFile."swaylock/config".text = '' xdg.configFile."swaylock/config".text = ''
image=${theme.background} image=${theme.background}
font=${font.interface} font=${font.interface}
font-size=${font.size.medium} font-size=${toString font.size.medium}
indicator-thickness=20 indicator-thickness=20
color=${color.bg} color=${color.bg}
inside-color=#FFFFFF00 inside-color=#FFFFFF00
bs-hl-color=${color.normal.red} bs-hl-color=${color.normal.red}
ring-color=${color.normal.green} ring-color=${color.normal.green}
key-hl-color=${accent.color} key-hl-color=${accent.color}
# divisor lines # divisor lines
separator-color=#aabbcc00 separator-color=#aabbcc00
line-color=#aabbcc00 line-color=#aabbcc00
line-clear-color=#aabbcc00 line-clear-color=#aabbcc00
line-caps-lock-color=#aabbcc00 line-caps-lock-color=#aabbcc00
line-ver-color=#aabbcc00 line-ver-color=#aabbcc00
line-wrong-color=#aabbcc00 line-wrong-color=#aabbcc00
''; '';
services.gammastep = { services.gammastep = {
enable = true; enable = true;