updates: (also build system back?)

This commit is contained in:
zoey 2025-05-29 10:51:57 -04:00
parent 2606d3f2a7
commit 8498f7d121
Signed by: zoey
GPG key ID: 81FB9FECDD6A33E2
6 changed files with 548 additions and 481 deletions

View file

@ -22,7 +22,7 @@ in {
};
extraConfig = ''
bold_font ${fonts.mono} Bold Italic
bold_font ${fonts.mono} Bold
italic_font ${fonts.mono} Italic
bold_italic_font ${fonts.mono} Bold Italic
'';

View file

@ -0,0 +1,276 @@
return {
"nvim-lualine/lualine.nvim",
config = function()
-- Eviline config for lualine
-- Author: shadmansaleh
-- Credit: glepnir
local lualine = require("lualine")
local ctp = require("catppuccin.palettes").get_palette("mocha")
local conditions = {
buffer_not_empty = function()
return vim.fn.empty(vim.fn.expand("%:t")) ~= 1
end,
hide_in_width = function()
return vim.fn.winwidth(0) > 80
end,
check_git_workspace = function()
local filepath = vim.fn.expand("%:p:h")
local gitdir = vim.fn.finddir(".git", filepath .. ";")
return gitdir and #gitdir > 0 and #gitdir < #filepath
end,
}
-- Config
local config = {
options = {
-- Disable sections and component separators
component_separators = "",
section_separators = "",
theme = {
-- We are going to use lualine_c an lualine_x as left and
-- right section. Both are highlighted by c theme . So we
-- are just setting default looks o statusline
normal = { c = { fg = ctp.text, bg = ctp.base } },
inactive = { c = { fg = ctp.overlay0, bg = ctp.base } },
},
},
sections = {
-- these are to remove the defaults
lualine_a = {},
lualine_b = {},
lualine_y = {},
lualine_z = {},
-- These will be filled later
lualine_c = {},
lualine_x = {},
},
inactive_sections = {
-- these are to remove the defaults
lualine_a = {},
lualine_b = {},
lualine_y = {},
lualine_z = {},
lualine_c = {},
lualine_x = {},
},
}
-- Function to get abbreviated mode indicators for status line
-- Returns a single character representing the current mode
-- Usage example: local mode = get_mode_abbr()
local function get_mode_abbr()
local mode_map = {
["n"] = "N", -- Normal
["no"] = "N", -- Operator-pending
["nov"] = "N", -- Operator-pending (forced charwise)
["noV"] = "N", -- Operator-pending (forced linewise)
["no\22"] = "N", -- Operator-pending (forced blockwise)
["niI"] = "N", -- Normal using i_CTRL-O in Insert-mode
["niR"] = "N", -- Normal using i_CTRL-O in Replace-mode
["niV"] = "N", -- Normal using i_CTRL-O in Virtual-Replace-mode
["nt"] = "N", -- Normal in terminal-emulator
["v"] = "V", -- Visual
["vs"] = "V", -- Visual using i_CTRL-O in Select-mode
["V"] = "VL", -- Visual Line
["Vs"] = "VL", -- Visual Line using i_CTRL-O in Select-mode
["\22"] = "VB", -- Visual Block
["\22s"] = "VB", -- Visual Block using i_CTRL-O in Select-mode
["s"] = "S", -- Select
["S"] = "SL", -- Select Line
["\19"] = "SB", -- Select Block
["i"] = "I", -- Insert
["ic"] = "I", -- Insert mode completion
["ix"] = "I", -- Insert mode i_CTRL-X
["R"] = "R", -- Replace
["Rc"] = "R", -- Replace mode completion
["Rx"] = "R", -- Replace mode i_CTRL-X
["Rv"] = "VR", -- Virtual Replace
["Rvc"] = "VR", -- Virtual Replace mode completion
["Rvx"] = "VR", -- Virtual Replace mode i_CTRL-X
["c"] = "C", -- Command-line
["cv"] = "EX", -- Vim Ex mode
["ce"] = "EX", -- Normal Ex mode
["r"] = "P", -- Prompt
["rm"] = "M", -- More prompt
["r?"] = "C", -- Confirm
["!"] = "S", -- Shell
["t"] = "T", -- Terminal
}
local current_mode = vim.api.nvim_get_mode().mode
return mode_map[current_mode] or current_mode
end
-- Function to get Catppuccin color for the current mode
-- Returns the appropriate color from the ctp palette based on current mode
-- Assumes that a local 'ctp' variable has already been defined
-- Usage example: local mode_color = get_mode_color()
local function get_mode_color()
local mode_colors = {
-- Normal mode - Blue
["n"] = ctp.blue,
["no"] = ctp.blue,
["nov"] = ctp.blue,
["noV"] = ctp.blue,
["no\22"] = ctp.blue,
["niI"] = ctp.green,
["niR"] = ctp.green,
["niV"] = ctp.green,
["nt"] = ctp.blue,
-- Visual modes - Mauve (purple)
["v"] = ctp.mauve,
["vs"] = ctp.mauve,
["V"] = ctp.mauve,
["Vs"] = ctp.mauve,
["\22"] = ctp.mauve,
["\22s"] = ctp.mauve,
-- Select modes - Peach
["s"] = ctp.peach,
["S"] = ctp.peach,
["\19"] = ctp.peach,
-- Insert mode - Green
["i"] = ctp.green,
["ic"] = ctp.green,
["ix"] = ctp.green,
-- Replace modes - Red
["R"] = ctp.red,
["Rc"] = ctp.red,
["Rx"] = ctp.red,
["Rv"] = ctp.red,
["Rvc"] = ctp.red,
["Rvx"] = ctp.red,
-- Command/Prompt modes - Yellow
["c"] = ctp.yellow,
["cv"] = ctp.yellow,
["ce"] = ctp.yellow,
["r"] = ctp.yellow,
["rm"] = ctp.yellow,
["r?"] = ctp.yellow,
-- Terminal mode - Teal
["t"] = ctp.teal,
-- Shell mode - Sapphire
["!"] = ctp.sapphire,
}
local current_mode = vim.api.nvim_get_mode().mode
return mode_colors[current_mode] or ctp.subtext0 -- Default to a neutral color if mode not found
end
-- Inserts a component in lualine_c at left section
local function ins_left(component)
table.insert(config.sections.lualine_c, component)
end
-- Inserts a component in lualine_x at right section
local function ins_right(component)
table.insert(config.sections.lualine_x, component)
end
ins_left({
function()
return get_mode_abbr()
end,
color = function()
local color = get_mode_color()
return { fg = ctp.base, bg = color, gui = "bold" }
end, -- Sets highlighting of component
padding = { left = 1, right = 1 }, -- We don't need space before this
})
ins_left({
"filename",
cond = conditions.buffer_not_empty,
color = { fg = ctp.sapphire },
})
ins_left({
-- filesize component
"filesize",
cond = conditions.buffer_not_empty,
color = { fg = ctp.subtext0 },
})
ins_left({ "location", color = { fg = ctp.subtext0 } })
ins_left({
"diagnostics",
sources = { "nvim_diagnostic" },
symbols = { error = "", warn = "", info = "" },
diagnostics_color = {
error = { fg = ctp.red },
warn = { fg = ctp.yellow },
info = { fg = ctp.teal },
},
})
-- Insert mid section. You can make any number of sections in neovim :)
-- for lualine it's any number greater then 2
ins_left({
function()
return "%="
end,
})
ins_right({
-- Lsp server name .
function()
local msg = "none"
local buf_ft = vim.api.nvim_get_option_value("filetype", { buf = 0 })
local clients = vim.lsp.get_clients()
if next(clients) == nil then
return msg
end
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name
end
end
return msg
end,
icon = "",
color = { fg = ctp.overlay1, gui = "bold" },
})
-- Add components to right sections
ins_right({
"branch",
icon = "",
color = { fg = ctp.mauve, gui = "bold" },
})
ins_right({
"diff",
-- Is it me or the symbol for modified us really weird
symbols = { added = "", modified = "󰝤 ", removed = "" },
diff_color = {
added = { fg = ctp.green },
modified = { fg = ctp.peach },
removed = { fg = ctp.red },
},
cond = conditions.hide_in_width,
})
ins_right({
function()
return ""
end,
color = function()
local color = get_mode_color()
return { fg = color }
end, -- Sets highlighting of component
padding = { left = 1 },
})
-- Now don't forget to initialize lualine
lualine.setup(config)
end,
}

