Compare commits

...

20 Commits

Author SHA1 Message Date
9a2a4822c2 zutty: add xresources 2026-01-28 11:16:38 +01:00
9f4a0eb52d nvim: add guess-indent, update keys 2026-01-28 10:51:42 +01:00
2c4d4c2a10 nvim: set title 2026-01-22 05:31:55 +01:00
6371fee81b nvim: add which-key 2026-01-22 00:43:18 +01:00
d45450227e nvim: add slimline 2026-01-21 23:53:06 +01:00
0be2ea5be3 nvim: colorscheme dark: kanagawa-wave 2026-01-21 23:45:29 +01:00
7ab3c8cdbb nivm: conform: add commands FormatDisable and FormatEnable 2026-01-20 21:43:06 +01:00
410cfe4fca add oxwm 2026-01-19 22:09:09 +01:00
baec05802d nvim: fix lua lsp config 2026-01-18 23:53:27 +01:00
85553bd9ac nvim: add luasnip 2026-01-13 00:37:29 +01:00
f6c795b8e9 nvim: change telescope keys 2026-01-10 18:32:35 +01:00
9778bd3e69 nvim: add option undofile 2026-01-09 12:00:27 +01:00
0c16c1d8fe nvim: colorscheme nightfox (terafox/dayfox); also update st .Xresources colors 2026-01-09 12:00:27 +01:00
bd1652deff nvim: add telescope 2026-01-09 12:00:27 +01:00
4dfb7abbba nvim: add sourround 2026-01-05 07:17:31 +01:00
a7c0178983 nvim: add nvim-various-textobjs 2026-01-05 07:17:31 +01:00
292de198a6 nvim: use vim.pack 2026-01-05 07:17:31 +01:00
48392501e1 nvim: split snacks keys to allow reload with :so 2025-12-19 22:21:10 +01:00
dafff8e0cd nvim: add auto-session 2025-12-19 22:18:16 +01:00
b4f94f7064 nvim: change and add snacks keys 2025-12-19 22:18:16 +01:00
30 changed files with 1117 additions and 382 deletions

View File

@@ -2,57 +2,19 @@ require("config.options")
require("config.remap") require("config.remap")
require("config.lsp") require("config.lsp")
local ok, paq = pcall(require, "paq") require("plugins.arrow")
if ok then require("plugins.auto-session")
paq({ require("plugins.colorscheme")
"EdenEast/nightfox.nvim", require("plugins.conform")
"ellisonleao/gruvbox.nvim", require("plugins.flash")
"stevearc/conform.nvim", require("plugins.guess-indent")
"otavioschwanck/arrow.nvim", require("plugins.luasnip")
"folke/flash.nvim", require("plugins.multicursor")
"folke/snacks.nvim", require("plugins.nvim-various-textobjs")
"stevearc/oil.nvim", require("plugins.oil")
{ require("plugins.slimline")
"jake-stewart/multicursor.nvim", require("plugins.snacks")
branch = "1.0", require("plugins.telescope")
}, require("plugins.surround")
{ require("plugins.treesitter")
"nvim-treesitter/nvim-treesitter-textobjects", require("plugins.which-key")
branch = "master",
},
{
"nvim-treesitter/nvim-treesitter",
branch = "master",
build = ":TSUpdate",
},
})
else
print("plugin paq missing")
end
local function load_plugin(name, setup)
local cfg = require(setup)
name = cfg.main or name
local ok, plugin = pcall(require, name)
if ok then
if cfg.config then
cfg.config(cfg.opts)
else
plugin.setup(cfg.opts)
end
if cfg.init then
cfg.init(plugin)
end
else
print("plugin " .. name .. " missing")
end
end
load_plugin("arrow", "plugins.arrow")
load_plugin("nightfox", "plugins.colorscheme")
load_plugin("conform", "plugins.conform")
load_plugin("flash", "plugins.flash")
load_plugin("multicursor-nvim", "plugins.multicursor")
load_plugin("oil", "plugins.oil")
load_plugin("snacks", "plugins.snacks")
load_plugin("treesitter", "plugins.treesitter")

View File

@@ -1,5 +1,12 @@
return { return {
cmd = 'lua-language-server', cmd = { "lua-language-server" },
filetypes = { 'lua' }, filetypes = { "lua" },
rootmarkers = { '.git' }, root_markers = { ".luarc.json", ".git" },
settings = {
Lua = {
runtime = {
version = "LuaJIT",
},
},
},
} }

View File

