Compare commits

..

1 Commits

Author SHA1 Message Date
389a5ad784 nvim: migrate to paq package manager 2025-11-23 21:39:31 +01:00
52 changed files with 472 additions and 2025 deletions

View File

@@ -31,7 +31,7 @@ st:
cd st && \
git remote add lupan.pl https://gitea.lupan.pl/lupan/st.git && \
git fetch lupan.pl && \
git checkout -b patched-5 --track lupan.pl/patched-5
git checkout -b patched-4 --track lupan.pl/patched-4
build-st:
make -C st

View File

@@ -1,266 +0,0 @@
# Session settings
# Name used for the default session
session = default
# Key press used to detatch from a session. Typically a Control key specified
# with prefix C-, for example C-\ for Control-backslash. Single keys are also
# allowed but not Meta (M-) keys.
detach_key = C-\
# Application Theming
# Colors are specified as -1 for default, 0-7 for standard, 8-15 for bright,
# 16-231 for extended, 232-255 for gray scale, 0xRRGGBB for 24-bit RGB colors,
# or you can use any of the X11 or Web Color Names. One or more comma separated
# font attributes may optionally be specified: bold, italic, reverse, strike,
# and blink. The attributes may also optionally include one of three underline
# types single, double, or curly.
include = theme_blue.ini
#statusbar_attr = white 0x5F636A
#tag_unoccupied = white 0x5F636A
#titlebar_unselected = white 0x004C6C
titlebar_unselected = 0x808080 0x000000
#tag_occupied = white 0x004C6C
#tag_urgent = white 0x004C6C bold,blink
#titlebar_selected = white 0x00AEEF
titlebar_selected = white 0x004C6C
#tag_selected = white 0x00AEEF bold
# Read only settings are overlayed onto the three titlebar settings above. Set
# either fg or bg to -1 to retain that titlebar setting. Any specified
# attributes are combined with those from above. These must be in this order
# and must be after all other titlebar definitions!
#titlebar_urgent = 0xE7DDB4 -1 blink
#titlebar_readonly = 0xA56815 -1 bold,italic
# Define up to 9 alphanumeric tag names, how they will be displayed on the
# status bar, and the types of colors and font attributes.
tagnames = 1 2 3 4 5 6 7 8 9
#tagnames = play dev test stage prod
tag_printf = " %s "
# Number of lines saved for each terminal's scroll back history
scroll_history = 5000
# The size of the layout zoom area is a number from .1 to .9, and the number of
# terminals in the zoom area is a number 1 or more.
zoomsize = .5
zoomnum = 1
# Specify one or more status bar commands to cycle through at the given number
# of interval seconds. Set interval to 0 to have the command run once and not
# refresh. Set interval to -1 to not have any status bar text.
statusbar_cmd = date; echo " | a4/$A4_SESSION" $A4
statusbar_cmd = uptime; echo " | a4/$A4_SESSION" $A4
#statusbar_cmd = cat ~/.cache/status/statusbar.txt; echo ' | a4' $A4
statusbar_interval = 10
statusbar_display = true
statusbar_top = true
#statusbar_begin = [
#statusbar_end = ]
# The terminal cursor can be set to visible or hidden, blinking or solid, and
# the shape can be 1-block, 2-underline, or 3-bar.
cursorvis = true
cursorblink = true
cursorshape = 1
# Any number of actions assigned to the optional special keyword "startup" are
# run when a4 is started, in the order specified.
#include = startup.ini
startup = create
#startup = view 2
#startup = create
#startup = keysequence ssh example.com\n
[Layouts]
# Layout symbol string in the status bar. First layout is the default. Order
# determines layout toggle cycle.
zoom_left = " │├┤ "
zoom_right = " ├┤│ "
fullscreen = " │ │ "
grid = " ├┼┤ "
columns = " │││ "
rows = " ─── "
zoom_top = " ├┬┤ "
zoom_bottom = " ├┴┤ "
[KeyboardActions]
# Keyboard actions have a key combination of no more than three keys assigned
# to them. A key can be raw or can include modifiers Meta or Alt, M-, Control,
# C-, Shift, S-, or with combinations of those. Any modifier keys must be put
# in the order of M-C-S-. Two special keys that must be fully spelled out are
# "Space" and "Hyphen".
C-g c = create
C-g x x = destroy
C-g Enter = zoom
C-g . = minimize
C-g q q = quit
C-g C-l = redraw
C-g s = statusbar vis
C-g S = statusbar pos
# The four actions view, tag, viewtoggle, and tagtoggle each take tag name as a
# parameter. You can use the special '#' character as a shortcut to assign
# mappings for up to 9 digits to the list of tag names. For the key
# combination, the last occurrence of '#' is replaced with the digit 'n' and
# then the 'nth' tag name is passed as the action parameter. For example,
# "C-g # F# = view #" expands to "C-g F1 = view 1", "C-g F2 = view 2", ....
C-g v # = view #
C-g F# = view #
C-g t # = tag #
C-g V # = viewtoggle #
C-g T # = tagtoggle #
C-g v 0 = view _all
C-g v Tab = view _swap
C-g t 0 = tag _all
# The focus action takes several possible parameters, including window number.
# You can use the special '#' character as a shortcut to assign mappings for
# all digits 1-9. in the key combination and the action parameter to assign
# that combo/action pairing to digits 1-9. For the key combination, the last
# occurrence of '#' is replaced with the digit 'n' and the same digit 'n' is
# passed as the action parameter. For example, "C-g # = focus #" is expanded
# out to "C-g 1 = focus 1", "C-g 2 = focus 2", ....
C-g # = focus #
C-g j = focus next
C-g C-j = focus NEXT
C-g k = focus prev
C-g C-k = focus PREV
C-g Tab = focus swap
C-g H = focus left
C-g J = focus down
C-g K = focus up
C-g L = focus right
C-g ) = focus group
C-g 0 = focus groupall
C-g * = readonly
C-a # = view #
C-a f = layout fullscreen
C-a g = layout grid
C-a h = layout zoom_left
C-a j = layout zoom_bottom
C-a k = layout zoom_top
C-a l = layout zoom_right
C-a c = layout columns
C-a r = layout rows
# Cycle through all layouts in order listed in the [Layouts] section
C-a Space = layout +1
C-a C-Space = layout -1
C-a Tab = layout swap
C-a i = zoomnum +1
C-a d = zoomnum -1
C-a I = zoomsize +.05
C-a D = zoomsize -.05
S-PageUp = scrollback .5
S-PageDown = scrollback -.5
C-g PageUp = scrollback 1.0
C-g PageDown = scrollback -1.0
# Specify ANSI escape or other key sequence overrides
#include = vt220.ini
#Home = keysequence \e[1~
#End = keysequence \e[4~
#C-g Space = keysequence Hello world!
[MouseTermwinActions]
click-1 = focus
C-click-1 = zoom
click-3 = focus group
C-click-3 = focus 0
wheel-up = scrollback 3
wheel-dn = scrollback -3
S-wheel-up = scrollback 0.5
S-wheel-dn = scrollback -0.5
C-wheel-up = scrollback 1.0
C-wheel-dn = scrollback -1.0
[MouseTitlebarActions]
click-1 = minimize
click-3 = readonly
[MouseTagNamesActions]
click-1 = view
C-click-1 = viewtoggle
click-3 = tag
C-click-3 = tagtoggle
[MouseLayoutSymbolActions]
click-1 = layout +1
click-3 = layout -1
C-click-1 = zoomnum +1
C-click-3 = zoomnum -1
M-C-click-1 = zoomsize +.05
M-C-click-3 = zoomsize -.05
[MouseStatusTextActions]
click-1 = statusbar next
[MouseFrameLinesActions]
click-1 = layout fullscreen
# Terminals typically have a default foreground (fg) color, background (bg)
# color, and 16 standard colors that are used by terminal applications. They
# can also define color numbers up to 255, but the are used less often. In a4,
# you can define ColorSchemes that are then applied to terminal windows
# dynamically by comparing the terminal's title text to defined ColorRules (see
# below). The first defined ColorScheme is used by default for all windows.
# (The cursor color is not yet implemented.)
#include = cs_gruvbox.ini
#include = cs_solarized.ini
#include = cs_redsands.ini
#include = cs_fairyfloss.ini
#include = cs_kokuban.ini
#include = cs_frontend_fun_forrest.ini
#include = cs_seafoam_pastel.ini
[ColorScheme Basic]
fg = 7
bg = 0
#color123 = DarkOrange1
[ColorScheme BasicRed]
fg = 0
bg = 1
[ColorScheme Red160]
fg = 232
bg = 160
[ColorScheme Crimson]
fg = MidnightBlue
bg = Crimson
[colorscheme RedSands]
color00 = 0x000000
color01 = 0xff3f00
color02 = 0x00bb00
color03 = 0xe7b000
color04 = 0x0072ff
color05 = 0xbb00bb
color06 = 0x00bbbb
color07 = 0xbbbbbb
color08 = 0x555555
color09 = 0xbb0000
color10 = 0x00bb00
color11 = 0xe7b000
color12 = 0x0072ae
color13 = 0xff55ff
color14 = 0x55ffff
color15 = 0xffffff
fg = 0xd7c9a7
bg = 0x7a251e
cursor = 0xd7c9a7
# Color rules pair text with a colorscheme. A terminal window's title bar text
# is compared with each ColorRule text, in the order specified, until one
# matches, and then that colorscheme is applied to the terminal. If none of the
# rules match, then the first colorscheme defined in a4.ini is used.
# <pattern> = <colorscheme name> [<fg color|-1> [<bg color>]]
#[ColorRules]
#root@appdev.com = FairyFloss red
#@appdev.com = FairyFloss
#root@appprd = redsands red
#appprd = redsands
#root@appprddr = redsands red 0x521914
#appprddr = redsands -1 0x521914

