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")
|
local scrap = require("scrap")
|
||||||
|
|
||||||
require("my.helpers.wrapMovement").enable()
|
require("my.helpers.wrapMovement").enable()
|
||||||
|
require("my.abbreviations.math").setup()
|
||||||
|
|
||||||
vim.opt.conceallevel = 0
|
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
|
-- {{{ Older functions for calculating things inside vim
|
||||||
-- vim.keymap.set("n", "<leader>lg", function()
|
-- vim.keymap.set("n", "<leader>lg", function()
|
||||||
-- if not pcall(function()
|
-- if not pcall(function()
|
||||||
|
@ -103,35 +100,7 @@ local abbreviations = {
|
||||||
{ "half", "\\half" }, -- 1/2 fraction
|
{ "half", "\\half" }, -- 1/2 fraction
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Todo: convert exponents and subscripts
|
|
||||||
-- to use this more concise notation.
|
|
||||||
local abolishAbbreviations = {
|
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
|
-- {{{ Special chars
|
||||||
-- System for writing special characters which need to also be easly
|
-- System for writing special characters which need to also be easly
|
||||||
-- accessible as {sub/super}scripts.
|
-- accessible as {sub/super}scripts.
|
||||||
|
@ -146,17 +115,6 @@ local abolishAbbreviations = {
|
||||||
options = A.no_capitalization,
|
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
|
-- {{{ Set symbols
|
||||||
-- - nats => naturals
|
-- - nats => naturals
|
||||||
-- - ints => integers
|
-- - ints => integers
|
||||||
|
@ -172,6 +130,16 @@ local abolishAbbreviations = {
|
||||||
options = A.no_capitalization,
|
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:
|
-- {{{ General function calls:
|
||||||
-- {function-name}{modifier?}{argument}{argument-modifier?}
|
-- {function-name}{modifier?}{argument}{argument-modifier?}
|
||||||
--
|
--
|
||||||
|
@ -189,36 +157,7 @@ local abolishAbbreviations = {
|
||||||
"{}{',^2,^3,^\\{-1\\},}({}{_n,})",
|
"{}{',^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
|
-- {{{ Graph theory
|
||||||
{ "vx{,s}", "vert{ex,ices}" },
|
|
||||||
{ "edg{,s}", "edge{}" },
|
|
||||||
|
|
||||||
-- Graph theory function syntax:
|
-- Graph theory function syntax:
|
||||||
-- gt[function]{graph}{modifier}
|
-- gt[function]{graph}{modifier}
|
||||||
-- - function:
|
-- - function:
|
||||||
|
@ -256,11 +195,4 @@ local expanded = scrap.expand_many(abolishAbbreviations)
|
||||||
A.manyLocalAbbr(abbreviations)
|
A.manyLocalAbbr(abbreviations)
|
||||||
A.manyLocalAbbr(expanded)
|
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
|
vim.opt_local.list = false -- The lsp usese tabs for formatting
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
require("my.helpers.wrapMovement").enable()
|
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 scrap = require("scrap")
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.symols = {
|
-- {{{ Ascii
|
||||||
-- Unicode:
|
M.ascii = {
|
||||||
{ "iin", "∈" }, -- [I]ncluded [i][n]
|
|
||||||
{ "mfrl", "∀" }, -- [M]ath [f]o[r]al[l]
|
|
||||||
{ "eps", "ε" }, -- [E]psilon
|
|
||||||
|
|
||||||
-- Ascii stuff:
|
|
||||||
{ "tto", "->" }, -- [t]o
|
{ "tto", "->" }, -- [t]o
|
||||||
{ "ffrom", "<-" }, -- [f]rom
|
{ "ffrom", "<-" }, -- [f]rom
|
||||||
{ "iip", "=>" }, -- [i]t [i]m[p]lies
|
{ "iip", "=>" }, -- [i]t [i]m[p]lies
|
||||||
|
@ -21,15 +16,15 @@ M.symols = {
|
||||||
{ "land", "/\\" }, -- [l]ogial [a][n][d]
|
{ "land", "/\\" }, -- [l]ogial [a][n][d]
|
||||||
{ "lor", "\\/" }, -- [l]ogial [o][r]
|
{ "lor", "\\/" }, -- [l]ogial [o][r]
|
||||||
}
|
}
|
||||||
|
-- }}}
|
||||||
|
|
||||||
M.words = {
|
M.words = {
|
||||||
{ "thrf", "therefore" },
|
{ "thrf", "therefore" },
|
||||||
{ "frl", "forall" },
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
A.manyGlobalAbbr(scrap.expand_many(M.words))
|
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
|
end
|
||||||
|
|
||||||
return M
|
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 = " "
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
-- Folding
|
-- Folding
|
||||||
vim.opt.foldmethod = "marker"
|
vim.opt.foldmethod = "marker" -- use {{{ }}} for folding
|
||||||
|
vim.opt.foldcolumn = "1" -- show column with folds on the left
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
@ -32,6 +32,10 @@ function M.config()
|
||||||
img_dir = { "%:p:h", "img" },
|
img_dir = { "%:p:h", "img" },
|
||||||
affix = "\\includegraphics[width=\\textwidth]{%s}",
|
affix = "\\includegraphics[width=\\textwidth]{%s}",
|
||||||
},
|
},
|
||||||
|
typst = {
|
||||||
|
img_dir = { "%:p:h", "img" },
|
||||||
|
affix = '#image("%s", width: 100)',
|
||||||
|
},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,14 @@ function M.config()
|
||||||
vim.g.haskell_tools = {
|
vim.g.haskell_tools = {
|
||||||
hls = {
|
hls = {
|
||||||
on_attach = lspconfig.on_attach,
|
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 = {
|
tools = {
|
||||||
hover = {
|
hover = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./global
|
./global.nix
|
||||||
./features/wayland/hyprland
|
./features/wayland/hyprland
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -5,4 +5,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
config.theme = "base16-256";
|
config.theme = "base16-256";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.shellAliases.cat = "bat";
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,21 +16,42 @@
|
||||||
|
|
||||||
# Install clis
|
# Install clis
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
ranger # Terminal file explorer
|
# {{{ System information
|
||||||
comma # Intstall and run programs by sticking a , before them
|
acpi # Battery stats
|
||||||
bc # Calculator
|
neofetch # Display system information
|
||||||
|
tokei # Useless but fun line of code counter (sloc alternative)
|
||||||
|
bottom # System monitor
|
||||||
|
# }}}
|
||||||
|
# {{{ Storage
|
||||||
ncdu # TUI disk usage
|
ncdu # TUI disk usage
|
||||||
du-dust # Similar to du and ncdu in purpose.
|
du-dust # Similar to du and ncdu in purpose.
|
||||||
|
# }}}
|
||||||
|
# {{{ Alternatives to usual commands
|
||||||
ripgrep # Better grep
|
ripgrep # Better grep
|
||||||
fd # Better find
|
fd # Better find
|
||||||
sd # Better sed
|
sd # Better sed
|
||||||
httpie # Better curl
|
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
|
ouch # Unified compression / decompression tool
|
||||||
mkpasswd # Hash passwords
|
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.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 = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
shellAbbrs = {
|
plugins =
|
||||||
battery = "acpi";
|
let
|
||||||
};
|
plugins = with pkgs.fishPlugins; [
|
||||||
|
z # Jump to directories by typing "z <directory-name>"
|
||||||
shellAliases = {
|
grc # Adds color to a bunch of built in commands
|
||||||
cat = "bat";
|
done # Trigger a notification when long commands finish execution
|
||||||
df = "df -h";
|
puffer # Text expansion (i.e. expanding .... to ../../../)
|
||||||
du = "du -h";
|
sponge # Remove failed commands and whatnot from history
|
||||||
duh = "du -hd 1"; # short for du here
|
forgit # Git tui thingy? (I'm still trying this one out)
|
||||||
pdf = "zathura --fork"; # Open a pdf reader
|
fzf-fish # Fuzzy finder for things like files
|
||||||
};
|
colored-man-pages # Self explainatory:)
|
||||||
|
|
||||||
# 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";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
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;
|
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;
|
stylix.targets.gtk.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
# TODO: use base16 theme
|
||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
services.keepassx.enable = true;
|
|
||||||
}
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Zathura is the pdf reader I am using.
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
programs.zathura = {
|
programs.zathura = {
|
||||||
|
@ -84,4 +85,6 @@
|
||||||
# }}}
|
# }}}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.shellAliases.pdf = "zathura --fork";
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ let
|
||||||
# Formatters
|
# Formatters
|
||||||
luaformatter # Lua
|
luaformatter # Lua
|
||||||
stylua # Lua
|
stylua # Lua
|
||||||
ormolu # Haskell
|
|
||||||
black # Python
|
black # Python
|
||||||
yapf # Python
|
yapf # Python
|
||||||
isort # Reorder python imports
|
isort # Reorder python imports
|
||||||
|
|
|
@ -1,18 +1,17 @@
|
||||||
# Common wayland stuff
|
# Common wayland stuff
|
||||||
{ lib, pkgs, ... }: {
|
{ lib, pkgs, inputs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./dunst.nix
|
|
||||||
./wlsunset.nix
|
./wlsunset.nix
|
||||||
./wlogout.nix
|
./wlogout.nix
|
||||||
./anyrun.nix
|
./anyrun.nix
|
||||||
../desktop/wezterm # Default hyprland terminal
|
|
||||||
../desktop/batsignal.nix
|
../desktop
|
||||||
../desktop/eww
|
../desktop/eww
|
||||||
];
|
];
|
||||||
|
|
||||||
# TODO: set up
|
# TODO: set up
|
||||||
# - volume/backlight controls
|
# - volume/backlight controls
|
||||||
# - eww bar
|
# - bar
|
||||||
# - configure hyprland colors using base16 stuff
|
# - configure hyprland colors using base16 stuff
|
||||||
# - look into swaylock or whatever people use
|
# - look into swaylock or whatever people use
|
||||||
# - multiple keyboard layouts
|
# - multiple keyboard layouts
|
||||||
|
@ -36,17 +35,10 @@
|
||||||
# }}}
|
# }}}
|
||||||
in
|
in
|
||||||
with pkgs; [
|
with pkgs; [
|
||||||
# {{{ Utils
|
|
||||||
libnotify # Send notifications
|
libnotify # Send notifications
|
||||||
wl-ocr # Custom ocr script
|
wl-ocr # Custom ocr script
|
||||||
wl-clipboard # Clipboard manager
|
wl-clipboard # Clipboard manager
|
||||||
wlogout # Nice logout script
|
|
||||||
wlsunset # Day/night gamma display adjustments
|
|
||||||
hyprpicker # Color picker
|
hyprpicker # Color picker
|
||||||
# }}}
|
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast # Screenshot tool
|
||||||
# {{{ Screenshot related tools
|
|
||||||
grim # Take screenshot
|
|
||||||
slurp # Area selector
|
|
||||||
# }}}
|
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -1,16 +1,13 @@
|
||||||
{ pkgs, lib, config, inputs, ... }:
|
{ pkgs, lib, config, inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
enabledMonitors = lib.filter (m: m.enabled) config.satellite.monitors;
|
hyprland-monitors = lib.concatStringsSep "\n" (lib.forEach config.satellite.monitors (m: ''
|
||||||
hyprland-monitors = lib.concatStringsSep "\n" (lib.forEach enabledMonitors (m: ''
|
|
||||||
monitor=${m.name},${toString m.width}x${toString m.height}@${toString m.refreshRate},${toString m.x}x${toString m.y},1
|
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}"}
|
${lib.optionalString (m.workspace != null) "workspace=${m.name},${m.workspace}"}
|
||||||
''));
|
''));
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ../default.nix ../../desktop ];
|
imports = [ ../global.nix ./hyprpaper.nix ];
|
||||||
|
|
||||||
home.packages = [ inputs.hyprland-contrib.packages.${pkgs.system}.grimblast pkgs.hyprpaper ];
|
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -21,16 +18,4 @@ in
|
||||||
${hyprland-monitors}
|
${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
|
{ config
|
||||||
, pkgs
|
, pkgs
|
||||||
, ...
|
, ...
|
||||||
|
@ -9,6 +10,8 @@ let bgImageSection = name: ''
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
home.packages = [ pkgs.wlogout ];
|
||||||
|
|
||||||
xdg.configFile."wlogout/style.css".text = ''
|
xdg.configFile."wlogout/style.css".text = ''
|
||||||
* {
|
* {
|
||||||
background-image: none;
|
background-image: none;
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
libnotify = lib.getExe pkgs.libnotify;
|
|
||||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||||
|
|
||||||
wlsunset-toggle = pkgs.writeShellScriptBin "wlsunset-toggle" ''
|
wlsunset-toggle = pkgs.writeShellScriptBin "wlsunset-toggle" ''
|
||||||
if [ "active" = "$(systemctl --user is-active wlsunset.service)" ]
|
if [ "active" = "$(systemctl --user is-active wlsunset.service)" ]
|
||||||
then
|
then
|
||||||
${systemctl} --user stop wlsunset.service
|
${systemctl} --user stop wlsunset.service
|
||||||
${libnotify} "Stopped wlsunset"
|
echo "Stopped wlsunset"
|
||||||
else
|
else
|
||||||
${systemctl} --user start wlsunset.service
|
${systemctl} --user start wlsunset.service
|
||||||
${libnotify} "Started wlsunset"
|
echo "Started wlsunset"
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
../desktop/batsignal.nix
|
../desktop
|
||||||
./rofi
|
./rofi
|
||||||
./polybar
|
./polybar
|
||||||
./feh.nix
|
./feh.nix
|
|
@ -1,9 +1,5 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
imports = [
|
imports = [ ./global.nix ];
|
||||||
./default.nix
|
|
||||||
../desktop
|
|
||||||
../desktop/alacritty.nix # Default xmonad terminal
|
|
||||||
];
|
|
||||||
|
|
||||||
# Command required to get the xdg stuff to work. Suggested by @lily on discord.
|
# 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";
|
xsession.initExtra = "${pkgs.dbus}/bin/dbus-update-activation-environment --systemd --all";
|
||||||
|
|
|
@ -14,9 +14,9 @@ let
|
||||||
inputs.intray.homeManagerModules.x86_64-linux.default
|
inputs.intray.homeManagerModules.x86_64-linux.default
|
||||||
inputs.smos.homeManagerModules.x86_64-linux.default
|
inputs.smos.homeManagerModules.x86_64-linux.default
|
||||||
|
|
||||||
../features/cli
|
./features/cli
|
||||||
../features/persistence.nix
|
./features/persistence.nix
|
||||||
../../common
|
../common
|
||||||
];
|
];
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ Overlays
|
# {{{ Overlays
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [ ./global ];
|
imports = [ ./global.nix ];
|
||||||
|
|
||||||
# Arbitrary extra packages
|
# Arbitrary extra packages
|
||||||
home.packages = [ ];
|
home.packages = [ ];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ inputs, pkgs, ... }: {
|
{ inputs, pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./global
|
./global.nix
|
||||||
|
|
||||||
./features/desktop/zathura.nix
|
./features/desktop/zathura.nix
|
||||||
./features/desktop/spotify.nix
|
./features/desktop/spotify.nix
|
||||||
|
@ -18,26 +18,35 @@
|
||||||
# Arbitrary extra packages
|
# Arbitrary extra packages
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# Desktop apps
|
# Desktop apps
|
||||||
zoom-us # Zoom client 🤮
|
# {{{ Communication
|
||||||
|
signal-desktop # Signal client
|
||||||
element-desktop # Matrix client
|
element-desktop # Matrix client
|
||||||
obsidian # Notes
|
zoom-us # Zoom client 🤮
|
||||||
peek # GIF recorder
|
inputs.matui.packages.${pkgs.system}.matui # Matrix TUi
|
||||||
vlc # Video player
|
# }}}
|
||||||
|
# {{{ Editors for different formats
|
||||||
gimp # Image editing
|
gimp # Image editing
|
||||||
libreoffice # Free office suite
|
|
||||||
lmms # Music software
|
lmms # Music software
|
||||||
kicad # PCB editing
|
kicad # PCB editing
|
||||||
plover.dev # steno engine
|
libreoffice # Free office suite
|
||||||
qbittorrent # Torrent client
|
# }}}
|
||||||
signal-desktop # Signal client
|
# {{{ Gaming
|
||||||
wine # Windows compat layer or whatever
|
wine # Windows compat layer or whatever
|
||||||
lutris # Game launcher
|
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
|
# google-chrome # Not my primary browser, but sometimes needed in webdev
|
||||||
# obs-studio # video recorder
|
# 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
|
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, ... }: {
|
{ inputs, pkgs, ... }: {
|
||||||
|
|
||||||
programs.hyprland.enable = true;
|
programs.hyprland.enable = true;
|
||||||
programs.hyprland.package =
|
programs.hyprland.package =
|
||||||
inputs.hyprland.packages.${pkgs.system}.hyprland;
|
inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
let greeter = "enso";
|
let greeter = "enso";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.xserver.enable = true;
|
imports = [ ./xserver.nix ];
|
||||||
|
|
||||||
services.xserver.displayManager.lightdm = {
|
services.xserver.displayManager.lightdm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -22,6 +23,7 @@ in
|
||||||
# services.xserver.displayManager.defaultSession = lib.mkDefault "hyprland";
|
# services.xserver.displayManager.defaultSession = lib.mkDefault "hyprland";
|
||||||
services.xserver.displayManager.defaultSession = lib.mkDefault "none+xmonad";
|
services.xserver.displayManager.defaultSession = lib.mkDefault "none+xmonad";
|
||||||
|
|
||||||
|
# Enable base16 styling
|
||||||
stylix.targets.lightdm.enable = true;
|
stylix.targets.lightdm.enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# This handles audio stuff
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
|
@ -12,16 +13,20 @@
|
||||||
|
|
||||||
# Volume controls
|
# Volume controls
|
||||||
environment.shellAliases =
|
environment.shellAliases =
|
||||||
let pactl = "${pkgs.pulseaudio}/bin/pactl";
|
let
|
||||||
|
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||||
|
volume = amount: "${pactl} set-sink-volume @DEFAULT_SINK@ ${amount}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Relative
|
# Relative
|
||||||
"v-up" = "${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
|
"v-down" = volume "-5%";
|
||||||
"v-down" = "${pactl} set-sink-volume @DEFAULT_SINK@ +5%";
|
"v-up" = volume "+5%";
|
||||||
|
|
||||||
# Absolute
|
# Absolute
|
||||||
"v-min" = "${pactl} set-sink-volume @DEFAULT_SINK@ 0%";
|
"v-min" = volume "0%";
|
||||||
"v-mid" = "${pactl} set-sink-volume @DEFAULT_SINK@ 50%";
|
"v-low" = volume "25%";
|
||||||
"v-max" = "${pactl} set-sink-volume @DEFAULT_SINK@ 100%";
|
"v-mid" = volume "50%";
|
||||||
|
"v-high" = volume "75%";
|
||||||
|
"v-max" = volume "100%";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# My touchpad configuration
|
# My touchpad configuration
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
imports = [ ./xserver.nix ];
|
||||||
|
|
||||||
services.xserver.libinput = {
|
services.xserver.libinput = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, ... }: {
|
{ pkgs, ... }: {
|
||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -36,15 +36,14 @@ main =
|
||||||
myWorkspaces =
|
myWorkspaces =
|
||||||
["1:dev", "2:browser", "3:chat", "4:terminal", "5:reading", "6:music", "7:gaming"]
|
["1:dev", "2:browser", "3:chat", "4:terminal", "5:reading", "6:music", "7:gaming"]
|
||||||
|
|
||||||
myTerminal = "alacritty"
|
myTerminal = "xmonad"
|
||||||
myBrowser = "firefox"
|
myBrowser = "firefox"
|
||||||
|
|
||||||
keymap =
|
keymap =
|
||||||
[ ("M-p", spawn "rofi -show drun"),
|
[ ("M-p", spawn "rofi -show drun"),
|
||||||
("M-w", spawn "rofi -show window"),
|
|
||||||
("M-g", spawn myBrowser),
|
("M-g", spawn myBrowser),
|
||||||
("M-d", spawn "Discord"),
|
("M-d", spawn "Discord"),
|
||||||
("M-v", spawn "alacritty -e 'vimclip'"),
|
("M-v", spawn "wezterm start vimclip"),
|
||||||
("M-s", spawn "spectacle -rcb"),
|
("M-s", spawn "spectacle -rcb"),
|
||||||
("M-S-s", spawn "spectacle -mcb"),
|
("M-S-s", spawn "spectacle -mcb"),
|
||||||
("M-C-s", spawn "spectacle -ucb"),
|
("M-C-s", spawn "spectacle -ucb"),
|
||||||
|
@ -62,8 +61,8 @@ main =
|
||||||
myLayoutHook = spacingHook layouts
|
myLayoutHook = spacingHook layouts
|
||||||
|
|
||||||
startupApps = []
|
startupApps = []
|
||||||
-- [ (0, "alacritty"),
|
-- [ (0, "wezterm"),
|
||||||
-- (1, "google-chrome-stable"),
|
-- (1, "firefox"),
|
||||||
-- (2, "Discord")
|
-- (2, "Discord")
|
||||||
-- ]
|
-- ]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [ ../touchpad.nix ];
|
imports = [ ../xserver.nix ../touchpad.nix ];
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,6 @@
|
||||||
default = 0;
|
default = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
enabled = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
workspace = lib.mkOption {
|
workspace = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
default = null;
|
default = null;
|
||||||
|
|
Loading…
Reference in a new issue