@@ -15,7 +15,7 @@ vim.api.nvim_create_autocmd("LspAttach", {
return { abbr = item.label:gsub("%b()", "") } return { abbr = item.label:gsub("%b()", "") }
end, end,
}) })
vim.keymap.set("n", "<leader>A", vim.lsp.buf.code_action) vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action)
vim.keymap.set("i", "<C-space>", vim.lsp.completion.get) vim.keymap.set("i", "<C-space>", vim.lsp.completion.get)
vim.keymap.set("n", "<leader>k", function() vim.keymap.set("n", "<leader>k", function()
vim.diagnostic.jump({ float = true, count = -1 }) vim.diagnostic.jump({ float = true, count = -1 })

View File

@@ -6,5 +6,8 @@ vim.g.maplocalleader = " \\"
vim.opt.number = true vim.opt.number = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.opt.signcolumn = "yes" vim.opt.signcolumn = "yes"
vim.opt.title = true
vim.opt.timeout = false vim.opt.timeout = false
vim.o.undofile = true

View File

@@ -1,10 +1,12 @@
vim.keymap.set("n", "<M-h>", "<C-w>h") local set = vim.keymap.set
vim.keymap.set("n", "<M-k>", "<C-w>k")
vim.keymap.set("n", "<M-j>", "<C-w>j")
vim.keymap.set("n", "<M-l>", "<C-w>l")
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<cr>") set("n", "<M-h>", "<C-w>h")
vim.keymap.set("n", "<leader>k", "<cmd>cp<cr>") set("n", "<M-k>", "<C-w>k")
vim.keymap.set("n", "<leader>j", "<cmd>cn<cr>") set("n", "<M-j>", "<C-w>j")
vim.keymap.set("n", "<leader>x", "<cmd>copen<cr>") set("n", "<M-l>", "<C-w>l")
vim.keymap.set("n", "<leader>X", "<cmd>cclose<cr>")
set("n", "<Esc>", "<cmd>nohlsearch<cr>")
set("n", "<leader>K", "<cmd>cp<cr>")
set("n", "<leader>J", "<cmd>cn<cr>")
set("n", "<leader>x", "<cmd>copen<cr>")
set("n", "<leader>X", "<cmd>cclose<cr>")

View File

@@ -1,7 +1,12 @@
return { vim.pack.add({ "https://github.com/otavioschwanck/arrow.nvim" })
opts = {
local ok, arrow = pcall(require, "arrow")
if ok then
arrow.setup({
show_icons = false, show_icons = false,
leader_key = "_", leader_key = "_",
buffer_leader_key = " m", buffer_leader_key = " m",
}, })
} else
print("plugin arrow missing")
end

View File

@@ -0,0 +1,12 @@
vim.pack.add({ "https://github.com/rmagatti/auto-session" })
vim.keymap.set("n", "<leader>wa", "<cmd>AutoSession search<cr>")
local ok, sess = pcall(require, "auto-session")
if ok then
sess.setup({
suppressed_dirs = { "~/", "~/src", "~/Downloads", "/" },
})
else
print("plugin auto-session missing")
end

View File

@@ -1,16 +1,5 @@
return { vim.pack.add({ "https://github.com/EdenEast/nightfox.nvim", "https://github.com/rebelot/kanagawa.nvim" })
opts = {
specs = { local cs = require("config.colorscheme")
all = { cs.set_colorschemes("kanagawa-wave", "dayfox")
syntax = { cs.update_colorscheme()
operator = "#bf8040",
},
},
},
},
init = function()
local cs = require("config.colorscheme")
cs.set_colorschemes("gruvbox", "gruvbox")
cs.update_colorscheme()
end,
}

View File

@@ -1,11 +1,36 @@
return { vim.pack.add({ "https://github.com/stevearc/conform.nvim" })
opts = {
local ok, conform = pcall(require, "conform")
if ok then
conform.setup({
formatters_by_ft = { formatters_by_ft = {
lua = { "stylua" }, lua = { "stylua" },
}, },
format_on_save = { format_on_save = function(bufnr)
timeout_ms = 500, -- Disable with a global or buffer-local variable
lsp_format = "fallback", if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then
}, return
}, end
} return { timeout_ms = 500, lsp_format = "fallback" }
end,
})
vim.api.nvim_create_user_command("FormatDisable", function(args)
if args.bang then
-- FormatDisable! will disable formatting just for this buffer
vim.b.disable_autoformat = true
else
vim.g.disable_autoformat = true
end
end, {
desc = "Disable autoformat-on-save",
bang = true,
})
vim.api.nvim_create_user_command("FormatEnable", function()
vim.b.disable_autoformat = false
vim.g.disable_autoformat = false
end, {
desc = "Re-enable autoformat-on-save",
})
else
print("plugin conform missing")
end

View File

@@ -1,24 +1,30 @@
return { vim.pack.add({ "https://github.com/folke/flash.nvim" })
opts = {
local ok, flash = pcall(require, "flash")
if ok then
flash.setup({
modes = { modes = {
char = { char = {
enabled = false, enabled = false,
}, },
}, },
}, })
init = function()
local set = vim.keymap.set local set = vim.keymap.set
set({ "n", "x", "o" }, "\\", function()
require("flash").jump() set({ "n", "x", "o" }, "\\", function()
end, { desc = "Flash" }) require("flash").jump()
set({ "n", "x", "o" }, "=", function() end, { desc = "Flash" })
require("flash").treesitter() set({ "n", "x", "o" }, "=", function()
end, { desc = "Flash Treesitter" }) require("flash").treesitter()
set({ "o" }, "r", function() end, { desc = "Flash Treesitter" })
require("flash").remote() set({ "o" }, "r", function()
end, { desc = "Remote Flash" }) require("flash").remote()
set({ "n", "x", "o" }, " t", function() end, { desc = "Remote Flash" })
require("flash").treesitter_search() set({ "n", "x", "o" }, " t", function()
end, { desc = "Treesitter Search" }) require("flash").treesitter_search()
end, end, { desc = "Treesitter Search" })
} else
print("plugin flash missing")
end

View File

@@ -0,0 +1,8 @@
vim.pack.add({ "https://github.com/NMAC427/guess-indent.nvim" })
local ok, guess_indent = pcall(require, "guess-indent")
if ok then
guess_indent.setup()
else
print("plugin guess-indent missing")
end

View File

@@ -0,0 +1,48 @@
vim.api.nvim_create_autocmd("PackChanged", {
group = vim.api.nvim_create_augroup("luasnip-update", { clear = true }),
callback = function(ev)
local name, kind = ev.data.spec.name, ev.data.kind
if name == "luasnip" and (kind == "install" or kind == "update") then
vim.system({ "make install_jsregexp" }, { cwd = ev.data.path }):wait()
print("luasnip make done.")
end
end,
})
vim.pack.add({ { src = "https://github.com/L3MON4D3/LuaSnip", version = vim.version.range("^2.0.0") } })
local ok, ls = pcall(require, "luasnip")
if ok then
vim.keymap.set({ "i" }, "<C-K>", function()
ls.expand()
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-L>", function(fallback)
if ls.locally_jumpable() then
ls.jump(1)
else
local key = vim.api.nvim_replace_termcodes("<C-L>", true, false, true)
vim.api.nvim_feedkeys(key, "n", false)
end
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-J>", function()
if ls.locally_jumpable() then
ls.jump(-1)
else
local key = vim.api.nvim_replace_termcodes("<C-J>", true, false, true)
vim.api.nvim_feedkeys(key, "n", false)
end
end, { silent = true })
vim.keymap.set({ "i", "s" }, "<C-E>", function()
if ls.choice_active() then
ls.change_choice(1)
else
local key = vim.api.nvim_replace_termcodes("<C-E>", true, false, true)
vim.api.nvim_feedkeys(key, "n", false)
end
end, { silent = true })
require("luasnip.loaders.from_lua").load({ paths = vim.fs.joinpath(vim.fn.stdpath("config"), "lua", "snippets") })
else
print("plugin luasnip missing")
end

View File

@@ -1,71 +1,76 @@
return { vim.pack.add({ { src = "https://github.com/jake-stewart/multicursor.nvim", version = "1.0" } })
init = function(mc)
local set = vim.keymap.set
-- Add or skip cursor above/below the main cursor. local ok, mc = pcall(require, "multicursor-nvim")
set({ "n", "x" }, "<c-k>", function() if ok then
mc.lineAddCursor(-1) mc.setup()
end)
set({ "n", "x" }, "<c-j>", function()
mc.lineAddCursor(1)
end)
set({ "n", "x" }, "<leader><c-k>", function()
mc.lineSkipCursor(-1)
end)
set({ "n", "x" }, "<leader><c-j>", function()
mc.lineSkipCursor(1)
end)
-- Add or skip adding a new cursor by matching word/selection local set = vim.keymap.set
set({ "n", "x" }, "<c-n>", function()
mc.matchAddCursor(1) -- Add or skip cursor above/below the main cursor.
end) set({ "n", "x" }, "<c-k>", function()
set({ "n", "x" }, "<leader><c-n>", function() mc.lineAddCursor(-1)
mc.matchSkipCursor(1) end)
end) set({ "n", "x" }, "<c-j>", function()
set({ "n", "x" }, "<c-p>", function() mc.lineAddCursor(1)
mc.matchAddCursor(-1) end)
end) set({ "n", "x" }, "<leader><c-k>", function()
set({ "n", "x" }, "<leader><c-p>", function() mc.lineSkipCursor(-1)
mc.matchSkipCursor(-1) end)
set({ "n", "x" }, "<leader><c-j>", function()
mc.lineSkipCursor(1)
end)
-- Add or skip adding a new cursor by matching word/selection
set({ "n", "x" }, "<c-n>", function()
mc.matchAddCursor(1)
end)
set({ "n", "x" }, "<leader><c-n>", function()
mc.matchSkipCursor(1)
end)
set({ "n", "x" }, "<c-p>", function()
mc.matchAddCursor(-1)
end)
set({ "n", "x" }, "<leader><c-p>", function()
mc.matchSkipCursor(-1)
end)
-- Add and remove cursors with control + left click.
set("n", "<c-leftmouse>", mc.handleMouse)
set("n", "<c-leftdrag>", mc.handleMouseDrag)
set("n", "<c-leftrelease>", mc.handleMouseRelease)
-- Disable and enable cursors.
set({ "n", "x" }, "<leader><c-q>", mc.toggleCursor)
-- Mappings defined in a keymap layer only apply when there are
-- multiple cursors. This lets you have overlapping mappings.
mc.addKeymapLayer(function(layerSet)
-- Select a different cursor as the main one.
layerSet({ "n", "x" }, "<left>", mc.prevCursor)
layerSet({ "n", "x" }, "<right>", mc.nextCursor)
-- Delete the main cursor.
layerSet({ "n", "x" }, "<leader>x", mc.deleteCursor)
-- Enable and clear cursors using escape.
layerSet("n", "<esc>", function()
if not mc.cursorsEnabled() then
mc.enableCursors()
else
mc.clearCursors()
end
end) end)
end)
-- Add and remove cursors with control + left click. -- Customize how cursors look.
set("n", "<c-leftmouse>", mc.handleMouse) local hl = vim.api.nvim_set_hl
set("n", "<c-leftdrag>", mc.handleMouseDrag) hl(0, "MultiCursorCursor", { reverse = true })
set("n", "<c-leftrelease>", mc.handleMouseRelease) hl(0, "MultiCursorVisual", { link = "Visual" })
hl(0, "MultiCursorSign", { link = "SignColumn" })
-- Disable and enable cursors. hl(0, "MultiCursorMatchPreview", { link = "Search" })
set({ "n", "x" }, "<leader><c-q>", mc.toggleCursor) hl(0, "MultiCursorDisabledCursor", { reverse = true })
hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
-- Mappings defined in a keymap layer only apply when there are hl(0, "MultiCursorDisabledSign", { link = "SignColumn" })
-- multiple cursors. This lets you have overlapping mappings. else
mc.addKeymapLayer(function(layerSet) print("plugin multicursor-nvim missing")
-- Select a different cursor as the main one. end
layerSet({ "n", "x" }, "<left>", mc.prevCursor)
layerSet({ "n", "x" }, "<right>", mc.nextCursor)
-- Delete the main cursor.
layerSet({ "n", "x" }, "<leader>x", mc.deleteCursor)
-- Enable and clear cursors using escape.
layerSet("n", "<esc>", function()
if not mc.cursorsEnabled() then
mc.enableCursors()
else
mc.clearCursors()
end
end)
end)
-- Customize how cursors look.
local hl = vim.api.nvim_set_hl
hl(0, "MultiCursorCursor", { reverse = true })
hl(0, "MultiCursorVisual", { link = "Visual" })
hl(0, "MultiCursorSign", { link = "SignColumn" })
hl(0, "MultiCursorMatchPreview", { link = "Search" })
hl(0, "MultiCursorDisabledCursor", { reverse = true })
hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
hl(0, "MultiCursorDisabledSign", { link = "SignColumn" })
end,
}

View File

@@ -0,0 +1,8 @@
vim.pack.add({ "https://github.com/chrisgrieser/nvim-various-textobjs" })
local ok, oil = pcall(require, "various-textobjs")
if ok then
oil.setup({ keymaps = { useDefaults = true } })
else
print("plugin nvim-various-textobjs missing")
end

View File

@@ -1,5 +1,10 @@
return { vim.pack.add({ "https://github.com/stevearc/oil.nvim" })
init = function()
vim.keymap.set("n", "<leader>-", "<cmd>Oil<cr>", { desc = "Oil file manager" }) local ok, oil = pcall(require, "oil")
end, if ok then
} oil.setup()
else
print("plugin oil missing")
end
vim.keymap.set("n", "<leader>-", "<cmd>Oil<cr>", { desc = "Oil file manager" })

View File

@@ -0,0 +1,8 @@
vim.pack.add({ "https://github.com/sschleemilch/slimline.nvim" })
local ok, slimline = pcall(require, "slimline")
if ok then
slimline.setup()
else
print("plugin slimline missing")
end

View File

@@ -1,177 +1,136 @@
return { vim.pack.add({ "https://github.com/folke/snacks.nvim" })
init = function()
local set = vim.keymap.set
set("n", "<leader><space>", function() local ok, snacks = pcall(require, "snacks")
Snacks.picker.smart() if ok then
end, { desc = "Smart Find Files" }) snacks.setup({
picker = { enabled = true },
})
else
print("plugin snacks missing")
end
set("n", "<leader><space>", function() local set = vim.keymap.set
Snacks.picker.smart()
end, { desc = "Smart Find Files" })
set("n", "<leader>a", function() set("n", "<leader>ea", function()
Snacks.picker.buffers() Snacks.explorer()
end, { desc = "Buffers" }) end, { desc = "File Explorer" })
set("n", "<leader>r", function() set("n", "<leader>ga", function()
Snacks.picker.recent() Snacks.lazygit()
end, { desc = "Recent files" }) end, { desc = "Lazygit" })
set("n", "<leader>R", function() set("n", "<leader>gh", function()
Snacks.picker.resume() Snacks.picker.git_diff()
end, { desc = "Resume" }) end, { desc = "Git Diff (Hunks)" })
set("n", "<leader>b", function() set("n", "<leader>gl", function()
Snacks.picker.lines() Snacks.picker.git_log_line()
end, { desc = "Buffer lines" }) end, { desc = "Git Log Line" })
set("n", "<leader>B", function() set("n", "<leader>gL", function()
Snacks.picker.grep_buffers() Snacks.picker.git_log()
end, { desc = "Grep Open Buffers" }) end, { desc = "Git Log" })
set("n", "<leader>f", function() set("n", "<leader>gr", function()
Snacks.picker.files() Snacks.lazygit.log_file()
end, { desc = "Find Files" }) end, { desc = "Git Log File (reflog)" })
set("n", "<leader>s", function() set({ "n", "v" }, "<leader>gw", function()
Snacks.picker.grep() Snacks.picker.grep_word()
end, { desc = "Grep" }) end, { desc = "Grep Visual Selection or Word" })
set("n", "<leader>S", function() set({ "n", "v" }, "<leader>gx", function()
Snacks.picker.git_status() Snacks.gitbrowse()
end, { desc = "Git Status" }) end, { desc = "Git Browse" })
set("n", "<leader>g", function() set("n", "<leader>xr", function()
Snacks.picker.git_files() Snacks.picker.recent()
end, { desc = "Find Git Files" }) end, { desc = "Recent files" })
set("n", "<leader>G", function() set("n", "<leader>xR", function()
Snacks.picker.git_grep() Snacks.picker.resume()
end, { desc = "Git Grep" }) end, { desc = "Resume" })
set("n", "<leader>l", function() set("n", "<leader>U", function()
Snacks.lazygit() Snacks.picker.undo()
end, { desc = "Lazygit" }) end, { desc = "Undo History" })
set("n", "<leader>L", function() set("n", "<leader>xC", function()
Snacks.lazygit.log_file() Snacks.picker.colorschemes()
end, { desc = "Lazygit log file" }) end, { desc = "Colorschemes" })
set("n", "<leader>n", function() set("n", "<leader>n", function()
Snacks.notifier.show_history() Snacks.notifier.show_history()
end, { desc = "Notification History" }) end, { desc = "Notification History" })
set("n", "<leader>N", function() set("n", "<leader>N", function()
Snacks.picker.notifications() Snacks.picker.notifications()
end, { desc = "Notifications" }) end, { desc = "Notifications" })
set("n", "<leader>C", function() set("n", "<leader>$", function()
Snacks.picker.commands() Snacks.rename.rename_file()
end, { desc = "Commands" }) end, { desc = "Rename File" })
set("n", "<leader>h", function() set("n", "<leader>z", function()
Snacks.picker.keymaps() Snacks.zen.zoom()
end, { desc = "Keymaps" }) end, { desc = "Toggle Zoom" })
set("n", "<leader>:", function() set("n", "<leader>.", function()
Snacks.picker.command_history() Snacks.scratch()
end, { desc = "Command History" }) end, { desc = "Toggle Scratch Buffer" })
set("n", '<leader>"', function() set("n", "<leader>x.", function()
Snacks.picker.registers() Snacks.scratch.select()
end, { desc = "Registers" }) end, { desc = "Select Scratch Buffer" })
set("n", "<leader>$", function() -- LSP
Snacks.rename.rename_file()
end, { desc = "Rename File" })
set("n", "<leader>z", function() set("n", "gD", function()
Snacks.zen.zoom() Snacks.picker.lsp_declarations()
end, { desc = "Toggle Zoom" }) end, { desc = "Goto Declaration" })
-- LSP
set("n", "gd", function() -- Terminal
Snacks.picker.lsp_definitions()
end, { desc = "Goto Definition" })
set("n", "gD", function() set({ "n", "t" }, "<c-/>", function()
Snacks.picker.lsp_declarations() Snacks.terminal()
end, { desc = "Goto Declaration" }) end, { desc = "Toggle Terminal" })
set("n", "gr", function() set({ "n", "t" }, "<c-_>", function()
Snacks.picker.lsp_references() Snacks.terminal()
end, { desc = "References" }) end, { desc = "which_key_ignore" })
set("n", "gI", function() vim.api.nvim_create_autocmd("VimEnter", {
Snacks.picker.lsp_implementations() callback = function()
end, { desc = "Goto Implementation" }) -- Setup some globals for debugging (lazy-loaded)
_G.dd = function(...)
Snacks.debug.inspect(...)
end
_G.bt = function()
Snacks.debug.backtrace()
end
set("n", "gy", function() -- Override print to use snacks for `:=` command
Snacks.picker.lsp_type_definitions() if vim.fn.has("nvim-0.11") == 1 then
end, { desc = "Goto T[y]pe Definition" }) vim._print = function(_, ...)
dd(...)
end
else
vim.print = _G.dd
end
set("n", "<leader>w", function() -- Create some toggle mappings
Snacks.picker.lsp_symbols() Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
end, { desc = "LSP Symbols" }) Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
set("n", "<leader>d", function() Snacks.toggle.diagnostics():map("<leader>ud")
Snacks.picker.diagnostics_buffer() Snacks.toggle.line_number():map("<leader>ul")
end, { desc = "Buffer Diagnostics" }) Snacks.toggle
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
set("n", "<leader>D", function() :map("<leader>uc")
Snacks.picker.diagnostics() Snacks.toggle.treesitter():map("<leader>uT")
end, { desc = "Diagnostics" }) Snacks.toggle.option("background", { off = "light", on = "dark", name = "Dark Background" }):map("<leader>ub")
Snacks.toggle.inlay_hints():map("<leader>uh")
set("n", "<leader>W", function() Snacks.toggle.indent():map("<leader>ug")
Snacks.picker.lsp_workspace_symbols() Snacks.toggle.dim():map("<leader>uD")
end, { desc = "LSP Workspace Symbols" })
-- Terminal
set({ "n", "t" }, "<c-/>", function()
Snacks.terminal()
end, { desc = "Toggle Terminal" })
set({ "n", "t" }, "<c-_>", function()
Snacks.terminal()
end, { desc = "which_key_ignore" })
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
-- Setup some globals for debugging (lazy-loaded)
_G.dd = function(...)
Snacks.debug.inspect(...)
end
_G.bt = function()
Snacks.debug.backtrace()
end
-- Override print to use snacks for `:=` command
if vim.fn.has("nvim-0.11") == 1 then
vim._print = function(_, ...)
dd(...)
end
else
vim.print = _G.dd
end
-- Create some toggle mappings
Snacks.toggle.option("spell", { name = "Spelling" }):map("<leader>us")
Snacks.toggle.option("wrap", { name = "Wrap" }):map("<leader>uw")
Snacks.toggle.option("relativenumber", { name = "Relative Number" }):map("<leader>uL")
Snacks.toggle.diagnostics():map("<leader>ud")
Snacks.toggle.line_number():map("<leader>ul")
Snacks.toggle
.option("conceallevel", { off = 0, on = vim.o.conceallevel > 0 and vim.o.conceallevel or 2 })
:map("<leader>uc")
Snacks.toggle.treesitter():map("<leader>uT")
Snacks.toggle
.option("background", { off = "light", on = "dark", name = "Dark Background" })
:map("<leader>ub")
Snacks.toggle.inlay_hints():map("<leader>uh")
Snacks.toggle.indent():map("<leader>ug")
Snacks.toggle.dim():map("<leader>uD")
end,
})
end, end,
} })

