Compare commits

...

3 commits

Author SHA1 Message Date
coast
c50cc229b3 new nvim line 2025-11-04 16:13:28 +03:30
coast
761b9be034 add new keybind to niri -- round mako corners 2025-11-04 14:01:21 +03:30
coast
b8eadbb3c8 changes to top bar, nvim undodir, uwuify shebang changed, and wezterm
cursor style changed
2025-11-04 13:49:57 +03:30
19 changed files with 186 additions and 102 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@ config/qtile/__pycache__
etc/nixos/hardware-configuration.nix etc/nixos/hardware-configuration.nix
nixos/hardware-configuration.nix nixos/hardware-configuration.nix
config/nvim/nvim config/nvim/nvim
config/nvim/undo

View file

@ -12,4 +12,5 @@ config.enable_tab_bar = false
config.font = wezterm.font("JetBrainsMono Nerd Font") config.font = wezterm.font("JetBrainsMono Nerd Font")
config.window_close_confirmation = "NeverPrompt" config.window_close_confirmation = "NeverPrompt"
config.window_background_opacity = 0.90 config.window_background_opacity = 0.90
config.default_cursor_style = "SteadyUnderline"
return config return config

View file

@ -4,6 +4,7 @@ background-color=#282828
text-color=#ebdbb2 text-color=#ebdbb2
border-color=#3c3836 border-color=#3c3836
progress-color=over #3c3836 progress-color=over #3c3836
border-radius=8
[urgency=low] [urgency=low]
border-color=#458588 border-color=#458588

View file

@ -111,6 +111,7 @@ binds {
Mod+Shift+Slash { show-hotkey-overlay; } Mod+Shift+Slash { show-hotkey-overlay; }
Mod+Return hotkey-overlay-title="Open a Terminal: wezterm" { spawn "wezterm"; } Mod+Return hotkey-overlay-title="Open a Terminal: wezterm" { spawn "wezterm"; }
Mod+R hotkey-overlay-title="Run an Application: rofi" { spawn-sh "rofi -show drun -config ~/.config/rofi/gruvbox.rasi"; } Mod+R hotkey-overlay-title="Run an Application: rofi" { spawn-sh "rofi -show drun -config ~/.config/rofi/gruvbox.rasi"; }
Mod+Shift+Return hotkey-overlay-title="Run an application: rofi (run)" { spawn-sh "rofi -show run -config ~/.config/rofi/gruvbox.rasi"; }
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; } Super+Alt+S allow-when-locked=true hotkey-overlay-title=null { spawn-sh "pkill orca || exec orca"; }

View file

@ -1,6 +1,5 @@
require("plugins/lazy") require("plugins/lazy")
require("plugins/lsp") require("plugins/lsp")
require("plugins/lualine")
require("plugins/nvim-tree") require("plugins/nvim-tree")
require("plugins/telescope") require("plugins/telescope")
require("plugins/treesitter") require("plugins/treesitter")
@ -8,3 +7,4 @@ require("plugins/treesitter")
require("config") require("config")
require("plugins/render-markdown") require("plugins/render-markdown")
require("plugins/monokai-pro") require("plugins/monokai-pro")
require("status_line").setup()

View file