View File

@@ -54,12 +54,14 @@ end
local function read_theme()
local theme = "theme_dark.lua"
local f = io.open(os.getenv('HOME') .. '/.lightmode')
local f = io.open(os.getenv('HOME') .. '/.config/alacritty/alacritty.toml')
if f then
if string.find(f:read('*all'), 'light') then
theme = 'theme_light.lua'
f:close()
end
f:close()
return theme
end
end
local theme = read_theme()
@@ -86,7 +88,7 @@ local function switch_theme()
end
-- This is used later as the default terminal and editor to run.
local terminal = "kitty --single-instance --instance-group default"
local terminal = "st"
-- Default modkey.
local modkey = "Mod4"
@@ -234,15 +236,13 @@ local function layout_menu()
awful.menu(layouts):show()
end
local function focus_nth_window(n)
local function focus_nth_window (n)
local cc = {}
for _, c in ipairs(client.get()) do
if awful.widget.tasklist.filter.currenttags(c, mouse.screen) then cc[#cc + 1] = c end
end
local new_focused = cc[n]
if new_focused then
client.focus = new_focused; new_focused:raise()
end
if new_focused then client.focus = new_focused; new_focused:raise() end
end
-- {{{ Key bindings
@@ -296,7 +296,7 @@ local globalkeys = gears.table.join(
{ description = "open a terminal", group = "launcher" }),
awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn("systemctl suspend") end,
{ description = "open a terminal", group = "launcher" }),
awful.key({ modkey, "Control", "Shift" }, "t", switch_theme,
awful.key({ modkey, "Shift" }, "F6", switch_theme,
{ description = "switch theme", group = "launcher" }),
awful.key({ modkey, }, "q", awesome.restart,
{ description = "reload awesome", group = "awesome" }),
@@ -347,7 +347,7 @@ local globalkeys = gears.table.join(
end,
{ description = "lua execute prompt", group = "awesome" }),
-- Menubar
awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'HurmitNerdFont:size=16'") end,
awful.key({ modkey }, "p", function() awful.spawn("dmenu_run -fn 'FiraCode Nerd Font Ret:size=10'") end,
{ description = "run command", group = "launcher" })
)
@@ -571,15 +571,15 @@ client.connect_signal("mouse::enter", function(c)
end)
-- local function set_border(c)
-- local s = awful.screen.focused()
-- if c.maximized
-- or (#s.tiled_clients == 1 and not c.floating)
-- or (s.selected_tag and s.selected_tag.layout.name == 'max')
-- then
-- c.border_width = 0
-- else
-- c.border_width = beautiful.border_width
-- end
-- local s = awful.screen.focused()
-- if c.maximized
-- or (#s.tiled_clients == 1 and not c.floating)
-- or (s.selected_tag and s.selected_tag.layout.name == 'max')
-- then
-- c.border_width = 0
-- else
-- c.border_width = beautiful.border_width
-- end
-- end
client.connect_signal("focus", function(c)

View File

@@ -5,7 +5,7 @@ local dpi = xresources.apply_dpi
local theme = {}
theme.font = "HurmitNerdFont 10"
theme.font = "Fira Code Nerd Font 10"
theme.tasklist_disable_icon = true
theme.wibar_height = 30

View File

@@ -5,7 +5,7 @@ local dpi = xresources.apply_dpi
local theme = {}
theme.font = "HurmitNerdFont 10"
theme.font = "Fira Code Nerd Font 10"
theme.tasklist_disable_icon = true
theme.wibar_height = 30

View File

@@ -1,25 +1,20 @@
font_family HurmitNerdFont
font_family FiraCode Nerd
font_size 11
cursor_blink_interval 0
enable_audio_bell no
visual_bell_duration 1.0
tab_bar_min_tabs 1
tab_bar_style powerline
tab_bar_edge top
tab_bar_filter session:~ or session:^$
tab_title_template "{index}:{session_name}:{bell_symbol}{activity_symbol}{title}"
tab_powerline_style round
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title} {index}"
open_url_with qutebrowser
action_alias launch_tab_home launch --type tab --cwd=~
kitten_alias hints hints --hints-background-color red --hints-foreground-color white
action_alias launch_tab launch --type=tab --cwd=current
map ctrl+shift+n launch_tab tmux
map ctrl+shift+t launch_tab tmux attach
map ctrl+shift+s launch_tab zsh
map ctrl+shift+6 no_op
map ctrl+shift+0 nth_window -1
map ctrl+shift+h previous_tab
map ctrl+shift+l next_tab
map ctrl+shift+p goto_tab -1
map ctrl+alt+1 goto_tab 1
map ctrl+alt+2 goto_tab 2
map ctrl+alt+3 goto_tab 3
@@ -29,43 +24,9 @@ map ctrl+alt+6 goto_tab 6
map ctrl+alt+7 goto_tab 7
map ctrl+alt+8 goto_tab 8
map ctrl+alt+9 goto_tab 9
map ctrl+alt+0 goto_tab -1
map ctrl+alt+h neighboring_window left
map ctrl+alt+j neighboring_window down
map ctrl+alt+k neighboring_window up
map ctrl+alt+l neighboring_window right
map ctrl+alt+a last_used_layout
map ctrl+alt+b goto_layout fat
map ctrl+alt+g goto_layout grid
map ctrl+alt+r goto_layout tall
map ctrl+alt+space goto_session -1
map ctrl+alt+return new_window_with_cwd
map ctrl+alt+d new_tab_with_cwd sh -c 'cd $(kitten choose-file --mode dir) && nvim'
map ctrl+alt+e new_tab_with_cwd nvim
map ctrl+alt+i new_tab_with_cwd lazygit
map ctrl+alt+f new_tab_with_cwd sh -c 'nvim $(kitten choose-file)'
map ctrl+alt+m toggle_layout stack
map ctrl+alt+o goto_session ~/.config/kitty/sessions
map ctrl+alt+/ goto_session --sort-by=alphabetical ~/.config/kitty/sessions
map ctrl+alt+p new_tab_with_cwd spf
map ctrl+alt+s launch --stdin-source=@screen_scrollback --type=overlay nvim -R -
map ctrl+alt+w new_window_with_cwd
map ctrl+alt+t new_tab_with_cwd
map ctrl+alt+x close_window_with_confirmation
map ctrl+alt+u>d launch_tab_home sh -c 'cd $(kitten choose-file --mode dir) && nvim'
map ctrl+alt+u>f launch_tab_home sh -c 'nvim $(kitten choose-file)'
map ctrl+alt+v focus_visible_window
map ctrl+alt+y new_window nvim @selection
map ctrl+alt+shift+s save_as_session --base-dir ~/.config/kitty/sessions --match=session:.
map ctrl+alt+shift+t detach_tab
map ctrl+alt+shift+w detach_window
map ctrl+alt+shift+x close_session .
map ctrl+alt+0 goto_tab 10
# BEGIN_KITTY_THEME
# Lupanbones-Dark
# Afterglow
include current-theme.conf
# END_KITTY_THEME

View File

@@ -1,33 +0,0 @@
# vim:ft=kitty
foreground #9da0af
background #1f212e
selection_foreground #808080
selection_background #4d5580
cursor #bf8040
cursor_text_color #1f212e
active_border_color #862d2d
inactive_border_color #4d5580
active_tab_foreground #9da0af
active_tab_background #4d5580
inactive_tab_foreground #1f212e
inactive_tab_background #808080
color1 #862d2d
color2 #3a783a
color3 #707010
color4 #345eb2
color5 #cc66cc
color6 #3a7878
color7 #a1a3aa
color8 #4d4d4d
color9 #c27070
color10 #40bf40
color11 #acac53
color12 #6b8ac7
color13 #8f248f
color14 #509595
color15 #dbdff0

View File

@@ -1,34 +0,0 @@
# vim:ft=kitty
foreground #1f212e
background #faf8f5
selection_foreground #1f212e
selection_background #a6c7f2
cursor #1f212e
cursor_text_color #faf8f5
active_border_color #862d2d
inactive_border_color #a6c7f2
active_tab_foreground #1f212e
active_tab_background #a6c7f2
inactive_tab_foreground #faf8f5
inactive_tab_background #808080
color0 #1f212e
color1 #862d2d
color2 #3a783a
color3 #707010
color4 #345eb2
color5 #cc66cc
color6 #3a7878
color7 #a1a3aa
color8 #73778c
color9 #c27070
color10 #40bf40
color11 #acac53
color12 #6b8ac7
color13 #8f248f
color14 #509595
color15 #dae4f1

View File

@@ -7,7 +7,3 @@ os:
gui:
nerdFontsVersion: "3"
theme:
selectedLineBgColor:
- reverse

View File

@@ -1,55 +0,0 @@
local colors_name = "lupanbones"
vim.g.colors_name = colors_name -- Required when defining a colorscheme
local lush = require "lush"
local hsluv = lush.hsluv -- Human-friendly hsl
local util = require "zenbones.util"
local bg = vim.o.background
-- Define a palette. Use `palette_extend` to fill unspecified colors
local palette
if bg == "light" then
palette = util.palette_extend({
bg = hsluv "#faf8f5",
fg = hsluv "#1f212e",
rose = hsluv "#bf8040",
leaf = hsluv "#3d8f66",
wood = hsluv "#acac53",
water = hsluv "#6b8ac7",
blossom = hsluv "#93806c",
sky = hsluv "#7461d1",
}, bg)
else
palette = util.palette_extend({
bg = hsluv "#1f212e",
fg = hsluv "#9da0af",
rose = hsluv "#bf8040",
leaf = hsluv "#3d8f66",
wood = hsluv "#d1d147",
water = hsluv "#6b8ac7",
blossom = hsluv "#93806c",
sky = hsluv "#7461d1",
}, bg)
end
-- Generate the lush specs using the generator util
local generator = require "zenbones.specs"
local base_specs = generator.generate(palette, bg, generator.get_global_config(colors_name, bg))
-- Optionally extend specs using Lush
local specs = lush.extends({ base_specs }).with(function()
return {
Statement { base_specs.Statement, fg = palette.rose },
String { fg = palette.leaf },
Special { fg = palette.water },
Type { fg = palette.sky, gui = "italic" },
Delimiter { fg = palette.blossom },
}
end)
-- Pass the specs to lush to apply
lush(specs)
-- Optionally set term colors
require("zenbones.term").apply_colors(palette)

View File

@@ -2,19 +2,56 @@ require("config.options")
require("config.remap")
require("config.lsp")
require("plugins.arrow")
require("plugins.auto-session")
require("plugins.colorscheme")
require("plugins.conform")
require("plugins.flash")
require("plugins.fzf-lua")
require("plugins.guess-indent")
require("plugins.luasnip")
require("plugins.multicursor")
require("plugins.nvim-various-textobjs")
require("plugins.oil")
require("plugins.slimline")
require("plugins.snacks")
require("plugins.surround")
require("plugins.treesitter")
require("plugins.which-key")
local ok, paq = pcall(require, "paq")
if ok then
paq({
"EdenEast/nightfox.nvim",
"stevearc/conform.nvim",
"otavioschwanck/arrow.nvim",
"folke/flash.nvim",
"folke/snacks.nvim",
"stevearc/oil.nvim",
{
"jake-stewart/multicursor.nvim",
branch = "1.0",
},
{
"nvim-treesitter/nvim-treesitter-textobjects",
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,15 +1,5 @@
return {
cmd = { "lua-language-server" },
filetypes = { "lua" },
root_markers = { ".luarc.json", ".git" },
settings = {
Lua = {
runtime = {
version = "LuaJIT",
},
diagnostics = {
globals = { "vim" },
}
},
},
cmd = 'lua-language-server',
filetypes = { 'lua' },
rootmarkers = { '.git' },
}

View File

@@ -1,5 +0,0 @@
return {
cmd = { "templ", "lsp" },
filetypes = { "templ" },
root_markers = { "go.mod", "go.work", ".git" },
}

View File

@@ -17,13 +17,10 @@ function M.terminalbg()
end
end
function M.update_colorscheme(only_if_changed)
local next = M.terminalbg()
if not only_if_changed or next ~= vim.o.background then
vim.o.background = next
function M.update_colorscheme()
vim.o.background = M.terminalbg()
if colorschemes then
vim.cmd.colorscheme(colorschemes[next])
end
vim.cmd.colorscheme(colorschemes[vim.o.background])
end
end
@@ -45,7 +42,7 @@ local function watch(fname)
fname,
{},
vim.schedule_wrap(function(...)
M.update_colorscheme(true)
M.update_colorscheme()
w:stop()
watch(fname)
end)

View File

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

View File

@@ -6,19 +6,5 @@ vim.g.maplocalleader = " \\"
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.signcolumn = "yes"
vim.opt.title = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
vim.opt.timeout = false
vim.o.undofile = true
vim.cmd([[autocmd TermOpen * startinsert]]);
vim.filetype.add({
extension = {
["kitty-session"] = 'kitty',
},
})

View File

@@ -1,19 +1,6 @@
local set = vim.keymap.set
vim.keymap.set("n", "<M-h>", "<C-w>h")
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")
set("n", "<M-h>", "<C-w>h")
set("n", "<M-k>", "<C-w>k")
set("n", "<M-j>", "<C-w>j")
set("n", "<M-l>", "<C-w>l")
set({ "n", 'v' }, "<leader>p", [["+p]])
set({ "n", 'v' }, "<leader>P", [["+P]])
set({ "n", 'v' }, "<leader>y", [["+y]])
set({ "n", 'v' }, "<leader>Y", [["+Y]])
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>")
set("n", "<leader>ga", "<cmd>tabnew | terminal lazygit<cr>")
vim.keymap.set("n", "<Esc>", "<cmd>nohlsearch<cr>")

View File

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

View File

@@ -1,12 +0,0 @@
vim.pack.add({ "https://github.com/rmagatti/auto-session" })
vim.keymap.set("n", "<leader>wy", "<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,11 +1,16 @@
vim.pack.add({
"https://github.com/EdenEast/nightfox.nvim",
"https://github.com/rebelot/kanagawa.nvim",
"https://github.com/kepano/flexoki-neovim",
"https://github.com/rktjmp/lush.nvim",
"https://github.com/zenbones-theme/zenbones.nvim",
})
local cs = require("config.colorscheme")
cs.set_colorschemes("lupanbones", "lupanbones")
cs.update_colorscheme()
return {
opts = {
specs = {
all = {
syntax = {
operator = "#bf8040",
},
},
},
},
init = function()
local cs = require("config.colorscheme")
cs.set_colorschemes("nightfox", "dayfox")
cs.update_colorscheme()
end,
}

View File

@@ -1,36 +1,11 @@
vim.pack.add({ "https://github.com/stevearc/conform.nvim" })
local ok, conform = pcall(require, "conform")
if ok then
conform.setup({
return {
opts = {
formatters_by_ft = {
lua = { "stylua" },
},
format_on_save = function(bufnr)
-- Disable with a global or buffer-local variable
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
format_on_save = {
timeout_ms = 500,
lsp_format = "fallback",
},
},
}

View File

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

View File

@@ -1,232 +0,0 @@
vim.pack.add({
"https://github.com/ibhagwan/fzf-lua",
"https://github.com/elanmed/fzf-lua-frecency.nvim",
})
local ok, fzf = pcall(require, "fzf-lua")
local ok2, frecency = pcall(require, "fzf-lua-frecency")
if ok then
fzf.setup({
keymap = {
builtin = {
true,
["<M-m>"] = "toggle-fullscreen",
},
fzf = {
true,
-- Use <c-q> to select all items and add them to the quickfix list
["ctrl-q"] = "select-all+accept",
},
}
})
fzf.register_ui_select()
local odin_pkg = "~/cloned/Odin"
local function go_root()
return vim.fn.trim(vim.fn.system("go env GOROOT"))
end
local go_root_pkg = nil
local function go_mod()
return vim.fs.joinpath(vim.fn.trim(vim.fn.system("go env GOPATH")), "pkg/mod")
end
local go_mod_pkg = nil
local function go_grep(cwd)
local input = vim.fn.input("Go grep declarations> ")
if #input == 0 then
return
end
local search1 = "^(func|type) .*(?<= )(?=[A-Z])[a-zA-Z0-9_]*" .. input .. "[a-zA-Z0-9_]*( |\\()"
local search2 = "^[\\t]+(?=[A-Z])[a-zA-Z0-9_]*" .. input .. "[a-zA-Z0-9_]* +="
local search = "(" .. search1 .. "|" .. search2 .. ")"
fzf.grep({
cwd = cwd,
cmd = "rg -P -g '*.go'",
search = search,
no_esc = true,
profile = 'ivy',
})
end
local function odin_grep(cwd)
local input = vim.fn.input("Odin grep declarations> ")
if #input == 0 then
return
end
local search = "^[ \\t]*[a-zA-Z0-9_]*" .. input .. "[a-zA-Z0-9_]* +::"
fzf.grep({
cwd = cwd,
cmd = "rg -g '*.odin'",
search = search,
no_esc = true,
profile = 'ivy',
})
end
local set = vim.keymap.set
set("n", "<leader>ba", fzf.buffers, { desc = "FzfLua buffers" })
set("n", "<leader>bh", fzf.history, { desc = "FzfLua history" })
set("n", "<leader>bj", fzf.jumps, { desc = "FzfLua jumps" })
set("n", "<leader>ca", fzf.lsp_code_actions, { desc = "FzfLua LSP code actions" })
set("n", "<leader>cb", fzf.complete_bline, { desc = "FzfLua complete buffer line" })
set("n", "<leader>cc", fzf.commands, { desc = "FzfLua commands" })
set("n", "<leader>cf", fzf.complete_file, { desc = "FzfLua complete file" })
set("n", "<leader>cF", fzf.complete_path, { desc = "FzfLua complete path" })
set("n", "<leader>ch", fzf.command_history, { desc = "FzfLua command history" })
set("n", "<leader>cH", fzf.highlights, { desc = "FzfLua color highlights" })
set("n", "<leader>cl", fzf.complete_line, { desc = "FzfLua complete line" })
set("n", "<leader>co", fzf.nvim_options, { desc = "FzfLua nvim options" })
set("n", "<leader>cr", fzf.profiles, { desc = "FzfLua fzf profiles" })
set("n", "<leader>cs", fzf.colorschemes, { desc = "FzfLua color schemes" })
set("n", "<leader>ct", fzf.tabs, { desc = "FzfLua tabs" })
set("n", "<leader>da", fzf.diagnostics_document, { desc = "FzfLua document diagnostics" })
set("n", "<leader>dw", fzf.diagnostics_workspace, { desc = "FzfLua workspace diagnostics" })
set("n", "<leader>ec", function()
fzf.files({ cwd = vim.fn.stdpath("config") })
end, { desc = "FzfLua nvim config files" })
set("n", "<leader>ep", function()
fzf.files({ cwd = vim.fs.joinpath(vim.fn.stdpath("data"), "site") })
end, { desc = "FzfLua find files" })
set("n", "<leader>es", function()
fzf.files({ cwd = '~/.config/kitty/sessions' })
end, { desc = "FzfLua kitty sessions" })
set("n", "<leader>eS", "<cmd>Oil ~/.config/kitty/sessions<cr>", { desc = "Kitty sessions (dir)" })
set("n", "<leader>fa", fzf.git_files, { desc = "FzfLua git files" })
set("n", "<leader>ff", fzf.files, { desc = "FzfLua find files" })
set("n", "<leader>fg", fzf.global, { desc = "FzfLua global" })
set("n", "<leader>fo", frecency.frecency, { desc = "FzfLua frecency oldfiles" })
set("n", "<leader>ft", fzf.filetypes, { desc = "FzfLua file types" })
set("n", "<leader>;", function()
frecency.frecency({ cwd_only = true })
end, { desc = "FzfLua frecency files" })
set("n", "<leader>gb", fzf.git_branches, { desc = "FzfLua git branches" })
set("n", "<leader>gB", fzf.git_blame, { desc = "FzfLua git blame" })
set("n", "<leader>gc", fzf.git_bcommits, { desc = "FzfLua git buffer commits" })
set("n", "<leader>gC", fzf.git_commits, { desc = "FzfLua git commits" })
set("n", "<leader>gd", fzf.git_diff, { desc = "FzfLua git diff" })
set("n", "<leader>gh", fzf.git_hunks, { desc = "FzfLua git hunks" })
set("n", "<leader>gC", fzf.git_commits, { desc = "FzfLua git commits" })
set("n", "<leader>gs", fzf.git_status, { desc = "FzfLua git status" })
set("n", "<leader>gS", fzf.git_stash, { desc = "FzfLua git stash" })
set("n", "<leader>gt", fzf.git_tags, { desc = "FzfLua git tags" })
set("n", "<leader>gw", fzf.git_worktrees, { desc = "FzfLua git worktrees" })
set("n", "<leader>ha", fzf.helptags, { desc = "FzfLua help tags" })
set("n", "<leader>hk", fzf.keymaps, { desc = "FzfLua keymaps" })
set("n", "<leader>ma", fzf.marks, { desc = "FzfLua marks" })
set("n", "<leader>mp", fzf.manpages, { desc = "FzfLua man pages" })
set("n", "<leader>qa", fzf.quickfix, { desc = "FzfLua quickfix" })
set("n", "<leader>qs", fzf.quickfix_stack, { desc = "FzfLua quickfix stack" })
set("n", "<leader>ql", fzf.loclist, { desc = "FzfLua loclist" })
set("n", "<leader>qh", fzf.loclist_stack, { desc = "FzfLua loclist stack" })
set("n", "<leader>ra", fzf.resume, { desc = "FzfLua resume" })
set("n", "<leader>rr", fzf.registers, { desc = "FzfLua registers" })
set("n", "<leader>ta", fzf.treesitter, { desc = "FzfLua treesitter symbols" })
set("n", "<leader>sa", fzf.live_grep, { desc = "FzfLua live grep" })
set("n", "<leader>sb", fzf.blines, { desc = "FzfLua buffer lines" })
set("n", "<leader>sB", fzf.grep_curbuf, { desc = "FzfLua grep current buffer" })
set("n", "<leader>sg", fzf.grep, { desc = "FzfLua grep" })
set("n", "<leader>sh", fzf.search_history, { desc = "FzfLua search history" })
set("n", "<leader>sl", fzf.grep_loclist, { desc = "FzfLua grep loclist" })
set("n", "<leader>sn", fzf.live_grep_native, { desc = "FzfLua live grep native" })
set("n", "<leader>so", fzf.lines, { desc = "FzfLua open buffers lines" })
set("n", "<leader>sp", fzf.grep_project, { desc = "FzfLua grep project" })
set("n", "<leader>sq", fzf.grep_quickfix, { desc = "FzfLua grep quickfix" })
set("n", "<leader>sr", function() fzf.grep({ resume = true }) end, { desc = "FzfLua grep resume" })
set("n", "<leader>sc", fzf.spellcheck, { desc = "FzfLua spell check" })
set("n", "<leader>ss", fzf.spell_suggest, { desc = "FzfLua spell suggest" })
set({ "n", "v" }, "<leader>sv", fzf.grep_visual, { desc = "FzfLua grep visual" })
set("n", "<leader>sw", fzf.grep_cword, { desc = "FzfLua grep cword" })
set("n", "<leader>sW", fzf.grep_cWORD, { desc = "FzfLua grep cword" })
set("n", "<leader>U", fzf.undotree, { desc = "FzfLua undo tree" })
set("n", "<leader>wa", fzf.lsp_live_workspace_symbols, { desc = "FzfLua document symbols" })
set("n", "<leader>wd", fzf.lsp_document_symbols, { desc = "FzfLua document symbols" })
set("n", "<leader>wf", fzf.lsp_finder, { desc = "FzfLua LSP finder" })
set("n", "<leader>wp", fzf.lsp_workspace_symbols, { desc = "FzfLua workspace symbols" })
set("n", "<leader>wz", fzf.zoxide, { desc = "FzfLua zoxide" })
set("n", "gd", fzf.lsp_definitions, { desc = "Goto Definition" })
set("n", "gD", fzf.lsp_declarations, { desc = "Goto Declarations" })
set("n", "grr", fzf.lsp_references, { desc = "References" })
set("n", "gri", fzf.lsp_implementations, { desc = "Goto Implementation" })
set("n", "grI", fzf.lsp_incoming_calls, { desc = "Incomming calls" })
set("n", "grO", fzf.lsp_outgoing_calls, { desc = "Outgouing calls" })
set("n", "grs", fzf.lsp_type_sub, { desc = "Outgouing calls" })
set("n", "grp", fzf.lsp_type_super, { desc = "Outgouing calls" })
set("n", "grt", fzf.lsp_typedefs, { desc = "Goto Type Definition" })
set("n", "<leader>Gf", function()
fzf.files({ cwd = go_root(), cmd = "fd --type f -e go" })
end, { desc = "FzfLua Go files" })
set("n", "<leader>GF", function()
fzf.files({ cwd = go_mod(), cmd = "fd --type f -e go" })
end, { desc = "FzfLua Go mod files" })
set("n", "<leader>Gl", function()
fzf.files({ cmd = "fd --type f -e go" })
end, { desc = "FzfLua Go current dir files" })
set("n", "<leader>Gs", function()
go_grep(go_root())
end, { desc = "FzfLua Go grep declarations" })
set("n", "<leader>GS", function()
go_grep(go_mod())
end, { desc = "FzfLua Go grep mod declarations" })
set("n", "<leader>Gd", function()
go_grep(nil)
end, { desc = "FzfLua Go current dir grep declarations" })
set("n", "<leader>Gm", function()
go_grep(go_mod_pkg or go_mod())
end, { desc = "FzfLua Go grep mod declarations" })
set("n", "<leader>GM", function()
fzf.zoxide({
cmd = "fd '' --type d " .. vim.fn.shellescape(go_mod()) .. [[ | awk '{print "\t"$1}']],
actions = {
["enter"] = function(a)
go_mod_pkg = vim.fn.trim(a[1])
go_grep(go_mod_pkg)
end
}
})
end, { desc = "FzfLua Go select package and grep package declarations" })
set("n", "<leader>Gp", function()
go_grep(go_root_pkg or go_root())
end, { desc = "FzfLua Go grep package declarations" })
set("n", "<leader>GP", function()
fzf.zoxide({
cmd = "fd '' --type d " .. vim.fn.shellescape(go_root()) .. [[ | awk '{print "\t"$1}']],
actions = {
["enter"] = function(a)
go_root_pkg = vim.fn.trim(a[1])
go_grep(go_root_pkg)
end
}
})
end, { desc = "FzfLua Go select package and grep package declarations" })
set("n", "<leader>of", function()
fzf.files({ cwd = "~/cloned/Odin", cmd = "fd --type f -e odin" })
end, { desc = "FzfLua Odin files" })
set("n", "<leader>ol", function()
fzf.files({ cmd = "fd --type f -e odin" })
end, { desc = "FzfLua Odin current dir files" })
set("n", "<leader>os", function()
odin_grep("~/cloned/Odin")
end, { desc = "FzfLua Odin grep declarations" })
set("n", "<leader>od", function()
odin_grep(nil)
end, { desc = "FzfLua Odin grep declarations" })
set("n", "<leader>op", function()
odin_grep(odin_pkg)
end, { desc = "FzfLua Odin grep package declarations" })
set("n", "<leader>oP", function()
fzf.zoxide({
cmd = [[fd '' --type d ~/cloned/Odin | awk '{print "\t"$1}']],
actions = {
["enter"] = function(a)
odin_pkg = vim.fn.trim(a[1])
odin_grep(odin_pkg)
end
}
})
end, { desc = "FzfLua Odin select package and grep package declarations" })
else
print("plugin fzf-lua missing")
end
if not ok2 then
print("plugin fzf-lua-frecency missing")
end
--vim.keymap.set("n", "<leader>-", "<cmd>Oil<cr>", { desc = "Oil file manager" })

View File

@@ -1,8 +0,0 @@
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

@@ -1,48 +0,0 @@
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,9 +1,5 @@
vim.pack.add({ { src = "https://github.com/jake-stewart/multicursor.nvim", version = "1.0" } })
local ok, mc = pcall(require, "multicursor-nvim")
if ok then
mc.setup()
return {
init = function(mc)
local set = vim.keymap.set
-- Add or skip cursor above/below the main cursor.
@@ -71,6 +67,5 @@ if ok then
hl(0, "MultiCursorDisabledCursor", { reverse = true })
hl(0, "MultiCursorDisabledVisual", { link = "Visual" })
hl(0, "MultiCursorDisabledSign", { link = "SignColumn" })
else
print("plugin multicursor-nvim missing")
end
end,
}

View File

@@ -1,9 +0,0 @@
vim.pack.add({ "https://github.com/chrisgrieser/nvim-various-textobjs" })
local ok, vto = pcall(require, "various-textobjs")
if ok then
vto.setup({ keymaps = { useDefaults = true, diabledDefaults = { 'r' } } })
vim.keymap.set({ 'o', 'x' }, ' }', vto.restOfParagraph)
else
print("plugin nvim-various-textobjs missing")
end

View File

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

View File

@@ -1,8 +0,0 @@
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,67 +1,142 @@
vim.pack.add({ "https://github.com/folke/snacks.nvim" })
return {
init = function()
local set = vim.keymap.set
local ok, snacks = pcall(require, "snacks")
if ok then
snacks.setup({
picker = { enabled = false },
})
else
print("plugin snacks missing")
end
set("n", "<leader><space>", function()
Snacks.picker.smart()
end, { desc = "Smart Find Files" })
local set = vim.keymap.set
set("n", "<leader><space>", function()
Snacks.picker.smart()
end, { desc = "Smart Find Files" })
set("n", "<leader>ea", function()
Snacks.explorer()
end, { desc = "File Explorer" })
set("n", "<leader>a", function()
Snacks.picker.buffers()
end, { desc = "Buffers" })
set("n", "<leader>gl", function()
Snacks.picker.git_log_line()
end, { desc = "Git Log Line" })
set("n", "<leader>r", function()
Snacks.picker.recent()
end, { desc = "Recent files" })
set({ "n", "v" }, "<leader>gx", function()
Snacks.gitbrowse()
end, { desc = "Git Browse" })
set("n", "<leader>xR", function()
set("n", "<leader>R", function()
Snacks.picker.resume()
end, { desc = "Resume" })
end, { desc = "Resume" })
set("n", "<leader>n", function()
set("n", "<leader>b", function()
Snacks.picker.lines()
end, { desc = "Buffer lines" })
set("n", "<leader>B", function()
Snacks.picker.grep_buffers()
end, { desc = "Grep Open Buffers" })
set("n", "<leader>f", function()
Snacks.picker.files()
end, { desc = "Find Files" })
set("n", "<leader>s", function()
Snacks.picker.grep()
end, { desc = "Grep" })
set("n", "<leader>S", function()
Snacks.picker.git_status()
end, { desc = "Git Status" })
set("n", "<leader>g", function()
Snacks.picker.git_files()
end, { desc = "Find Git Files" })
set("n", "<leader>G", function()
Snacks.picker.git_grep()
end, { desc = "Git Grep" })
set("n", "<leader>l", function()
Snacks.lazygit()
end, { desc = "Lazygit" })
set("n", "<leader>L", function()
Snacks.lazygit.log_file()
end, { desc = "Lazygit log file" })
set("n", "<leader>n", function()
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()
end, { desc = "Notifications" })
end, { desc = "Notifications" })
set("n", "<leader>$", function()
set("n", "<leader>C", function()
Snacks.picker.commands()
end, { desc = "Commands" })
set("n", "<leader>h", function()
Snacks.picker.keymaps()
end, { desc = "Keymaps" })
set("n", "<leader>:", function()
Snacks.picker.command_history()
end, { desc = "Command History" })
set("n", '<leader>"', function()
Snacks.picker.registers()
end, { desc = "Registers" })
set("n", "<leader>$", function()
Snacks.rename.rename_file()
end, { desc = "Rename File" })
end, { desc = "Rename File" })
set("n", "<leader>z", function()
set("n", "<leader>z", function()
Snacks.zen.zoom()
end, { desc = "Toggle Zoom" })
end, { desc = "Toggle Zoom" })
-- LSP
set("n", "<leader>.", function()
Snacks.scratch()
end, { desc = "Toggle Scratch Buffer" })
set("n", "gd", function()
Snacks.picker.lsp_definitions()
end, { desc = "Goto Definition" })
set("n", "<leader>x.", function()
Snacks.scratch.select()
end, { desc = "Select Scratch Buffer" })
set("n", "gD", function()
Snacks.picker.lsp_declarations()
end, { desc = "Goto Declaration" })
-- Terminal
set("n", "gr", function()
Snacks.picker.lsp_references()
end, { desc = "References" })
set({ "n", "t" }, "<c-/>", function()
set("n", "gI", function()
Snacks.picker.lsp_implementations()
end, { desc = "Goto Implementation" })
set("n", "gy", function()
Snacks.picker.lsp_type_definitions()
end, { desc = "Goto T[y]pe Definition" })
set("n", "<leader>w", function()
Snacks.picker.lsp_symbols()
end, { desc = "LSP Symbols" })
set("n", "<leader>d", function()
Snacks.picker.diagnostics_buffer()
end, { desc = "Buffer Diagnostics" })
set("n", "<leader>D", function()
Snacks.picker.diagnostics()
end, { desc = "Diagnostics" })
set("n", "<leader>W", function()
Snacks.picker.lsp_workspace_symbols()
end, { desc = "LSP Workspace Symbols" })
-- Terminal
set({ "n", "t" }, "<c-/>", function()
Snacks.terminal()
end, { desc = "Toggle Terminal" })
end, { desc = "Toggle Terminal" })
set({ "n", "t" }, "<c-_>", function()
set({ "n", "t" }, "<c-_>", function()
Snacks.terminal()
end, { desc = "which_key_ignore" })
end, { desc = "which_key_ignore" })
vim.api.nvim_create_autocmd("VimEnter", {
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
-- Setup some globals for debugging (lazy-loaded)
_G.dd = function(...)
@@ -90,9 +165,13 @@ vim.api.nvim_create_autocmd("VimEnter", {
.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
.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,
}

View File

@@ -1,13 +0,0 @@
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

@@ -1,26 +1,6 @@
-- run ":TSUpdate" after plugin update
-- If hooks need to run on install, run this before `vim.pack.add()`
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({
return {
main = "nvim-treesitter.configs",
opts = {
highlight = {
enable = true,
},
@@ -71,14 +51,12 @@ if ok then
swap = {
enable = true,
swap_next = {
["<leader>cp"] = "@parameter.inner",
["<leader>p"] = "@parameter.inner",
},
swap_previous = {
["<leader>cP"] = "@parameter.inner",
["<leader>P"] = "@parameter.inner",
},
},
},
})
else
print("plugin nvim-treesitter.configs missing")
end
},
}

View File

@@ -1,8 +0,0 @@
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

@@ -1,43 +0,0 @@
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

@@ -1,97 +0,0 @@
{
"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": "62437532b38495551410b3f377bcf4aaac574ebe",
"src": "https://github.com/rmagatti/auto-session"
},
"conform.nvim": {
"rev": "c2526f1cde528a66e086ab1668e996d162c75f4f",
"src": "https://github.com/stevearc/conform.nvim"
},
"flash.nvim": {
"rev": "fcea7ff883235d9024dc41e638f164a450c14ca2",
"src": "https://github.com/folke/flash.nvim"
},
"flexoki-neovim": {
"rev": "c3e2251e813d29d885a7cbbe9808a7af234d845d",
"src": "https://github.com/kepano/flexoki-neovim"
},
"fzf-lua": {
"rev": "d9908fd0a5474994f00526ed17f0b77339dc0152",
"src": "https://github.com/ibhagwan/fzf-lua"
},
"fzf-lua-frecency.nvim": {
"rev": "5726403e132fe8699d670c7ef8d59dbed887b4e6",
"src": "https://github.com/elanmed/fzf-lua-frecency.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"
},
"lush.nvim": {
"rev": "9c60ec2279d62487d942ce095e49006af28eed6e",
"src": "https://github.com/rktjmp/lush.nvim"
},
"multicursor.nvim": {
"rev": "630dd29dd696bc977cb81d7dd2fa6bb280f60fc4",
"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": "34ca4f6b54cf167554c5792cacc69c930b654136",
"src": "https://github.com/chrisgrieser/nvim-various-textobjs"
},
"oil.nvim": {
"rev": "f55b25e493a7df76371cfadd0ded5004cb9cd48a",
"src": "https://github.com/stevearc/oil.nvim"
},
"slimline.nvim": {
"rev": "6b1f20780a26813ba3c2f248c6c6f61e7281bb7b",
"src": "https://github.com/sschleemilch/slimline.nvim"
},
"snacks.nvim": {
"rev": "fe7cfe9800a182274d0f868a74b7263b8c0c020b",
"src": "https://github.com/folke/snacks.nvim"
},
"which-key.nvim": {
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
"src": "https://github.com/folke/which-key.nvim"
},
"zenbones.nvim": {
"rev": "22b7fb75593412e0dc81b4bdefae718e9e84aa82",
"src": "https://github.com/zenbones-theme/zenbones.nvim"
}
}
}

View File

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

View File

@@ -1,321 +0,0 @@
---@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

@@ -1,14 +0,0 @@
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

@@ -1,14 +0,0 @@
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

@@ -19,22 +19,10 @@ if which eza > /dev/null; then
elif which exa > /dev/null; then
alias ls='exa --icons'
alias tree='exa --tree --icons'
else
eval $(dircolors)
alias ls='ls --color'
fi
alias nocaps='setxkbmap pl -option ctrl:nocaps'
alias fixdp='xrandr --output DP-0 --right-of DP-2'
alias a4='COLORTERM=truecolor TERM=xterm-256color a4'
a4i() {
local Q="${@:-}"
local NAME=$(a4 -l | grep '^ ' | fzy -q "$Q" | tr '\t' ' ' | cut -d' ' -f6-)
if [ -n "$NAME" ]; then
a4 -a "$NAME"
fi
}
tn() {
if [ $# -eq 0 ]; then
@@ -72,25 +60,5 @@ tai() {
}
vf() {
if [ "$TERM" = "xterm-kitty" ]; then
local FILE=$(kitten choose-file)
[ -n "$FILE" ] && nvim "$FILE"
else
nvim $(fzf --multi)
fi
}
vd() {
if [ "$TERM" = "xterm-kitty" ]; then
local DIR=$(kitten choose-file --mode dir)
[ -n "$DIR" ] && ( cd "$DIR" && exec nvim )
else
local DIR=$(fzf --walker dir,follow,hidden)
[ -n "$DIR" ] && ( cd "$DIR" && exec nvim )
fi
}
vz() {
local DIR=$(zoxide query -l | fzf --query "$Q")
[ -n "$DIR" ] && ( cd "$DIR" && exec nvim )
}

View File

@@ -10,8 +10,8 @@
export LANG=pl_PL.UTF-8
export EDITOR=nvim
export VISUAL=nvim
export EDITOR=vis
export VISUAL=vis
# if running bash
if [ -n "$BASH_VERSION" ]; then
@@ -29,13 +29,6 @@ done
export PATH
if [ -d ~/.local/share/man ]; then
export MANPATH="$HOME/.local/share/man:$MANPATH"
fi
export GOPATH=~/.cache/go
export GOBIN=~/.local/bin
# start X or Hyprland at login
if [ -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY" -a "$(tty)" = /dev/tty1 ]; then
if which /usr/bin/sx > /dev/null; then

View File

@@ -1,5 +1,6 @@
# Install zap:
# % git clone https://github.com/zap-zsh/zap.git --branch=release-v1 ~/.local/share/zap
# % cd ~/.local/share
# % git clone https://github.com/zap-zsh/zap.git --branch=release-v1
export FZF_DEFAULT_OPTS='--color=bg+:#808080'
zstyle ':fzf-tab:*' fzf-flags $FZF_DEFAULT_OPTS

View File

@@ -1,178 +0,0 @@
##############################################
# #
# Superfile Configuration #
# #
##############################################
# This contains the root config file for superfile! More details can be found at
# https://superfile.dev/configure/superfile-config/.
###############################################################################
# Defaults #
###############################################################################
#-- File Editor
# Default: $EDITOR
editor = "nvim"
#-- Directory Editor
#
dir_editor = "nvim ."
#-- Auto check for update
auto_check_update = false
#-- cd on quit
# Should we cd the shell to the last directory open in superfile when the
# program exits?
cd_on_quit = false
#-- File Preview
# Should we open a file preview by default whenever selection-hovering over a
# file?
default_open_file_preview = true
#-- Image Preview
# Should we open an image preview by default whenever selection-hovering over an
# image?
show_image_preview = true
#-- File Info Footer
# Should we display a footer in the file panel that provides more file information?
show_panel_footer_info = true
#-- Default Directory
# The initial path that the file panel should navigate to when superfile is
# opened. This setting understands relative paths such as ".", "..", etc.
default_directory = "."
#-- File Size Units
# true: SI decimal units of 1000 (kB, MB, GB).
# false: IEC binary units of 1024 (KiB, MiB, GiB).
file_size_use_si = false
#-- Default File Sort Type
# (0: Name, 1: Size, 2: Date Modified, 3: Type).
default_sort_type = 0
#-- Sort Order Reversing
# true: Descending.
# false: Ascending.
sort_order_reversed = false
#-- Case-Sensitive Sorting (only for Name Sort)
# An uppercase "B" comes before a lowercase "a" if true.
case_sensitive_sort = false
#-- Exit Shell on Success
# Whether to exit the shell on successful command execution.
shell_close_on_success = false
#-- Page Scroll Size
# Number of lines to scroll for PgUp/PgDown keys (0: full page, default behavior).
page_scroll_size = 0
#-- Debug Mode
debug = false
#-- Ignore Missing Config Fields
# Whether to silence any warnings about missing config fields.
ignore_missing_fields = false
#-- File Panel Extra Columns Count
# Count of extra columns in file panel in addition to file name. When option equal 0 then feature is disabled.
file_panel_extra_columns = 0
#-- File name width in File Panel
# Percentage of file panel width allocated to file names (25-100). Higher values give more space to names, less to extra columns.
file_panel_name_percent = 50
###############################################################################
# Styling #
###############################################################################
#-- Theme
# Put your theme's name here!
theme = "catppuccin-mocha"
#-- Code Previewer
# Whether to use the builtin syntax highlighting with chroma or use bat. Values: "" for builtin chroma, "bat" for bat
code_previewer = ""
#-- Nerd Fonts Support
# Whether to enable support for Nerd Fonts symbols.
# Requires: Font patched with the Nerd Fonts patch.
nerdfont = true
#-- Show checkbox icons in select mode
# Requires: nerdfont = true
show_select_icons = true
#-- Transparent Background Support
# Set to true to enable background transparency.
# Requires: terminal support for colour transparency
transparent_background = false
#-- File Preview Panel Width
# Width of the file preview panel will be 1/n of the total width.
# Values recommended to be in 210.
# Default (0): Use the same width as file picker panel.
file_preview_width = 0
#-- File Preview Border
# Enable border around the file preview panel for better visual separation.
# Default: false (no border)
enable_file_preview_border = false
#-- Sidebar Width
# If you don't want to display the sidebar, you can input 0 directly.
# Values recommended to be in 520.
sidebar_width = 20
#-- Border
# Make sure to add strings that are exactly one character wide!
# Use ' ' for borderless.
border_top = '─'
border_bottom = '─'
border_left = '│'
border_right = '│'
border_top_left = '╭'
border_top_right = '╮'
border_bottom_left = '╰'
border_bottom_right = '╯'
border_middle_left = '├'
border_middle_right = '┤'
###############################################################################
# Plugins #
###############################################################################
# This section is for using plugins with superfile, external addons that extend
# the default capabilities of the program! More info can be found at
# https://superfile.dev/list/plugin-list/.
#-- Detailed Metadata
# Requires: exiftool
metadata = false
#-- MD5 Checksum Generation
# Requires: md5sum
enable_md5_checksum = false
#
#-- Zoxide Support - Smart directory navigation!
# Requires: zoxide
zoxide_support = true
#-- File opening rules
# Map file extensions to commands used to open them.
# The file path will be appended as the last argument.
# MUST BE IN THE VERY END OF THE FILE BECAUSE TOML CANNOT CLOSE TABLES
# Example:
# png = "feh"
# pdf = "zathura"
# conf = "nvim"
[open_with]
pdf = "zathura"
png = "sxiv"
jpg = "sxiv"

View File

@@ -1,98 +0,0 @@
##############################################
# #
# Superfile vim-like Hotkeys #
# #
##############################################
#-- Maintainer: nonepork <https://github.com/nonepork>
# This contains a hotkey config file for superfile, that's themed around vim
# controls! More details can be found at
# https://superfile.dev/configure/custom-hotkeys/.
###############################################################################
# Global hotkeys #
###############################################################################
# Note: These hotkeys should be unique.
#-- Basic Actions
confirm = ['enter', 'l']
quit = ['ctrl+c', ''] # a.k.a. "theprimeagen troller"
cd_quit = ['Q', '']
#-- Navigation
list_up = ['k', '']
list_down = ['j', '']
page_up = ['pgup','']
page_down = ['pgdown','']
#-- File Panel Controls
create_new_file_panel = ['n', '']
close_file_panel = ['q', '']
next_file_panel = ['tab', 'L']
previous_file_panel = ['shift+tab', 'H']
toggle_file_preview_panel = ['f', '']
open_sort_options_menu = ['o', '']
toggle_reverse_sort = ['R', '']
#-- Focus Manipulation
focus_on_process_bar = ['ctrl+p', '']
focus_on_sidebar = ['ctrl+s', '']
focus_on_metadata = ['ctrl+d', '']
#-- File/Dir Creation/Renaming
file_panel_item_create = ['a', '']
file_panel_item_rename = ['r', '']
#-- Main File Operations
copy_items = ['y', '']
cut_items = ['x', '']
paste_items = ['p', '']
delete_items = ['d', '']
permanently_delete_items = ['D', '']
#-- Archive Manipulation
extract_file = ['ctrl+e', '']
compress_file = ['ctrl+a', '']
#-- Editor Actions
open_file_with_editor = ['e', '']
open_current_directory_with_editor = ['E', '']
#-- Other Actions
pinned_directory = ['P', '']
toggle_dot_file = ['.', '']
change_panel_mode = ['m', '']
open_help_menu = ['?', '']
open_spf_prompt = ['>', '']
open_command_line = [':', '']
open_zoxide = ['z', '']
copy_path = ['Y', '']
copy_present_working_directory = ['c', '']
toggle_footer = ['ctrl+f', '']
###############################################################################
# Typing hotkeys #
###############################################################################
# Note: These hotkeys can override all hotkeys.
confirm_typing = ['enter', '']
cancel_typing = ['esc', '']
###############################################################################
# Mode-Specific Hotkeys #
###############################################################################
# Note: These hotkeys can conflict with other modes, but not with global
# hotkeys.
#-- Normal Mode Actions
parent_directory = ['-', 'h']
search_bar = ['/', '']
#-- Selection Mode Actions
file_panel_select_mode_items_select_down = ['J', '']
file_panel_select_mode_items_select_up = ['K', '']
file_panel_select_all_items = ['A', '']

View File

@@ -1,20 +0,0 @@
set nocompatible
set ignorecase
set smartcase
set hlsearch
set relativenumber
syntax enable
filetype plugin on
" open nested file with :find file.name
" include * in path for fuzzy find
set path+=**
set wildmenu
let g:netrw_banner=0
let g:netrw_liststyle=3
nmap <esc> <cmd>nohlsearch<cr>
colorscheme catppuccin

View File

@@ -183,3 +183,26 @@ local function jump(keys)
end
vis:map(vis.modes.NORMAL, '\\', jump)
local function oneJump()
local v = vis.win.viewport.bytes
local data = vis.win.file:content(v)
local data = 'echo abc'
local code, out, err = vis:pipe(vis.win.file, v, 'chars-jump', false)
-- local code, out, err = vis:pipe(vis.win.file, v, 'cat', true)
-- local code, out, err = vis:pipe('chars-jump')
if code ~= 0 then
vis:info(err or ('fzf exit code ' .. code))
else
local p = jumps[out:sub(1, 1)]
if p then
vis.win.selection.pos = p
else
vis:info('not found')
end
end
return ret
end
vis:map(vis.modes.NORMAL, '-', oneJump)

View File

@@ -0,0 +1,5 @@
local lexer = lexer
local lex = lexer.new(...)
return lex

View File

@@ -56,14 +56,7 @@ XTerm.vt100.color14: #8FBCBB
XTerm.vt100.color7: #E5E9F0
XTerm.vt100.color15: #ECEFF4
st.font: HurmitNerdFont:size=16
! 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
st.font: Fira Code Retina:size=10
#ifdef THEME_DARK
st.lightmode: 0
@@ -89,7 +82,7 @@ st.color14: #509595
st.color15: #dbdff0
#else
st.lightmode: 1
st.background: #faf8f5
st.background: #f2f2f3
st.foreground: #1f212e
st.cursorColor: #bf8040
st.reverse-cursor: #1f212e

View File

@@ -1 +1 @@
Net/ThemeName "Arc-Dark"
Net/ThemeName "Sunrise-Compact-Dark"

View File

@@ -6,9 +6,10 @@ fi
xset b off
xrandr --auto
xrandr --output DP-0 --left-of DP-2 --primary
xrandr --output HDMI-0 --left-of DP-0
xrdb -merge ~/.Xresources -DHOME="$HOME"
#xrandr --output DP-0 --left-of DP-2 --primary
#xrandr --output HDMI-0 --left-of DP-0
xrandr --output HDMI-A-0 --mode 3840x2160 --right-of eDP --auto
xrdb -merge ~/.Xresources
setxkbmap pl -option ctrl:nocaps
if [ -x ~/.fehbg ]; then
@@ -28,18 +29,17 @@ xsettingsd &
xsetroot -cursor_name left_ptr
picom -b -I 1 -O 1 -e 1 --no-fading-openclose --backend glx || compton -b --no-fading-openclose
picom -b -I 1 -O 1 -i 1 -e 1 --no-fading-openclose || compton -b --no-fading-openclose
if which dwm > /dev/null; then
lupan-clock &
exec dwm
fi
if which awesome > /dev/null; then
exec awesome
fi
if which dwm > /dev/null; then
dunst &
lupan-clock &
exec dwm
fi
if which dk > /dev/null; then
for m in $(polybar --list-monitors | cut -d: -f1); do
MONITOR=$m polybar --reload bar &

View File

@@ -11,10 +11,10 @@ if [ "$THEME" = "toggle" ]; then
fi
if [ "$THEME" = dark ]; then
GTK_THEME=Arc-Dark
GTK_THEME=Sunrise-Compact-Dark
rm -f ~/.lightmode
elif [ "$THEME" = light ]; then
GTK_THEME=Arc-Light
GTK_THEME=Sunrise-Compact-Light
touch ~/.lightmode
else
echo "error: unknown theme: should be either dark, light or toggle" >&2
@@ -30,7 +30,7 @@ if [ -n "$XRES" ]; then
elif [ "$THEME" = light ]; then
sed -i 's/^#define THEME_DARK/#undef THEME_DARK/' "$XRES"
fi
xrdb -merge "$XRES" -DHOME="$HOME"
xrdb -merge "$XRES"
pkill -USR1 '^st$'
fi
@@ -46,9 +46,9 @@ fi
XSET=$(readlink -e ~/.config/xsettingsd/xsettingsd.conf)
if [ "$THEME" = dark ]; then
kitten themes --reload-in=all 'lupanbones-dark'
kitten themes --reload-in=all Afterglow
elif [ "$THEME" = light ]; then
kitten themes --reload-in=all 'lupanbones-light'
kitten themes --reload-in=all One Half Light
fi
# GTK

15
xsession/bin/st-abduco-tabbed Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
if [ $# -eq 0 ]; then
exec tabbed "$0" -w
fi
if [ "$1" = "-w" ] && [ -n "$2" ]; then
name=$(abduco | tail +2 | awk -F'\t' '{ print $NF }' | dmenu -p session: -l 10)
if [ -n "$name" ]; then
exec st -w "$2" -t "$name" -e abduco -A "$name" "$SHELL"
fi
else
echo error: requires either no arguments or single option -w with and argument >&2
exit 1
fi