View File

@@ -0,0 +1,13 @@
vim.pack.add({
{
src = "https://github.com/kylechui/nvim-surround",
version = vim.version.range("^3.0.0"),
},
})
local ok, surround = pcall(require, "nvim-surround")
if ok then
surround.setup()
else
print("plugin surround missing")
end

View File

@@ -0,0 +1,99 @@
vim.api.nvim_create_autocmd("PackChanged", {
group = vim.api.nvim_create_augroup("telescope-fzf-native-update", { clear = true }),
callback = function(ev)
local name, kind = ev.data.spec.name, ev.data.kind
if name == "telescope-fzf-native.nvim" and (kind == "install" or kind == "update") then
vim.system({ "make" }, { cwd = ev.data.path }):wait()
print("telescope-fzf-native make done.")
end
end,
})
vim.pack.add({
{ src = "https://github.com/nvim-telescope/telescope.nvim", version = "v0.2.1" },
"https://github.com/nvim-lua/plenary.nvim",
"https://github.com/nvim-telescope/telescope-fzf-native.nvim",
"https://gitlab.com/davvid/telescope-git-grep.nvim",
{ src = "https://github.com/nvim-telescope/telescope-frecency.nvim", version = vim.version.range("^1.0.0") },
})
local ok, builtin = pcall(require, "telescope.builtin")
if ok then
require("telescope").setup({
defaults = require("telescope.themes").get_ivy(),
})
local set = vim.keymap.set
require("telescope").load_extension("fzf")
require("telescope").load_extension("git_grep")
require("telescope").load_extension("frecency")
set("n", "<leader><space>", function()
require("telescope-frecency").start()
end, { desc = "Telescope frecency" })
set("n", "<leader>;", function()
require("telescope-frecency").start({ workspace = "CWD" })
end, { desc = "Telescope frecency" })
set("n", "<leader>b", builtin.buffers, { desc = "Telescope buffers" })
set("n", "<leader>cc", builtin.commands, { desc = "Telescope commands" })
set("n", "<leader>ch", builtin.command_history, { desc = "Telescope command history" })
set("n", "<leader>cH", builtin.highlights, { desc = "Telescope highlights" })
set("n", "<leader>da", builtin.diagnostics, { desc = "Telescope diagnostics" })
set("n", "<leader>ec", function()
builtin.find_files({ cwd = vim.fn.stdpath("config") })
end, { desc = "Telescope nvim config files" })
set("n", "<leader>ep", function()
builtin.find_files({ cwd = vim.fs.joinpath(vim.fn.stdpath("data"), "site") })
end, { desc = "Telescope find files" })
set("n", "<leader>fa", builtin.git_files, { desc = "Telescope nvim package files" })
set("n", "<leader>F", builtin.find_files, { desc = "Telescope find files" })
set("n", "<leader>fh", function()
builtin.find_files({ hidden = true })
end, { desc = "Telescope find files (hidden)" })
set("n", "<leader>gB", builtin.git_branches, { desc = "Telescope git branches" })
set("n", "<leader>gc", builtin.git_bcommits, { desc = "Telescope git buffer commits" })
set("n", "<leader>gC", builtin.git_commits, { desc = "Telescope git commits" })
set("n", "<leader>gs", builtin.git_status, { desc = "Telescope git status" })
set("n", "<leader>gS", builtin.git_stash, { desc = "Telescope git stash" })
set("n", "<leader>ha", builtin.help_tags, { desc = "Telescope help tags" })
set("n", "<leader>hk", builtin.keymaps, { desc = "Telescope keymaps" })
set("n", "<leader>l", builtin.current_buffer_fuzzy_find, { desc = "Telescope current buffer fuzzy find" })
set("n", "<leader>L", function()
builtin.live_grep({ grep_open_files = true })
end, { desc = "Telescope grep open files" })
set("n", "<leader>m", builtin.marks, { desc = "Telescope marks" })
set("n", "<leader>M", builtin.man_pages, { desc = "Telescope man pages" })
set("n", "<leader>o", builtin.oldfiles, { desc = "Telescope oldfiles" })
set("n", "<leader>qa", builtin.quickfix, { desc = "Telescope quickfix" })
set("n", "<leader>qh", builtin.quickfixhistory, { desc = "Telescope quickfix history" })
set("n", "<leader>ql", builtin.loclist, { desc = "Telescope loclist" })
set("n", "<leader>r", builtin.resume, { desc = "Telescope resume" })
set("n", "<leader>t", builtin.treesitter, { desc = "Telescope treesitter symbols" })
set("n", "<leader>R", builtin.registers, { desc = "Telescope registers" })
set("n", "<leader>sa", function()
require("git_grep").live_grep()
end, { desc = "Telescope git live grep" })
set("n", "<leader>S", builtin.live_grep, { desc = "Telescope live grep" })
set("n", "<leader>sh", builtin.search_history, { desc = "Telescope search history" })
set("n", "<leader>so", function()
builtin.grep_string({ grep_open_files = true })
end, { desc = "Telescope grep open files" })
set({ "n", "v" }, "<leader>sw", function()
require("git_grep").grep()
end, { desc = "Telescope git grep word" })
set("n", "<leader>wd", builtin.lsp_document_symbols, { desc = "Telescope document symbols" })
set("n", "<leader>wp", builtin.lsp_workspace_symbols, { desc = "Telescope workspace symbols" })
set("n", "<leader>ws", function()
require("git_grep").workspace_live_grep()
end, { desc = "Telescope workspace git live grep" })
set("n", "<leader>wy", function()
require("git_grep").workspace_grep()
end, { desc = "Telescope workspace git grep word" })
set("n", "<leader>:", builtin.builtin, { desc = "Telescope builtin" })
set("n", "gd", builtin.lsp_definitions, { desc = "Goto Definition" })
set("n", "grr", builtin.lsp_references, { desc = "References" })
set("n", "gI", builtin.lsp_implementations, { desc = "Goto Implementation" })
set("n", "gy", builtin.lsp_type_definitions, { desc = "Goto T[y]pe Definition" })
else
print("plugin builtin missing")
end

