Compare commits
No commits in common. "b927205c9daa36759b082fbef0f6679b5b9e4e0e" and "2c32facb60bb30a39dba36990acef84cbb0ca6e0" have entirely different histories.
b927205c9d
...
2c32facb60
6 changed files with 58 additions and 129 deletions
|
@ -7,6 +7,5 @@
|
||||||
./firewall.nix
|
./firewall.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./kmscon.nix
|
./kmscon.nix
|
||||||
./mprocs.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,9 +183,6 @@ in
|
||||||
oneko
|
oneko
|
||||||
|
|
||||||
plover.dev
|
plover.dev
|
||||||
|
|
||||||
mupdf
|
|
||||||
inotify-tools
|
|
||||||
];
|
];
|
||||||
xsession = {
|
xsession = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -44,15 +44,35 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
keyConfig = ''
|
keyConfig = ''
|
||||||
(
|
(
|
||||||
move_left: Some(( code: Char('h'), modifiers: "")),
|
open_help: Some(( code: F(1), modifiers: ( bits: 0,),)),
|
||||||
move_right: Some(( code: Char('l'), modifiers: "")),
|
|
||||||
move_up: Some(( code: Char('k'), modifiers: "")),
|
|
||||||
move_down: Some(( code: Char('j'), modifiers: "")),
|
|
||||||
|
|
||||||
stash_open: Some(( code: Char('l'), modifiers: "")),
|
move_left: Some(( code: Char('h'), modifiers: ( bits: 0,),)),
|
||||||
open_help: Some(( code: F(1), modifiers: "")),
|
move_right: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
|
||||||
|
move_up: Some(( code: Char('k'), modifiers: ( bits: 0,),)),
|
||||||
|
move_down: Some(( code: Char('j'), modifiers: ( bits: 0,),)),
|
||||||
|
|
||||||
status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),
|
popup_up: Some(( code: Char('p'), modifiers: ( bits: 2,),)),
|
||||||
|
popup_down: Some(( code: Char('n'), modifiers: ( bits: 2,),)),
|
||||||
|
page_up: Some(( code: Char('b'), modifiers: ( bits: 2,),)),
|
||||||
|
page_down: Some(( code: Char('f'), modifiers: ( bits: 2,),)),
|
||||||
|
home: Some(( code: Char('g'), modifiers: ( bits: 0,),)),
|
||||||
|
end: Some(( code: Char('G'), modifiers: ( bits: 1,),)),
|
||||||
|
shift_up: Some(( code: Char('K'), modifiers: ( bits: 1,),)),
|
||||||
|
shift_down: Some(( code: Char('J'), modifiers: ( bits: 1,),)),
|
||||||
|
|
||||||
|
edit_file: Some(( code: Char('I'), modifiers: ( bits: 1,),)),
|
||||||
|
|
||||||
|
status_reset_item: Some(( code: Char('U'), modifiers: ( bits: 1,),)),
|
||||||
|
|
||||||
|
diff_reset_lines: Some(( code: Char('u'), modifiers: ( bits: 0,),)),
|
||||||
|
diff_stage_lines: Some(( code: Char('s'), modifiers: ( bits: 0,),)),
|
||||||
|
|
||||||
|
stashing_save: Some(( code: Char('w'), modifiers: ( bits: 0,),)),
|
||||||
|
stashing_toggle_index: Some(( code: Char('m'), modifiers: ( bits: 0,),)),
|
||||||
|
|
||||||
|
stash_open: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
|
||||||
|
|
||||||
|
abort_merge: Some(( code: Char('M'), modifiers: ( bits: 1,),)),
|
||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
{...}: {
|
|
||||||
home-manager.users.jade = {
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
home = {
|
|
||||||
packages = [pkgs.mprocs];
|
|
||||||
};
|
|
||||||
xdg.configFile."mprocs/mprocs.yaml" = {
|
|
||||||
text = builtins.toJSON {
|
|
||||||
proc_list_width = 15;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,12 +1,5 @@
|
||||||
{config, ...}: {
|
{config, ...}: {
|
||||||
home-manager.users.jade = {pkgs, ...}: let
|
home-manager.users.jade = {pkgs, ...}: {
|
||||||
typstGrammar = pkgs.fetchFromGitHub {
|
|
||||||
owner = "uben0";
|
|
||||||
repo = "tree-sitter-typst";
|
|
||||||
rev = "baddc325e858afff90501dbefa00ecfa28528931";
|
|
||||||
sha256 = "sha256-XZAgnpb1B8EZ2WXPj/JYSZGsmpKsnDiBFCDF0XjunOM";
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
home = {
|
home = {
|
||||||
sessionVariables.EDITOR = "hx";
|
sessionVariables.EDITOR = "hx";
|
||||||
packages = [
|
packages = [
|
||||||
|
@ -14,28 +7,15 @@
|
||||||
pkgs.vscode-langservers-extracted
|
pkgs.vscode-langservers-extracted
|
||||||
pkgs.nodePackages.typescript-language-server
|
pkgs.nodePackages.typescript-language-server
|
||||||
pkgs.emmet-language-server
|
pkgs.emmet-language-server
|
||||||
pkgs.typst-lsp
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
home.file = {
|
|
||||||
".config/helix/runtime/queries" = {
|
|
||||||
source = "${typstGrammar}/queries";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
programs.helix = {
|
programs.helix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
theme = "gruvbox";
|
theme = "gruvbox";
|
||||||
editor = {
|
editor = {
|
||||||
line-number = "relative";
|
line-number = "relative";
|
||||||
bufferline = "multiple";
|
lsp.display-messages = true;
|
||||||
color-modes = true;
|
|
||||||
lsp = {
|
|
||||||
display-messages = true;
|
|
||||||
display-inlay-hints = true;
|
|
||||||
};
|
|
||||||
shell = ["nu" "-c"];
|
|
||||||
idle-timeout = 0;
|
|
||||||
indent-guides = {
|
indent-guides = {
|
||||||
render = true;
|
render = true;
|
||||||
character = "│";
|
character = "│";
|
||||||
|
@ -58,29 +38,16 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
languages = {
|
languages = {
|
||||||
language-server = {
|
language-server."nu-builtin-lsp" = {
|
||||||
"nu-builtin-lsp" = {
|
|
||||||
command = "${config.users.defaultUserShell}/bin/nu";
|
command = "${config.users.defaultUserShell}/bin/nu";
|
||||||
args = ["--lsp"];
|
args = ["--lsp"];
|
||||||
};
|
};
|
||||||
"rust-analyzer" = {
|
language-server."rust-analyzer" = {
|
||||||
config = {
|
config = {
|
||||||
check.command = "clippy";
|
check.command = "clippy";
|
||||||
completion.snippets.custom = {
|
|
||||||
"pub fn" = {
|
|
||||||
prefix = ["pfn" "pubfn"];
|
|
||||||
postfix = ["pfn"];
|
|
||||||
body = [
|
|
||||||
"pub fn $\{receiver\}() {"
|
|
||||||
"\\t$1"
|
|
||||||
"}"
|
|
||||||
];
|
|
||||||
scope = "type";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
language-server."emmet-language-server" = {
|
||||||
};
|
|
||||||
"emmet-language-server" = {
|
|
||||||
command = "emmet-language-server";
|
command = "emmet-language-server";
|
||||||
args = ["--stdio"];
|
args = ["--stdio"];
|
||||||
};
|
};
|
||||||
|
@ -92,52 +59,11 @@
|
||||||
# args = ["--language-server"];
|
# args = ["--language-server"];
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
"typst-lsp" = {
|
|
||||||
command = "typst-lsp";
|
|
||||||
config = {
|
|
||||||
exportPdf = "onType";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
grammar = [
|
|
||||||
{
|
|
||||||
name = "typst";
|
|
||||||
source = {
|
|
||||||
git = "https://github.com/uben0/tree-sitter-typst";
|
|
||||||
rev = "baddc325e858afff90501dbefa00ecfa28528931";
|
|
||||||
# path = "${typstGrammar}";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
language = [
|
language = [
|
||||||
{
|
{
|
||||||
name = "nu";
|
name = "nu";
|
||||||
language-servers = ["nu-builtin-lsp"];
|
language-servers = ["nu-builtin-lsp"];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "typst";
|
|
||||||
scope = "source.typst";
|
|
||||||
file-types = ["typ" "typst"];
|
|
||||||
injection-regex = "typ(st)?";
|
|
||||||
comment-token = "//";
|
|
||||||
indent = {
|
|
||||||
tab-width = 2;
|
|
||||||
unit = " ";
|
|
||||||
};
|
|
||||||
roots = ["typst.toml"];
|
|
||||||
formatter = {
|
|
||||||
command = "${pkgs.typstfmt}/bin/typstfmt";
|
|
||||||
};
|
|
||||||
auto-format = true;
|
|
||||||
language-servers = ["typst-lsp"];
|
|
||||||
auto-pairs = {
|
|
||||||
"(" = ")";
|
|
||||||
"{" = "}";
|
|
||||||
"[" = "]";
|
|
||||||
"$" = "$";
|
|
||||||
"\"" = "\"";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "nix";
|
name = "nix";
|
||||||
formatter = {
|
formatter = {
|
||||||
|
|
|
@ -803,15 +803,18 @@ def glog [
|
||||||
] {
|
] {
|
||||||
git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n $amount
|
git log --pretty=%h»¦«%s»¦«%aN»¦«%aE»¦«%aD -n $amount
|
||||||
| lines
|
| lines
|
||||||
| split column "»¦«u commit subject name email date"
|
| split column "»¦«" commit subject name email date
|
||||||
}
|
}
|
||||||
|
|
||||||
def typed [
|
def ed [
|
||||||
name: string
|
file: path
|
||||||
|
...cmdargs: string
|
||||||
] {
|
] {
|
||||||
touch $"($name).typ"
|
let ext = $file | path parse | get extension;
|
||||||
typst compile $"($name).typ"
|
match $ext {
|
||||||
mprocs --names Editor,Viewer,Notify $"hx '($name).typ'" $"mupdf-x11 '($name).pdf'" $"while inotifywait -e modify '($name).pdf' ; do pkill -HUP mupdf; done"
|
"typ" => {|| zellij run --direction down -- typst watch $file ($cmdargs | prepend '--open' | str join ' ') }
|
||||||
|
};
|
||||||
|
hx $file
|
||||||
}
|
}
|
||||||
|
|
||||||
alias gnix = cd ~/nix-configs;
|
alias gnix = cd ~/nix-configs;
|
||||||
|
|
Loading…
Reference in a new issue