1
Fork 0

Add tldr persistence and much more

This commit is contained in:
Matei Adriel 2023-11-04 18:58:09 +01:00
parent 36d1a39511
commit f17e32e30d
No known key found for this signature in database
9 changed files with 97 additions and 87 deletions

View file

@ -13,7 +13,7 @@ let
catppuccin-latte = {
stylix = {
image = ./wallpapers/watercag.png;
image = ./wallpapers/needygirloverdose.jpg;
base16Scheme = "${inputs.catppuccin-base16}/base16/latte.yaml";
polarity = "light";
};

View file

@ -6,6 +6,7 @@ pkgs.mkShell {
hpack
stack
cabal-install
haskell-language-server
haskellPackages.implicit-hie # Automatically generate hie.yaml!
];
}

View file

@ -6,8 +6,8 @@ require("my.helpers.wrapMovement").setup()
vim.opt.conceallevel = 0
-- vim.opt.foldcolumn = "1"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldmethod = "expr"
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
-- vim.opt.foldmethod = "expr"
-- {{{ Older functions for calculating things inside vim
-- vim.keymap.set("n", "<leader>lg", function()
@ -33,79 +33,82 @@ vim.opt.foldmethod = "expr"
local abbreviations = {
-- Other fancy symvols
{ "tmat", "^T" }, -- Tranpose of a matrix
{ "cmat", "^*" }, -- Conjugate of a matrix
{ "sneg", "^C" }, -- Set complement
{ "ortco", "^\\bot" }, -- Orthogonal complement
{ "tmat", "^T" }, -- Tranpose of a matrix
{ "cmat", "^*" }, -- Conjugate of a matrix
{ "sneg", "^C" }, -- Set complement
{ "ortco", "^\\bot" }, -- Orthogonal complement
{ "sinter", "^\\circ" }, -- Interior of a set
{ "nuls", "\\varnothing" },
{ "nuls", "\\varnothing" },
-- Basic commands
{ "mangle", "\\measuredangle" },
{ "aangle", "\\angle" },
{ "sdiff", "\\setminus" },
{ "sst", "\\subset" },
{ "spt", "\\supset" },
{ "sseq", "\\subseteq" },
{ "speq", "\\supseteq" },
{ "nin", "\\not\\in" },
{ "iin", "\\in" },
{ "tto", "\\to" },
{ "land", "\\land" },
{ "lor", "\\lor" },
{ "ssin", "\\sin" },
{ "ccos", "\\cos" },
{ "ttan", "\\ttan" },
{ "ssec", "\\sec" },
{ "lln", "\\ln" },
{ "frl", "\\forall" },
{ "exs", "\\exists" },
{ "iinf", "\\infty" },
{ "ninf", "-\\infty" },
{ "nlnl", "\\pm" }, -- had this as npnp first but it was hard-ish to type
{ "ccup", "\\cup" },
{ "ccap", "\\cap" },
{ "nope", "\\bot" },
{ "yee", "\\top" },
{ "ccan", "\\cancel" },
{ "com", "\\circ" },
{ "mul", "\\cdot" },
{ "smul", "\\times" },
{ "card", "\\#" },
{ "div", "\\|" },
{ "ndiv", "\\not\\|\\:" },
{ "perp", "\\perp" },
{ "sdiff", "\\setminus" },
{ "sst", "\\subset" },
{ "spt", "\\supset" },
{ "sseq", "\\subseteq" },
{ "speq", "\\supseteq" },
{ "nin", "\\not\\in" },
{ "iin", "\\in" },
{ "tto", "\\to" },
{ "land", "\\land" },
{ "lor", "\\lor" },
{ "ssin", "\\sin" },
{ "ccos", "\\cos" },
{ "ttan", "\\ttan" },
{ "ssec", "\\sec" },
{ "lln", "\\ln" },
{ "frl", "\\forall" },
{ "exs", "\\exists" },
{ "iinf", "\\infty" },
{ "ninf", "-\\infty" },
{ "nlnl", "\\pm" }, -- had this as npnp first but it was hard-ish to type
{ "ccup", "\\cup" },
{ "ccap", "\\cap" },
{ "nope", "\\bot" },
{ "yee", "\\top" },
{ "ccan", "\\cancel" },
{ "com", "\\circ" },
{ "mul", "\\cdot" },
{ "smul", "\\times" },
{ "card", "\\#" },
{ "div", "\\|" },
{ "ndiv", "\\not\\|\\:" },
{ "perp", "\\perp" },
{ "cdots", "\\cdots" }, -- center dots
{ "ldots", "\\ldots" }, -- low dots
{ "cldots", ",\\ldots," }, -- comma, low dots
-- Decorations
{ "hat", "\\hat" },
{ "bar", "\\bar" },
{ "hat", "\\hat" },
{ "bar", "\\bar" },
-- Custom commands
{ "abs", "\\abs" }, -- custom abs command
{ "norm", "\\norm" }, -- custom norm command
{ "iprod", "\\iprod" }, -- custom inner product command
{ "abs", "\\abs" }, -- custom abs command
{ "norm", "\\norm" }, -- custom norm command
{ "iprod", "\\iprod" }, -- custom inner product command
{ "diprod", "\\dprod" }, -- custom self inner product command
{ "prob", "\\prob" }, -- custom probability function
{ "dist", "\\dist" }, -- custom dist function
{ "diam", "\\diam" }, -- custom diam operator
{ "gen", "\\gen" }, -- custom command for group generated by element
{ "ord", "\\ordop" }, -- order of a group
{ "vsm", "\\vecspace" }, -- custom math vector space
{ "prob", "\\prob" }, -- custom probability function
{ "dist", "\\dist" }, -- custom dist function
{ "diam", "\\diam" }, -- custom diam operator
{ "gen", "\\gen" }, -- custom command for group generated by element
{ "ord", "\\ordop" }, -- order of a group
{ "vsm", "\\vecspace" }, -- custom math vector space
}
-- Todo: convert exponents and subscripts
-- to use this more concise notation.
local abolishAbbreviations = {
-- {{{ General phrases
{ "thrf", "therefore" },
{ "bcla", "by contradiction let's assume" },
{ "wlg", "without loss of generality" },
{ "tits", "that is to say," },
{ "wpbd", "we will prove the statement in both directions." },
{ "stam{,s}", "statement{}" },
{ "thrf", "therefore" },
{ "bcla", "by contradiction let's assume" },
{ "wlg", "without loss of generality" },
{ "tits", "that is to say," },
{ "wpbd", "we will prove the statement in both directions." },
{ "stam{,s}", "statement{}" },
{ "{ww,tt}{m,i}", "{which,this} {means,implies}" },
{ "cex{,s}", "counterexample{}" },
{ "er{t,s,r}", "{transitivity,symmetry,reflexivity}" },
{ "cex{,s}", "counterexample{}" },
{ "er{t,s,r}", "{transitivity,symmetry,reflexivity}" },
-- }}}
-- {{{ Exponents and subscripts:
-- {operation}{argument}
@ -131,7 +134,7 @@ local abolishAbbreviations = {
-- to `\\foo` directly (so I saved some keystrokes by letting scrap.nvim
-- repeat everything for me).
{
"{,e,s}{{eps,lam},{star,delta,Delta,pi,psi,sigma,alpha,beta,theta,gamma,omega,Omega}}",
"{,e,s}{{eps,lam},{star,delta,Delta,pi,tau,psi,phi,rho,sigma,alpha,beta,theta,gamma,omega,Omega}}",
"{,^,_}\\\\{{epsilon,lambda},{}}",
options = A.no_capitalization,
},
@ -180,20 +183,20 @@ local abolishAbbreviations = {
},
-- }}}
-- {{{ Calculus & analysis
{ "ib{p,s}", "integration by {parts,substitution}" },
{ "nb{,h}{,s}", "neighbour{,hood}{}" },
{ "ib{p,s}", "integration by {parts,substitution}" },
{ "nb{,h}{,s}", "neighbour{,hood}{}" },
-- }}}
-- {{{ Linear algebra
{ "rref", "reduced row echalon form" },
{ "rref", "reduced row echalon form" },
{ "eg{va,ve,p}{,s}", "eigen{value,vector,pair}{}" },
{ "mx{,s}", "matri{x,ces}" },
{ "dete{,s}", "determinant{}" },
{ "ort{n,g}", "orto{normal,gonal}" },
{ "l{in,de}", "linearly {independent,dependent}" },
{ "lcon{,s}", "linear combination{}" },
{ "vst{,s}", "vector space{}" }, -- text vector space
{ "mx{,s}", "matri{x,ces}" },
{ "dete{,s}", "determinant{}" },
{ "ort{n,g}", "orto{normal,gonal}" },
{ "l{in,de}", "linearly {independent,dependent}" },
{ "lcon{,s}", "linear combination{}" },
{ "vst{,s}", "vector space{}" }, -- text vector space
{
"rizz", -- ok please ignore this one 💀
"rizz", -- ok please ignore this one 💀
"Riesz vector",
options = A.no_capitalization,
},
@ -206,7 +209,7 @@ local abolishAbbreviations = {
},
-- }}}
-- {{{ Graph theory
{ "vx{,s}", "vert{ex,ices}" },
{ "vx{,s}", "vert{ex,ices}" },
{ "edg{,s}", "edge{}" },
-- Graph theory function syntax:

View file

@ -36,7 +36,7 @@
"Self inner product": {
"prefix": "diprod",
"description": "Inner product of a vector with itself",
"body": "\\dprod{$1}{$1}$0"
"body": "\\dprod{$1}$0"
},
"Lemma": {
"prefix": "lemma",

View file

@ -1,5 +0,0 @@
/* add '[pdf]' next to links to PDF files */
a[href$=".pdf"]:after {
font-size: smaller;
content: " [pdf]";
}

View file

@ -96,4 +96,9 @@
# "${config.xdg.configHome}/syncthing" # Syncthing config data
# ];
# # }}}
# {{{ Tldr
satellite.persistence.at.cache.apps.tldr.directories = [
"${config.home.homeDirectory}/.tldrc" # tldr cache
];
# }}}
}

View file

@ -13,7 +13,7 @@ let
(chord [ "j" "k" "l" ] [ "rightctrl" "rightshift" ])
(chord [ "s" "d" "f" ] [ "leftctrl" "leftshift" ])
(unmap [ "leftalt" ])
(unmap [ "leftshift" ])
# (unmap [ "leftshift" ]) # Useful for touhou
(unmap [ "leftctrl" ])
(unmap [ "rightshift" ])
(unmap [ "rightctrl" ])

View file

@ -12,6 +12,7 @@
../common/optional/xdg-portal.nix
../common/optional/hyprland.nix
../common/optional/quietboot.nix
../common/optional/gitea.nix
./hardware
./services/syncthing.nix
@ -36,7 +37,9 @@
# }}}
# {{{ A few ad-hoc programs
programs.kdeconnect.enable = true;
programs.firejail.enable = true;
programs.extra-container.enable = true;
virtualisation.docker.enable = true;
# }}}
# {{{ Ad-hoc stylix targets
# TODO: include this on all gui hosts

View file

@ -1,3 +1,13 @@
let
# TODO: remove this once I switch to zfs
commonVersioning = {
type = "staggered";
params = {
cleanInterval = "3600"; # 1 hour in seconds
maxAge = "604800"; # 14 days in seconds.
};
};
in
{
imports = [ ../../common/optional/syncthing.nix ];
@ -5,19 +15,12 @@
"mythical-vault" = {
path = "/home/adrielus/.password-store";
devices = [ "enceladus" "lapetus" ];
versioning = commonVersioning;
};
"stellar-sanctum" = {
path = "/home/adrielus/Projects/stellar-sanctum/";
devices = [ "enceladus" "lapetus" ];
# TODO: remove this once I switch to zfs
versioning = {
type = "staggered";
params = {
cleanInterval = "3600"; # 1 hour in seconds
maxAge = "604800"; # 14 days in seconds.
};
};
versioning = commonVersioning;
};
};
}