View File

@@ -1,6 +1,26 @@
return { -- run ":TSUpdate" after plugin update
main = "nvim-treesitter.configs", -- If hooks need to run on install, run this before `vim.pack.add()`
opts = { vim.api.nvim_create_autocmd("PackChanged", {
group = vim.api.nvim_create_augroup("nvim-treesitter-update", { clear = true }),
callback = function(ev)
local name, kind = ev.data.spec.name, ev.data.kind
if name == "nvim-treesitter" and kind == "update" then
if not ev.data.active then
vim.cmd.packadd("nvim-treesitter")
end
vim.cmd("TSUpdate")
print("TSUpdate done.")
end
end,
})
vim.pack.add({
{ src = "https://github.com/nvim-treesitter/nvim-treesitter-textobjects", version = "master" },
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "master" },
})
local ok, configs = pcall(require, "nvim-treesitter.configs")
if ok then
configs.setup({
highlight = { highlight = {
enable = true, enable = true,
}, },
@@ -58,5 +78,7 @@ return {
}, },
}, },
}, },
}, })
} else
print("plugin nvim-treesitter.configs missing")
end

View File

@@ -0,0 +1,8 @@
vim.pack.add({ "https://github.com/folke/which-key.nvim" })
local ok, whichkey = pcall(require, "which-key")
if ok then
whichkey.setup({ preset = "helix", delay = 1000 })
else
print("plugin whichkey missing")
end