View file

@ -16,7 +16,7 @@ in {
config = mkIf cfg.enable {
services.greetd = {
enable = false;
enable = true;
settings = {
default_session = {
command = "niri-session";
@ -25,7 +25,7 @@ in {
};
};
services.xserver.displayManager.gdm.enable = true;
services.xserver.displayManager.gdm.enable = false;
services.xserver.displayManager.gdm.wayland = true;
# services.displayManager.sddm.enable = true;

View file

@ -34,98 +34,25 @@ in {
{
set = "Custom";
privateBuildPlan = ''
# [buildPlans.IosevkaCustom]
# family = "Iosevka"
# spacing = "fontconfig-mono"
# serifs = "sans"
# noCvSs = true
# exportGlyphNames = true
#
# [buildPlans.IosevkaCustom.variants]
# inherits = "ss08"
#
# [buildPlans.IosevkaCustom.widths.Normal]
# shape = 500
# menu = 5
# css = "normal"
#
# [buildPlans.IosevkaCustom.widths.Extended]
# shape = 600
# menu = 7
# css = "expanded"
[buildPlans.IosevkaCustom]
family = "Iosevka"
spacing = "normal"
spacing = "fontconfig-mono"
serifs = "sans"
noCvSs = true
exportGlyphNames = true
[buildPlans.IosevkaCustom.variants.design]
one = "base-flat-top-serif"
two = "straight-neck-serifless"
four = "closed-serifless"
five = "oblique-arched-serifless"
six = "closed-contour"
seven = "bend-serifless"
eight = "crossing-asymmetric"
nine = "closed-contour"
zero = "oval-dotted"
capital-d = "more-rounded-serifless"
capital-g = "toothless-corner-serifless-hooked"
a = "double-storey-serifless"
g = "double-storey"
i = "hooky"
l = "serifed-semi-tailed"
r = "hookless-serifless"
t = "bent-hook-short-neck"
w = "straight-flat-top-serifless"
y = "straight-turn-serifless"
capital-eszet = "rounded-serifless"
long-s = "bent-hook-middle-serifed"
eszet = "longs-s-lig-serifless"
lower-lambda = "straight-turn"
lower-tau = "short-tailed"
lower-phi = "straight"
partial-derivative = "closed-contour"
cyrl-capital-u = "straight-turn-serifless"
cyrl-u = "straight-turn-serifless"
cyrl-ef = "split-serifless"
asterisk = "penta-low"
caret = "high"
guillemet = "straight"
number-sign = "slanted"
dollar = "open"
cent = "through-cap"
bar = "force-upright"
micro-sign = "tailed-serifless"
lig-ltgteq = "slanted"
lig-neq = "more-slanted-dotted"
lig-equal-chain = "without-notch"
lig-hyphen-chain = "without-notch"
lig-plus-chain = "with-notch"
[buildPlans.IosevkaCustom.variants]
inherits = "ss08"
[buildPlans.IosevkaCustom.weights.Regular]
shape = 400
menu = 400
css = 400
[buildPlans.IosevkaCustom.weights.Bold]
shape = 700
menu = 700
css = 700
[buildPlans.IosevkaCustom.slopes.Upright]
angle = 0
shape = "upright"
menu = "upright"
[buildPlans.IosevkaCustom.widths.Normal]
shape = 500
menu = 5
css = "normal"
[buildPlans.IosevkaCustom.slopes.Italic]
angle = 9.4
shape = "italic"
menu = "italic"
css = "italic"
[buildPlans.IosevkaCustom.widths.Extended]
shape = 600
menu = 7
css = "expanded"
'';
})
noto-fonts