@ -7,7 +7,7 @@
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, "cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" },
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" }, "cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
"comfy-line-numbers.nvim": { "branch": "main", "commit": "31e2f9287b4491ad72defb9e0185eb2739983799" }, "comfy-line-numbers.nvim": { "branch": "main", "commit": "31e2f9287b4491ad72defb9e0185eb2739983799" },
"lazy.nvim": { "branch": "main", "commit": "db067881fff0fd4be8c00e5bde7492e0e1c77a2f" }, "lazy.nvim": { "branch": "main", "commit": "202d8e92b3a74ac88eb3a7f1e40fb59b4c2a6535" },
"lsp_signature.nvim": { "branch": "master", "commit": "d50e40b3bf9324128e71b0b7e589765ce89466d2" }, "lsp_signature.nvim": { "branch": "master", "commit": "d50e40b3bf9324128e71b0b7e589765ce89466d2" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
@ -31,5 +31,6 @@
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"twilight.nvim": { "branch": "main", "commit": "664e752f4a219801265cc3fc18782b457b58c1e1" }, "twilight.nvim": { "branch": "main", "commit": "664e752f4a219801265cc3fc18782b457b58c1e1" },
"typst-preview.nvim": { "branch": "master", "commit": "e544812bba84b4f7976590f2b6c0dfbd099e1893" }, "typst-preview.nvim": { "branch": "master", "commit": "e544812bba84b4f7976590f2b6c0dfbd099e1893" },
"vim-closetag": { "branch": "master", "commit": "d0a562f8bdb107a50595aefe53b1a690460c3822" },
"vim-vsnip": { "branch": "master", "commit": "0a4b8419e44f47c57eec4c90df17567ad4b1b36e" } "vim-vsnip": { "branch": "master", "commit": "0a4b8419e44f47c57eec4c90df17567ad4b1b36e" }
} }

View file

@ -10,6 +10,9 @@ cfg.softtabstop = 4
cfg.smarttab = true cfg.smarttab = true
cfg.smartindent = true cfg.smartindent = true
cfg.undofile = true
cfg.undodir = vim.fn.stdpath("config") .. "/undo"
cfg.number = true cfg.number = true
cfg.relativenumber = true cfg.relativenumber = true

View file

@ -99,5 +99,6 @@ return {
}, },
}, },
"nguyenvukhang/nvim-toggler", "nguyenvukhang/nvim-toggler",
"alvan/vim-closetag",
}, },
} }

View file