View File

@@ -0,0 +1,43 @@
return {
s(
"ife",
fmt(
[[
if err != nil {
<>
}
]],
{
i(0),
},
{ delimiters = "<>" }
)
),
s(
"ifse",
fmt(
[[
if <><>err = <>; err != nil {
<>
}
]],
{
i(1),
f(function(args)
local a = args[1][1]
if string.sub(a, -2) == ", " or a == "" then
return ""
elseif string.sub(a, -1) == "," then
return " "
else
return ", "
end
end, { 1 }),
i(2),
i(0),
},
{ delimiters = "<>" }
)
),
}

View File

@@ -0,0 +1,99 @@
{
"plugins": {
"LuaSnip": {
"rev": "5a1e39223db9a0498024a77b8441169d260c8c25",
"src": "https://github.com/L3MON4D3/LuaSnip",
"version": "2.0.0 - 3.0.0"
},
"arrow.nvim": {
"rev": "6e0f726f55f99332dd726a53effd6813786b6d49",
"src": "https://github.com/otavioschwanck/arrow.nvim"
},
"auto-session": {
"rev": "292492ab7af4bd8b9e37e28508bc8ce995722fd5",
"src": "https://github.com/rmagatti/auto-session"
},
"conform.nvim": {
"rev": "8314f4c9e205e7f30b62147069729f9a1227d8bf",
"src": "https://github.com/stevearc/conform.nvim"
},
"flash.nvim": {
"rev": "fcea7ff883235d9024dc41e638f164a450c14ca2",
"src": "https://github.com/folke/flash.nvim"
},
"guess-indent.nvim": {
"rev": "84a4987ff36798c2fc1169cbaff67960aed9776f",
"src": "https://github.com/NMAC427/guess-indent.nvim"
},
"kanagawa.nvim": {
"rev": "aef7f5cec0a40dbe7f3304214850c472e2264b10",
"src": "https://github.com/rebelot/kanagawa.nvim"
},
"multicursor.nvim": {
"rev": "993c6eda70077c5619388900dcffefff73b40c96",
"src": "https://github.com/jake-stewart/multicursor.nvim",
"version": "'1.0'"
},
"nightfox.nvim": {
"rev": "ba47d4b4c5ec308718641ba7402c143836f35aa9",
"src": "https://github.com/EdenEast/nightfox.nvim"
},
"nvim-surround": {
"rev": "1098d7b3c34adcfa7feb3289ee434529abd4afd1",
"src": "https://github.com/kylechui/nvim-surround",
"version": "3.0.0 - 4.0.0"
},
"nvim-treesitter": {
"rev": "42fc28ba918343ebfd5565147a42a26580579482",
"src": "https://github.com/nvim-treesitter/nvim-treesitter",
"version": "'master'"
},
"nvim-treesitter-textobjects": {
"rev": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef",
"src": "https://github.com/nvim-treesitter/nvim-treesitter-textobjects",
"version": "'master'"
},
"nvim-various-textobjs": {
"rev": "1532de4649c81b88ee0b4e53bdd17e551dd4589a",
"src": "https://github.com/chrisgrieser/nvim-various-textobjs"
},
"oil.nvim": {
"rev": "81b8a91735ad5cd24a6b3137f14a89f19176364f",
"src": "https://github.com/stevearc/oil.nvim"
},
"plenary.nvim": {
"rev": "b9fd5226c2f76c951fc8ed5923d85e4de065e509",
"src": "https://github.com/nvim-lua/plenary.nvim"
},
"slimline.nvim": {
"rev": "b23d6239ae06d7b422b30b227756971348ffcd68",
"src": "https://github.com/sschleemilch/slimline.nvim"
},
"snacks.nvim": {
"rev": "fe7cfe9800a182274d0f868a74b7263b8c0c020b",
"src": "https://github.com/folke/snacks.nvim"
},
"telescope-frecency.nvim": {
"rev": "d4f1bb2a939cc02720bceb635095246751db144f",
"src": "https://github.com/nvim-telescope/telescope-frecency.nvim",
"version": "1.0.0 - 2.0.0"
},
"telescope-fzf-native.nvim": {
"rev": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c",
"src": "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
},
"telescope-git-grep.nvim": {
"rev": "0936967941a6e7b3875d1b1bfff41b8bcd75bdf5",
"src": "https://gitlab.com/davvid/telescope-git-grep.nvim"
},
"telescope.nvim": {
"rev": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179",
"src": "https://github.com/nvim-telescope/telescope.nvim",
"version": "'v0.2.1'"
},
"which-key.nvim": {
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
"src": "https://github.com/folke/which-key.nvim"
}
}
}

