Move a bunch of things around
This commit is contained in:
parent
28d21046ef
commit
bfc89aff7f
|
@ -2,13 +2,10 @@ local A = require("my.abbreviations")
|
|||
local scrap = require("scrap")
|
||||
|
||||
require("my.helpers.wrapMovement").enable()
|
||||
require("my.abbreviations.math").setup()
|
||||
|
||||
vim.opt.conceallevel = 0
|
||||
|
||||
-- vim.opt.foldcolumn = "1"
|
||||
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
-- vim.opt.foldmethod = "expr"
|
||||
|
||||
-- {{{ Older functions for calculating things inside vim
|
||||
-- vim.keymap.set("n", "<leader>lg", function()
|
||||
-- if not pcall(function()
|
||||
|
@ -103,35 +100,7 @@ local abbreviations = {
|
|||
{ "half", "\\half" }, -- 1/2 fraction
|
||||
}
|
||||
|
||||
-- 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{}" },
|
||||
{ "{ww,tt}{m,i}", "{which,this} {means,implies}" },
|
||||
{ "cex{,s}", "counterexample{}" },
|
||||
{ "er{t,s,r}", "{transitivity,symmetry,reflexivity}" },
|
||||
-- }}}
|
||||
-- {{{ Exponents and subscripts:
|
||||
-- {operation}{argument}
|
||||
-- - operation = e (exponent) | s (subscript)
|
||||
-- - argument = t{special} | {basic}
|
||||
-- - basic = 0-9|n|i|t|k
|
||||
-- - special =
|
||||
-- - "p" => +
|
||||
-- - "m" => -
|
||||
-- - "i" => -1
|
||||
{
|
||||
"{e,s}{{0,1,2,3,4,5,6,7,8,9,n,i,t,k},t{i,m,p}}",
|
||||
"{^,_}{{},{\\{-1\\},-,+}}",
|
||||
options = A.no_capitalization,
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Special chars
|
||||
-- System for writing special characters which need to also be easly
|
||||
-- accessible as {sub/super}scripts.
|
||||
|
@ -146,17 +115,6 @@ local abolishAbbreviations = {
|
|||
options = A.no_capitalization,
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ My own operator syntax:
|
||||
-- - Any operator can be prefixed with "a" to
|
||||
-- align in aligned mode
|
||||
-- - Any operator can be prefixed with cr to
|
||||
-- start a new line and align in aligned mode
|
||||
{
|
||||
"{cr,a,}{eq,neq,leq,geq,lt,gt,iff,iip,iib}",
|
||||
"{\\\\\\&,&,}{=,\\neq,\\leq,\\geq,<,>,\\iff,\\implies,\\impliedby}",
|
||||
options = A.no_capitalization,
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Set symbols
|
||||
-- - nats => naturals
|
||||
-- - ints => integers
|
||||
|
@ -172,6 +130,16 @@ local abolishAbbreviations = {
|
|||
options = A.no_capitalization,
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ My own operator syntax:
|
||||
-- - Any operator can be prefixed with "a" to
|
||||
-- align in aligned mode
|
||||
-- - Any operator can be prefixed with cr to
|
||||
-- start a new line and align in aligned mode
|
||||
{
|
||||
"{cr,a,}{eq,neq,leq,geq,lt,gt,iff,iip,iib}",
|
||||
"{\\\\\\&,&,}{=,\\neq,\\leq,\\geq,<,>,\\iff,\\implies,\\impliedby}",
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ General function calls:
|
||||
-- {function-name}{modifier?}{argument}{argument-modifier?}
|
||||
--
|
||||
|
@ -189,36 +157,7 @@ local abolishAbbreviations = {
|
|||
"{}{',^2,^3,^\\{-1\\},}({}{_n,})",
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Calculus & analysis
|
||||
{ "ib{p,s}", "integration by {parts,substitution}" },
|
||||
{ "nb{,h}{,s}", "neighbour{,hood}{}" },
|
||||
-- }}}
|
||||
-- {{{ Linear algebra
|
||||
{ "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
|
||||
{
|
||||
"rizz", -- ok please ignore this one 💀
|
||||
"Riesz vector",
|
||||
options = A.no_capitalization,
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Linear systems
|
||||
-- Note: we must add the space inside the {} in order for capitalization to work!
|
||||
{
|
||||
"{{s,o,l},}deq{s,}",
|
||||
"{{scalar,ordinary,linear} ,}differential equation{}",
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Graph theory
|
||||
{ "vx{,s}", "vert{ex,ices}" },
|
||||
{ "edg{,s}", "edge{}" },
|
||||
|
||||
-- Graph theory function syntax:
|
||||
-- gt[function]{graph}{modifier}
|
||||
-- - function:
|
||||
|
@ -256,11 +195,4 @@ local expanded = scrap.expand_many(abolishAbbreviations)
|
|||
A.manyLocalAbbr(abbreviations)
|
||||
A.manyLocalAbbr(expanded)
|
||||
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>lc",
|
||||
"<cmd>VimtexCompile<cr>",
|
||||
{ desc = "Compile current buffer using vimtex", buffer = true }
|
||||
)
|
||||
|
||||
vim.opt_local.list = false -- The lsp usese tabs for formatting
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
require("my.helpers.wrapMovement").enable()
|
||||
require("my.abbreviations.math").setup()
|
||||
require("my.abbreviations.unicode").setup()
|
||||
|
|
|
@ -2,13 +2,8 @@ local A = require("my.abbreviations")
|
|||
local scrap = require("scrap")
|
||||
local M = {}
|
||||
|
||||
M.symols = {
|
||||
-- Unicode:
|
||||
{ "iin", "∈" }, -- [I]ncluded [i][n]
|
||||
{ "mfrl", "∀" }, -- [M]ath [f]o[r]al[l]
|
||||
{ "eps", "ε" }, -- [E]psilon
|
||||
|
||||
-- Ascii stuff:
|
||||
-- {{{ Ascii
|
||||
M.ascii = {
|
||||
{ "tto", "->" }, -- [t]o
|
||||
{ "ffrom", "<-" }, -- [f]rom
|
||||
{ "iip", "=>" }, -- [i]t [i]m[p]lies
|
||||
|
@ -21,15 +16,15 @@ M.symols = {
|
|||
{ "land", "/\\" }, -- [l]ogial [a][n][d]
|
||||
{ "lor", "\\/" }, -- [l]ogial [o][r]
|
||||
}
|
||||
-- }}}
|
||||
|
||||
M.words = {
|
||||
{ "thrf", "therefore" },
|
||||
{ "frl", "forall" },
|
||||
}
|
||||
|
||||
function M.setup()
|
||||
A.manyGlobalAbbr(scrap.expand_many(M.words))
|
||||
A.manyGlobalAbbr(scrap.expand_many(M.symols, { capitalized = false }))
|
||||
A.manyGlobalAbbr(scrap.expand_many(M.ascii, { capitalized = false }))
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
100
dotfiles/neovim/lua/my/abbreviations/math.lua
Normal file
100
dotfiles/neovim/lua/my/abbreviations/math.lua
Normal file
|
@ -0,0 +1,100 @@
|
|||
local A = require("my.abbreviations")
|
||||
local scrap = require("scrap")
|
||||
local M = {}
|
||||
|
||||
M.words = {
|
||||
-- {{{ 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{}" },
|
||||
{ "{ww,tt}{m,i}", "{which,this} {means,implies}" },
|
||||
{ "cex{,s}", "counterexample{}" },
|
||||
{ "er{t,s,r}", "{transitivity,symmetry,reflexivity}" },
|
||||
-- }}}
|
||||
-- {{{ Special chars
|
||||
-- System for writing special characters which need to also be easly
|
||||
-- accessible as {sub/super}scripts.
|
||||
--
|
||||
-- The reason epsilon and lambda are separated out from everything else in
|
||||
-- the pattern is because they are the only ones where `foo` doesn't expand
|
||||
-- to `\\foo` directly (so I saved some keystrokes by letting scrap.nvim
|
||||
-- repeat everything for me).
|
||||
{
|
||||
"{,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,
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Set symbols
|
||||
-- - nats => naturals
|
||||
-- - ints => integers
|
||||
-- - rats => rationals
|
||||
-- - irats => irationals
|
||||
-- - rrea => reals
|
||||
-- - comp => complex
|
||||
-- - ppri => primes
|
||||
-- - ffie => fields
|
||||
{
|
||||
"{nats,ints,rats,irats,rrea,comp,ppri,ffie}",
|
||||
"\\mathbb\\{{N,Z,Q,I,R,C,P,F}\\}",
|
||||
options = A.no_capitalization,
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Calculus & analysis
|
||||
{ "ib{p,s}", "integration by {parts,substitution}" },
|
||||
{ "nb{,h}{,s}", "neighbour{,hood}{}" },
|
||||
-- }}}
|
||||
-- {{{ Linear algebra
|
||||
{ "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
|
||||
{
|
||||
"rizz", -- ok please ignore this one 💀
|
||||
"Riesz vector",
|
||||
options = A.no_capitalization,
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Differential equations
|
||||
-- Note: we must add the space inside the {} in order for capitalization to work!
|
||||
{
|
||||
"{{s,o,l},}deq{s,}",
|
||||
"{{scalar,ordinary,linear} ,}differential equation{}",
|
||||
},
|
||||
-- }}}
|
||||
-- {{{ Graph theory
|
||||
{ "vx{,s}", "vert{ex,ices}" },
|
||||
{ "edg{,s}", "edge{}" },
|
||||
-- }}}
|
||||
}
|
||||
|
||||
M.notation = {
|
||||
-- {{{ Exponents and subscripts:
|
||||
-- {operation}{argument}
|
||||
-- - operation = e (exponent) | s (subscript)
|
||||
-- - argument = t{special} | {basic}
|
||||
-- - basic = 0-9|n|i|t|k
|
||||
-- - special =
|
||||
-- - "p" => +
|
||||
-- - "m" => -
|
||||
-- - "i" => -1
|
||||
{
|
||||
"{e,s}{{0,1,2,3,4,5,6,7,8,9,n,i,t,k},t{i,m,p}}",
|
||||
"{^,_}{{},{\\{-1\\},-,+}}",
|
||||
},
|
||||
-- }}}
|
||||
}
|
||||
|
||||
function M.setup()
|
||||
A.manyGlobalAbbr(scrap.expand_many(M.words))
|
||||
A.manyGlobalAbbr(scrap.expand_many(M.notation, { capitalized = false }))
|
||||
end
|
||||
|
||||
return M
|
149
dotfiles/neovim/lua/my/abbreviations/unicode.lua
Normal file
149
dotfiles/neovim/lua/my/abbreviations/unicode.lua
Normal file
|
@ -0,0 +1,149 @@
|
|||
local A = require("my.abbreviations")
|
||||
local scrap = require("scrap")
|
||||
local M = {}
|
||||
|
||||
-- {{{ Unicode
|
||||
M.unicode = {
|
||||
-- {{{ Logic
|
||||
{ "frl", "∀" }, -- [f]o[r]al[l]
|
||||
{ "exs", "∃" }, -- [e][x]ist[s]
|
||||
{ "land", "∧" }, -- [l]ogical [and]
|
||||
{ "Land", "⋀" }, -- arbitrary [l]ogical [and]
|
||||
{ "lor", "∨" }, -- [l]ogical [or]
|
||||
{ "Lor", "⋁" }, -- [l]ogical [or]
|
||||
{ "bot", "⊥" }, -- false
|
||||
{ "top", "⊤" }, -- true
|
||||
{ "iip", "⟹" }, -- [i]t [i]m[p]lies
|
||||
{ "iib", "⟸" }, -- [i]t's [i]mplied [b]y
|
||||
{ "iff", "⟺" }, -- [if] and only i[f]
|
||||
{ "lneg", "¬" }, -- [l]ogical [neg]ation
|
||||
-- }}}
|
||||
-- {{{ Set theory
|
||||
{ "nolla", "∅" },
|
||||
{ "sect", "∩" }, -- set intersection
|
||||
{ "Sect", "⋂" }, -- arbitrary set intersection
|
||||
{ "dsect", "⊓" }, -- disjoint set intersection (whatever that means lol)
|
||||
{ "union", "∪" }, -- set union
|
||||
{ "Union", "⋃" }, -- arbitrary set union
|
||||
{ "dnion", "⊔" }, -- disjoint set union
|
||||
-- {{{ Inclusions
|
||||
{ "sst", "⊂" }, -- [s]ub[s]et
|
||||
{ "nsst", "⊄" }, -- [n]ot [s]ub[s]et
|
||||
{ "sseq", "⊆" }, -- [s]ub[s]et or [eq]ual
|
||||
{ "nsseq", "⊈" }, -- [n]ot [s]ub[s]et or [eq]ual
|
||||
{ "psseq", "⊊" }, -- [p]roper [s]ub[s]et or [eq]ual
|
||||
{ "spt", "⊃" }, -- [s]u[p]erset
|
||||
{ "nspt", "⊅" }, -- [s]u[p]erset
|
||||
{ "speq", "⊇" }, -- [s]u[p]erset or [eq]ual
|
||||
{ "nspeq", "⊉" }, -- [n]ot [s]u[p]erset or [eq]ual
|
||||
{ "pspeq", "⊋" }, -- [p]roper [s]u[p]erset or [eq]ual
|
||||
-- }}}
|
||||
-- }}}
|
||||
-- {{{ Double stroked chars
|
||||
{ "AA", "𝔸" },
|
||||
{ "BB", "𝔹" },
|
||||
{ "CC", "ℂ" },
|
||||
{ "DD", "ⅅ" },
|
||||
{ "EE", "𝔼" },
|
||||
{ "FF", "𝔽" },
|
||||
{ "GG", "𝔾" },
|
||||
{ "HH", "ℍ" },
|
||||
{ "II", "𝕀" },
|
||||
{ "JJ", "𝕁" },
|
||||
{ "KK", "𝕂" },
|
||||
{ "LL", "𝕃" },
|
||||
{ "MM", "𝕄" },
|
||||
{ "NN", "ℕ" },
|
||||
{ "OO", "𝕆" },
|
||||
{ "PP", "ℙ" },
|
||||
{ "QQ", "ℚ" },
|
||||
{ "RR", "ℝ" },
|
||||
{ "SS", "𝕊" },
|
||||
{ "TT", "𝕋" },
|
||||
{ "UU", "𝕌" },
|
||||
{ "VV", "𝕍" },
|
||||
{ "WW", "𝕎" },
|
||||
{ "XX", "𝕏" },
|
||||
{ "YY", "𝕐" },
|
||||
{ "ZZ", "ℤ" },
|
||||
-- }}}
|
||||
-- {{{ Common operators
|
||||
{ "comp", "∘" }, -- composition
|
||||
{ "mul", "⋅" }, -- multiplication
|
||||
{ "sqrt", "√" }, -- square root
|
||||
{ "cbrt", "∛" }, -- cube root
|
||||
-- }}}
|
||||
-- {{{ Integrals
|
||||
{ "int", "∫" }, -- integral
|
||||
{ "iint", "∬" }, -- integral
|
||||
{ "iiint", "∭" }, -- integral
|
||||
{ "pint", "∮" }, -- integral
|
||||
{ "piint", "∯" }, -- integral
|
||||
{ "piiint", "∰" }, -- integral
|
||||
-- }}}
|
||||
-- {{{ Common relations
|
||||
{ "sim", "∼" }, -- similarity
|
||||
{ "simeq", "≃" },
|
||||
{ "cong", "≅" }, -- congruence
|
||||
{ "defas", "≔" }, -- defined as
|
||||
{ "eq", "=" }, -- [eq]ual
|
||||
{ "neq", "≠" }, -- [n]ot [eq]ual
|
||||
{ "leq", "≤" }, -- [l]ess than or [e][q]ual
|
||||
{ "geq", "≥" }, -- [g]reater than or [e][q]ual
|
||||
|
||||
{ "iin", "∈" }, -- [I]ncluded [i][n]
|
||||
{ "nin", "∉" }, -- [n]ot included [i][n]
|
||||
{ "iic", "∋" }, -- [I]n[c]ludes
|
||||
{ "nic", "∌" }, -- does'[n]t [i]n[c]lude
|
||||
-- }}}
|
||||
-- {{{ Greek characters
|
||||
{ "alpha", "α" },
|
||||
{ "beta", "β" },
|
||||
{ "gamma", "γ" },
|
||||
{ "Gamma", "Γ" },
|
||||
{ "delta", "δ" },
|
||||
{ "Delta", "Δ" },
|
||||
{ "eps", "ε" },
|
||||
{ "zeta", "ζ" },
|
||||
{ "eta", "η" },
|
||||
{ "theta", "θ" },
|
||||
{ "Theta", "Θ" },
|
||||
{ "iota", "ι" },
|
||||
{ "kappa", "κ" },
|
||||
{ "lambda", "λ" },
|
||||
{ "Lambda", "Λ" },
|
||||
{ "mu", "μ" },
|
||||
{ "nu", "ν" },
|
||||
{ "xi", "ξ" },
|
||||
{ "pi", "π" },
|
||||
{ "Pi", "∏" },
|
||||
{ "rho", "ρ" },
|
||||
{ "sigma", "ς" },
|
||||
{ "Sigma", "Σ" },
|
||||
{ "tau", "τ" },
|
||||
{ "upsilon", "υ" },
|
||||
{ "phi", "ϕ" },
|
||||
{ "Phi", "Φ" },
|
||||
{ "chi", "χ" },
|
||||
{ "psi", "ψ" },
|
||||
{ "Psi", "Ψ" },
|
||||
{ "omega", "ω" },
|
||||
{ "Omega", "Ω" },
|
||||
-- }}}
|
||||
-- {{{ Common symbols
|
||||
{ "iinf", "∞" },
|
||||
{ "star", "⋆" },
|
||||
{ "diamond", "⋄" },
|
||||
-- }}}
|
||||
-- {{{ Brackets
|
||||
{ "langle", "⟨" },
|
||||
{ "rangle", "⟩" },
|
||||
-- }}}
|
||||
}
|
||||
-- }}}
|
||||
|
||||
function M.setup()
|
||||
A.manyGlobalAbbr(scrap.expand_many(M.unicode, { capitalized = false }))
|
||||
end
|
||||
|
||||
return M
|
|
@ -42,7 +42,8 @@ function M.setup()
|
|||
vim.g.mapleader = " "
|
||||
|
||||
-- Folding
|
||||
vim.opt.foldmethod = "marker"
|
||||
vim.opt.foldmethod = "marker" -- use {{{ }}} for folding
|
||||
vim.opt.foldcolumn = "1" -- show column with folds on the left
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -32,6 +32,10 @@ function M.config()
|
|||
img_dir = { "%:p:h", "img" },
|
||||
affix = "\\includegraphics[width=\\textwidth]{%s}",
|
||||
},
|
||||
typst = {
|
||||
img_dir = { "%:p:h", "img" },
|
||||
affix = '#image("%s", width: 100)',
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
|
|
|
@ -12,6 +12,14 @@ function M.config()
|
|||
vim.g.haskell_tools = {
|
||||
hls = {
|
||||
on_attach = lspconfig.on_attach,
|
||||
settings = {
|
||||
haskell = {
|
||||
formattingProvider = "fourmolu",
|
||||
-- This seems to work better with custom preludes
|
||||
-- See this issue https://github.com/fourmolu/fourmolu/issues/357
|
||||
plugin = { fourmolu = { config = { external = true } } },
|
||||
},
|
||||
},
|
||||
},
|
||||
tools = {
|
||||
hover = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./global
|
||||
./global.nix
|
||||
./features/wayland/hyprland
|
||||
];
|
||||
|
||||
|
|
|
@ -10,5 +10,5 @@ Check out [tethys](../tethys.nix) for example imports
|
|||
| [desktop](./desktop) | Desktop apps usable on both wayland and xorg |
|
||||
| [xorg](./xorg) | Xorg only stuff |
|
||||
| [wayland](./wayland) | Wayland only stuff |
|
||||
| [neovim](./neovim) | Neovim (to be expanded in the future ) |
|
||||
| [neovim](./neovim) | Neovim (to be expanded in the future) |
|
||||
| [persistence](./persistence.nix) | For impermanence settings |
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{
|
||||
# Enabling this produces an uglier theme for some reason.
|
||||
# options.stylix.targets.bat.enable =true;
|
||||
# options.stylix.targets.bat.enable = true;
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config.theme = "base16-256";
|
||||
};
|
||||
|
||||
home.shellAliases.cat = "bat";
|
||||
}
|
||||
|
|
|
@ -16,21 +16,42 @@
|
|||
|
||||
# Install clis
|
||||
home.packages = with pkgs; [
|
||||
ranger # Terminal file explorer
|
||||
comma # Intstall and run programs by sticking a , before them
|
||||
bc # Calculator
|
||||
# {{{ System information
|
||||
acpi # Battery stats
|
||||
neofetch # Display system information
|
||||
tokei # Useless but fun line of code counter (sloc alternative)
|
||||
bottom # System monitor
|
||||
# }}}
|
||||
# {{{ Storage
|
||||
ncdu # TUI disk usage
|
||||
du-dust # Similar to du and ncdu in purpose.
|
||||
# }}}
|
||||
# {{{ Alternatives to usual commands
|
||||
ripgrep # Better grep
|
||||
fd # Better find
|
||||
sd # Better sed
|
||||
httpie # Better curl
|
||||
# }}}
|
||||
# {{{ Misc
|
||||
ranger # Terminal file explorer
|
||||
comma # Intstall and run programs by sticking a , before them
|
||||
bc # Calculator
|
||||
ouch # Unified compression / decompression tool
|
||||
mkpasswd # Hash passwords
|
||||
neofetch # Display system information
|
||||
tokei # Useless but fun line of code counter (sloc alternative)
|
||||
bottom # System monitor
|
||||
inputs.agenix.packages.${pkgs.system}.agenix # Secret encryption
|
||||
inputs.deploy-rs.packages.${pkgs.system}.default # Deployment
|
||||
# }}}
|
||||
];
|
||||
|
||||
# Set up common aliases
|
||||
home.shellAliases = {
|
||||
# {{{ Storage
|
||||
# -h = humans readable units
|
||||
df = "df -h";
|
||||
du = "du -h";
|
||||
|
||||
# short for `du here`
|
||||
# -d = depth
|
||||
duh = "du -hd 1";
|
||||
# }}}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,33 +1,27 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
|
||||
shellAbbrs = {
|
||||
battery = "acpi";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
cat = "bat";
|
||||
df = "df -h";
|
||||
du = "du -h";
|
||||
duh = "du -hd 1"; # short for du here
|
||||
pdf = "zathura --fork"; # Open a pdf reader
|
||||
};
|
||||
|
||||
# with pkgs.fishPlugins;
|
||||
plugins = [
|
||||
# Jump to directories by typing "z <directory-name>"
|
||||
{
|
||||
name = "z";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jethrokuan";
|
||||
repo = "z";
|
||||
rev = "85f863f20f24faf675827fb00f3a4e15c7838d76";
|
||||
sha256 = "1kaa0k9d535jnvy8vnyxd869jgs0ky6yg55ac1mxcxm8n0rh2mgq";
|
||||
};
|
||||
}
|
||||
plugins =
|
||||
let
|
||||
plugins = with pkgs.fishPlugins; [
|
||||
z # Jump to directories by typing "z <directory-name>"
|
||||
grc # Adds color to a bunch of built in commands
|
||||
done # Trigger a notification when long commands finish execution
|
||||
puffer # Text expansion (i.e. expanding .... to ../../../)
|
||||
sponge # Remove failed commands and whatnot from history
|
||||
forgit # Git tui thingy? (I'm still trying this one out)
|
||||
fzf-fish # Fuzzy finder for things like files
|
||||
colored-man-pages # Self explainatory:)
|
||||
];
|
||||
in
|
||||
# For some reason home-manager expects a slightly different format 🤔
|
||||
lib.forEach plugins
|
||||
(plugin: {
|
||||
name = plugin.pname;
|
||||
inherit (plugin) src;
|
||||
});
|
||||
|
||||
interactiveShellInit = builtins.readFile ./config.fish;
|
||||
};
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
stylix.targets.alacritty.enable = true;
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
window.opacity = lib.mkForce 0.5; # Conflicts with stylix
|
||||
window.padding = {
|
||||
x = 4;
|
||||
y = 4;
|
||||
};
|
||||
|
||||
env = {
|
||||
TERM = "tmux-256color";
|
||||
ALWAYS_TMUX = 1;
|
||||
};
|
||||
|
||||
working_directory = "${config.home.homeDirectory}/Projects/";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
# Notify on low battery percentages.
|
||||
{
|
||||
services.batsignal.enable = true;
|
||||
}
|
|
@ -1,3 +1,12 @@
|
|||
{
|
||||
imports = [
|
||||
./wezterm # terminal
|
||||
./dunst.nix # notifaction handler
|
||||
];
|
||||
|
||||
# Notifies on low battery percentages
|
||||
services.batsignal.enable = true;
|
||||
|
||||
# Use a base16 theme for gtk apps!
|
||||
stylix.targets.gtk.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
# TODO: use base16 theme
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
};
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
services.keepassx.enable = true;
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
# Zathura is the pdf reader I am using.
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.zathura = {
|
||||
|
@ -84,4 +85,6 @@
|
|||
# }}}
|
||||
'';
|
||||
};
|
||||
|
||||
home.shellAliases.pdf = "zathura --fork";
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ let
|
|||
# Formatters
|
||||
luaformatter # Lua
|
||||
stylua # Lua
|
||||
ormolu # Haskell
|
||||
black # Python
|
||||
yapf # Python
|
||||
isort # Reorder python imports
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
# Common wayland stuff
|
||||
{ lib, pkgs, ... }: {
|
||||
{ lib, pkgs, inputs, ... }: {
|
||||
imports = [
|
||||
./dunst.nix
|
||||
./wlsunset.nix
|
||||
./wlogout.nix
|
||||
./anyrun.nix
|
||||
../desktop/wezterm # Default hyprland terminal
|
||||
../desktop/batsignal.nix
|
||||
|
||||
../desktop
|
||||
../desktop/eww
|
||||
];
|
||||
|
||||
# TODO: set up
|
||||
# - volume/backlight controls
|
||||
# - eww bar
|
||||
# - bar
|
||||
# - configure hyprland colors using base16 stuff
|
||||
# - look into swaylock or whatever people use
|
||||
# - multiple keyboard layouts
|
||||
|
@ -36,17 +35,10 @@
|
|||
# }}}
|
||||
in
|
||||
with pkgs; [
|
||||
# {{{ Utils
|
||||
libnotify # Send notifications
|
||||
wl-ocr # Custom ocr script
|
||||
wl-clipboard # Clipboard manager
|
||||
wlogout # Nice logout script
|
||||
wlsunset # Day/night gamma display adjustments
|
||||
hyprpicker # Color picker
|
||||
# }}}
|
||||
# {{{ Screenshot related tools
|
||||
grim # Take screenshot
|
||||
slurp # Area selector
|
||||
# }}}
|
||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast # Screenshot tool
|
||||
];
|
||||
}
|
|
@ -1,16 +1,13 @@
|
|||
{ pkgs, lib, config, inputs, ... }:
|
||||
|
||||
let
|
||||
enabledMonitors = lib.filter (m: m.enabled) config.satellite.monitors;
|
||||
hyprland-monitors = lib.concatStringsSep "\n" (lib.forEach enabledMonitors (m: ''
|
||||
hyprland-monitors = lib.concatStringsSep "\n" (lib.forEach config.satellite.monitors (m: ''
|
||||
monitor=${m.name},${toString m.width}x${toString m.height}@${toString m.refreshRate},${toString m.x}x${toString m.y},1
|
||||
${lib.optionalString (m.workspace != null) "workspace=${m.name},${m.workspace}"}
|
||||
''));
|
||||
in
|
||||
{
|
||||
imports = [ ../default.nix ../../desktop ];
|
||||
|
||||
home.packages = [ inputs.hyprland-contrib.packages.${pkgs.system}.grimblast pkgs.hyprpaper ];
|
||||
imports = [ ../global.nix ./hyprpaper.nix ];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
@ -21,16 +18,4 @@ in
|
|||
${hyprland-monitors}
|
||||
'';
|
||||
};
|
||||
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
systemdTarget = "hyprland-session.target";
|
||||
|
||||
preload = [ config.stylix.image ];
|
||||
wallpapers = [{ inherit (config.stylix) image; }] ++
|
||||
lib.forEach enabledMonitors ({ name, ... }: {
|
||||
monitor = name;
|
||||
image = config.stylix.image;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
14
home/features/wayland/hyprland/hyprpaper.nix
Normal file
14
home/features/wayland/hyprland/hyprpaper.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
home.packages = [ pkgs.hyprpaper ];
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
systemdTarget = "hyprland-session.target";
|
||||
|
||||
preload = [ config.stylix.image ];
|
||||
wallpapers = [{ inherit (config.stylix) image; }] ++
|
||||
lib.forEach config.satellite.monitors ({ name, ... }: {
|
||||
monitor = name;
|
||||
image = config.stylix.image;
|
||||
});
|
||||
};
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
# Wlogout is a logout menu. In my setup, it can be triggered using mod-q
|
||||
{ config
|
||||
, pkgs
|
||||
, ...
|
||||
|
@ -9,6 +10,8 @@ let bgImageSection = name: ''
|
|||
'';
|
||||
in
|
||||
{
|
||||
home.packages = [ pkgs.wlogout ];
|
||||
|
||||
xdg.configFile."wlogout/style.css".text = ''
|
||||
* {
|
||||
background-image: none;
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
libnotify = lib.getExe pkgs.libnotify;
|
||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||
|
||||
wlsunset-toggle = pkgs.writeShellScriptBin "wlsunset-toggle" ''
|
||||
if [ "active" = "$(systemctl --user is-active wlsunset.service)" ]
|
||||
then
|
||||
${systemctl} --user stop wlsunset.service
|
||||
${libnotify} "Stopped wlsunset"
|
||||
echo "Stopped wlsunset"
|
||||
else
|
||||
${systemctl} --user start wlsunset.service
|
||||
${libnotify} "Started wlsunset"
|
||||
echo "Started wlsunset"
|
||||
fi
|
||||
'';
|
||||
in
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
../desktop/batsignal.nix
|
||||
../desktop
|
||||
./rofi
|
||||
./polybar
|
||||
./feh.nix
|
|
@ -1,9 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./default.nix
|
||||
../desktop
|
||||
../desktop/alacritty.nix # Default xmonad terminal
|
||||
];
|
||||
imports = [ ./global.nix ];
|
||||
|
||||
# Command required to get the xdg stuff to work. Suggested by @lily on discord.
|
||||
xsession.initExtra = "${pkgs.dbus}/bin/dbus-update-activation-environment --systemd --all";
|
||||
|
|
|
@ -14,9 +14,9 @@ let
|
|||
inputs.intray.homeManagerModules.x86_64-linux.default
|
||||
inputs.smos.homeManagerModules.x86_64-linux.default
|
||||
|
||||
../features/cli
|
||||
../features/persistence.nix
|
||||
../../common
|
||||
./features/cli
|
||||
./features/persistence.nix
|
||||
../common
|
||||
];
|
||||
# }}}
|
||||
# {{{ Overlays
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
imports = [ ./global ];
|
||||
imports = [ ./global.nix ];
|
||||
|
||||
# Arbitrary extra packages
|
||||
home.packages = [ ];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ inputs, pkgs, ... }: {
|
||||
imports = [
|
||||
./global
|
||||
./global.nix
|
||||
|
||||
./features/desktop/zathura.nix
|
||||
./features/desktop/spotify.nix
|
||||
|
@ -18,26 +18,35 @@
|
|||
# Arbitrary extra packages
|
||||
home.packages = with pkgs; [
|
||||
# Desktop apps
|
||||
zoom-us # Zoom client 🤮
|
||||
# {{{ Communication
|
||||
signal-desktop # Signal client
|
||||
element-desktop # Matrix client
|
||||
obsidian # Notes
|
||||
peek # GIF recorder
|
||||
vlc # Video player
|
||||
zoom-us # Zoom client 🤮
|
||||
inputs.matui.packages.${pkgs.system}.matui # Matrix TUi
|
||||
# }}}
|
||||
# {{{ Editors for different formats
|
||||
gimp # Image editing
|
||||
libreoffice # Free office suite
|
||||
lmms # Music software
|
||||
kicad # PCB editing
|
||||
plover.dev # steno engine
|
||||
qbittorrent # Torrent client
|
||||
signal-desktop # Signal client
|
||||
libreoffice # Free office suite
|
||||
# }}}
|
||||
# {{{ Gaming
|
||||
wine # Windows compat layer or whatever
|
||||
lutris # Game launcher
|
||||
# }}}
|
||||
# {{{ Clis
|
||||
sherlock # Search for usernames across different websites
|
||||
# }}}
|
||||
# {{{ Misc
|
||||
obsidian # Notes
|
||||
peek # GIF recorder
|
||||
mpv # Video player
|
||||
plover.dev # steno engine
|
||||
qbittorrent # Torrent client
|
||||
# google-chrome # Not my primary browser, but sometimes needed in webdev
|
||||
# obs-studio # video recorder
|
||||
inputs.matui.packages.${pkgs.system}.matui # Matrix TUi
|
||||
|
||||
# Clis
|
||||
sherlock # Search for usernames across different websites
|
||||
# }}}
|
||||
];
|
||||
|
||||
home.sessionVariables.QT_SCREEN_SCALE_FACTORS = 1.4; # Bigger text in qt apps
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# The main configuration is specified by home-manager
|
||||
{ inputs, pkgs, ... }: {
|
||||
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprland.package =
|
||||
inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
let greeter = "enso";
|
||||
in
|
||||
{
|
||||
services.xserver.enable = true;
|
||||
imports = [ ./xserver.nix ];
|
||||
|
||||
services.xserver.displayManager.lightdm = {
|
||||
enable = true;
|
||||
|
||||
|
@ -22,6 +23,7 @@ in
|
|||
# services.xserver.displayManager.defaultSession = lib.mkDefault "hyprland";
|
||||
services.xserver.displayManager.defaultSession = lib.mkDefault "none+xmonad";
|
||||
|
||||
# Enable base16 styling
|
||||
stylix.targets.lightdm.enable = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# This handles audio stuff
|
||||
{ pkgs, ... }: {
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
@ -12,16 +13,20 @@
|
|||
|
||||
# Volume controls
|
||||
environment.shellAliases =
|
||||
let pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||
let
|
||||
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||
volume = amount: "${pactl} set-sink-volume @DEFAULT_SINK@ ${amount}";
|
||||
in
|
||||
{
|
||||
# Relative
|
||||
"v-up" = "${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"v-down" = "${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"v-down" = volume "-5%";
|
||||
"v-up" = volume "+5%";
|
||||
|
||||
# Absolute
|
||||
"v-min" = "${pactl} set-sink-volume @DEFAULT_SINK@ 0%";
|
||||
"v-mid" = "${pactl} set-sink-volume @DEFAULT_SINK@ 50%";
|
||||
"v-max" = "${pactl} set-sink-volume @DEFAULT_SINK@ 100%";
|
||||
"v-min" = volume "0%";
|
||||
"v-low" = volume "25%";
|
||||
"v-mid" = volume "50%";
|
||||
"v-high" = volume "75%";
|
||||
"v-max" = volume "100%";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# My touchpad configuration
|
||||
{ ... }: {
|
||||
imports = [ ./xserver.nix ];
|
||||
|
||||
services.xserver.libinput = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
{ pkgs, ... }: {
|
||||
services.dbus.enable = true;
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
|
|
@ -36,15 +36,14 @@ main =
|
|||
myWorkspaces =
|
||||
["1:dev", "2:browser", "3:chat", "4:terminal", "5:reading", "6:music", "7:gaming"]
|
||||
|
||||
myTerminal = "alacritty"
|
||||
myTerminal = "xmonad"
|
||||
myBrowser = "firefox"
|
||||
|
||||
keymap =
|
||||
[ ("M-p", spawn "rofi -show drun"),
|
||||
("M-w", spawn "rofi -show window"),
|
||||
("M-g", spawn myBrowser),
|
||||
("M-d", spawn "Discord"),
|
||||
("M-v", spawn "alacritty -e 'vimclip'"),
|
||||
("M-v", spawn "wezterm start vimclip"),
|
||||
("M-s", spawn "spectacle -rcb"),
|
||||
("M-S-s", spawn "spectacle -mcb"),
|
||||
("M-C-s", spawn "spectacle -ucb"),
|
||||
|
@ -62,8 +61,8 @@ main =
|
|||
myLayoutHook = spacingHook layouts
|
||||
|
||||
startupApps = []
|
||||
-- [ (0, "alacritty"),
|
||||
-- (1, "google-chrome-stable"),
|
||||
-- [ (0, "wezterm"),
|
||||
-- (1, "firefox"),
|
||||
-- (2, "Discord")
|
||||
-- ]
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [ ../touchpad.nix ];
|
||||
imports = [ ../xserver.nix ../touchpad.nix ];
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
@ -35,11 +35,6 @@
|
|||
default = 0;
|
||||
};
|
||||
|
||||
enabled = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
workspace = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
|
|
Loading…
Reference in a new issue