@ -3,9 +3,8 @@ local fmt = require("null-ls")
local cmp = require("cmp") local cmp = require("cmp")
require("nvim-autopairs").setup({}) require("nvim-autopairs").setup({})
require("lsp_signature").setup({ require("lsp_signature").setup({ hint_enable = false })
hint_enable = false,
})
local augroup = vim.api.nvim_create_augroup("LspFormatting", {}) local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
fmt.setup({ fmt.setup({
sources = { sources = {
@ -27,6 +26,7 @@ fmt.setup({
end end
end, end,
}) })
cmp.setup({ cmp.setup({
snippet = { snippet = {
expand = function(args) expand = function(args)
@ -40,112 +40,78 @@ cmp.setup({
["<C-e>"] = cmp.mapping.abort(), ["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = true }), ["<CR>"] = cmp.mapping.confirm({ select = true }),
}), }),
window = { window = { completion = cmp.config.window.bordered(), documentation = cmp.config.window.bordered() },
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
sources = cmp.config.sources({ sources = cmp.config.sources({
{ name = "nvim_lsp" }, { name = "nvim_lsp" },
{ name = "vsnip" }, { name = "vsnip" },
{ { name = "spell" },
name = "spell",
option = {
keep_all_entries = false,
enable_in_context = function()
return true
end,
},
},
}, { }, {
{ name = "buffer" }, { name = "buffer" },
{ name = "nvim_lua" }, { name = "nvim_lua" },
}), }),
}) })
cmp.setup.filetype("gitcommit", {
sources = cmp.config.sources({
{ name = "git" },
}, {
{ name = "buffer" },
}),
})
cmp.setup.cmdline({ "/", "?" }, { local capabilities = require("cmp_nvim_lsp").default_capabilities()
mapping = cmp.mapping.preset.cmdline(),
sources = { lsp.html.setup({
{ name = "buffer" }, cmd = { "vscode-html-language-server", "--stdio" },
capabilities = capabilities,
init_options = {
configurationSection = { "html", "css", "javascript" },
embeddedLanguages = { css = true, javascript = true },
provideFormatter = true,
},
settings = {
html = {
format = {
wrapLineLength = 120,
wrapAttributes = "auto",
contentUnformatted = "pre,code,textarea",
},
hover = { documentation = true, references = true },
},
}, },
}) })
cmp.setup.cmdline(":", { lsp.cssls.setup({
mapping = cmp.mapping.preset.cmdline(), capabilities = capabilities,
sources = cmp.config.sources({ settings = { css = { validate = true }, scss = { validate = true }, less = { validate = true } },
{ name = "path" },
}, {
{ name = "cmdline" },
}),
}) })
local capabilities = require("cmp_nvim_lsp").default_capabilities() lsp.ts_ls.setup({
lsp.rust_analyzer.setup({
settings = {
["rust-analyzer"] = {},
},
capabilities = capabilities, capabilities = capabilities,
on_attach = function(client)
client.server_capabilities.documentFormattingProvider = false
end,
}) })
lsp.rust_analyzer.setup({ capabilities = capabilities })
local clangd_capabilities = vim.deepcopy(capabilities) local clangd_capabilities = vim.deepcopy(capabilities)
clangd_capabilities["offsetEncoding"] = "utf-8" clangd_capabilities["offsetEncoding"] = "utf-8"
lsp.clangd.setup({ lsp.clangd.setup({
cmd = { cmd = { "clangd", "--background-index", "--function-arg-placeholders=0", "-j=12", "--clang-tidy" },
"clangd",
"--background-index",
"--function-arg-placeholders=0",
"-j=12",
"--clang-tidy",
},
capabilities = clangd_capabilities, capabilities = clangd_capabilities,
init_options = { init_options = { documentFormatting = true },
documentFormatting = true,
},
}) })
lsp.pyright.setup({ lsp.pyright.setup({ capabilities = capabilities })
capabilities = capabilities, lsp.gopls.setup({ capabilities = capabilities })
}) lsp.asm_lsp.setup({ capabilities = capabilities })
lsp.gopls.setup({ lsp.zls.setup({ capabilities = capabilities })
capabilities = capabilities, lsp.jdtls.setup({ capabilities = capabilities })
}) lsp.tinymist.setup({ capabilities = capabilities })
lsp.asm_lsp.setup({
capabilities = capabilities,
})
lsp.zls.setup({
capabilities = capabilities,
})
lsp.jdtls.setup({
capabilities = capabilities,
})
lsp.tinymist.setup({
capabilities = capabilities,
})
lsp.lua_ls.setup({ lsp.lua_ls.setup({
on_init = function(client) on_init = function(client)
local path = client.workspace_folders[1].name local path = client.workspace_folders[1].name
if not vim.loop.fs_stat(path .. "/.luarc.json") and not vim.loop.fs_stat(path .. "/.luarc.jsonc") then if not vim.loop.fs_stat(path .. "/.luarc.json") and not vim.loop.fs_stat(path .. "/.luarc.jsonc") then
client.config.settings = vim.tbl_deep_extend("force", client.config.settings, { client.config.settings = vim.tbl_deep_extend("force", client.config.settings, {
Lua = { Lua = {
runtime = { runtime = { version = "LuaJIT" },
version = "LuaJIT", workspace = { checkThirdParty = false, library = { vim.env.VIMRUNTIME } },
},
workspace = {
checkThirdParty = false,
library = {
vim.env.VIMRUNTIME,
},
},
}, },
}) })
client.notify("workspace/didChangeConfiguration", { settings = client.config.settings }) client.notify("workspace/didChangeConfiguration", { settings = client.config.settings })
end end
return true return true

View file

@ -0,0 +1,101 @@
colors = {
foreground = "#f8f8f2",
wine = "#7f2f4d",
red = "#d75a6c",
green = "#8ab661",
yellow = "#e0b763",
orange = "#d87f3e",
magenta = "#682776",
cyan = "#36b5b5",
bg_darken = "#1e1e1e",
}
local M = {}
function M.setup()
vim.cmd("hi StatusBackground guifg=" .. colors.foreground .. " guibg=" .. colors.bg_darken)
vim.cmd("hi Moden guifg=" .. colors.foreground .. " guibg=" .. colors.wine .. " gui=bold")
vim.cmd("hi Modei guifg=" .. colors.foreground .. " guibg=" .. colors.green .. " gui=bold")
vim.cmd("hi Modev guifg=" .. colors.foreground .. " guibg=" .. colors.yellow .. " gui=bold")
vim.cmd("hi Modet guifg=" .. colors.foreground .. " guibg=" .. colors.orange .. " gui=bold")
vim.cmd("hi Modec guifg=" .. colors.foreground .. " guibg=" .. colors.magenta .. " gui=bold")
vim.cmd("hi Moder guifg=" .. colors.foreground .. " guibg=" .. colors.red .. " gui=bold")
vim.cmd("hi Filetype guifg=" .. colors.cyan .. " guibg=" .. colors.bg_darken .. " gui=bold")
vim.cmd("hi Position guifg=" .. colors.yellow .. " guibg=" .. colors.bg_darken .. " gui=bold")
vim.cmd("hi GitBranch guifg=" .. colors.orange .. " guibg=" .. colors.bg_darken .. " gui=bold")
vim.cmd("hi GitDiff guifg=" .. colors.green .. " guibg=" .. colors.bg_darken)
vim.cmd("hi GitDiffDel guifg=" .. colors.red .. " guibg=" .. colors.bg_darken)
vim.cmd("hi Separator guifg=" .. colors.foreground .. " guibg=" .. colors.bg_darken)
vim.cmd("hi LSPError guifg=" .. colors.red .. " guibg=" .. colors.bg_darken)
vim.cmd("hi LSPWarn guifg=" .. colors.yellow .. " guibg=" .. colors.bg_darken)
vim.cmd("hi LSPInfo guifg=" .. colors.cyan .. " guibg=" .. colors.bg_darken)
vim.cmd("hi LSPOk guifg=" .. colors.green .. " guibg=" .. colors.bg_darken)
vim.o.statusline = table.concat({
"%{%v:lua.themeStatuslineMode()%} ",
"%f ",
"%{%v:lua.themeGitBranch()%} ",
"%{%v:lua.themeGitDiff()%} ",
"%{%v:lua.themeLSP()%} ",
"%=",
"%{%v:lua.themeStatuslineFiletype()%} ",
"%{%v:lua.themeStatuslinePosition()%}",
})
end
function themeStatuslineMode()
local mode = vim.fn.mode()
local mode_highlight = "Mode" .. mode:sub(1, 1)
return string.format("%%#%s# %s %%#StatusBackground#", mode_highlight, mode:upper())
end
function themeStatuslineFiletype()
return string.format("%%#Filetype# %s %%#Separator#│%%#StatusBackground#", vim.bo.filetype)
end
function themeStatuslinePosition()
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
return string.format("%%#Position# %03d:%02d ", row, col)
end
function themeGitBranch()
local branch = vim.fn.systemlist("git rev-parse --abbrev-ref HEAD 2>/dev/null")[1] or ""
if branch ~= "" then
return string.format("%%#GitBranch# %s %%#Separator#│%%#StatusBackground#", branch)
end
return ""
end
function themeGitDiff()
local diff = vim.fn.systemlist("git diff --shortstat 2>/dev/null")[1] or ""
local added, removed = diff:match("(%d+) insertions?"), diff:match("(%d+) deletions?")
added = added or "0"
removed = removed or "0"
if diff ~= "" then
return string.format("%%#GitDiff#+%s %%#GitDiffDel#-%s %%#StatusBackground#", added, removed)
end
return ""
end
function themeLSP()
local errors = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.ERROR })
local warns = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.WARN })
local info = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.INFO })
local hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT })
local str = ""
if errors > 0 then
str = str .. string.format("%%#LSPError#E:%d ", errors)
end
if warns > 0 then
str = str .. string.format("%%#LSPWarn#W:%d ", warns)
end
if info > 0 then
str = str .. string.format("%%#LSPInfo#I:%d ", info)
end
if hints > 0 then
str = str .. string.format("%%#LSPOk#H:%d ", hints)
end
return str
end
return M

Binary file not shown.

View file

@ -3,16 +3,16 @@
"output": "HDMI-A-1", "output": "HDMI-A-1",
"layer": "top", "layer": "top",
"modules-left": [ "modules-left": [
"custom/distro",
"niri/workspaces", "niri/workspaces",
"niri/mode", "niri/window"
], ],
"modules-center": [ "modules-center": [
], ],
"modules-right": [ "modules-right": [
"clock", "clock",
// "battery", // "battery",
"pulseaudio", "pulseaudio"
"network"
], ],
"pulseaudio": { "pulseaudio": {
"tooltip": false, "tooltip": false,
@ -50,6 +50,10 @@
} }
] ]
}, },
"custom/distro": {
"format": "󱄅",
"tooltip": false
},
"bluetooth": { "bluetooth": {
"format": " {status}", "format": " {status}",
"format-connected": " CONN", "format-connected": " CONN",
@ -64,17 +68,6 @@
}, },
"niri/workspaces": { "niri/workspaces": {
"format": "●", "format": "●",
"persistent-workspaces": {
"1": 1,
"2": 2,
"3": 3,
"4": 4,
"5": 5,
"6": 6,
"7": 7,
"8": 8,
"9": 9
},
}, },
"niri/window": { "niri/window": {
"icon": false, "icon": false,

View file

@ -6,7 +6,7 @@
@define-color text_dim #8c8a75; @define-color text_dim #8c8a75;
@define-color blue #7fbbb3; @define-color blue #7fbbb3;
@define-color green #55393D; /* changed */ @define-color green #55393D;
@define-color yellow #f9e2af; @define-color yellow #f9e2af;
@define-color peach #e69875; @define-color peach #e69875;
@define-color maroon #c05a3b; @define-color maroon #c05a3b;
@ -23,8 +23,14 @@
} }
window#waybar { window#waybar {
background: @background; background: linear-gradient(
border-bottom: 2px solid @surface0; to bottom,
rgba(30, 30, 30, 1) 0%,
rgba(28, 28, 28, 0.95) 68%,
rgba(25, 25, 25, 0.75) 82%,
rgba(20, 20, 20, 0.30) 94%,
rgba(20, 20, 20, 0.00) 100%
);
} }
#disk, #disk,
@ -41,7 +47,7 @@ window#waybar {
#bluetooth, #bluetooth,
#tray menu { #tray menu {
padding: 5px 10px; padding: 5px 10px;
margin: 8px 0 8px 10px; margin: 3px 0 13px 10px;
background: @surface0; background: @surface0;
color: @text; color: @text;
transition: 0.3s; transition: 0.3s;
@ -57,8 +63,9 @@ window#waybar.empty #window {
border: none; border: none;
} }
#network { margin: 8px 12px; color: @text; } #network { color: @text; }
#pulseaudio, #clock { color: @text; } #pulseaudio { margin-right: 12px; color: @text; }
#clock { color: @text; }
#workspaces { #workspaces {
margin-left: 12px; margin-left: 12px;
@ -73,7 +80,7 @@ window#waybar.empty #window {
} }
#workspaces button.empty { color: @text_dim; } #workspaces button.empty { color: @text_dim; }
#workspaces button.active { color: @green; } /* now #55393D */ #workspaces button.active { color: @green; }
#workspaces button.urgent { color: @maroon; } #workspaces button.urgent { color: @maroon; }
#workspaces button:hover { #workspaces button:hover {
@ -81,3 +88,11 @@ window#waybar.empty #window {
color: @text; color: @text;
} }
#custom-distro {
background-color: @accent;
color: @text;
font-size: 30;
margin-bottom: 8px;
padding-left: 12px;
padding-right: 12px;
}

View file

@ -1,4 +1,4 @@
#!/run/current-system/sw/bin/awk -f #!awk -f
function uwuify(s, o) { function uwuify(s, o) {
o = s o = s