View File

@@ -0,0 +1,5 @@
{
"workspace.library" : [
"/usr/local/share/oxwm"
]
}

View File

@@ -0,0 +1,321 @@
---@meta
---Load type definitions for LSP
---@module 'oxwm'
-- Modifier key: "Mod4" is the Super/Windows key, "Mod1" is Alt
local modkey = "Mod4"
-- Terminal emulator command (defaults to alacritty)
local terminal = "st"
local colors
local f = io.open(os.getenv("HOME") .. "/.lightmode")
if f ~= nil then
io.close(f)
colors = require("light")
else
colors = require("dark")
end
os.execute("hsetroot -solid '" .. colors.bg .. "'")
-- Workspace tags - can be numbers, names, or icons (requires a Nerd Font)
local tags = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }
-- Font for the status bar (use "fc-list" to see available fonts)
local bar_font = "monospace:style=Bold:size=10"
-- Define your blocks
-- Similar to widgets in qtile, or dwmblocks
local blocks = {
oxwm.bar.block.ram({
format = "Ram: {used}/{total} GB",
interval = 5,
color = colors.light_blue,
underline = false,
}),
oxwm.bar.block.static({
text = "",
interval = 999999999,
color = colors.lavender,
underline = false,
}),
oxwm.bar.block.shell({
format = "{}",
command = "uname -r",
interval = 999999999,
color = colors.red,
underline = false,
}),
-- oxwm.bar.block.static({
-- text = " │ ",
-- interval = 999999999,
-- color = colors.lavender,
-- underline = false,
-- }),
-- oxwm.bar.block.battery({
-- format = "Bat: {}%",
-- charging = "⚡ Bat: {}%",
-- discharging = "- Bat: {}%",
-- full = "✓ Bat: {}%",
-- interval = 30,
-- color = colors.green,
-- underline = false,
-- }),
oxwm.bar.block.static({
text = "",
interval = 999999999,
color = colors.lavender,
underline = false,
}),
oxwm.bar.block.datetime({
format = "{}",
date_format = "%a, %b %d - %H:%M",
interval = 1,
color = colors.cyan,
underline = false,
}),
}
-------------------------------------------------------------------------------
-- Basic Settings
-------------------------------------------------------------------------------
oxwm.set_terminal(terminal)
oxwm.set_modkey(modkey) -- This is for Mod + mouse binds, such as drag/resize
oxwm.set_tags(tags)
-------------------------------------------------------------------------------
-- Layouts
-------------------------------------------------------------------------------
-- Set custom symbols for layouts (displayed in the status bar)
-- Available layouts: "tiling", "normie" (floating), "grid", "monocle", "tabbed"
oxwm.set_layout_symbol("tiling", "[T]")
oxwm.set_layout_symbol("normie", "[F]")
oxwm.set_layout_symbol("tabbed", "[=]")
-------------------------------------------------------------------------------
-- Appearance
-------------------------------------------------------------------------------
-- Border configuration
-- Width in pixels
oxwm.border.set_width(3)
-- Color of focused window border
oxwm.border.set_focused_color(colors.orange)
-- Color of unfocused window borders
oxwm.border.set_unfocused_color(colors.grey)
-- Smart Enabled = No border if 1 window
oxwm.gaps.set_smart(true)
-- Inner gaps (horizontal, vertical) in pixels
oxwm.gaps.set_inner(5, 5)
-- Outer gaps (horizontal, vertical) in pixels
oxwm.gaps.set_outer(5, 5)
-------------------------------------------------------------------------------
-- Window Rules
-------------------------------------------------------------------------------
-- Rules allow you to automatically configure windows based on their properties
-- You can match windows by class, instance, title, or role
-- Available properties: floating, tag, fullscreen, etc.
--
-- Common use cases:
-- - Force floating for certain applications (dialogs, utilities)
-- - Send specific applications to specific workspaces
-- - Configure window behavior based on title or class
-- Examples (uncomment to use):
oxwm.rule.add({ instance = "gimp", floating = true })
-- oxwm.rule.add({ class = "Alacritty", tag = 9, focus = true })
-- oxwm.rule.add({ class = "firefox", title = "Library", floating = true })
-- oxwm.rule.add({ class = "firefox", tag = 2 })
-- oxwm.rule.add({ instance = "mpv", floating = true })
-- To find window properties, use xprop and click on the window
-- WM_CLASS(STRING) shows both instance and class (instance, class)
-------------------------------------------------------------------------------
-- Status Bar Configuration
-------------------------------------------------------------------------------
-- Font configuration
oxwm.bar.set_font(bar_font)
-- Set your blocks here (defined above)
oxwm.bar.set_blocks(blocks)
-- Bar color schemes (for workspace tag display)
-- Parameters: foreground, background, border
-- Unoccupied tags
oxwm.bar.set_scheme_normal(colors.fg, colors.bg, "#444444")
-- Occupied tags
oxwm.bar.set_scheme_occupied(colors.cyan, colors.bg, colors.cyan)
-- Currently selected tag
oxwm.bar.set_scheme_selected(colors.orange, colors.bg, colors.orange)
-- Urgent tags (windows requesting attention)
oxwm.bar.set_scheme_urgent(colors.red, colors.bg, colors.red)
-- Hide tags that have no windows and are not selected
-- oxwm.bar.set_hide_vacant_tags(true)
--
function shell_quote(s)
return '"' .. string.gsub(s, '[$"!`\\]', "\\%1") .. '"'
end
-------------------------------------------------------------------------------
-- Keybindings
-------------------------------------------------------------------------------
-- Keybindings are defined using oxwm.key.bind(modifiers, key, action)
-- Modifiers: {"Mod4"}, {"Mod1"}, {"Shift"}, {"Control"}, or combinations like {"Mod4", "Shift"}
-- Keys: Use uppercase for letters (e.g., "Return", "H", "J", "K", "L")
-- Actions: Functions that return actions (e.g., oxwm.spawn(), oxwm.client.kill())
--
-- A list of available keysyms can be found in the X11 keysym definitions.
-- Common keys: Return, Space, Tab, Escape, Backspace, Delete, Left, Right, Up, Down
-- Basic window management
oxwm.key.bind({ modkey }, "Return", oxwm.spawn_terminal())
-- Launch Dmenu
oxwm.key.bind(
{ modkey },
"P",
oxwm.spawn({
"sh",
"-c",
"dmenu_run -l 10 -fn " .. shell_quote(bar_font) .. " -nb " .. shell_quote(colors.bg) .. " -nf " .. shell_quote(
colors.fg
) .. " -sb " .. shell_quote(colors.orange) .. " -sf " .. shell_quote(colors.black),
})
)
-- Copy screenshot to clipboard
oxwm.key.bind({ modkey }, "S", oxwm.spawn({ "sh", "-c", "maim -s | xclip -selection clipboard -t image/png" }))
oxwm.key.bind({ modkey }, "X", oxwm.client.kill())
-- Keybind overlay - Shows important keybindings on screen
oxwm.key.bind({ modkey, "Shift" }, "Slash", oxwm.show_keybinds())
-- Window state toggles
oxwm.key.bind({ modkey }, "F", oxwm.client.toggle_fullscreen())
oxwm.key.bind({ modkey, "Shift" }, "Space", oxwm.client.toggle_floating())
-- Layout management
oxwm.key.bind({ modkey, "Shift" }, "F", oxwm.layout.set("normie"))
oxwm.key.bind({ modkey }, "T", oxwm.layout.set("tiling"))
oxwm.key.bind({ modkey }, "G", oxwm.layout.set("grid"))
oxwm.key.bind({ modkey }, "M", oxwm.layout.set("monocle"))
oxwm.key.bind({ modkey }, "B", oxwm.layout.set("tabbed"))
oxwm.key.bind({ modkey, "Shift" }, "S", oxwm.layout.set("scrolling"))
oxwm.key.bind({ modkey }, "N", oxwm.layout.cycle())
oxwm.key.bind({ modkey, "Shift" }, "T", oxwm.spawn({ "lupan-set-theme", "toggle" }))
-- Master area controls (tiling layout)
-- Decrease/Increase master area width
oxwm.key.bind({ modkey }, "H", oxwm.set_master_factor(-5))
oxwm.key.bind({ modkey }, "L", oxwm.set_master_factor(5))
-- Increment/Decrement number of master windows
oxwm.key.bind({ modkey }, "I", oxwm.inc_num_master(1))
oxwm.key.bind({ modkey, "Shift" }, "I", oxwm.inc_num_master(-1))
-- Gaps toggle
oxwm.key.bind({ modkey }, "A", oxwm.toggle_gaps())
-- Window manager controls
oxwm.key.bind({ modkey, "Shift" }, "Q", oxwm.quit())
oxwm.key.bind({ modkey, "Shift" }, "R", oxwm.restart())
-- Focus movement [1 for up in the stack, -1 for down]
oxwm.key.bind({ modkey }, "J", oxwm.client.focus_stack(1))
oxwm.key.bind({ modkey }, "K", oxwm.client.focus_stack(-1))
-- Window movement (swap position in stack)
oxwm.key.bind({ modkey, "Shift" }, "J", oxwm.client.move_stack(1))
oxwm.key.bind({ modkey, "Shift" }, "K", oxwm.client.move_stack(-1))
-- Multi-monitor support
-- Focus next/previous Monitors
oxwm.key.bind({ modkey }, "Comma", oxwm.monitor.focus(-1))
oxwm.key.bind({ modkey }, "Period", oxwm.monitor.focus(1))
-- Move window to next/previous Monitors
oxwm.key.bind({ modkey, "Shift" }, "Comma", oxwm.monitor.tag(-1))
oxwm.key.bind({ modkey, "Shift" }, "Period", oxwm.monitor.tag(1))
-- Workspace (tag) navigation
-- Switch to workspace N (tags are 0-indexed, so tag "1" is index 0)
oxwm.key.bind({ modkey }, "1", oxwm.tag.view(0))
oxwm.key.bind({ modkey }, "2", oxwm.tag.view(1))
oxwm.key.bind({ modkey }, "3", oxwm.tag.view(2))
oxwm.key.bind({ modkey }, "4", oxwm.tag.view(3))
oxwm.key.bind({ modkey }, "5", oxwm.tag.view(4))
oxwm.key.bind({ modkey }, "6", oxwm.tag.view(5))
oxwm.key.bind({ modkey }, "7", oxwm.tag.view(6))
oxwm.key.bind({ modkey }, "8", oxwm.tag.view(7))
oxwm.key.bind({ modkey }, "9", oxwm.tag.view(8))
-- Move focused window to workspace N
oxwm.key.bind({ modkey, "Shift" }, "1", oxwm.tag.move_to(0))
oxwm.key.bind({ modkey, "Shift" }, "2", oxwm.tag.move_to(1))
oxwm.key.bind({ modkey, "Shift" }, "3", oxwm.tag.move_to(2))
oxwm.key.bind({ modkey, "Shift" }, "4", oxwm.tag.move_to(3))
oxwm.key.bind({ modkey, "Shift" }, "5", oxwm.tag.move_to(4))
oxwm.key.bind({ modkey, "Shift" }, "6", oxwm.tag.move_to(5))
oxwm.key.bind({ modkey, "Shift" }, "7", oxwm.tag.move_to(6))
oxwm.key.bind({ modkey, "Shift" }, "8", oxwm.tag.move_to(7))
oxwm.key.bind({ modkey, "Shift" }, "9", oxwm.tag.move_to(8))
-- Combo view (view multiple tags at once) {argos_nothing}
-- Example: Mod+Ctrl+2 while on tag 1 will show BOTH tags 1 and 2
oxwm.key.bind({ modkey, "Control" }, "1", oxwm.tag.toggleview(0))
oxwm.key.bind({ modkey, "Control" }, "2", oxwm.tag.toggleview(1))
oxwm.key.bind({ modkey, "Control" }, "3", oxwm.tag.toggleview(2))
oxwm.key.bind({ modkey, "Control" }, "4", oxwm.tag.toggleview(3))
oxwm.key.bind({ modkey, "Control" }, "5", oxwm.tag.toggleview(4))
oxwm.key.bind({ modkey, "Control" }, "6", oxwm.tag.toggleview(5))
oxwm.key.bind({ modkey, "Control" }, "7", oxwm.tag.toggleview(6))
oxwm.key.bind({ modkey, "Control" }, "8", oxwm.tag.toggleview(7))
oxwm.key.bind({ modkey, "Control" }, "9", oxwm.tag.toggleview(8))
-- Multi tag (window on multiple tags)
-- Example: Mod+Ctrl+Shift+2 puts focused window on BOTH current tag and tag 2
oxwm.key.bind({ modkey, "Control", "Shift" }, "1", oxwm.tag.toggletag(0))
oxwm.key.bind({ modkey, "Control", "Shift" }, "2", oxwm.tag.toggletag(1))
oxwm.key.bind({ modkey, "Control", "Shift" }, "3", oxwm.tag.toggletag(2))
oxwm.key.bind({ modkey, "Control", "Shift" }, "4", oxwm.tag.toggletag(3))
oxwm.key.bind({ modkey, "Control", "Shift" }, "5", oxwm.tag.toggletag(4))
oxwm.key.bind({ modkey, "Control", "Shift" }, "6", oxwm.tag.toggletag(5))
oxwm.key.bind({ modkey, "Control", "Shift" }, "7", oxwm.tag.toggletag(6))
oxwm.key.bind({ modkey, "Control", "Shift" }, "8", oxwm.tag.toggletag(7))
oxwm.key.bind({ modkey, "Control", "Shift" }, "9", oxwm.tag.toggletag(8))
-------------------------------------------------------------------------------
-- Advanced: Keychords
-------------------------------------------------------------------------------
-- Keychords allow you to bind multiple-key sequences (like Emacs or Vim)
-- Format: {{modifiers}, key1}, {{modifiers}, key2}, ...
-- Example: Press Mod4+Space, then release and press T to spawn a terminal
oxwm.key.chord({
{ { modkey }, "Space" },
{ {}, "T" },
}, oxwm.spawn_terminal())
oxwm.key.chord({
{ { modkey }, "Space" },
{ {}, "F" },
}, oxwm.spawn({ "firefox" }))
oxwm.key.chord({
{ { modkey }, "Space" },
{ {}, "L" },
}, oxwm.spawn({ "slock" }))
-------------------------------------------------------------------------------
-- Autostart
-------------------------------------------------------------------------------
-- Commands to run once when OXWM starts
-- Uncomment and modify these examples, or add your own
-- oxwm.autostart("picom")
-- oxwm.autostart("feh --bg-scale ~/wallpaper.jpg")
-- oxwm.autostart("dunst")
-- oxwm.autostart("nm-applet")

