From 048d5e012fc1546ecc6df55055bda3644985aacc Mon Sep 17 00:00:00 2001 From: Riley Apeldoorn Date: Tue, 8 Mar 2022 06:56:23 +0100 Subject: [PATCH] uhhhh --- colors.nix | 8 +++---- machines/thor/configuration.nix | 1 + modules/default.nix | 41 +++++++++++++++++++++++++++++++++ modules/kak/colors/rust.nix | 27 +++++++++++----------- modules/kak/default.nix | 18 ++++++++++++--- 5 files changed, 75 insertions(+), 20 deletions(-) diff --git a/colors.nix b/colors.nix index 855b246..cf24d99 100644 --- a/colors.nix +++ b/colors.nix @@ -57,7 +57,7 @@ let inherit (builtins) mapAttrs map; in rec { red = { normal = "ff6161"; bright = "ff3b3b"; - pastel = "ff5369"; + pastel = "ff7588"; }; green = { @@ -81,19 +81,19 @@ let inherit (builtins) mapAttrs map; in rec { purple = { normal = "bd78fa"; bright = "c97ffa"; - pastel = "00e1ff"; + pastel = "d9b5ff"; }; cyan = { normal = "29f8ff"; bright = "26e3fc"; - pastel = ""; + pastel = "63e8ff"; }; pink = { normal = "f74ddb"; bright = "ff63e5"; - pastel = ""; + pastel = "ff96e3"; }; orange = { diff --git a/machines/thor/configuration.nix b/machines/thor/configuration.nix index 9032b31..460621b 100644 --- a/machines/thor/configuration.nix +++ b/machines/thor/configuration.nix @@ -18,6 +18,7 @@ users.users."riley".packages = with pkgs; [ minecraft + cockatrice ]; devices = { diff --git a/modules/default.nix b/modules/default.nix index 10478b7..33298ad 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -141,6 +141,47 @@ let named = submodule { ]; + environment.shellAliases = { + + # Born to VIM + ":q" = "exit"; + + # Launch [A]lacritty + "a" = "alacritty"; + + # [D]isown + "d" = "disown"; + + # Install a [p]ackage in a nix-shell + "p" = "nix-shell -p"; + + }; + + programs.bash.interactiveShellInit = '' + + # [G]o to the directory. Create the directory if it does not exist + # yet, and if the directory contains a shell.nix file, source it. + g () { + [ -d "$1" ] || mkdir -p "$1"; + cd "$1"; + [ -e "shell.nix" ] && nix-shell; + } + + # [M]ake a directory and immediately enter it. + m () { mkdir -p "$1" && cd "$1"; } + + # [R]eplace the current process with the given one. + r () { $1 & disown; exit; } + + # [J]ump to the directory by means of fuzzy search. If the fuzzy finder + # is aborted, the jump is also aborted. + j () { t=`sk` && cd $t; } + + # Enter a temporary [d]irectory. + d () { cd "$(mktemp -d)"; } + + ''; + boot = { loader.systemd-boot = { enable = true; diff --git a/modules/kak/colors/rust.nix b/modules/kak/colors/rust.nix index 6bec1dd..c560fd3 100644 --- a/modules/kak/colors/rust.nix +++ b/modules/kak/colors/rust.nix @@ -8,34 +8,35 @@ text = with theme; '' # Types - face global variant rgb:${green.bright}+b - face global enum rgb:${green.bright}+b - face global struct rgb:${red.pastel}+b - face global alias rgb:${orange.normal}+b - face global primitive rgb:${misc.teal}+b + face global variant rgb:${blue.normal}+b + face global enum rgb:${blue.normal}+b + face global struct rgb:${blue.normal}+b + face global alias rgb:${blue.normal}+b + face global primitive rgb:${blue.normal}+b + face global union rgb:${blue.normal}+b face global trait rgb:${purple.bright}+b - face global union rgb:${misc.lime}+b # Other Rust-specific syntax elements face global lifetime rgb:${cyan.bright} - face global format rgb:${orange.bright}+b - face global macro rgb:fc4cbf+b + face global macro rgb:${green.bright}+b + face global format macro # Keywords - face global keyword rgb:${foreground.normal}+b + face global keyword rgb:${green.normal} # Literals - face global literal rgb:${yellow.bright} - face global string rgb:${yellow.bright} + face global literal rgb:${misc.lime} + face global string literal # Items - face global function rgb:${green.normal} + # face global function rgb:ff70cd + face global function rgb:fc7cf8 face global method function face global module rgb:${misc.blueGrey} # Other stuff face global attribute comment - face global variable rgb:${foreground.normal} + face global variable rgb:f5f5f5 face global property rgb:${misc.lime} face global operator rgb:${yellow.normal} face global punctuation rgb:${foreground.normal} diff --git a/modules/kak/default.nix b/modules/kak/default.nix index 3cd823c..22ab4da 100644 --- a/modules/kak/default.nix +++ b/modules/kak/default.nix @@ -58,10 +58,21 @@ let kakrc = pkgs.writeTextFile (rec { colorscheme haskell lsp-enable-window - lsp-inlay-diagnostics-enable global + lsp-inlay-diagnostics-enable window - map global ': lsp-code-actions' - map global ': lsp-hover' + map global normal ': lsp-code-actions' + map global normal ': lsp-hover' + + hook window ModeChange .*:.*:insert %{ + remove-highlighter window/lsp_diagnostics + } + + hook window ModeChange .*:insert:normal %{ + lsp-inlay-diagnostics-enable window + } + + set global lsp_inlay_diagnostic_sign '>' + map global insert '' } @@ -112,6 +123,7 @@ let kakrc = pkgs.writeTextFile (rec { face global InlayDiagnosticWarning rgb:a39e31+f face global InlayDiagnosticError rgb:ad494f+f face global InlayDiagnosticHint rgb:4d965a+f + face global InlayDiagnosticInfo rgb:4d965a+f ''); });