View File

@@ -0,0 +1,14 @@
return {
fg = "#aaaaaa",
red = "#f7768e",
bg = "#1a1b26",
black = "#1a1b26",
cyan = "#0db9d7",
green = "#9ece6a",
lavender = "#a9b1d6",
light_blue = "#7aa2f7",
grey = "#737373",
blue = "#6dade3",
purple = "#ad8ee6",
orange = "#bd6628",
}

View File

@@ -0,0 +1,14 @@
return {
fg = "#1a1b26",
red = "#b94646",
bg = "#dddddd",
black = "#1a1b26",
cyan = "#4d8080",
green = "#9ece6a",
lavender = "#a9b1d6",
light_blue = "#7aa2f7",
grey = "#bbbbbb",
blue = "#6dade3",
purple = "#ad8ee6",
orange = "#d78042",
}

View File

@@ -58,50 +58,95 @@ XTerm.vt100.color15: #ECEFF4
st.font: FiraCode Nerd Font:size=10 st.font: FiraCode Nerd Font:size=10
! gruvebox colors from https://github.com/morhetz/gruvbox-contrib/tree/master/deepin-terminal ! kanagawa wave colors from https://github.com/rebelot/kanagawa.nvim/blob/master/extras/alacritty/kanagawa_wave.toml
! dayfox colors from https://github.com/edeneast/nightfox.nvim/raw/main/extra/dayfox/alacritty.toml
Zutty.font: monaspaceneon
Zutty.fontpath: /usr/share/fonts:HOME/.local/share/fonts
Zutty.fontsize: 20
#ifdef THEME_DARK #ifdef THEME_DARK
st.lightmode: 0 st.lightmode: 0
st.background: #282828 st.background: #1f1f28
st.foreground: #d5c4a1 st.foreground: #dcd7ba
st.cursorColor: #bf8040 st.cursorColor: #cbd9d8
st.reverse-cursor: #1f212e st.reverse-cursor: #e6eaea
st.color0: #282828 st.color0: #090618
st.color1: #cc241d st.color1: #c34043
st.color2: #98971a st.color2: #76946a
st.color3: #d79921 st.color3: #c0a36e
st.color4: #458588 st.color4: #7e9cd8
st.color5: #b16286 st.color5: #957fb8
st.color6: #689d6a st.color6: #6a9589
st.color7: #a89984 st.color7: #c8c093
st.color8: #928374 st.color8: #727169
st.color9: #fb4934 st.color9: #e82424
st.color10: #b8bb26 st.color10: #98bb6c
st.color11: #fabd2f st.color11: #e6c384
st.color12: #83a598 st.color12: #7fb4ca
st.color13: #d3869b st.color13: #938aa9
st.color14: #8ec07c st.color14: #7aa89f
st.color15: #ebdbb2 st.color15: #dcd7ba
Zutty.bg: #1f1f28
Zutty.fg: #dcd7ba
Zutty.cr: #cbd9d8
Zutty.color0: #090618
Zutty.color1: #c34043
Zutty.color2: #76946a
Zutty.color3: #c0a36e
Zutty.color4: #7e9cd8
Zutty.color5: #957fb8
Zutty.color6: #6a9589
Zutty.color7: #c8c093
Zutty.color8: #727169
Zutty.color9: #e82424
Zutty.color10: #98bb6c
Zutty.color11: #e6c384
Zutty.color12: #7fb4ca
Zutty.color13: #938aa9
Zutty.color14: #7aa89f
Zutty.color15: #dcd7ba
#else #else
st.lightmode: 1 st.lightmode: 1
st.background: #fbf1c7 st.background: #f6f2ee
st.foreground: #3c3836 st.foreground: #3d2b5a
st.cursorColor: #bf8040 st.cursorColor: #643f61
st.reverse-cursor: #1f212e st.reverse-cursor: #3d2b5a
st.color0: #282828 st.color0: #352c24
st.color1: #cc241d st.color1: #a5222f
st.color2: #98971a st.color2: #396847
st.color3: #d79921 st.color3: #ac5402
st.color4: #458588 st.color4: #2848a9
st.color5: #b16286 st.color5: #6e33ce
st.color6: #689d6a st.color6: #287980
st.color7: #7c6f64 st.color7: #f2e9e1
st.color8: #928374 st.color8: #534c45
st.color9: #9d0006 st.color9: #b3434e
st.color10: #79740e st.color10: #577f63
st.color11: #b57614 st.color11: #b86e28
st.color12: #076678 st.color12: #4863b6
st.color13: #8f3f71 st.color13: #8452d5
st.color14: #427b58 st.color14: #488d93
st.color15: #3c3836 st.color15: #f4ece6
Zutty.bg: #f6f2ee
Zutty.fg: #3d2b5a
Zutty.cr: #643f61
Zutty.color0: #352c24
Zutty.color1: #a5222f
Zutty.color2: #396847
Zutty.color3: #ac5402
Zutty.color4: #2848a9
Zutty.color5: #6e33ce
Zutty.color6: #287980
Zutty.color7: #f2e9e1
Zutty.color8: #534c45
Zutty.color9: #b3434e
Zutty.color10: #577f63
Zutty.color11: #b86e28
Zutty.color12: #4863b6
Zutty.color13: #8452d5
Zutty.color14: #488d93
Zutty.color15: #f4ece6
#endif #endif

View File

@@ -8,7 +8,7 @@ xset b off
xrandr --auto xrandr --auto
xrandr --output DP-0 --left-of DP-2 --primary xrandr --output DP-0 --left-of DP-2 --primary
xrandr --output HDMI-0 --left-of DP-0 xrandr --output HDMI-0 --left-of DP-0
xrdb -merge ~/.Xresources xrdb -merge ~/.Xresources -DHOME="$HOME"
setxkbmap pl -option ctrl:nocaps setxkbmap pl -option ctrl:nocaps
if [ -x ~/.fehbg ]; then if [ -x ~/.fehbg ]; then

View File

@@ -30,7 +30,7 @@ if [ -n "$XRES" ]; then
elif [ "$THEME" = light ]; then elif [ "$THEME" = light ]; then
sed -i 's/^#define THEME_DARK/#undef THEME_DARK/' "$XRES" sed -i 's/^#define THEME_DARK/#undef THEME_DARK/' "$XRES"
fi fi
xrdb -merge "$XRES" xrdb -merge "$XRES" -DHOME="$HOME"
pkill -USR1 '^st$' pkill -USR1 '^st$'
fi fi