refactor: migrate from shell-based sync to mise dotfiles management

- Replace sync-config/sync-script with mise.toml [dotfiles] directives
- Convert installer scripts to mise tasks (shells, desktop, theme, webapps)
- Remove config/nvim-old (deprecated neovim config)
- Add omarchy theme system with multi-app configs (btop, hyprland, kitty, foot, tmux, etc.)
- Move SSH hosts to config.d/* include pattern
- Add Tera templates for dynamic config generation (git-local, dofiles.conf)
- Update pi agent settings (0.80.10, packages list)
- Add mise tasks for pi plugin setup and nvim tooling
This commit is contained in:
2026-07-18 06:11:59 +00:00
parent 8cf32cbb88
commit 156b7261db
102 changed files with 1124 additions and 4465 deletions
+2 -1
View File
@@ -5,13 +5,14 @@ if [[ -z "${DOTFILES_DIR:-}" ]]; then
export DOTFILES_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) export DOTFILES_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
fi fi
script_dir="$script_dir/installer" script_dir="$DOTFILES_DIR/installer"
shopt -s nullglob shopt -s nullglob
ran_any=false ran_any=false
for script in "$script_dir"/*.sh; do for script in "$script_dir"/*.sh; do
if [[ -f "$script" && -x "$script" ]]; then if [[ -f "$script" && -x "$script" ]]; then
echo $script
"$script" "$script"
ran_any=true ran_any=true
fi fi
+16 -2
View File
@@ -1,4 +1,4 @@
#? Config file for btop v.1.4.6 #? Config file for btop v.1.4.7
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
@@ -14,6 +14,11 @@ truecolor = true
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols. #* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
force_tty = false force_tty = false
#* Option to disable presets. Either the default preset, custom presets, or all presets.
#* "Off" All presets are enabled.
#* "Default" preset is disabled.#* "Custom" presets are disabled.#* "All" presets are disabled.
disable_presets = "Off"
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets. #* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box. #* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
#* Use whitespace " " as separator between different presets. #* Use whitespace " " as separator between different presets.
@@ -24,6 +29,9 @@ presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:defaul
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. #* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
vim_keys = false vim_keys = false
#* Disable all mouse events.
disable_mouse = false
#* Rounded corners on boxes, is ignored if TTY mode is ON. #* Rounded corners on boxes, is ignored if TTY mode is ON.
rounded_corners = true rounded_corners = true
@@ -92,6 +100,9 @@ proc_left = true
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). #* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
proc_filter_kernel = false proc_filter_kernel = false
#* Should the process list follow the selected process when detailed view is open.
proc_follow_detailed = true
#* In tree-view, always accumulate child process resources in the parent process. #* In tree-view, always accumulate child process resources in the parent process.
proc_aggregate = false proc_aggregate = false
@@ -208,6 +219,9 @@ io_graph_combined = false
#* Example: "/mnt/media:100 /:20 /boot:1". #* Example: "/mnt/media:100 /:20 /boot:1".
io_graph_speeds = "" io_graph_speeds = ""
#* Swap the positions of the upload and download speed graphs. When true, upload will be on top.
swap_upload_download = false
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False. #* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
net_download = 100 net_download = 100
@@ -250,7 +264,7 @@ rsmi_measure_pcie_speeds = true
#* Horizontally mirror the GPU graph. #* Horizontally mirror the GPU graph.
gpu_mirror_graph = true gpu_mirror_graph = true
#* Set which GPU vendors to show. Available values are "nvidia amd intel" #* Set which GPU vendors to show. Available values are "nvidia amd intel apple"
shown_gpus = "nvidia amd intel" shown_gpus = "nvidia amd intel"
#* Custom gpu0 model name, empty string to disable. #* Custom gpu0 model name, empty string to disable.
+2 -1
View File
@@ -1,9 +1,10 @@
-- require("keybinds.lua") -- require("keybinds.lua")
hl.monitor({ output = "desc:Lenovo Group Limited 0x41A0", mode = "highrr", position = "0x0", scale = "1.0" }) hl.monitor({ output = "desc:Lenovo Group Limited 0x41A0", mode = "highrr", position = "0x0", scale = "1.0" })
hl.monitor({ output = "desc:Samsung Display Corp. 0x4143", mode = "highrr", position = "0x0", scale = "2" })
hl.monitor({ output = "desc:LG Electronics LG HDR 4K 406NTZN74597", mode = "preferred", position = "auto-right", scale = "1.333333" }) hl.monitor({ output = "desc:LG Electronics LG HDR 4K 406NTZN74597", mode = "preferred", position = "auto-right", scale = "1.333333" })
hl.monitor({ output = "desc:Ancor Communications Inc ASUS MG28U 0x00009B77", mode = "preferred", position = "auto-right", scale = "1.333333" }) hl.monitor({ output = "desc:Ancor Communications Inc ASUS MG28U 0x00009B77", mode = "preferred", position = "auto-right", scale = "1.333333" })
hl.monitor({ output = "eDP-1", mode = "preferred", position = "0x0", scale = "1.0" }) -- hl.monitor({ output = "eDP-1", mode = "preferred", position = "0x0", scale = "1.0" })
hl.monitor({ output = "desc:LG Electronics LG HDR WQHD 0x0006530C", mode = "preferred", position = "auto-up", scale = "1.333333" }) hl.monitor({ output = "desc:LG Electronics LG HDR WQHD 0x0006530C", mode = "preferred", position = "auto-up", scale = "1.333333" })
hl.monitor({ output = "CAP Capture 0x00000001", mode = "1920x1080@60", position = "auto-down", scale = 1 }) hl.monitor({ output = "CAP Capture 0x00000001", mode = "1920x1080@60", position = "auto-down", scale = 1 })
+15 -1
View File
@@ -4,7 +4,6 @@ experimental = true
[tools] [tools]
age = "latest" age = "latest"
bun = "latest" bun = "latest"
"cargo:cargo-llvm-cov" = "latest"
codex = "latest" codex = "latest"
copilot-cli = "latest" copilot-cli = "latest"
"github:ZinoKader/portal" = "latest" "github:ZinoKader/portal" = "latest"
@@ -18,3 +17,18 @@ herdr = "latest"
opencode = "latest" opencode = "latest"
pi = "latest" pi = "latest"
worktrunk = "latest" worktrunk = "latest"
[tasks.setup_pi]
run = [
'pi install npm:pi-lens',
'pi install npm:pi-native-search',
'pi install npm:@tintinweb/pi-subagents',
'pi install npm:context-mode',
'pi install npm:@gotgenes/pi-permission-system',
'test -x /usr/bin/pass && /usr/bin/pass show agent/pi/auth.json > ~/.pi/agent/auth.json'
]
[tasks.setup_nvim]
run = [
'uv tool install vectorcode'
]
-8
View File
@@ -1,8 +0,0 @@
" Override cargo compiler defaults
setlocal makeprg=cargo\ build\ --message-format=short
setlocal errorformat=
\%f:%l:%c:\ %t%*[^:]:\ %m,
\%f:%l:%c:\ %m,
\%f:%l:\ %t%*[^:]:\ %m,
\%f:%l:\ %m
-2
View File
@@ -1,2 +0,0 @@
let current_compiler = "cmake"
CompilerSet makeprg=cmake
-2
View File
@@ -1,2 +0,0 @@
let current_compiler = "npm"
CompilerSet makeprg=npm\ run
-30
View File
@@ -1,30 +0,0 @@
vim.api.nvim_buf_set_keymap(
0,
"n",
"<CR>",
"<cmd>lua require('kulala').run()<cr>",
{ noremap = true, silent = true, desc = "Execute the request" }
)
vim.api.nvim_buf_set_keymap(
0,
"n",
"[",
"<cmd>lua require('kulala').jump_prev()<cr>",
{ noremap = true, silent = true, desc = "Jump to the previous request" }
)
vim.api.nvim_buf_set_keymap(
0,
"n",
"]",
"<cmd>lua require('kulala').jump_next()<cr>",
{ noremap = true, silent = true, desc = "Jump to the next request" }
)
vim.api.nvim_buf_set_keymap(
0,
"n",
"<leader>i",
"<cmd>lua require('kulala').inspect()<cr>",
{ noremap = true, silent = true, desc = "Inspect the current request" }
)
-163
View File
@@ -1,163 +0,0 @@
-- Steve Beaulac nvim configuration using kickstart git: 2ba39c6 --
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
vim.g.have_nerd_fonts = true
-- set <space> as my leader key
vim.g.autoformat = true
-- vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
vim.g.editorconfig = true
vim.wo.number = true
vim.opt.background = "dark"
vim.opt.backup = false
vim.opt.clipboard:append("unnamedplus")
vim.opt.modifiable = true
vim.opt.cmdheight = 1
vim.opt.completeopt = { 'menuone', 'noinsert', 'noselect', 'fuzzy', 'popup' }
vim.opt.conceallevel = 0
-- vim.opt.concealcursor = ""
vim.opt.encoding = "UTF-8"
vim.opt.lazyredraw = true
vim.opt.redrawtime = 10000
vim.opt.maxmempattern = 20000
vim.opt.synmaxcol = 300
vim.opt.pumheight = 10
vim.opt.pumblend = 10
vim.opt.winblend = 0
vim.opt.hlsearch = true
vim.opt.breakindent = true
vim.opt.ignorecase = true
vim.opt.backspace = "indent,eol,start"
vim.opt.formatoptions = "jcroqlnt"
vim.opt.grepformat = "%f:%l:%c:%m"
vim.opt.grepprg = "rg --vimgrep"
vim.opt.ignorecase = true
vim.opt.inccommand = "split"
vim.opt.list = true
vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" }
vim.opt.mouse = "a"
vim.opt.pumblend = 10
vim.opt.pumheight = 10
vim.opt.showmode = false
vim.opt.showmatch = true
vim.opt.showtabline = 0
vim.opt.smartcase = true
vim.opt.smartindent = true
vim.opt.splitbelow = true
vim.opt.splitright = true
-- vim.opt.splitkeep = "screen"
vim.opt.swapfile = false
vim.opt.termguicolors = true
vim.opt.undofile = true
vim.opt.undolevels = 10000
vim.opt.updatetime = 250 -- default 250
vim.opt.timeoutlen = 500 -- default 1000
vim.opt.ttimeoutlen = 0
-- vim.opt.timeout = false
vim.opt.autoread = true
vim.opt.autowrite = false
vim.opt.autochdir = false
vim.opt.writebackup = false
vim.opt.expandtab = true
vim.opt.shiftround = true
vim.opt.shiftwidth = 4
vim.opt.softtabstop = 4
vim.opt.tabstop = 4
vim.opt.hidden = true
vim.opt.shortmess:append({ W = true, I = true, c = true, C = true })
vim.opt.spelllang = { "en" }
vim.opt.selection = "inclusive"
vim.opt.cursorline = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.laststatus = 3
vim.opt.showcmd = false
vim.opt.ruler = false
vim.opt.numberwidth = 4
vim.opt.signcolumn = "yes"
vim.opt.wrap = false
vim.opt.scrolloff = 8
vim.opt.sidescrolloff = 8
vim.opt.shell = "/bin/bash"
vim.opt.sessionoptions = { "blank", "buffers", "curdir", "tabpages", "winsize", "winpos", "terminal", "localoptions", "help", "skiprtp", "folds" }
vim.opt.virtualedit = "block"
vim.opt.wildmode = "longest:full,full"
vim.opt.diffopt:append("linematch:60")
vim.opt.winminwidth = 5
-- vim.opt.hidden = false
-- vim.opt.cindent = true
-- vim.opt.autoindent = true
if vim.fn.has("nvim-0.10") == 1 then
vim.opt.smoothscroll = true
end
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
vim.opt.foldlevel = 99
vim.opt.errorbells = false
vim.opt.belloff = "all"
vim.opt.undodir = vim.fn.stdpath('data') .. "/undodir"
vim.opt.incsearch = true
vim.opt.fillchars = { eob = " " }
vim.opt.iskeyword:append("-")
vim.opt.path:append("**")
vim.opt.colorcolumn = "100"
vim.diagnostic.config({
virtual_text = { current_line = true }
})
-- Lazy plugin manager
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', lazyrepo, '--branch=stable', lazypath }
if vim.v.shell_error ~= 0 then
error('Error cloning lazy.nvim:\n' .. out)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
{ import = "plugins" }
},
rocks = {
enabled = false,
hererocks = false,
},
checker = {
enabled = true,
notify = false,
},
change_detection = {
notify = false,
},
})
vim.g.lazyvim_check_order = false
require("config.keymaps")
require("config.scripts")
-- When Nvim is idle or you switch focus/buffers, check if files changed
vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter", "CursorHold", "CursorHoldI" }, {
pattern = "*",
command = "checktime",
})
vim.api.nvim_create_autocmd("User", {
pattern = "VeryLazy",
callback = function()
require("config.autocmds")
end,
})
@@ -1,10 +0,0 @@
{
"gCopyright": {
"prefix": "copy",
"description": "Generic Copyright",
"body": [
"Copyright (c) ${CURRENT_YEAR} ${1:Author} <${2:email}>. All Rights Reserved.",
"$0"
]
}
}
-49
View File
@@ -1,49 +0,0 @@
{
"Starter Template": {
"prefix": "vsTaskHeader",
"body": [
"{",
"\t\"version\": \"2.0.0\",",
"\t\"tasks\": [",
"\t\t$0",
"\t]",
"}"
],
"scope": "json"
},
"Tasks": {
"prefix": "vsTasks",
"body": [
"{",
"\t\"label\": \"$1\",",
"\t\"type\": \"shell\",",
"\t\"command\": \"$2\",",
"\t\"args\": [ $3 ],",
"\t\"group\": {",
"\t\t\"kind\": \"build\",",
"\t\t\"isDefault\": true",
"\t}$0",
"}"
],
"scope": "json"
},
"Presentation": {
"prefix": "presentation",
"body": [
"\"presentation\": {",
"\t\"reveal\": \"always\",",
"\t\"panel\": \"new\",",
"}"
],
"scope": "json"
},
"ProblemMatcher": {
"prefix": "problemMatcher",
"body": [
"\"problemMatcher\": [",
"\t$0",
"]"
],
"scope": "json"
}
}
@@ -1,21 +0,0 @@
{
"name": "sjb_snippets",
"contributes": {
"snippets": [
{
"language": [
"json"
],
"path": "./json.json"
},
{
"language": [
"rust",
"global",
"all"
],
"path": "./copyright.json"
}
]
}
}
-143
View File
@@ -1,143 +0,0 @@
vim.filetype.add({
extension = {
['http'] = 'http',
},
})
-- Check if we need to reload the file when it changed
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, {
desc = 'Check time',
group = vim.api.nvim_create_augroup("sjb-checktime", { clear = true}),
callback = function()
if vim.o.buftype ~= 'nofile' then
vim.cmd('checktime')
end
end,
})
vim.api.nvim_create_autocmd('TextYankPost', {
desc = 'Highlight when yanking (copying) text',
group = vim.api.nvim_create_augroup('sjb-highlight-yank', { clear = true }),
callback = function()
vim.hl.on_yank()
end,
})
-- windows to close
vim.api.nvim_create_autocmd("FileType", {
pattern = {
"OverseerForm",
"OverseerList",
"floggraph",
"fugitive",
"git",
"help",
"lspinfo",
"man",
"neotest-output",
"neotest-summary",
"qf",
"query",
"spectre_panel",
"startuptime",
"toggleterm",
"tsplayground",
"vim",
},
group = vim.api.nvim_create_augroup('sjb-quick-close', { clear = true }),
callback = function(event)
vim.bo[event.buf].buflisted = false
vim.keymap.set("n", "q", "<cmd>close<cr>", { buffer = event.buf, silent = true })
end,
})
-- wrap and check for spell in text filetypes
vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("sjb-wrap-spell", { clear = true }),
pattern = { "gitcommit", "markdown" },
callback = function()
vim.opt_local.wrap = true
vim.opt_local.spell = true
end,
})
-- Auto create dir when saving a file, in case some intermediate directory does not exist
vim.api.nvim_create_autocmd({ "BufWritePre" }, {
group = vim.api.nvim_create_augroup("sjb-auto-create-dir", { clear = true}),
callback = function(event)
if event.match:match("^%w%w+://") then
return
end
local file = vim.loop.fs_realpath(event.match) or event.match
vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p")
end,
})
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "*",
callback = function()
if vim.fn.isdirectory(".jj") == 1 then
vim.fn.jobstart({"jj", "status"}, {
on_exit = function(_, exit_code)
if exit_code ~= 0 then
vim.notify("jj command failed", vim.log.levels.WARN)
end
end,
})
end
end,
})
local gpgGroup = vim.api.nvim_create_augroup("customGpg", { clear = true })
vim.api.nvim_create_autocmd({ "BufReadPre", "FileReadPre" }, {
pattern = "*.gpg",
group = gpgGroup,
callback = function()
-- Make sure nothing is written to shada file while editing an encrypted file.
vim.opt_local.shada = nil
-- We don't want a swap file, as it writes unencrypted data to disk
vim.opt_local.swapfile = false
-- Switch to binary mode to read the encrypted file
vim.opt_local.bin = true
-- Save the current 'ch' value to a buffer-local variable
vim.b.ch_save = vim.opt_local.ch:get()
vim.cmd "set ch=2"
end,
})
vim.api.nvim_create_autocmd({ "BufReadPost", "FileReadPost" }, {
pattern = "*.gpg",
group = gpgGroup,
callback = function()
vim.cmd "'[,']!gpg --decrypt 2> /dev/null"
-- Switch to normal mode for editing
vim.opt_local.bin = false
-- Restore the 'ch' value from the buffer-local variable
vim.opt_local.ch = vim.b.ch_save
vim.cmd "unlet b:ch_save"
vim.cmd(":doautocmd BufReadPost " .. vim.fn.expand "%:r")
end,
})
-- Convert all text to encrypted text before writing
vim.api.nvim_create_autocmd({ "BufWritePre", "FileWritePre" }, {
pattern = "*.gpg",
group = gpgGroup,
callback = function()
-- Switch to binary mode to write the encrypted file
vim.opt_local.bin = true
-- So we can avoid the armor option
vim.cmd("'[,']!gpg --default-recipient-self -e 2>/dev/null")
end,
})
-- Undo the encryption so we are back in the normal text, directly after the file has been written.
vim.api.nvim_create_autocmd({ "BufWritePost", "FileWritePost" }, {
pattern = "*.gpg",
group = gpgGroup,
callback = function()
vim.cmd("u")
-- Switch to normal mode for editing
vim.opt_local.bin = false
end,
})
-78
View File
@@ -1,78 +0,0 @@
-- Keymaps for better default experience
-- See `:help vim.keymap.set()`
--vim.keymap.set({ 'n', 'v' }, '<Space>', '<Nop>', { silent = true })
-- Remap for dealing with word wrap
vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
-- save file
-- vim.keymap.set({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
-- vim.keymap.set({ "i", "x", "n", "s" }, "<C-x><C-s>", "<cmd>:qall<cr>", { desc = "Save file" })
-- better indenting
vim.keymap.set("v", "<", "<gv")
vim.keymap.set("v", ">", ">gv")
-- better jumps
vim.keymap.set("n", "<C-d>", "<C-d>zz")
vim.keymap.set("n", "<C-u>", "<C-u>zz")
vim.keymap.set("n", "<C-f>", "<C-f>zz")
vim.keymap.set("n", "<C-b>", "<C-b>zz")
vim.keymap.set("i", "<C-f>", "<C-x><C-f>", { noremap = true, silent = true })
vim.keymap.set("i", "<C-b>", "<C-x><C-b>", { noremap = true, silent = true })
vim.keymap.set("i", "<C-l>", "<C-x><C-l>", { noremap = true, silent = true })
-- Paste over currently selected text without yanking it
vim.keymap.set("v", "p", '"_dP')
vim.keymap.set("n", "<leader>p", [["_dP]], { desc = "Paste over currently selected text without yanking it" })
vim.keymap.set("n", "<leader>Y", [["+Y]], { noremap = true, silent = true })
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]], { noremap = true, silent = true })
vim.keymap.set({"n", "v"}, "<leader>d", [["_d]], { noremap = true, silent = true })
-- new file
vim.keymap.set("n", "<leader>bn", "<cmd>enew<cr>", { desc = "New File" })
-- vim.keymap.set("n", "<leader>bd", "<cmd>bdelete<cr>", { desc = "Unload Buffer" })
vim.keymap.set("n", "<leader>`", "<cmd>e #<cr>", { desc = "Switch to Other Buffer" })
vim.keymap.set("n", "<leader>bc", "<cmd>tabclose<cr>", { desc = "Close Tab" })
-- Clear search with <esc>
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<cr>', { desc = "clear hlsearch" })
-- vim.keymap.set("n", "<leader><esc>", "<cmd>nohlsearch<cr>", { desc = "clear hlsearch" })
-- Diagnostic keymaps
vim.keymap.set('n', '<leader>cl', vim.diagnostic.setloclist, { desc = 'Send diagnostic to location list' })
vim.keymap.set("n", "<leader>cq", vim.diagnostic.setqflist, { desc = "Send diagnostic to Quickfix" })
-- vim.keymap.set("n", "<leader>gq", "<cmd>copen<cr>", { desc = "Quickfix List" })
-- vim.keymap.set("n", "<leader>gl", "<cmd>lopen<cr>", { desc = "Location List" })
vim.keymap.set('n', '<leader>eb', "<cmd>.w !bash -e<cr>", { desc = "Send line to bash" })
vim.keymap.set('n', '<leader>eB', "<cmd>%w !bash -e<cr>", { desc = "Send buffer to bash" })
vim.keymap.set('n', '<leader>e.', "<cmd>.!bash -e<cr>", { desc = "Execute current line" })
vim.keymap.set('n', '<leader>e%', "<cmd>% !bash -e<cr>", { desc = "Execute current buffer" })
vim.keymap.set('n', '<leader>ex', "<cmd>!chmod +x %<cr>", { desc = "Make file executable" })
vim.keymap.set('n', "<leader>eL", "<cmd>source %<cr>", { desc = "Source current buffer" })
vim.keymap.set('n', "<leader>el", "<cmd>.lua<cr>", { desc = "Source current line" })
vim.keymap.set('v', "<leader>el", "<cmd>lua<cr>", { desc = "Source current line" })
vim.keymap.set('n', '<leader>xu', '<cmd>Lazy sync<cr>', { desc = 'Lazy sync' })
vim.keymap.set("n", "<leader>cx", function()
local file = vim.fn.expand "%"
local line = vim.fn.line "."
vim.fn.setreg("+", string.format("%s:%d", file, line))
vim.notify "Copied line reference to clipboard"
end, { desc = "Copy line reference to clipboard" })
vim.keymap.set("n", "<leader>ktn", require('tasks').create_new_task, { desc = "create new task" } )
vim.keymap.set("n", "<leader>kts", require('tasks').start_task, { desc = "start task" } )
vim.keymap.set("n", "<leader>kte", require('tasks').stop_task, { desc = "stop task" } )
-33
View File
@@ -1,33 +0,0 @@
function R(name)
require("plenary.reload").reload_module(name)
end
function websearch(url, o)
-- Get visual selection or prompt for search
local search_term
-- Check if there's a visual selection
if vim.fn.mode() == 'v' or vim.fn.mode() == 'V' then
-- Get the visual selection
local start_pos = vim.fn.getpos("'<")
local end_pos = vim.fn.getpos("'>")
local lines = vim.fn.getline(start_pos[2], end_pos[2])
local selected_text = table.concat(lines, " ")
search_term = selected_text
else
search_term = (o and o.args) or vim.fn.input("Search: ")
end
-- Encode the search term for URLs
local escaped = vim.uri_encode(search_term)
-- Construct and execute the search URL
local search_url = (url):format(escaped)
vim.ui.open(search_url)
end
-- Command to call the search function
vim.api.nvim_create_user_command('DuckDuckGo', function(o) websearch('https://duckduckgo.com/?q=%s', o) end, { nargs = 1 })
vim.api.nvim_create_user_command('Docsrs', function(o) websearch('https://docs.rs/%s', o) end, { nargs = 1})
vim.api.nvim_create_user_command('RustStd', function(o) websearch('https://doc.rust-lang.org/std/?search=%s', o) end, { nargs = 1})
vim.keymap.set({ 'n', 'v'}, '<leader>sW', function() websearch('https://duckduckgo.com/?q=%s', null) end, { desc = "Search on DuckDuckGo" })
@@ -1,17 +0,0 @@
return {
name = "CMake Build",
builder = function()
return {
cmd = { "cmake" },
args = { "--build", "build", "--target", "all" },
components = {
{ "on_output_quickfix", set_diagnostics = true },
"on_result_diagnostics",
"default",
},
}
end,
condition = {
filetype = { "cpp", "c" },
},
}
@@ -1,17 +0,0 @@
return {
name = "CMake Create",
builder = function()
return {
cmd = { "cmake" },
args = { "-B", "build", "-S", "." },
components = {
{ "on_output_quickfix", set_diagnostics = true },
"on_result_diagnostics",
"default",
},
}
end,
condition = {
filetype = { "cpp", "c" },
},
}
@@ -1 +0,0 @@
return { "user.cmake_create", "user.cmake_build" }
@@ -1,34 +0,0 @@
local M = {}
M.problem_patterns = {
["$rustc"] = {
{
regexp = "^(error|warning)(\\[E\\d+\\])*:(.*)$",
message = 3
},
{
regexp = "^\\s+-+>\\s*([^:]*):(\\d+):(\\d+)$",
kind = "location",
file = 1,
line = 2,
column = 3
},
{
regexp = "^(\\s|\\d)+(\\||=).*$"
},
{
regexp = "^$"
}
}
}
M.problem_matchers = {
["$rustc"] = {
fileLocation = { "relative", "${cwd}" },
pattern = "$rustc",
}
}
return M
-864
View File
@@ -1,864 +0,0 @@
return {
{
"Davidyz/VectorCode",
version = "*",
build = "uv tool upgrade vectorcode", -- This helps keeping the CLI up-to-date
-- build = "pipx upgrade vectorcode", -- If you used pipx to install the CLI
dependencies = { "nvim-lua/plenary.nvim" },
},
{
"olimorris/codecompanion.nvim",
version = "^18.0.0",
opts = {},
dependencies = {
"nvim-lua/plenary.nvim",
"franco-ruggeri/codecompanion-spinner.nvim",
"ravitemer/codecompanion-history.nvim",
"cairijun/codecompanion-agentskills.nvim",
"ttgrules/cc-adapter-copilot-cli-acp",
},
event = "VeryLazy",
keys = {
{ "<leader>rct", "<cmd>CodeCompanionChat Toggle<cr>", mode = {'n', 'v'}, { noremap = true, silent = true }, desc = "CC Toggle" },
{ "<leader>rca", "<cmd>CodeCompanionActions<cr>", mode = { 'n', 'v' }, { noremap = true, silent = true }, desc = "CC Action" },
{ "<leader>rce", "<cmd>CodeCompanion Explain<cr>", mode = { 'n' }, desc = "CC Explain" },
{ "<leader>rcf", "<cmd>CodeCompanion Fix code<cr>", mode = { 'n' }, desc = "CC fix" },
{ "<leader>rcc", "<cmd>CodeCompanionChat Add<cr>", mode = { 'v' }, { noremap = true, silent = true }, desc = "CC Add" },
{ '<leader>rcr', '<cmd>CodeCompanion Code Review<cr>', mode = { 'v' }, desc = 'Code Review' },
{ '<leader>rco', '<cmd>CodeCompanion Optimize Performance<cr>', mode = { 'v' }, desc = 'Optimize Code' },
{ '<leader>rce', '<cmd>CodeCompanion Explain Code<cr>', mode = { 'v' }, desc = 'Explain Code' },
{ '<leader>rcg', '<cmd>CodeCompanion Generate Tests<cr>', mode = { 'v' }, desc = 'Generate Tests' },
{ '<leader>rcd', '<cmd>CodeCompanion Debug Analysis<cr>', mode = { 'v' }, desc = 'Debug Analysis' },
},
config = function()
local function get_abacus_key()
local handle = io.popen("pass show abacus.ai-api")
if not handle then return "" end
local result = handle:read("*a")
handle:close()
-- Remove trailing newline that 'pass' often adds
return result:gsub("%s+", "")
end
local codecompanion = require("codecompanion")
codecompanion.setup({
adapters = {
http = {
opts = {
show_presets = true,
show_model_choices = true,
},
-- openai = function()
-- return require("codecompanion.adapters").extend("openai", {
-- env = { api_key = "cmd:pass show api.openai.com" }
-- })
-- end,
openrouter = function()
return require("codecompanion.adapters").extend("openai_compatible", {
env = {
url = "https://openrouter.ai/api",
api_key = "OPENROUTER_API_KEY",
chat_url = "/v1/chat/completions",
},
schema = {
model = {
default = "anthropic/claude-3.7-sonnet",
},
},
})
end,
abacus = function()
return require("codecompanion.adapters").extend("openai_compatible", {
name = "abacus",
formatted_name = "Abacus.AI",
env = {
url = "https://routellm.abacus.ai/v1",
-- IMPORTANT: include /v1 in the base url
api_key = get_abacus_key(),
chat_url = "/chat/completions"
},
headers = {
["Content-Type"] = "application/json",
["Authorization"] = "Bearer ${api_key}",
},
schema = {
model = {
order = 1,
mapping = "parameters",
type = "enum",
desc = "The model to use for chat completions.",
default = "route-llm",
choices = {
-- Routing Model
["route-llm"] = { opts = { desc = "Intelligent routing to best model" } },
-- OpenAI Models
["gpt-5.2"] = { opts = { has_vision = true } },
["gpt-5.1"] = { opts = { has_vision = true } },
["gpt-5.1-chat-latest"] = { opts = { has_vision = true } },
["gpt-5"] = { opts = { has_vision = true } },
["gpt-5-mini"] = { opts = { has_vision = true } },
["gpt-5-nano"] = { opts = { has_vision = true } },
["gpt-4o"] = { opts = { has_vision = true } },
["gpt-4o-mini"] = { opts = { has_vision = true } },
["o4-mini"] = { opts = { can_reason = true } },
["o3"] = { opts = { can_reason = true } },
["o3-pro"] = { opts = { can_reason = true } },
-- Anthropic Models
["claude-4-5-sonnet"] = { opts = { has_vision = true } },
["claude-4-5-haiku"] = { opts = { has_vision = true } },
["claude-4-5-opus"] = { opts = { has_vision = true } },
["claude-3-opus"] = { opts = { has_vision = true } },
-- Google Models
["gemini-3-pro"] = { opts = { has_vision = true } },
["gemini-3-flash"] = { opts = { has_vision = true } },
["gemini-2.5-pro"] = { opts = { has_vision = true } },
["gemini-2.5-flash"] = { opts = { has_vision = true } },
-- xAI Models
["grok-4-1-fast"] = {},
["grok-4"] = {},
["grok-code-fast-1"] = {},
-- Meta Models
["llama-4-Maverick-17B"] = {},
["llama-3.1-405B"] = {},
["llama-3.1-70B"] = {},
-- DeepSeek Models
["deepseek-v3.2"] = {},
["deepseek-v3.1-Terminus"] = {},
["deepseek-R1"] = { opts = { can_reason = true } },
-- Qwen Models
["qwen-3-Max"] = {},
["qwen3-coder-480b-a35b-instruct"] = {},
["qwen-3-32B"] = {},
["qwq-32B"] = { opts = { can_reason = true } },
},
},
temperature = {
order = 2,
mapping = "parameters",
type = "number",
optional = true,
default = 1.0,
desc = "Controls randomness of output (0-2).",
validate = function(n)
return n >= 0 and n <= 2, "Must be between 0 and 2"
end,
},
max_tokens = {
order = 3,
mapping = "parameters",
type = "integer",
optional = true,
default = nil,
desc = "Maximum tokens to generate.",
validate = function(n)
return n > 0, "Must be greater than 0"
end,
},
top_p = {
order = 4,
mapping = "parameters",
type = "number",
optional = true,
default = 1.0,
desc = "Nucleus sampling parameter (0-1).",
validate = function(n)
return n >= 0 and n <= 1, "Must be between 0 and 1"
end,
},
},
})
end,
ollama = function()
return require("codecompanion.adapters").extend("ollama", {
env = {
url = "http://129.100.33.66:11434",
},
schema = {
model = {
default = "qwen3.5", -- change to whatever you pulled
},
},
})
end,
copilot = function()
return require("codecompanion.adapters").extend("copilot", {
schema = {
model = {
default = "gpt-5-mini", -- Consistent model choice
},
max_tokens = {
default = 16284,
}
}
})
end,
},
acp = {
opts = {
show_presets = true,
},
copilot_cli = function()
return require("codecompanion.adapters").extend("copilot_cli", {})
end,
codex = function()
return require("codecompanion.adapters").extend("codex", {
commands = {
default = { "codex-acp" },
},
schema = {
model = {
default = "github-copilot/gpt-5.2-codex",
},
},
defaults = {
timeout = 20000,
auth_method = "chatgpt", -- "openai-api-key"|"codex-api-key"|"chatgpt"
},
})
end,
opencode = function()
return require("codecompanion.adapters").extend("codex", {
commands = {
default = { "opencode", "acp" },
},
schema = {
model = {
default = "github-copilot/gpt-5.2-codex",
},
},
defaults = {
timeout = 20000,
auth_method = "chatgpt", -- "openai-api-key"|"codex-api-key"|"chatgpt"
},
})
end,
},
},
rules = {
opts = {
chat = {
enabled = true,
autoload = { "default" }
},
},
},
opts = {
send_code = true,
log_level = "WARN", -- Change to DEBUG for troubleshooting
language = "English",
-- NEW: Performance improvements
job_start_delay = 500, -- Reduced from default 1500ms
submit_delay = 1000, -- Reduced from default 2000ms
},
extensions = {
spinner = {},
-- ddgr_search = {
-- opts = {
-- require_approval_before = false,
-- },
-- },
agentskills = {
opts = {
{ "~/Documents/ai-skills", recursive = true },
},
},
-- vectorcode = { lazy = true },
history = {
lazy = true,
enabled = true,
opts = {
keymap = "ghf",
save_chat_keymap = "ghs",
picker = "snacks",
dir_to_save = vim.env.HOME .. "/Documents/ai-history",
title_generation_opts = {
adapter = "copilot",
model = "gpt-5-mini",
},
summary = {
create_summary_keymap = "ghc",
browse_summaries_keymap = "ghb",
},
},
},
-- mcphub = {
-- callback = "mcphub.extensions.codecompanion",
-- opts = {
-- make_vars = true,
-- make_slash_commands = true,
-- show_result_in_chat = true,
-- },
-- },
},
interactions = {
chat = {
variables = {
project = {
callback = function()
-- Get project files structure
local files = vim.fn.systemlist("fd . -type f")
return table.concat(files, "\n")
end,
description = "Share project structure"
}
},
tools = {
opts = {
auto_submit_errors = true, -- Send any errors to the LLM automatically?
auto_submit_success = true, -- Send any successful output to the LLM automatically?
system_prompt = {
enabled = true,
replace_main_system_prompt = false,
},
default_tools = {
"file_search",
"read_file",
"cmd_runner",
-- "ddgr_search",
},
},
["fetch_enhanced"] = {
callback = function(url, options)
options = options or {}
local max_length = options.max_length or 200000 -- 200KB default
local timeout = options.timeout or 60
-- Use curl for better control
local cmd = string.format(
'curl -L -s --max-time %d --user-agent "CodeCompanion-Neovim" "%s"',
timeout,
url
)
local handle = io.popen(cmd)
if not handle then
return nil, "Failed to execute curl"
end
local result = handle:read("*a")
local success = handle:close()
if not success then
return nil, "Curl command failed"
end
-- Truncate if too long
if #result > max_length then
result = result:sub(1, max_length) .. "\n[... truncated at " .. max_length .. " characters ...]"
end
return result
end,
opts = {
requires_approval = false,
}
},
["fetch_unlimited"] = {
description = "Fetch a data from the web",
callback = function(url, options)
options = options or {}
-- Use a local proxy service or direct system calls
local temp_file = vim.fn.tempname()
local cmd = string.format(
'wget --timeout=60 --tries=3 --output-document="%s" "%s" 2>/dev/null && cat "%s" && rm "%s"',
temp_file, url, temp_file, temp_file
)
local handle = io.popen(cmd)
if not handle then
return nil, "Failed to fetch URL"
end
local result = handle:read("*a")
handle:close()
-- Optional: Process and clean the content
-- Remove excessive whitespace, clean HTML if needed
-- result = result:gsub("%s+", " "):gsub("^\s+", ""):gsub("%s+$", "")
return result
end,
opts = {
requires_approval = false,
description = "Fetch web content with unlimited size"
}
},
["fetch"] = {
description = "Fetch a webpage in a markdown format",
callback = function(url, options)
local cmd = string.format(
'reader -o -i none %s 2>/dev/null',
url
)
local handle = io.popen(cmd)
if not handle then
return nil, "Failed to fetch URL"
end
local result = handle:read("*a")
handle:close()
return result
end,
},
-- ["mcp"] = { -- Name this tool whatever you like
-- -- Callback provides the necessary functions to CodeCompanion
-- callback = function()
-- return require("mcphub.extensions.codecompanion")
-- end,
-- opts = {
-- -- If true, CodeCompanion will ask for approval before executing the MCP tool call
-- requires_approval = true,
-- -- Optional: Pass parameters like temperature to the underlying LLM if the chat strategy supports it
-- temperature = 0.7
-- }
-- },
groups = {
['plan'] = {
description = "Planning my project and codes with enhanced web access",
prompt = "Using all the ${tools} at your disposal including enhanced web fetching. Analyze the codes and use it to help me with my query. You have access to unlimited web content fetching.",
tools = {
"fetch", -- Backup unlimited fetch
"file_search",
"grep_search",
"list_code_usages",
"next_edit_suggestion",
"read_file",
"cmd_runner",
},
opts = {
collapse_tools = true,
-- Override default fetch behavior for this group
tool_config = {
fetch_enhanced = {
max_length = 500000, -- 500KB for planning tasks
chunk_processing = true,
},
},
},
},
['research'] = {
description = "Deep research with unlimited web access",
prompt = "You are a research assistant with unlimited web access. Using the ${tools} fetch and analyze large documents, research papers, and comprehensive web content.",
tools = {
"fetch",
"fetch_enhanced",
"file_search",
"read_file",
},
opts = {
collapse_tools = false,
},
},
-- NEW: Add development group for coding tasks
['dev'] = {
description = "Full-stack development with all necessary tools",
prompt = "You are an expert full-stack developer. Use ${tools} to understand, modify, and test code. Always gather context before making changes.",
tools = {
"file_search",
"grep_search",
"fetch",
"list_code_usages",
"read_file",
"insert_edit_into_file",
"cmd_runner",
"next_edit_suggestion",
},
opts = {
collapse_tools = true,
},
},
},
},
slash_commands = {
["buffer"] = { opts = { provider = "snacks" } }, -- snacks
["file"] = { opts = { provider = "snacks" } }, -- snackes
['git_files'] = {
description = 'List git files',
---@param chat CodeCompanion.Chat
callback = function(chat)
local handle = io.popen 'git ls-files'
if handle ~= nil then
local result = handle:read '*a'
handle:close()
chat:add_reference({ content = result }, 'git', '<git_files>')
return vim.notify('Git files added to the chat.')
else
return vim.notify('No git files available', vim.log.levels.INFO, { title = 'CodeCompanion' })
end
end,
opts = {
contains_code = false,
},
},
-- NEW: Add helpful workspace command
["workspace"] = {
description = "Add workspace context",
callback = function(chat)
local cwd = vim.fn.getcwd()
local workspace_info = string.format("Working directory: %s", cwd)
-- Get project type
local files = vim.fn.glob(cwd .. "/*", false, true)
for _, file in ipairs(files) do
local basename = vim.fn.fnamemodify(file, ":t")
if basename == "package.json" then
workspace_info = workspace_info .. "\nProject type: Node.js/JavaScript"
break
elseif basename == "Cargo.toml" then
workspace_info = workspace_info .. "\nProject type: Rust"
break
elseif basename == "go.mod" then
workspace_info = workspace_info .. "\nProject type: Go"
break
end
end
chat:add_reference({ content = workspace_info }, 'workspace', '<workspace>')
return vim.notify('Workspace context added.')
end,
opts = {
contains_code = false,
},
},
},
-- adapter = { name = "abacus", model = "route-llm" },
-- adapter = { name = "opencode", model = "github-copilot/gpt-5.2-codex" },
adapter = { name = "copilot", model = "gpt-5-mini" },
},
inline = {
-- adapter = { name = "abacus", model = "route-llm" },
adapter = { name = "copilot", model = "gpt-5.1-codex-mini" },
},
cmd = {
adapter = { name = "copilot", model = "gpt-5-mini" },
},
background = {
adapter = { name = "copilot", model = "gpt-5-mini" },
},
},
prompt_library = {
markdown = {
dirs = {
vim.fn.getcwd() .. "/.prompts",
"~/.agents/prompts",
},
},
["Code Review"] = {
interaction = "chat",
description = "Review the selected code for improvements",
opts = {
mapping = "<LocalLeader>rpc",
modes = { "v" },
adapter = {
name = "copilot",
model = "chatgpt-5.1-codex",
},
},
prompts = {
{
role = "system",
content = "You are an expert code reviewer. Analyze the code for: 1) Logic errors 2) Performance issues 3) Security vulnerabilities 4) Best practices 5) Code clarity and maintainability. Provide specific, actionable feedback.",
},
{
role = "user",
content = function(context)
local code = require("codecompanion.helpers.actions").get_code(context.start_line, context.end_line)
return "Please review this code:\n\n```" .. context.filetype .. "\n" .. code .. "\n```"
end,
},
},
cc_keywords = { "review", "critique", "smell", "security", "vulnerability", "best practice", "maintainab" },
cc_threshold = 2,
},
["Optimize Performance"] = {
interaction = "chat",
description = "Get performance optimization suggestions",
opts = {
mapping = "<LocalLeader>rpo",
modes = { "v" },
adapter = {
name = "copilot",
model = "chatgpt-5.2-codex",
},
},
prompts = {
{
role = "system",
content = "You are a performance optimization expert. Focus on: 1) Time complexity improvements 2) Space efficiency 3) Algorithm optimization 4) Framework-specific optimizations 5) Caching strategies.",
},
{
role = "user",
content = function(context)
local code = require("codecompanion.helpers.actions").get_code(context.start_line, context.end_line)
return "How can I optimize the performance of this code?\n\n```" .. context.filetype .. "\n" .. code .. "\n```"
end,
},
},
cc_keywords = { "optimize", "performance", "slow", "latency", "throughput", "memory", "alloc" },
},
["Debug Analysis"] = {
interaction = "chat",
description = "Analyze and debug problematic code",
opts = {
mapping = "<LocalLeader>rpd",
modes = { "v" },
adapter = {
name = "copilot",
model = "chatgpt-5.2-codex",
},
},
prompts = {
{
role = "system",
content = [[You are a debugging expert. Analyze code for:
1. Potential bugs and issues
2. Logic errors
3. Runtime errors
4. Common pitfalls
5. Debugging strategies.
6. Provide specific solutions.]],
},
{
role = "user",
content = function(context)
local code = require("codecompanion.helpers.actions").get_code(context.start_line, context.end_line)
return fmt(
[[Help me debug this code from buffer %d and identify potential issues:
```%s
%s
```]],
context.bufnr,
context.filetype,
code
)
end,
opts = {
contains_code = true,
}
},
},
cc_keyword = { "bug", "debug", "error", "exception", "crash", "stacktrace", "broken", "issue" },
},
["Architecture Review"] = {
interaction = "chat",
description = "Review architectural patterns and design",
opts = {
mapping = "<LocalLeader>rpa",
modes = { "v" },
adapter = {
name = "copilot",
model = "chatgpt-5.2-codex",
},
},
prompts = {
{
role = "system",
content = "You are a software architect. Review code for: 1) Design patterns usage 2) SOLID principles 3) Separation of concerns 4) Scalability considerations 5) Maintainability. Suggest architectural improvements.",
},
{
role = "user",
content = function(context)
local code = require("codecompanion.helpers.actions").get_code(context.start_line, context.end_line)
return fmt(
[[Please review the architecture and design of this code from buffer %d:
```%s
%s
```]],
context.bufnr,
context.filetype,
code
)
end,
opts = {
contains_code = true,
}
},
},
cc_keywords = { "architecture", "design", "pattern", "solid", "scalab", "maintainab", "refactor" },
},
},
display = {
action_palette = {
provider = "snacks",
opts = {
show_default_actions = true,
show_default_prompt_library = true,
}
},
chat = {
show_settings = false,
render_headers = false,
icons = {
chat_context = "📎️",
},
fold_context = true,
-- NEW: Better chat window configuration
window = {
layout = "vertical",
width = 0.45,
height = 0.8,
border = "rounded", -- Better visual
},
auto_scroll = false,
start_in_insert_mode = false, -- More convenient
}
}
})
end
},
{
"carlos-algms/agentic.nvim",
opts = {
-- Available by default: "claude-agent-acp" | "gemini-acp" | "codex-acp" | "opencode-acp" | "cursor-acp" | "auggie-acp" | "mistral-vibe-acp"
provider = "opencode-acp", -- setting the name here is all you need to get started
keymaps = {
-- Keybindings for ALL buffers in the widget (chat, prompt, code, files)
widget = {
close = "q", -- String for a single keybinding
change_mode = {
{
"<S-Tab>",
mode = { "i", "n", "v" }, -- Specify modes for this keybinding
},
},
switch_provider = "<localLeader>ras", -- Switch ACP provider
switch_model = "<localLeader>ram", -- Switch model
},
-- Keybindings for the prompt buffer only
prompt = {
submit = {
"<CR>", -- Normal mode, just Enter
{
"<C-s>",
mode = { "n", "v", "i" },
},
},
paste_image = {
{
"<localLeader>p",
mode = { "n" },
},
{
"<C-v>", -- Same as Claude-code in insert mode
mode = { "i" },
}
},
},
-- Keybindings for diff preview navigation
diff_preview = {
next_hunk = "]c",
prev_hunk = "[c",
},
},
},
-- these are just suggested keymaps; customize as desired
keys = {
{
"<leader>rat",
function() require("agentic").toggle() end,
mode = { "n", "v", "i" },
desc = "Toggle Agentic Chat"
},
{
"<C-'>",
function() require("agentic").add_selection_or_file_to_context() end,
mode = { "n", "v" },
desc = "Add file or selection to Agentic to Context"
},
{
"<leader>ran",
function() require("agentic").new_session() end,
mode = { "n", "v", "i" },
desc = "New Agentic Session"
},
{
"<A-i>r", -- ai Restore
function()
require("agentic").restore_session()
end,
desc = "Agentic Restore session",
silent = true,
mode = { "n", "v", "i" },
},
{
"<leader>rad", -- ai Diagnostics
function()
require("agentic").add_current_line_diagnostics()
end,
desc = "Add current line diagnostic to Agentic",
mode = { "n" },
},
{
"<leader>raD", -- ai all Diagnostics
function()
require("agentic").add_buffer_diagnostics()
end,
desc = "Add all buffer diagnostics to Agentic",
mode = { "n" },
},
},
},
{
"zbirenbaum/copilot.lua",
dependencies = {
"copilotlsp-nvim/copilot-lsp",
config = function()
vim.g.copilot_nes_debounce = 500
end,
},
cmd = "Copilot",
event = "InsertEnter",
config = function()
require('copilot').setup({
nes = {
enabled = false,
keymap = {
accept_and_goto = "<a-y>",
accept = false,
dismiss = "<Esc>",
},
},
panel = {
enabled = false,
},
})
end,
},
{
"PhantomYdn/fabric-ai.nvim",
cmd = { "Fabric" },
opts = {
-- Default configuration (all optional)
fabric_path = "fabric-ai", -- Path to Fabric CLI
patterns_path = nil, -- Custom patterns dir (auto-detect if nil)
timeout = 300000, -- Command timeout in ms (5 minutes)
window = {
width = 0.8, -- 80% of editor width
height = 0.8, -- 80% of editor height
border = "rounded",
},
},
keys = {
-- fabric-ai.nvim doesn't have default keymappings
{ "<leader>fa", ":'<,'>Fabric<CR>", mode = "v", desc = "Fabric AI" },
{ "<leader>fa", ":Fabric<CR>", mode = "n", desc = "Fabric AI" },
{ "<leader>fu", ":Fabric url<CR>", mode = "n", desc = "Fabric URL" },
},
},
}
-283
View File
@@ -1,283 +0,0 @@
return {
{
"mfussenegger/nvim-ansible",
lazy = true,
keys = function()
vim.keymap.set('v', '<leader>te', function() require('ansible').run() end, { buffer = true, silent = true })
vim.keymap.set('n', '<leader>te', ":w<CR> :lua require('ansible').run()<CR>", { buffer = true, silent = true })
end,
},
{
"hat0uma/csvview.nvim",
opts = {
parser = { comments = { "#", "//" } },
keymaps = {
textobject_field_inner = { "if", mode = { "o", "x" } },
textobject_field_outer = { "af", mode = { "o", "x" } },
jump_next_field_end = { "<Tab>", mode = { "n", "v" } },
jump_prev_field_end = { "<S-Tab>", mode = { "n", "v" } },
jump_next_row = { "<Enter>", mode = { "n", "v" } },
jump_prev_row = { "<S-Enter>", mode = { "n", "v" } },
},
},
cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" },
},
{
"obsidian-nvim/obsidian.nvim",
lazy = false,
ft = "markdown",
keys = {
{ "<leader>kx", "<cmd>Obsidian extract_note<cr>", desc = "Extract Note", mode = "v" },
{ "<leader>knn", "<cmd>Obsidian new<cr>", desc = "New Obsidian note", mode = "n" },
{ "<leader>knt", "<cmd>Obsidian new_from_template<cr>", desc = "New from template", mode = "n" },
{ "<leader>ksq", "<cmd>Obsidian quick_switch<cr>", desc = "Quick Switch", mode = "n" },
{ "<leader>kss", "<cmd>Obsidian search<cr>", desc = "Search Obsidian notes", mode = "n" },
{ "<leader>kdt", "<cmd>Obsidian today<cr>", desc = "Daily Today", mode = "n" },
{ "<leader>kdy", "<cmd>Obsidian yesterday<cr>", desc = "Daily Yesterday", mode = "n" },
{ "<leader>kdw", "<cmd>Obsidian tomorrow<cr>", desc = "Daily Tomorrow", mode = "n" },
{ "<leader>kdd", "<cmd>Obsidian dailies<cr>", desc = "Dailies", mode = "n" },
{ "<leader>kw", "<cmd>Obsidian workspace<cr>", desc = "Change Workspace", mode = "n" },
},
config = function()
require("obsidian").setup({
legacy_commands = false,
picker = {
name = "snacks.pick",
},
ui = {
enable = true,
},
workspaces = {
{
name = "NCA notes",
path = vim.fn.expand "~" .. "/Documents/nca-notes/",
},
},
notes_subdir = "Inbox",
daily_notes = {
folder = "Dailies",
date_format = "%Y-%m-%d-%a",
alias_fomat = "%B %-d, %Y",
default_tags = { "daily-notes" },
},
new_notes_location = "notes_subdir",
templates = {
subdir = "Templates",
date_format = "%Y-%m-%d-%a",
time_format = "%H:%M",
tags = "",
},
completion = {
nvim_cmp = false,
blink = true,
min_chars = 2,
},
link = {
style = "wiki",
},
note_id_func = function(title)
local suffix = ""
if title ~= nil then
suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
else
for _ = 1, 4 do
suffix = suffix .. string.char(math.random(65, 90))
suffix = tostring(os.time()) .. "-" .. suffix
end
end
return suffix
end,
callbacks = {
enter_note = function(note)
vim.keymap.set('n', '<leader>k.', '<CMD>Obsidian toggle_checkbox<CR>', { desc = 'toggle checkbox', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>kp', '<CMD>Obsidian paste_img<CR>', { desc = 'paste img', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>kt', '<CMD>Obsidian tags<CR>', { desc = 'tags', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>k`', '<CMD>Obsidian backlinks<CR>', { desc = 'backlinks', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>kx', '<CMD>Obsidian follow_link<CR>', { desc = 'follow link', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>ksl', '<CMD>Obsidian links<CR>', { desc = 'links', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>kr', '<CMD>Obsidian rename<CR>', { desc = 'rename', buffer = note.bufnr, silent = true })
vim.keymap.set('n', '<leader>ksc', '<CMD>Obsidian toc<CR>', { desc = 'toc', buffer = note.bufnr, silent = true })
vim.keymap.set('v', '<leader>kx', '<CMD>Obsidian link<CR>', { desc = 'links', buffer = note.bufnr, silent = true })
vim.keymap.set('v', '<leader>kl', '<CMD>Obsidian link_new<CR>', { desc = 'links', buffer = note.bufnr, silent = true })
end,
},
})
end,
},
{
"salkin-mada/openscad.nvim",
lazy = true,
config = function()
vim.g.openscad_load_snippets = true
require("openscad").setup({})
end,
dependencies = { "L3MON4D3/LuaSnip", "junegunn/fzf.vim" },
},
{
-- 'nvim-orgmode/orgmode',
'SjB/orgmode',
branch = 'sjb-wip',
event = 'VeryLazy',
ft = { 'org' },
config = function()
-- Setup orgmode
local org = require('orgmode')
-- org.setup_ts_grammar()
org.setup({
ui = {
input = {
use_vim_ui = true
}
},
org_agenda_files = {'~/Documents/notes/*project*org', '~/Documents/notes/Inbox*org', '~/Documents/journals/*.org'},
org_default_notes_file = "~/Documents/notes/Inbox.org",
org_todo_keywords = { 'TODO(t)', 'NEXT(n)', '|', 'DONE(d)', 'DELEGATED(a)' },
mappings = {
capture = {
org_capture_refile = 'R',
}
},
hyperlinks = {
sources = {
-- require("denote.extensions.orgmode"):new({
-- files = _G.denote.config.directory,
-- }),
},
},
org_capture_templates = {
t = {
description = "Todo item",
template = "* TODO %?\n SCHEDULED: %t\n DEADLINE: %T\n", -- Template content
headline = "Tasks",
},
j = {
description = "Journal entry",
target = "~/Documents/notes/journals/%<%Y-%m-%d>.org",
template = "* %<%Y-%m-%d %H:%M> %?\n",
},
},
})
end,
},
{
"akinsho/org-bullets.nvim",
config = function()
require("org-bullets").setup {
concealcursor = false, -- If false then when the cursor is on a line underlying characters are visible
symbols = {
-- list symbol
list = "•",
-- headlines can be a list
headlines = { "◉", "○", "✸", "✿" },
-- or a function that receives the defaults and returns a list
headlines = function(default_list)
table.insert(default_list, "♥")
return default_list
end,
-- or false to disable the symbol. Works for all symbols
headlines = false,
-- or a table of tables that provide a name
-- and (optional) highlight group for each headline level
headlines = {
{ "◉", "MyBulletL1" },
{ "○", "MyBulletL2" },
{ "✸", "MyBulletL3" },
{ "✿", "MyBulletL4" },
},
checkboxes = {
half = { "", "@org.checkbox.halfchecked" },
done = { "✓", "@org.keyword.done" },
todo = { "˟", "@org.keyword.todo" },
},
}
}
end
},
{
"chipsenkbeil/org-roam.nvim",
lazy = true,
ft = { 'org' },
opts = {
bindings = {
prefix = "<LocalLeader>oO",
},
directory = "~/Documents/notes",
extensions = {
dailies = {
directory = "journals"
},
},
},
},
{
"iamcco/markdown-preview.nvim",
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
ft = { "markdown" },
init = function()
vim.g.mkdp_filetypes = { "markdown" }
end,
keys = function()
vim.keymap.set("n", "<leader>xmp", "<cmd>MarkdownPreview<CR>", { desc ="Markdown Preview" })
vim.keymap.set("n", "<leader>xms", "<cmd>MarkdownPreviewStop<CR>", { desc ="Markdown Preview Stop" })
end,
build = function() vim.fn["mkdp#util#install"]() end,
--build = "cd app && npm install",
},
{
"lervag/vimtex",
ft = "tex", -- Load only for .tex files
config = function()
vim.g.tex_flavor = "latex"
vim.g.vimtex_view_method = "zathura" -- Change to your preferred PDF viewer
vim.g.vimtex_quickfix_mode = 0 -- Disable quickfix window
-- vim.opt.conceallevel = 2 -- Enable concealment for nicer inline math display
vim.g.tex_conceal = "abdmg" -- Conceal accents, bold, delimiters, math, Greek
end,
},
{
'MeanderingProgrammer/render-markdown.nvim',
after = { 'nvim-treesitter' },
requires = { 'nvim-tree/nvim-web-devicons', opt = true },
ft = { 'markdown', 'codecompanion', 'copilot-chat' },
config = function()
require('render-markdown').setup({
completions = { lsp = { enabled = true } },
-- render_modes = { 'n', 'v' },
render_modes = true,
enabled = true,
anti_conceal = {
enabled = false,
},
quote = { repeat_linebreak = true },
checkbox = {
-- unchecked = { icon = '✘ ' },
checked = { icon = '✔ ', scope_highlight = '@markup.strikethrough' },
custom = {
todo = { raw = '[-]', rendered = '󰥔 ', highlight = 'RenderMarkdownTodo', scope_highlight = nil },
important = { raw = '[~]', rendered = '󰓎 ', highlight = 'DiagnosticWarn', },
},
},
latex = {
enabled = false,
converter = "latex2text",
},
win_options = {
conceallevel = {
default = 0,
rendered = 2, -- Conceal level 2: hide LaTeX code fully
},
concealcursor = {
default = "",
rendered = "n", -- Conceal only in normal mode
},
}
})
end,
},
}
File diff suppressed because it is too large Load Diff
-134
View File
@@ -1,134 +0,0 @@
return {
{ "nvim-lua/plenary.nvim", lazy = true },
{ "nvim-tree/nvim-web-devicons", lazy = true, opts = {} },
{
'nvim-mini/mini.extra',
lazy = true,
},
{
'nvim-mini/mini.ai',
lazy = false,
version = '*',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
},
config = function()
local MiniExtra = require('mini.extra')
local ai = require('mini.ai')
local spec_treesitter = ai.gen_spec.treesitter
ai.setup({
custom_textobjects = {
F = spec_treesitter({ a = '@function.outer', i = '@function.inner' }),
C = spec_treesitter({ a = '@comment.outer', i = '@comment.inner' }),
P = spec_treesitter({ a = '@parameter.outer', i = '@parameter.inner' }),
O = spec_treesitter({ a = '@block.outter', i = '@block.inner' }),
k = spec_treesitter({ a = '@class.outer', i = '@class.inner' }),
o = spec_treesitter({
a = { '@conditional.outer', '@loop.outer' },
i = { '@conditional.inner', '@loop.inner' },
})
}
})
end
},
{
'nvim-mini/mini.move',
lazy = false,
version = '*',
opts = {}
},
{ 'nvim-mini/mini.align', lazy = false, version = '*', opts = {} },
{ 'nvim-mini/mini.bracketed', lazy = false, version = '*', opts = {} },
{
'nvim-mini/mini.operators',
lazy = false,
version = '*',
opts = {
evaluate = { prefix = 'g|', func = nil, },
exchange = { prefix = 'g.', reindent_linewise = true, },
multiply = { prefix = 'gm', func = nil, },
replace = { prefix = 'gk', reindent_linewise = true, },
sort = { prefix = 'gs', func = nil, }
}
},
{
'nvim-mini/mini.surround',
lazy = false,
version = '*',
opts = {
-- Add custom surroundings to be used on top of builtin ones. For more
-- information with examples, see `:h MiniSurround.config`.
-- custom_surroundings = {
-- s = { input = { '%[%[().-()%]%]' }, output = { left = '[[', right = ']]' } },
-- },
mappings = {
add = 'sa', -- Add surrounding in Normal and Visual modes
delete = 'sd', -- Delete surrounding
find = 'sf', -- Find surrounding (to the right)
find_left = 'sF', -- Find surrounding (to the left)
highlight = 'sh', -- Highlight surrounding
replace = 'sr', -- Replace surrounding
update_n_lines = 'sn', -- Update `n_lines`
suffix_last = 'l', -- Suffix to search with "prev" method
suffix_next = 'n', -- Suffix to search with "next" method
},
}
},
{
'nvim-mini/mini.splitjoin',
lazy = false,
version = false,
config = function()
require('mini.splitjoin').setup()
end,
},
{
"nvim-mini/mini.hipatterns",
lazy = false,
event = "BufReadPre",
config = function()
local MiniExtra = require("mini.extra")
local hi_words = MiniExtra.gen_highlighter.words
require('mini.hipatterns').setup({
highlighters = {
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
fixme = hi_words({ 'FIXME', 'Fixme', 'fixme' }, "MiniHipatternsFixme"),
hack = hi_words({ 'HACK', 'Hack', 'hack' }, "MiniHipatternsHack"),
todo = hi_words({ 'TODO', 'Todo', 'todo' }, "MiniHipatternsTodo"),
note = hi_words({ 'NOTE', 'Note', 'note' }, "MiniHipatternsNote"),
done = hi_words({ 'DONE', 'Done', 'done' }, "MiniHipatternsFixme"),
-- Highlight hex color strings (`#rrggbb`) using that color
-- hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
end,
},
{
'nvim-mini/mini.files',
event = 'VeryLazy',
version = '*',
keys = {
{ "-", function() require("mini.files").open(vim.api.nvim_buf_get_name(0)) end, desc = "Open parent directory", mode = "n" },
{ "<leader>-", function() require("mini.files").open() end, desc = "File Explore", mode = "n" },
},
opts = {
mappings = {
go_in = "<CR>", -- Map both Enter and L to enter directories or open files
go_in_plus = "L",
go_out = "-",
go_out_plus = "H",
close = "<Esc>",
},
}
},
{
'nvim-mini/mini.sessions',
version = '*',
lazy = false,
config = function()
require('mini.sessions').setup()
end,
},
}
-89
View File
@@ -1,89 +0,0 @@
return {
{
"al1-ce/just.nvim",
dependencies = {
'nvim-lua/plenary.nvim', -- async jobs
'j-hui/fidget.nvim', -- task progress (optional)
},
config = true
},
{
'mistweaverco/kulala.nvim',
ft = {"http", "rest"},
},
{
"HakonHarnes/img-clip.nvim",
event = "VeryLazy",
opts = {
-- add options here
-- or leave it empty to use the default settings
},
keys = {
-- suggested keymap
{ "<leader>kp", "<cmd>PasteImage<cr>", desc = "Paste image from system clipboard" },
},
},
{
"uhs-robert/sshfs.nvim",
opts = {
mounts = {
base_dir = vim.fn.expand("$HOME") .. "/Public", -- where remote mounts are created
},
-- Refer to the configuration section below
-- or leave empty for defaults
},
},
{
"esmuellert/codediff.nvim",
dependencies = { "MunifTanjim/nui.nvim" },
cmd = "CodeDiff",
},
{
"https://plugins.ejri.dev/mise.nvim",
keys = {
{ "<leader>xm", "<cmd>Lazy reload mise.nvim<cr>", desc = "Reload mise environment" }
},
opts = {
unset_vars = true,
load_on_setup = true,
force_run = true,
}
},
{
'NeogitOrg/neogit',
dependencies = {
'nvim-lua/plenary.nvim', -- required
'sindrets/diffview.nvim',
},
lazy = true,
keys = {
{ '<leader>gn', "<cmd>Neogit kind=auto<cr>", desc = 'Neogit'},
{ '<leader>gN', "<cmd>Neogit kind=floating<cr>", desc = 'Neogit'}
},
opts = {
-- disable_context_highlighting = true,
disable_commit_confirmation = true,
disable_insert_on_commit = false,
disable_signs = true,
integrations = { diffview = true, fz_lua = false },
auto_refresh = false,
console_timeout = 5000,
auto_show_console = false,
sections = {
stashes = {
folded = false,
},
recent = { folded = false },
},
}
},
{
"thunder-coding/zincoxide",
opts = {
zincoxide_cmd = "zoxide",
complete = true,
behaviour = "tabs",
},
cmd = { "Z", "Zg", "Zt", "Zw" },
},
}
-308
View File
@@ -1,308 +0,0 @@
return {
{ 'j-hui/fidget.nvim', lazy = true },
{
"utilyre/barbecue.nvim",
dependencies = {
{ 'SmiteshP/nvim-navic', lazy = true },
},
event = "VeryLazy",
opts = {},
},
{
"folke/flash.nvim",
event = "VeryLazy",
---@type Flash.Config
opts = {
modes = {
char = {
jump_labels = true,
search = { wrap = true },
highlight = { backdrop = false },
},
search = {
-- when `true`, flash will be activated during regular search by default.
-- You can always toggle when searching with `require("flash").toggle()`
enabled = true,
highlight = { backdrop = false },
jump = { history = true, register = true, nohlsearch = true, autojump = true },
search = {
wrap = true,
-- `forward` will be automatically set to the search direction
-- `mode` is always set to `search`
-- `incremental` is set to `true` when `incsearch` is enabled
},
},
treesitter = {
search = { wrap = true },
}
},
},
-- stylua: ignore
keys = {
{ "<leader>/", mode = { "n" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "s", mode = { "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
},
},
{
"folke/snacks.nvim",
opts = {
notifier = {
timeout = 4000,
},
picker = {
win = {
input = {
keys = {
["<a-s>"] = { "flash", mode = { "n", "i" } },
["s"] = { "flash" },
},
},
},
actions = {
flash = function(picker)
require("flash").jump({
pattern = "^",
label = { after = { 0, 0 } },
search = {
mode = "search",
exclude = {
function(win)
return vim.bo[vim.api.nvim_win_get_buf(win)].filetype ~= "snacks_picker_list"
end,
},
},
action = function(match)
local idx = picker.list:row2idx(match.pos[1])
picker.list:_move(idx, true, true)
end,
})
end,
},
},
},
},
{
'nvim-lualine/lualine.nvim',
event = "VeryLazy",
config = function()
local function truncate_branch_name(branch)
if not branch or branch == "" then
return ""
end
-- Match the branch name to the specified format
local _, _, ticket_number = string.find(branch, "skdillon/sko%-(%d+)%-")
-- If the branch name matches the format, display sko-{ticket_number}, otherwise display the full branch name
if ticket_number then
return "sko-" .. ticket_number
else
return branch
end
end
require("lualine").setup({
options = {
-- theme = "rose-pine",
globalstatus = true,
-- component_separators = { left = "", right = "" },
-- section_separators = { left = "█", right = "█" },
icons_enabled = true,
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
tabline = {
lualine_a = {},
lualine_b = {'branch'},
lualine_c = {'filename'},
lualine_x = {},
lualine_y = {},
lualine_z = {}
},
},
sections = {
lualine_b = {
{ "branch", icon = "", fmt = truncate_branch_name },
"diff",
"diagnostics",
},
lualine_c = {
{ 'lsp_progress' },
{
'buffers',
show_filename_only = true, -- Shows shortened relative path when set to false.
hide_filename_extension = false, -- Hide filename extension when set to true.
show_modified_status = true, -- Shows indicator when the buffer is modified.
mode = 0,
max_length = vim.o.columns * 2 / 3,
filetype_names = {
TelescopePrompt = '',
},
-- it can also be a function that returns
-- the value of `max_length` dynamically.
use_mode_colors = false,
symbols = {
modified = ' ●', -- Text to show when the buffer is modified
alternate_file = '#', -- Text to show to identify the alternate file
directory = '', -- Text to show when the buffer is a directory
},
},
},
lualine_x = {
"windows",
"fileformat",
"filetype",
},
},
})
end,
},
{
"hedyhli/outline.nvim",
lazy = true,
cmd = { "Outline", "OutlineOpen" },
keys = { -- Example mapping to toggle outline
{ "<leader>so", "<cmd>Outline<CR>", desc = "Toggle outline" },
},
opts = {
symbol_folding = {
-- Unfold entire symbol tree by default with false, otherwise enter a
-- number starting from 1
autofold_depth = false,
-- autofold_depth = 1,
},
},
},
{
'stevearc/quicker.nvim',
ft = "qf",
opts = {},
},
{
"christoomey/vim-tmux-navigator",
cmd = {
"TmuxNavigateLeft",
"TmuxNavigateDown",
"TmuxNavigateUp",
"TmuxNavigateRight",
"TmuxNavigatePrevious",
},
keys = {
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
-- { "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
},
},
{
'akinsho/toggleterm.nvim',
lazy = false,
config = function()
require("toggleterm").setup({
-- highlights = require("rose-pine.plugins.toggleterm"),
size = 20,
open_mapping = [[<c-\>]],
hide_numbers = true,
shade_terminals = true,
shading_factor = 2,
start_in_insert = true,
insert_mappings = true,
persiste_size = true,
direction = 'horizontal',
close_on_exit = true,
float_opts = {
border = "curved",
}
})
end,
keys = {
{ "<Esc><Esc>", "<c-\\><c-n>", desc = "Escape input", mode = { "t" } }
},
},
{
'ten3roberts/window-picker.nvim',
opts = {
-- Default keys to annotate, keys will be used in order. The default uses the
-- most accessible keys from the home row and then top row.
keys = 'alskdjfhgwoeiruty',
-- Swap windows by holding shift + letter
swap_shift = true,
-- Windows containing filetype to exclude
exclude = { qf = true, NvimTree = true, aerial = true },
-- Flash the cursor line of the newly focused window for 300ms.
-- Set to 0 or false to disable.
flash_duration = 300,
},
keys = {
{ "<leader>a", "<cmd>WindowPick<cr>", desc = "Windows Pick"},
{ "<C-w>a", "<cmd>WindowPick<cr>", desc = "Windows Pick"},
{ "<C-w>D", "<cmd>WindowZap<cr>", desc = "Windows Delete"},
{ "<C-w>S", "<cmd>WindowSwap<cr>", desc = "Windows Swap"},
},
},
{
"folke/which-key.nvim",
event = "VimEnter",
opts = {
icons = {
-- set icon mappings to true if you have a Nerd Font
mappings = vim.g.have_nerd_font,
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
keys = vim.g.have_nerd_font and {} or {
Up = '<Up> ',
Down = '<Down> ',
Left = '<Left> ',
Right = '<Right> ',
C = '<C-…> ',
M = '<M-…> ',
D = '<D-…> ',
S = '<S-…> ',
CR = '<CR> ',
Esc = '<Esc> ',
ScrollWheelDown = '<ScrollWheelDown> ',
ScrollWheelUp = '<ScrollWheelUp> ',
NL = '<NL> ',
BS = '<BS> ',
Space = '<Space> ',
Tab = '<Tab> ',
F1 = '<F1>',
F2 = '<F2>',
F3 = '<F3>',
F4 = '<F4>',
F5 = '<F5>',
F6 = '<F6>',
F7 = '<F7>',
F8 = '<F8>',
F9 = '<F9>',
F10 = '<F10>',
F11 = '<F11>',
F12 = '<F12>',
},
},
spec = {
{ "g", group = "+goto" },
{ "]", group = "+next" },
{ "[", group = "+prev" },
{ "<leader>c", group = "+code", mode = { 'n', 'x' } },
{ "<leader>b", group = "+buffer" },
{ "<leader>f", group = "+find" },
{ "<leader>g", group = "+goto" },
{ "<leader>k", group = "+obsidian" },
{ "<leader>l", group = "+lsp" },
{ "<leader>m", group = "+bookmark" },
{ "<leader>o", group = "+notes" },
{ "<leader>r", group = "+ai" },
{ "<leader>s", group = "+search" },
{ "<leader>t", group = "+trouble" },
{ "<leader>v", group = "+vcs", mode = { 'n', 'v' } },
{ "<leader>w", group = "+workspace" },
{ "<leader>x", group = "+extra" },
{ "<leader>u", group = "+toggle" },
},
},
},
}
-16
View File
@@ -1,16 +0,0 @@
local ls = require("luasnip")
local s = ls.snippet
local t = ls.text_node
local i = ls.insert_node
-- local f = ls.function_node
return {
s({ trig = "fn", name = "Function", dscr = "Function" }, {
t("fn "),
i(1),
t("() "),
t("{\n"),
t("\t"),
i(0),
t("\n}\n"),
})
}
-92
View File
@@ -1,92 +0,0 @@
local M = {}
local function get_current_time()
return os.date("%H:%M")
end
local function get_active_task_line()
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
local active_lines = {}
for i, line in ipairs(lines) do
if line:match("#status/in%-progress") then
table.insert(active_lines, {line = line, lnum = i})
end
end
if #active_lines == 0 then
print("No active task found (#status/in-progress).")
return nil, "no_active"
elseif #active_lines > 1 then
print("Multiple active tasks found. Please ensure only one task is #status/in-progress.")
return nil, "multiple_active"
else
return active_lines[1].line, active_lines[1].lnum
end
end
function M.create_new_task()
local desc = vim.fn.input("Task Description: ")
if desc == '' then return end
local project = vim.fn.input("Project (leave empty if none, e.g., '[[Project Name]]'): ")
local priority_options = {"high", "medium", "low"}
local priority_idx = vim.fn.inputlist("Priority:", priority_options)
local priority = priority_options[tonumber(priority_idx)] or "medium"
local category_options = {"work", "meeting", "learning", "journal", "focused-work", "break"}
local category_idx = vim.fn.inputlist("Category:", category_options)
local category = category_options[tonumber(category_idx)] or "work"
local new_task_line = string.format("- [ ] %s %s #status/todo #priority/%s #%s",
desc, project, priority, category)
vim.api.nvim_put({new_task_line}, "l", true, true)
print("New task created: " .. new_task_line)
end
function M.start_task()
local current_line, lnum = get_active_task_line()
if not current_line then return end
local new_line = current_line
local current_time = get_current_time()
if new_line:match("start:: %d%d:%d%d") then
print("Task already has a start time. Updating to current time.")
new_line = new_line:gsub("start:: %d%d:%d%d", "start:: " .. current_time)
else
new_line = new_line .. " start:: " .. current_time
end
-- Clear end time if present when starting a task again
new_line = new_line:gsub(" end:: %d%d:%d%d", "")
vim.api.nvim_buf_set_lines(0, lnum - 1, lnum, false, {new_line})
print("Task started/resumed: " .. current_time)
end
function M.stop_task()
local current_line, lnum = get_active_task_line()
if not current_line then return end
local new_line = current_line
local current_time = get_current_time()
if new_line:match("end:: %d%d:%d%d") then
print("Task already has an end time. Updating to current time.")
new_line = new_line:gsub("end:: %d%d:%d%d", "end:: " .. current_time)
else
new_line = new_line .. " end:: " .. current_time
end
-- Option to change status to done
local change_status = vim.fn.confirm("Change status to #status/done?", "&Yes\n&No", 2)
if change_status == 1 then -- Yes
new_line = new_line:gsub("#status/in%-progress", "#status/done")
end
vim.api.nvim_buf_set_lines(0, lnum - 1, lnum, false, {new_line})
print("Task stopped: " .. current_time)
end
return M
+47
View File
@@ -0,0 +1,47 @@
[colors.primary]
background = "#1a1b26"
foreground = "#a9b1d6"
[colors.cursor]
text = "#1a1b26"
cursor = "#c0caf5"
[colors.vi_mode_cursor]
text = "#1a1b26"
cursor = "#c0caf5"
[colors.search.matches]
foreground = "#1a1b26"
background = "#e0af68"
[colors.search.focused_match]
foreground = "#1a1b26"
background = "#f7768e"
[colors.footer_bar]
foreground = "#1a1b26"
background = "#a9b1d6"
[colors.selection]
text = "#c0caf5"
background = "#7aa2f7"
[colors.normal]
black = "#32344a"
red = "#f7768e"
green = "#9ece6a"
yellow = "#e0af68"
blue = "#7aa2f7"
magenta = "#ad8ee6"
cyan = "#449dab"
white = "#787c99"
[colors.bright]
black = "#444b6a"
red = "#ff7a93"
green = "#b9f27c"
yellow = "#ff9e64"
blue = "#7da6ff"
magenta = "#bb9af7"
cyan = "#0db9d7"
white = "#acb0d0"
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

+82
View File
@@ -0,0 +1,82 @@
# Theme: tokyo-night
# By: Pascal Jaeger
# Main bg
theme[main_bg]="#1a1b26"
# Main text color
theme[main_fg]="#cfc9c2"
# Title color for boxes
theme[title]="#cfc9c2"
# Highlight color for keyboard shortcuts
theme[hi_fg]="#7dcfff"
# Background color of selected item in processes box
theme[selected_bg]="#414868"
# Foreground color of selected item in processes box
theme[selected_fg]="#cfc9c2"
# Color of inactive/disabled text
theme[inactive_fg]="#565f89"
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
theme[proc_misc]="#7dcfff"
# Cpu box outline color
theme[cpu_box]="#565f89"
# Memory/disks box outline color
theme[mem_box]="#565f89"
# Net up/down box outline color
theme[net_box]="#565f89"
# Processes box outline color
theme[proc_box]="#565f89"
# Box divider line and small boxes line color
theme[div_line]="#565f89"
# Temperature graph colors
theme[temp_start]="#9ece6a"
theme[temp_mid]="#e0af68"
theme[temp_end]="#f7768e"
# CPU graph colors
theme[cpu_start]="#9ece6a"
theme[cpu_mid]="#e0af68"
theme[cpu_end]="#f7768e"
# Mem/Disk free meter
theme[free_start]="#9ece6a"
theme[free_mid]="#e0af68"
theme[free_end]="#f7768e"
# Mem/Disk cached meter
theme[cached_start]="#9ece6a"
theme[cached_mid]="#e0af68"
theme[cached_end]="#f7768e"
# Mem/Disk available meter
theme[available_start]="#9ece6a"
theme[available_mid]="#e0af68"
theme[available_end]="#f7768e"
# Mem/Disk used meter
theme[used_start]="#9ece6a"
theme[used_mid]="#e0af68"
theme[used_end]="#f7768e"
# Download graph colors
theme[download_start]="#9ece6a"
theme[download_mid]="#e0af68"
theme[download_end]="#f7768e"
# Upload graph colors
theme[upload_start]="#9ece6a"
theme[upload_mid]="#e0af68"
theme[upload_end]="#f7768e"
+1
View File
@@ -0,0 +1 @@
26,27,38
+23
View File
@@ -0,0 +1,23 @@
accent = "#7aa2f7"
cursor = "#c0caf5"
foreground = "#a9b1d6"
background = "#1a1b26"
selection_foreground = "#c0caf5"
selection_background = "#7aa2f7"
color0 = "#32344a"
color1 = "#f7768e"
color2 = "#9ece6a"
color3 = "#e0af68"
color4 = "#7aa2f7"
color5 = "#ad8ee6"
color6 = "#449dab"
color7 = "#787c99"
color8 = "#444b6a"
color9 = "#ff7a93"
color10 = "#b9f27c"
color11 = "#ff9e64"
color12 = "#7da6ff"
color13 = "#bb9af7"
color14 = "#0db9d7"
color15 = "#acb0d0"
+25
View File
@@ -0,0 +1,25 @@
[colors-dark]
foreground=a9b1d6
background=1a1b26
selection-foreground=c0caf5
selection-background=7aa2f7
cursor=1a1b26 c0caf5
regular0=32344a
regular1=f7768e
regular2=9ece6a
regular3=e0af68
regular4=7aa2f7
regular5=ad8ee6
regular6=449dab
regular7=787c99
bright0=444b6a
bright1=ff7a93
bright2=b9f27c
bright3=ff9e64
bright4=7da6ff
bright5=bb9af7
bright6=0db9d7
bright7=acb0d0
+22
View File
@@ -0,0 +1,22 @@
background = #1a1b26
foreground = #a9b1d6
cursor-color = #c0caf5
selection-background = #7aa2f7
selection-foreground = #c0caf5
palette = 0=#32344a
palette = 1=#f7768e
palette = 2=#9ece6a
palette = 3=#e0af68
palette = 4=#7aa2f7
palette = 5=#ad8ee6
palette = 6=#449dab
palette = 7=#787c99
palette = 8=#444b6a
palette = 9=#ff7a93
palette = 10=#b9f27c
palette = 11=#ff9e64
palette = 12=#7da6ff
palette = 13=#bb9af7
palette = 14=#0db9d7
palette = 15=#acb0d0
+137
View File
@@ -0,0 +1,137 @@
# Gum Style (generic) Variables
env = FOREGROUND,##a9b1d6
env = BACKGROUND,##1a1b26
env = BORDER_FOREGROUND,##7aa2f7
env = BORDER_BACKGROUND,##1a1b26
# Gum Confirm Style Variables
env = GUM_CONFIRM_PROMPT_FOREGROUND,##7aa2f7
env = GUM_CONFIRM_PROMPT_BACKGROUND,##1a1b26
env = GUM_CONFIRM_SELECTED_FOREGROUND,##c0caf5
env = GUM_CONFIRM_SELECTED_BACKGROUND,##7aa2f7
env = GUM_CONFIRM_UNSELECTED_FOREGROUND,##a9b1d6
env = GUM_CONFIRM_UNSELECTED_BACKGROUND,##1a1b26
# Gum Input Style Variables
env = GUM_INPUT_PROMPT_FOREGROUND,##7aa2f7
env = GUM_INPUT_PROMPT_BACKGROUND,##1a1b26
env = GUM_INPUT_PLACEHOLDER_FOREGROUND,##444b6a
env = GUM_INPUT_PLACEHOLDER_BACKGROUND,##1a1b26
env = GUM_INPUT_CURSOR_FOREGROUND,##c0caf5
env = GUM_INPUT_CURSOR_BACKGROUND,##1a1b26
env = GUM_INPUT_HEADER_FOREGROUND,##a9b1d6
env = GUM_INPUT_HEADER_BACKGROUND,##1a1b26
# Gum Choose Style Variables
env = GUM_CHOOSE_CURSOR_FOREGROUND,##7aa2f7
env = GUM_CHOOSE_CURSOR_BACKGROUND,##1a1b26
env = GUM_CHOOSE_HEADER_FOREGROUND,##a9b1d6
env = GUM_CHOOSE_HEADER_BACKGROUND,##1a1b26
env = GUM_CHOOSE_ITEM_FOREGROUND,##a9b1d6
env = GUM_CHOOSE_ITEM_BACKGROUND,##1a1b26
env = GUM_CHOOSE_SELECTED_FOREGROUND,##c0caf5
env = GUM_CHOOSE_SELECTED_BACKGROUND,##7aa2f7
# Gum Filter Style Variables
env = GUM_FILTER_PROMPT_FOREGROUND,##7aa2f7
env = GUM_FILTER_PROMPT_BACKGROUND,##1a1b26
env = GUM_FILTER_TEXT_FOREGROUND,##a9b1d6
env = GUM_FILTER_TEXT_BACKGROUND,##1a1b26
env = GUM_FILTER_MATCH_FOREGROUND,##7aa2f7
env = GUM_FILTER_CURSOR_TEXT_FOREGROUND,##c0caf5
env = GUM_FILTER_CURSOR_TEXT_BACKGROUND,##1a1b26
env = GUM_FILTER_SELECTED_FOREGROUND,##c0caf5
env = GUM_FILTER_SELECTED_BACKGROUND,##7aa2f7
env = GUM_FILTER_INDICATOR_FOREGROUND,##7aa2f7
env = GUM_FILTER_HEADER_FOREGROUND,##a9b1d6
env = GUM_FILTER_MATCH_BACKGROUND,##1a1b26
env = GUM_FILTER_HEADER_BACKGROUND,##1a1b26
env = GUM_FILTER_PLACEHOLDER_FOREGROUND,##444b6a
env = GUM_FILTER_PLACEHOLDER_BACKGROUND,##1a1b26
env = GUM_FILTER_INDICATOR_BACKGROUND,##1a1b26
env = GUM_FILTER_SELECTED_PREFIX_FOREGROUND,##c0caf5
env = GUM_FILTER_SELECTED_PREFIX_BACKGROUND,##7aa2f7
env = GUM_FILTER_UNSELECTED_PREFIX_FOREGROUND,##444b6a
env = GUM_FILTER_UNSELECTED_PREFIX_BACKGROUND,##1a1b26
# Gum Table Style Variables
env = GUM_TABLE_HEADER_FOREGROUND,##a9b1d6
env = GUM_TABLE_HEADER_BACKGROUND,##1a1b26
env = GUM_TABLE_CELL_FOREGROUND,##a9b1d6
env = GUM_TABLE_CELL_BACKGROUND,##1a1b26
env = GUM_TABLE_BORDER_FOREGROUND,##444b6a
env = GUM_TABLE_BORDER_BACKGROUND,##1a1b26
env = GUM_TABLE_SELECTED_FOREGROUND,##c0caf5
env = GUM_TABLE_SELECTED_BACKGROUND,##7aa2f7
# Gum Spin Style Variables
env = GUM_SPIN_SPINNER_FOREGROUND,##7aa2f7
env = GUM_SPIN_SPINNER_BACKGROUND,##1a1b26
env = GUM_SPIN_TITLE_FOREGROUND,##a9b1d6
env = GUM_SPIN_TITLE_BACKGROUND,##1a1b26
# Gum File Style Variables
env = GUM_FILE_CURSOR_FOREGROUND,##c0caf5
env = GUM_FILE_CURSOR_BACKGROUND,##1a1b26
env = GUM_FILE_SYMLINK_FOREGROUND,##a9b1d6
env = GUM_FILE_SYMLINK_BACKGROUND,##1a1b26
env = GUM_FILE_DIRECTORY_FOREGROUND,##a9b1d6
env = GUM_FILE_DIRECTORY_BACKGROUND,##1a1b26
env = GUM_FILE_FILE_FOREGROUND,##a9b1d6
env = GUM_FILE_FILE_BACKGROUND,##1a1b26
env = GUM_FILE_PERMISSIONS_FOREGROUND,##444b6a
env = GUM_FILE_PERMISSIONS_BACKGROUND,##1a1b26
env = GUM_FILE_SELECTED_FOREGROUND,##c0caf5
env = GUM_FILE_SELECTED_BACKGROUND,##7aa2f7
env = GUM_FILE_FILE_SIZE_FOREGROUND,##444b6a
env = GUM_FILE_FILE_SIZE_BACKGROUND,##1a1b26
env = GUM_FILE_HEADER_FOREGROUND,##a9b1d6
env = GUM_FILE_HEADER_BACKGROUND,##1a1b26
# Gum Pager Style Variables
env = GUM_PAGER_FOREGROUND,##a9b1d6
env = GUM_PAGER_BACKGROUND,##1a1b26
env = GUM_PAGER_LINE_NUMBER_FOREGROUND,##444b6a
env = GUM_PAGER_LINE_NUMBER_BACKGROUND,##1a1b26
env = GUM_PAGER_MATCH_FOREGROUND,##7aa2f7
env = GUM_PAGER_MATCH_BACKGROUND,##1a1b26
env = GUM_PAGER_MATCH_HIGH_FOREGROUND,##7aa2f7
env = GUM_PAGER_MATCH_HIGH_BACKGROUND,##1a1b26
env = GUM_PAGER_HELP_FOREGROUND,##444b6a
env = GUM_PAGER_HELP_BACKGROUND,##1a1b26
# Gum Write Style Variables
env = GUM_WRITE_BASE_FOREGROUND,##a9b1d6
env = GUM_WRITE_BASE_BACKGROUND,##1a1b26
env = GUM_WRITE_CURSOR_LINE_NUMBER_FOREGROUND,##444b6a
env = GUM_WRITE_CURSOR_LINE_NUMBER_BACKGROUND,##1a1b26
env = GUM_WRITE_CURSOR_LINE_FOREGROUND,##a9b1d6
env = GUM_WRITE_CURSOR_LINE_BACKGROUND,##7aa2f7
env = GUM_WRITE_CURSOR_FOREGROUND,##c0caf5
env = GUM_WRITE_CURSOR_BACKGROUND,##1a1b26
env = GUM_WRITE_END_OF_BUFFER_FOREGROUND,##444b6a
env = GUM_WRITE_END_OF_BUFFER_BACKGROUND,##1a1b26
env = GUM_WRITE_LINE_NUMBER_FOREGROUND,##444b6a
env = GUM_WRITE_LINE_NUMBER_BACKGROUND,##1a1b26
env = GUM_WRITE_HEADER_FOREGROUND,##a9b1d6
env = GUM_WRITE_HEADER_BACKGROUND,##1a1b26
env = GUM_WRITE_PLACEHOLDER_FOREGROUND,##444b6a
env = GUM_WRITE_PLACEHOLDER_BACKGROUND,##1a1b26
env = GUM_WRITE_PROMPT_FOREGROUND,##a9b1d6
env = GUM_WRITE_PROMPT_BACKGROUND,##1a1b26
# Gum Log Style Variables
env = GUM_LOG_LEVEL_FOREGROUND,##7aa2f7
env = GUM_LOG_LEVEL_BACKGROUND,##1a1b26
env = GUM_LOG_TIME_FOREGROUND,##444b6a
env = GUM_LOG_TIME_BACKGROUND,##1a1b26
env = GUM_LOG_PREFIX_FOREGROUND,##a9b1d6
env = GUM_LOG_PREFIX_BACKGROUND,##1a1b26
env = GUM_LOG_MESSAGE_FOREGROUND,##a9b1d6
env = GUM_LOG_MESSAGE_BACKGROUND,##1a1b26
env = GUM_LOG_KEY_FOREGROUND,##a9b1d6
env = GUM_LOG_KEY_BACKGROUND,##1a1b26
env = GUM_LOG_VALUE_FOREGROUND,##a9b1d6
env = GUM_LOG_VALUE_BACKGROUND,##1a1b26
env = GUM_LOG_SEPARATOR_FOREGROUND,##444b6a
env = GUM_LOG_SEPARATOR_BACKGROUND,##1a1b26
+132
View File
@@ -0,0 +1,132 @@
# Syntax
"keyword" = "color5"
"keyword.control" = { fg = "color5", modifiers = ["italic"] }
"function" = "color4"
"function.builtin" = "color4"
"function.macro" = "color5"
"type" = "color3"
"type.builtin" = "color5"
"type.enum.variant" = "color6"
"constructor" = "color4"
"constant" = "color3"
"constant.builtin" = "color3"
"constant.numeric" = "color3"
"constant.character" = "color6"
"constant.character.escape" = "color5"
"string" = "color2"
"string.regexp" = "color5"
"string.special" = "color4"
"comment" = { fg = "color8", modifiers = ["italic"] }
"variable" = "foreground"
"variable.parameter" = { fg = "color5", modifiers = ["italic"] }
"variable.builtin" = "color1"
"variable.other.member" = "color4"
"label" = "color4"
"punctuation" = "color8"
"punctuation.special" = "color6"
"operator" = "color6"
"tag" = "color4"
"namespace" = { fg = "color3", modifiers = ["italic"] }
"special" = "color5"
"attribute" = "color3"
# Markup
"markup.heading.1" = "color1"
"markup.heading.2" = "color3"
"markup.heading.3" = "color3"
"markup.heading.4" = "color2"
"markup.heading.5" = "color4"
"markup.heading.6" = "color5"
"markup.list" = "color6"
"markup.list.unchecked" = "color8"
"markup.list.checked" = "color2"
"markup.bold" = { fg = "color1", modifiers = ["bold"] }
"markup.italic" = { fg = "color1", modifiers = ["italic"] }
"markup.strikethrough" = { modifiers = ["crossed_out"] }
"markup.link.url" = { fg = "color4", modifiers = ["italic", "underlined"] }
"markup.link.text" = "color5"
"markup.link.label" = "color4"
"markup.raw" = "color2"
"markup.quote" = "color5"
# Diff
"diff.plus" = "color2"
"diff.minus" = "color1"
"diff.delta" = "color4"
# Leave the editor background transparent so the terminal background shows through
"ui.background" = { }
"ui.linenr" = { fg = "color8" }
"ui.linenr.selected" = { fg = "foreground" }
# Statusline uses an inverted band (background-color text on foreground-color
# background) to guarantee contrast across both light and dark Omarchy themes.
"ui.statusline" = { fg = "background", bg = "foreground" }
"ui.statusline.inactive" = { fg = "background", bg = "color8" }
"ui.statusline.normal" = { fg = "background", bg = "color4", modifiers = ["bold"] }
"ui.statusline.insert" = { fg = "background", bg = "color2", modifiers = ["bold"] }
"ui.statusline.select" = { fg = "background", bg = "color5", modifiers = ["bold"] }
"ui.popup" = { fg = "foreground", bg = "background" }
"ui.window" = { fg = "color8" }
"ui.help" = { fg = "foreground", bg = "background" }
"ui.bufferline" = { fg = "color8", bg = "background" }
"ui.bufferline.active" = { fg = "foreground", bg = "background", underline = { color = "color5", style = "line" } }
"ui.text" = "foreground"
"ui.text.focus" = { fg = "foreground", bg = "color0", modifiers = ["bold"] }
"ui.text.inactive" = { fg = "color8" }
"ui.text.directory" = { fg = "color4" }
"ui.virtual" = "color8"
"ui.virtual.ruler" = { bg = "color0" }
"ui.virtual.indent-guide" = "color8"
"ui.virtual.inlay-hint" = { fg = "color8" }
"ui.virtual.jump-label" = { fg = "color1", modifiers = ["bold"] }
"ui.virtual.whitespace" = "color8"
"ui.selection" = { bg = "selection_background", fg = "selection_foreground" }
"ui.cursor" = { fg = "background", bg = "cursor" }
"ui.cursor.primary" = { fg = "background", bg = "cursor" }
"ui.cursor.match" = { fg = "color3", modifiers = ["bold"] }
"ui.cursor.primary.normal" = { fg = "background", bg = "cursor" }
"ui.cursor.primary.insert" = { fg = "background", bg = "color2" }
"ui.cursor.primary.select" = { fg = "background", bg = "color5" }
"ui.cursorline.primary" = { bg = "color0" }
"ui.highlight" = { bg = "color0", modifiers = ["bold"] }
"ui.menu" = { fg = "foreground", bg = "background" }
"ui.menu.selected" = { fg = "background", bg = "foreground", modifiers = ["bold"] }
"diagnostic.error" = { underline = { color = "color1", style = "curl" } }
"diagnostic.warning" = { underline = { color = "color3", style = "curl" } }
"diagnostic.info" = { underline = { color = "color4", style = "curl" } }
"diagnostic.hint" = { underline = { color = "color6", style = "curl" } }
"diagnostic.unnecessary" = { modifiers = ["dim"] }
"diagnostic.deprecated" = { modifiers = ["crossed_out"] }
error = "color1"
warning = "color3"
info = "color4"
hint = "color6"
[palette]
background = "#1a1b26"
foreground = "#a9b1d6"
cursor = "#c0caf5"
selection_background = "#7aa2f7"
selection_foreground = "#c0caf5"
color0 = "#32344a"
color1 = "#f7768e"
color2 = "#9ece6a"
color3 = "#e0af68"
color4 = "#7aa2f7"
color5 = "#ad8ee6"
color6 = "#449dab"
color7 = "#787c99"
color8 = "#444b6a"
@@ -0,0 +1,94 @@
@define-color foreground #a9b1d6;
@define-color background #1a1b26;
@define-color accent #7aa2f7;
@define-color muted #444b6a;
@define-color card_bg #32344a;
@define-color text_dark #1a1b26;
@define-color accent_hover #7da6ff;
@define-color selected_tab #7aa2f7;
@define-color text #a9b1d6;
* {
all: unset;
font-family: JetBrains Mono NF;
color: @foreground;
font-weight: bold;
font-size: 16px;
}
.window {
background: alpha(@background, 0.95);
border: solid 2px @accent;
margin: 4px;
padding: 18px;
}
tabs {
padding: 0.5rem 1rem;
}
tabs > tab {
margin-right: 1rem;
}
.tab-label {
color: @text;
transition: all 0.2s ease;
}
tabs > tab:checked > .tab-label, tabs > tab:active > .tab-label {
text-decoration: underline currentColor;
color: @selected_tab;
}
tabs > tab:focus > .tab-label {
color: @foreground;
}
.page {
padding: 1rem;
}
.image-label {
font-size: 12px;
padding: 0.25rem;
}
flowboxchild > .card, button > .card {
transition: all 0.2s ease;
border: solid 2px transparent;
border-color: @background;
border-radius: 5px;
background-color: @card_bg;
padding: 5px;
}
flowboxchild:hover > .card, button:hover > .card, flowboxchild:active > .card, flowboxchild:selected > .card, button:active > .card, button:selected > .card, button:focus > .card {
border: solid 2px @accent;
}
.image {
border-radius: 5px;
}
.region-button {
padding: 0.5rem 1rem;
border-radius: 5px;
background-color: @accent;
color: @text_dark;
transition: all 0.2s ease;
}
.region-button > label {
color: @text_dark;
}
.region-button:not(:disabled):hover, .region-button:not(:disabled):focus {
background-color: @accent_hover;
color: @text_dark;
}
.region-button:disabled {
background-color: @muted;
color: @background;
}
+9
View File
@@ -0,0 +1,9 @@
$activeBorderColor = rgb(7aa2f7)
general {
col.active_border = $activeBorderColor
}
group {
col.border_active = $activeBorderColor
}
+14
View File
@@ -0,0 +1,14 @@
hl.config({
general = {
col = {
active_border = { colors = {"rgb(7aa2f7)", "rgb(f7768e)" }, angle = 45 },
inactive_border = { colors = {"rgb(9ece6a)", "rgb(9ece6a)" }, angle = 45 }
}
},
group = {
col = {
border_active = { colors = {"rgb(7aa2f7)", "rgb(f7768e)" }, angle = 45 },
border_inactive = { colors = {"rgb(9ece6a)", "rgb(9ece6a)" }, angle = 45 }
}
}
})
+5
View File
@@ -0,0 +1,5 @@
$color = rgba(26,27,38, 1.0)
$inner_color = rgba(26,27,38, 0.8)
$outer_color = rgba(169,177,214, 1.0)
$font_color = rgba(169,177,214, 1.0)
$check_color = rgba(122,162,247, 1.0)
+1
View File
@@ -0,0 +1 @@
Yaru-magenta
+1
View File
@@ -0,0 +1 @@
ff00ff
+27
View File
@@ -0,0 +1,27 @@
foreground #a9b1d6
background #1a1b26
selection_foreground #c0caf5
selection_background #7aa2f7
cursor #c0caf5
cursor_text_color #1a1b26
active_border_color #7aa2f7
active_tab_background #7aa2f7
color0 #32344a
color1 #f7768e
color2 #9ece6a
color3 #e0af68
color4 #7aa2f7
color5 #ad8ee6
color6 #449dab
color7 #787c99
color8 #444b6a
color9 #ff7a93
color10 #b9f27c
color11 #ff9e64
color12 #7da6ff
color13 #bb9af7
color14 #0db9d7
color15 #acb0d0
+40
View File
@@ -0,0 +1,40 @@
text-color=#a9b1d6
border-color=#7aa2f7
background-color=#1a1b26
anchor=top-right
group-by=app-name,summary,body
default-timeout=5000
width=420
outer-margin=20
padding=10,15
border-size=2
max-icon-size=32
font=sans-serif 14px
[app-name=Spotify]
invisible=1
[mode=do-not-disturb]
invisible=true
[mode=do-not-disturb app-name=notify-send]
invisible=false
[urgency=critical]
default-timeout=0
layer=overlay
[summary~="Setup Wi-Fi"]
on-button-left=exec sh -c 'omarchy-notification-dismiss "Setup Wi-Fi"; omarchy-launch-wifi'
[summary~="Update System"]
on-button-left=exec sh -c 'omarchy-notification-dismiss "Update System"; omarchy-launch-floating-terminal-with-presentation omarchy-update'
[summary~="Install Dictation with Voxtype"]
on-button-left=exec sh -c 'omarchy-notification-dismiss "Install Dictation with Voxtype"; omarchy-launch-floating-terminal-with-presentation omarchy-voxtype-install'
[summary~="Screenshot copied & saved"]
max-icon-size=80
format=<b>%s</b>\n%b
+12
View File
@@ -0,0 +1,12 @@
vim.pack.add({{ src = 'https://github.com/folke/tokyonight.nvim' }})
require("tokyonight").setup({
style = "night",
transparent = true,
terminal_colors = true,
styles = {
sidebars = "transparent",
floats = "transparent",
},
})
vim.cmd("colorscheme tokyonight")
+12
View File
@@ -0,0 +1,12 @@
return {
{
"folke/tokyonight.nvim",
priority = 1000,
},
{
"LazyVim/LazyVim",
opts = {
colorscheme = "tokyonight-night",
},
},
}
+99
View File
@@ -0,0 +1,99 @@
/* Omarchy Theme for Obsidian */
.theme-dark, .theme-light {
/* Core colors */
--background-primary: #1a1b26;
--background-primary-alt: #1a1b26;
--background-secondary: #1a1b26;
--background-secondary-alt: #1a1b26;
--text-normal: #a9b1d6;
/* Selection colors */
--text-selection: #7aa2f7;
/* Border color */
--background-modifier-border: #444b6a;
/* Semantic heading colors */
--text-title-h1: #f7768e;
--text-title-h2: #9ece6a;
--text-title-h3: #e0af68;
--text-title-h4: #7aa2f7;
--text-title-h5: #ad8ee6;
--text-title-h6: #ad8ee6;
/* Links and accents */
--text-link: #7aa2f7;
--text-accent: #7aa2f7;
--text-accent-hover: #7aa2f7;
--interactive-accent: #7aa2f7;
--interactive-accent-hover: #7aa2f7;
/* Muted text */
--text-muted: color-mix(in srgb, #a9b1d6 70%, transparent);
--text-faint: color-mix(in srgb, #a9b1d6 55%, transparent);
/* Code */
--code-normal: #449dab;
/* Errors and success */
--text-error: #f7768e;
--text-error-hover: #f7768e;
--text-success: #9ece6a;
/* Tags */
--tag-color: #449dab;
--tag-background: #444b6a;
/* Graph */
--graph-line: #444b6a;
--graph-node: #7aa2f7;
--graph-node-focused: #7aa2f7;
--graph-node-tag: #449dab;
--graph-node-attachment: #9ece6a;
}
/* Headers */
.cm-header-1, .markdown-rendered h1 { color: var(--text-title-h1); }
.cm-header-2, .markdown-rendered h2 { color: var(--text-title-h2); }
.cm-header-3, .markdown-rendered h3 { color: var(--text-title-h3); }
.cm-header-4, .markdown-rendered h4 { color: var(--text-title-h4); }
.cm-header-5, .markdown-rendered h5 { color: var(--text-title-h5); }
.cm-header-6, .markdown-rendered h6 { color: var(--text-title-h6); }
/* Code blocks */
.markdown-rendered code {
color: #449dab;
}
/* Syntax highlighting */
.cm-s-obsidian span.cm-keyword { color: #f7768e; }
.cm-s-obsidian span.cm-string { color: #9ece6a; }
.cm-s-obsidian span.cm-number { color: #e0af68; }
.cm-s-obsidian span.cm-comment { color: #444b6a; }
.cm-s-obsidian span.cm-operator { color: #7aa2f7; }
.cm-s-obsidian span.cm-def { color: #7aa2f7; }
/* Links */
.markdown-rendered a {
color: var(--text-link);
}
/* Blockquotes */
.markdown-rendered blockquote {
border-left-color: #7aa2f7;
}
/* Active elements */
.workspace-leaf.mod-active .workspace-leaf-header-title {
color: var(--interactive-accent);
}
.nav-file-title.is-active {
color: var(--interactive-accent);
}
/* Search results */
.search-result-file-title {
color: var(--interactive-accent);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 662 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

+26
View File
@@ -0,0 +1,26 @@
* {
background: #1a1b26;
foreground: #a9b1d6;
active-background: #9ece6a;
urgent-background: #f7768e;
normal-foreground: #e0af68;
normal-background: #1a1b26;
selected-foreground: #c0caf5;
selected-background: #7aa2f7;
seperator-color: #1a1b26;
border-color: #32344a;
prompt-color: #7aa2f7;
prompt-background-color: #32344a;
window-border-size: 1px;
window-border-radius: 8px;
background-color: @background;
text-color: @foreground;
}
+5
View File
@@ -0,0 +1,5 @@
@define-color background-color #1a1b26;
@define-color border-color #a9b1d6;
@define-color label #a9b1d6;
@define-color image #a9b1d6;
@define-color progress #7aa2f7;
+63
View File
@@ -0,0 +1,63 @@
color_bg0="#1a1b26"
color_bg1="#32344a"
color_bg2="#787c99"
color_fg0="#a9b1d6"
color_fg1="#e0af68"
color_status_fg="#7aa2f7"
color_status_bg="#32344a"
color_selected_fg="#c0caf5"
color_selected_bg="#7aa2f7"
color_highlight_fg="#9ece6a"
color_highlight_bg="#1a1b26"
color_current_fg="#f7768e"
color_current_bg="#1a1b26"
color_check_fg="#ad8ee6"
pane_border_fg="#a9b1d6"
pane_border_selected_fg="#9ece6a"
set -g @prefix_highlight_fg "${color_highlight_fg}"
set -g @prefix_highlight_bg "${color_highlight_bg}"
# Status bar settings
set -g status-style "bg=${color_bg0},fg=${color_fg0}"
set -g status "on"
set -g status-bg "${color_bg0}"
set -g status-justify "left"
#set -g status-left-length "100"
set -g status-right-length "100"
# Messages
set -g message-style "fg=${color_selected_fg},bg=${color_selected_bg}"
set -g message-command-style "fg=${color_selected_fg},bg=${color_selected_bg}"
# Panes
set -g pane-border-style "fg=${pane_border_fg}"
set -g pane-active-border-style "fg=${pane_border_selected_fg}"
# Windows
set -g window-status-activity-style "fg=${color_fg0},bg=${color_bg0},none"
set -g window-status-separator ""
set -g window-status-style "fg=${color_fg0},bg=${color_bg0},none"
# Statusline - current window
set -g window-status-current-format "#[fg=${color_current_fg},bg=${color_current_bg}]#I: #[fg=${color_check_fg},bg=${color_current_bg}](✓) #[fg=${color_current_fg},bg=${color_current_bg}]#W "
# Statusline - other windows
set -g window-status-format "#[fg=${color_highlight_fg},bg=${color_highlight_bg}]#I: #[fg=${color_fg0},bg=${color_highlight_bg}]#W "
# Statusline - right side
set -g status-right "#[fg=${color_fg1},bg=${color_bg0},nobold,nounderscore,noitalics]%Y-%m-%d %H:%M #[fg=${color_fg0},bg=${color_highlight_fg},nobold,nounderscore,noitalics] #[fg=${color_fg0},bg=${color_bg1}] #(echo '#{pane_current_path}' | rev | cut -d'/' -f-2 | rev) #[fg=${color_fg0},bg=${color_current_fg},nobold,nounderscore,noitalics] #[fg=${color_fg0},bg=${color_bg1}] #S "
# Modes
set -g clock-mode-colour "${color_status_fg}"
set -g mode-style "fg=${color_highlight_fg} bg=${color_bg1} bold"
# Statusline - left side (empty)
set -g status-left ""
Binary file not shown.

After

Width:  |  Height:  |  Size: 402 KiB

+4
View File
@@ -0,0 +1,4 @@
{
"name": "Tokyo Night",
"extension": "enkia.tokyo-night"
}
+6
View File
@@ -0,0 +1,6 @@
@define-color selected-text #7aa2f7;
@define-color text #a9b1d6;
@define-color base #1a1b26;
@define-color border #a9b1d6;
@define-color foreground #a9b1d6;
@define-color background #1a1b26;
+2
View File
@@ -0,0 +1,2 @@
@define-color foreground #a9b1d6;
@define-color background #1a1b26;
+1
View File
@@ -0,0 +1 @@
default
+9 -2
View File
@@ -1,5 +1,5 @@
{ {
"lastChangelogVersion": "0.80.2", "lastChangelogVersion": "0.80.10",
"theme": "light/dark", "theme": "light/dark",
"defaultProvider": "opencode-go", "defaultProvider": "opencode-go",
"defaultModel": "deepseek-v4-flash", "defaultModel": "deepseek-v4-flash",
@@ -8,5 +8,12 @@
"compaction": { "compaction": {
"enabled": true "enabled": true
}, },
"enableInstallTelemetry": false "enableInstallTelemetry": false,
"packages": [
"npm:pi-lens",
"npm:pi-native-search",
"npm:@tintinweb/pi-subagents",
"npm:context-mode",
"npm:@gotgenes/pi-permission-system"
]
} }
+1 -26
View File
@@ -1,27 +1,2 @@
SetEnv TERM=xterm-256color Include config.d/*
Host dupont
HostName 172.25.11.30
user sjb
ForwardAgent yes
RemoteForward /run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra
StreamLocalBindUnlink yes
RequestTTY yes
Host haddock-tmux
User sjb
Hostname 129.100.33.96
ForwardAgent yes
RemoteForward /run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra
StreamLocalBindUnlink yes
RequestTTY yes
RemoteCommand tmux -l new -A
Host risc-v
User sjb
Hostname 172.25.11.31
ForwardAgent yes
RemoteForward /run/user/1001/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra
StreamLocalBindUnlink yes
RequestTTY yes
+3
View File
@@ -0,0 +1,3 @@
SetEnv TERM=xterm-256color
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
pacman -Sy --noconfirm networkmanager sudo pacman -Sy --noconfirm networkmanager
if [[ -x "$(command -v systemctl)" ]]; then if [[ -x "$(command -v systemctl)" ]]; then
sudo systemctl enable --now NetworkManager.service sudo systemctl enable --now NetworkManager.service
+1 -3
View File
@@ -2,14 +2,12 @@
# SjB TODO: # SjB TODO:
# - install public keys # - install public keys
sudo pacman -Syu --noconfirm
if [[ "$(uname -m)" == "x86_64" ]]; then if [[ "$(uname -m)" == "x86_64" ]]; then
if ! pacman-key --list-keys 882DCFE48E2051D48E2562ABF3B607488DB35A47 >/dev/null 2>&1; then if ! pacman-key --list-keys 882DCFE48E2051D48E2562ABF3B607488DB35A47 >/dev/null 2>&1; then
sudo pacman-key --recv-key 882DCFE48E2051D48E2562ABF3B607488DB35A47 && sudo pacman-key --lsign-key 882DCFE48E2051D48E2562ABF3B607488DB35A47 sudo pacman-key --recv-key 882DCFE48E2051D48E2562ABF3B607488DB35A47 && sudo pacman-key --lsign-key 882DCFE48E2051D48E2562ABF3B607488DB35A47
fi fi
if sudo pacman -U --noconfirm https://cdn77.cachyos.org/repo/x86_64/cachyos/archlinux-keyring-20260420-2-any.pkg.tar.zst && if sudo pacman -U --noconfirm https://cdn77.cachyos.org/repo/x86_64/cachyos/archlinux-keyring-20260707.1-1-any.pkg.tar.zst &&
sudo pacman -U --noconfirm https://cdn77.cachyos.org/repo/x86_64/cachyos/cachyos-mirrorlist-27-1-any.pkg.tar.zst; then sudo pacman -U --noconfirm https://cdn77.cachyos.org/repo/x86_64/cachyos/cachyos-mirrorlist-27-1-any.pkg.tar.zst; then
if ! grep -q "^\[cachyos\]" /etc/pacman.conf; then if ! grep -q "^\[cachyos\]" /etc/pacman.conf; then
+1 -1
View File
@@ -17,4 +17,4 @@ if [[ -f "/etc/sdboot-manage.conf" ]]; then
sudo sed -i '/^LINUX_OPTIONS=/ s/splash\"/splash quiet\"/' /etc/sdboot-manage.conf sudo sed -i '/^LINUX_OPTIONS=/ s/splash\"/splash quiet\"/' /etc/sdboot-manage.conf
fi fi
/usr/bin/sdboot-manage gen sudo /usr/bin/sdboot-manage gen
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/sh -e #!/usr/bin/sudo /bin/sh
if [[ $UID != 0 ]]; then if [[ $UID != 0 ]]; then
echo "need to be root" echo "need to be root"
-4
View File
@@ -8,7 +8,6 @@ paru --noconfirm --needed -Sy \
cups \ cups \
cups-filters \ cups-filters \
cups-pdf \ cups-pdf \
cups-browsed \
system-config-printer \ system-config-printer \
avahi \ avahi \
nss-mdns \ nss-mdns \
@@ -37,6 +36,3 @@ if ! grep -q '^CreateRemotePrinters Yes' /etc/cups/cups-browsed.conf; then
echo 'CreateRemotePrinters Yes' | sudo tee -a /etc/cups/cups-browsed.conf echo 'CreateRemotePrinters Yes' | sudo tee -a /etc/cups/cups-browsed.conf
fi fi
if [[ -x "$(command -v systemctl)" ]]; then
sudo systemctl enable --now cups-browsed.service
fi
-9
View File
@@ -1,9 +0,0 @@
#!/bin/sh -e
${DOTFILES_DIR}/sync-config config/btop
THEME_DIR="${HOME}/.config/omarchy/current/theme"
# theme link
mkdir -p ~/.config/btop/themes
ln -snf ${THEME_DIR}/btop.theme ${HOME}/.config/btop/themes/current.theme
-48
View File
@@ -1,48 +0,0 @@
#!/bin/sh -e
if [[ -x "$(command -v systemctl)" ]]; then
systemctl --user enable --now syncthing
fi
THEME_DIR="${HOME}/.config/omarchy/current/theme"
${DOTFILES_DIR}/sync-config config/hypr
${DOTFILES_DIR}/sync-script script/hyprland-activeworkspace
${DOTFILES_DIR}/sync-script script/hyprland-keybindings
${DOTFILES_DIR}/sync-script script/hyprland-fetch-client
${DOTFILES_DIR}/sync-script script/hyprland-focus-client
${DOTFILES_DIR}/sync-script script/rofi-pass
sjb-script-installer ${SJB_CONF_DIR}/bin/bing-wallpaper
${DOTFILES_DIR}/sync-script script/bing-wallpaper
if [[ ! -x "$(command -v gsettings)" ]]; then
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true
fi
${DOTFILES_DIR}/sync-config config/rofi
${DOTFILES_DIR}/sync-config config/mako
ln -snf ${THEME_DIR}/current/theme/mako.ini ${HOME}/.config/mako/config
${DOTFILES_DIR}/sync-config config/ghostty
ln -snf ${THEME_DIR}/current/theme/ghostty ${HOME}/.config/ghostty/theme
${DOTFILES_DIR}/sync-config config/chromium-flags.conf
xdg-settings set default-web-browser firefox.desktop
if [[ -x "$(command -v systemctl)" ]]; then
${DOTFILES_DIR}/sync-config config/systemd
systemctl --user enable mako.service
systemctl --user enable hypridle.service
systemctl --user enable awww-daemon.service
systemctl --user enable gnome-keyring-daemon.service
systemctl --user enable hyprpolkitagent.service
systemctl --user enable wallpaper.timer
fi
-4
View File
@@ -1,4 +0,0 @@
#!/bin/sh -e
${DOTFILES_DIR}/sync-config config/emacs
-6
View File
@@ -1,6 +0,0 @@
#!/bin/sh -e
mkdir -p ${HOME}/.config/environment.d
${DOTFILES_DIR}/sync-config config/environment.d/
echo "DOTFILES_DIR=${DOTFILES_DIR}" | tee -a ${HOME}/.config/environment.d/dotfiles.conf
-15
View File
@@ -1,15 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v fish)" ]]; then
paru -Sy --needed --noconfirm fish fisher
fi
${DOTFILES_DIR}/sync-config config/fish
if [[ -x /usr/bin/fisher ]]; then
fisher install franciscolourenco/done
fisher install kidonng/zoxide.fish
fisher install PatrickF1/fzf.fish
fi
chsh -s /bin/fish $USER
-7
View File
@@ -1,7 +0,0 @@
#!/bin/sh -e
${DOTFILES_DIR}/sync-config config/fontconfig
rsync -av ${DOTFILES_DIR}/fonts/ ${HOME}/.local/share/fonts/
fc-cache
-18
View File
@@ -1,18 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v git)" ]]; then
paru -Sy --needed --noconfirm git
fi
${DOTFILES_DIR}/sync-config config/git
GIT_CONFIG="${HOME}/.config/git/local"
# Set identification from install inputs
if [[ -n "${SJB_USER_NAME//[[:space:]]/}" ]]; then
git config -f ${GIT_CONFIG} user.name "$SJB_USER_NAME"
fi
if [[ -n "${SJB_USER_EMAIL//[[:space:]]/}" ]]; then
git config -f ${GIT_CONFIG} user.email "$SJB_USER_EMAIL"
fi
-7
View File
@@ -1,7 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v goose-desktop)" ]]; then
paru -Sy --needed --noconfirm goose-desktop-bin
fi
${DOTFILES_DIR}/sync-config config/goose
-7
View File
@@ -1,7 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v goose)" ]]; then
paru -Sy --needed --noconfirm codename-goose-bin
fi
${DOTFILES_DIR}/sync-config config/goose
-21
View File
@@ -1,21 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v jj)" ]]; then
paru -Sy --needed --noconfirm jj
fi
${DOTFILES_DIR}/sync-config config/jj
JJ_CONFIG="${HOME}/.config/jj/conf.d/local.toml"
mkdir -p "$(dirname ${JJ_CONFIG})"
cp ${DOTFILES_DIR}/installer/templates/local.toml.tmpl ${JJ_CONFIG}
if [[ -n "${SJB_USER_NAME//[[:space:]]/}" ]]; then
sed -i "s/NAME_PLACEHOLDER/${SJB_USER_NAME}/g" ${JJ_CONFIG}
fi
if [[ -n "${SJB_USER_EMAIL//[[:space:]]/}" ]]; then
sed -i "s/EMAIL_PLACEHOLDER/${SJB_USER_EMAIL}/g" ${JJ_CONFIG}
fi
-18
View File
@@ -1,18 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v nvim)" ]]; then
paru -Sy --noconfirm neovim harper tree-sitter-cli
fi
${DOTFILES_DIR}/sync-config config/nvim
# Set specific app links for current theme
PLUGINS_DIR="${HOME}/.config/nvim/plugin"
THEME_DIR="${HOME}/.config/omarchy/current/theme"
mkdir -p ${PLUGINS_DIR}
ln -snf ${THEME_DIR}/current/theme/neovim-vimpack.lua ${PLUGINS_DIR}/theme.lua
uv tool install vectorcode
npm_config_prefix="$HOME/.local" npm install -g mcp-hub@latest
-8
View File
@@ -1,8 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v obsidian)" ]]; then
paru -Sy --needed --noconfirm obsidian
fi
xdg-mime default obsidian.desktop x-scheme-handler/obsidian
xdg-settings set default-url-scheme-handler obsidian obsidian.desktop
-8
View File
@@ -1,8 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v opencode)" ]]; then
paru -Sy --needed --noconfirm opencode-bin
fi
${DOTFILES_DIR}/sync-config config/opencode
ln -snf ${HOME}/.agents/prompts ${HOME}/.config/opencode/agents
-23
View File
@@ -1,23 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v pi)" ]]; then
node -v || paru -Sy --noconfirm nodejs npm
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
npm install -g pi-acp
fi
mkdir ~/.pi
ln -snf ~/.pi ~/.config/pi
ln -snf ~/.agents/.agents/AGENTS.md ~/.pi/agent/AGENTS.md
${DOTFILES_DIR}/sync-config config/pi
if [[ -x "$(command -v pass)" ]]; then
pass show agent/pi/agent/auth.json > ~/.pi/agent/auth.json
fi
pi install npm:pi-lens
pi install npm:@gotgenes/pi-permission-system
pi install npm:pi-native-search
pi install npm:pi-subagents
pi install npm:context-mode
-4
View File
@@ -1,4 +0,0 @@
[user]
name = "NAME_PLACEHOLDER"
email = "EMAIL_PLACEHOLDER"
-24
View File
@@ -1,24 +0,0 @@
#!/bin/sh -e
# Use dark mode for QT apps too (like kdenlive)
# Allow icons to match the theme
# Prefer dark mode everything
if [[ ! -x "$(command -v paru)" ]]; then
paru -Sy --needed --noconfirm kvantum-qt5 gnome-themes-extra yaru-icon-theme
fi
if [[ ! -x "$(command -v gsettings)" ]]; then
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"
fi
${DOTFILES_DIR}/sync-script script/omarchy-theme-bg-next
${DOTFILES_DIR}/sync-script script/omarchy-theme-list
${DOTFILES_DIR}/sync-script script/omarchy-theme-set
# Set initial theme
THEME_DIR="${HOME}/.config/omarchy/current/theme"
mkdir -p ${THEME_DIR}
omarchy-theme-set "tokyo-night"
-17
View File
@@ -1,17 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v tmux)" ]]; then
paru -Sy --needed --noconfirm tmux git zoxide fzf
fi
${DOTFILES_DIR}/sync-config config/tmux
THEME_DIR="${HOME}/.config/omarchy/current/theme"
ln -snf ${THEME_DIR}/tmux ${HOME}/.config/tmux/theme
# setup tmux
if [[ ! -d ~/.config/tmux/plugins/tpm ]]; then
git clone https://github.com/tmux-plugins/tpm ${HOME}/.config/tmux/plugins/tpm
tmux run-shell ~/.config/tmux/plugins/tpm/bindings/install_plugins
fi
-24
View File
@@ -1,24 +0,0 @@
#!/bin/sh -e
if [[ ! -x "$(command -v paru)" ]]; then
paru -Sy --needed --noconfirm chromium
fi
${DOTFILES_DIR}/sync-script script/sjb-webapp-installer
sjb-webapp-installer "WhatsApp" https://web.whatsapp.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/whatsapp.png
sjb-webapp-installer "Google Photos" https://photos.google.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-photos.png
sjb-webapp-installer "Google Contacts" https://contacts.google.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-contacts.png
sjb-webapp-installer "Google Messages" https://messages.google.com/web/conversations https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-messages.png
sjb-webapp-installer "ChatGPT" https://chatgpt.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/chatgpt.png
sjb-webapp-installer "YouTube" https://youtube.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/youtube.png
sjb-webapp-installer "GitHub" https://github.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/github-light.png
sjb-webapp-installer "Figma" https://figma.com/ https://www.veryicon.com/download/png/application/app-icon-7/figma-1?s=256
sjb-webapp-installer "Discord" https://discord.com/channels/@me https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/discord.png
sjb-webapp-installer "Twitch" https://twitch.tv/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/twitch.png
sjb-webapp-installer "Team" https://teams.microsoft.com/v2/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-teams.svg
sjb-webapp-installer "Outlook" https://outlook.office.com/mail/inbox/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-outlook.svg
sjb-webapp-installer "Slack" https://app.slack.com/client/T09M8T3BB1N/C09KZ5N0ZK9 https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/slack.svg
sjb-webapp-installer "Copilot" https://m365.cloud.microsoft https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-copilot.svg
sjb-webapp-installer "Augureal" https://chat.augureai.ca/chat https://www.svgrepo.com/download/375527/ai-platform.svg
+176 -1
View File
@@ -1,2 +1,177 @@
[env] [vars]
USER_FULLNAME = "Steve Beaulac"
USER_EMAIL = "steve@beaulac.me"
DOTFILES_DIR = "{{config_root}}" DOTFILES_DIR = "{{config_root}}"
THEME_DIR = "~/.config/omarchy/current/theme"
[settings]
dotfiles.root = "{{config_root}}"
dotfiles.default_mode = "symlink-each"
[dotfiles]
"~/.config/omarchy/current/theme" = { source = "config/omarchy/default", mode = "copy" }
"~/.config/omarchy/current/background" = { source = "config/omarchy/default/backgrounds/omarchy.png", mode = "symlink" }
"~/.config/omarchy/current/theme.name" = { source = "config/omarchy/theme.name", mode = "copy" }
"~/.config/btop" = "config/btop"
"~/.config/btop/themes/current.theme" = { source = "~/.config/omarchy/current/theme/btop.theme", mode = "symlink" }
"~/.config/emacs" = "config/emacs"
"~/.config/environment.d" = "config/environment.d"
"~/.config/environment.d/dotfiles.conf" = { source = "templates/dofiles.conf.tmpl", template = "tera", mode = "template" }
"~/.config/fish" = "config/fish" # check if we really need the fisher plugins
"~/.config/gdb" = "config/gdb"
"~/.config/ghostty" = "config/ghostty"
"~/.config/ghostty/theme" = { source = "~/.config/omarchy/current/theme/ghostty.conf", mode = "symlink" }
"~/.config/git" = "config/git"
"~/.config/git/local" = { source = "templates/git-local.tmpl", mode = "template", template = "tera" }
"~/.config/fontconfig" = { source = "config/fontconfig", mode = "copy" }
"~/.config/foot" = "config/foot"
"~/.config/hypr" = "config/hypr"
"~/.config/hypr/theme.lua" = { source = "~/.config/omarchy/current/theme/hyprland.lua", mode = "symlink" }
"~/.config/jj" = "config/jj"
"~/.config/jj/conf.d/local.toml" = { source = "templates/git-local.tmpl", mode = "template", template = "tera" }
"~/.config/kitty" = "config/kitty"
"~/.config/mako/config" = { source = "~/.config/omarchy/current/theme/mako.ini", mode = "symlink" }
"~/.config/mini.nvim" = "config/mini.nvim"
"~/.config/mise/config.toml" = { source = "config/mise/config.toml", mode = "symlink" }
"~/.config/opencode" = "config/opencode"
"~/.agents" = { source = "config/agents", mode = "symlink-each" }
"~/.config/opencode/agents" = { source = "config/agents/prompts", mode = "symlink" }
"~/.pi" = "config/pi"
"~/.pi/agent/AGENTS.md" = { source = "config/agents/AGENTS.md", mode = "symlink" }
"~/.config/rofi" = "config/rofi"
"~/.config/rofi/theme.rasi" = { source = "~/.config/omarchy/current/theme/rofi.rasi", mode = "symlink" }
"~/.ssh" = "config/ssh"
"~/.config/systemd" = { source="config/systemd", mode = "copy" }
"~/.config/tmux" = "config/tmux"
"~/.config/tmux/theme" = { source = "~/.config/omarchy/current/theme/tmux", mode = "symlink" }
"~/.config/uwsm" = "config/uwsm"
"~/.config/worktrunck" = "config/worktrunk"
"~/.config/chromium-flags.conf" = { source = "config/chromium-flags.conf", mode = "symlink" }
"~/.profile" = { source = "config/profile", mode = "symlink" }
"~/.local/share/fonts/" = { source = "fonts", mode = "copy" }
# scripts.
"~/.local/bin/hyprland-activeworkspace" = { source = "script/hyprland-activeworkspace", mode = "symlink" }
"~/.local/bin/hyprland-keybindings" = { source = "script/hyprland-keybindings", mode = "symlink" }
"~/.local/bin/hyprland-fetch-client" = { source = "script/hyprland-fetch-client", mode = "symlink" }
"~/.local/bin/hyprland-focus-client" = { source = "script/hyprland-focus-client", mode = "symlink" }
"~/.local/bin/active-workspace" = { source = "script/active-workspace", mode = "symlink" }
"~/.local/bin/avr-flash" = { source = "script/avr-flash", mode = "symlink" }
"~/.local/bin/dfu-flash" = { source = "script/dfu-flash", mode = "symlink" }
"~/.local/bin/git-bare-clone" = { source = "script/git-bare-clone", mode = "symlink" }
"~/.local/bin/git-churn" = { source = "script/git-churn", mode = "symlink" }
"~/.local/bin/hyprland-tmux-session" = { source = "script/hyprland-tmux-session", mode = "symlink" }
"~/.local/bin/hyprland-toggle-monitor" = { source = "script/hyprland-toggle-monitor", mode = "symlink" }
"~/.local/bin/ci" = { source = "script/ci", mode = "symlink" }
"~/.local/bin/rofi-pass" = { source = "script/rofi-pass", mode = "symlink" }
"~/.local/bin/sharehome" = { source = "script/sharehome", mode = "symlink" }
"~/.local/bin/sjb-orgmode-installer" = { source = "script/sjb-orgmode-installer", mode = "symlink" }
"~/.local/bin/sjb-script-installer" = { source = "script/sjb-script-installer", mode = "symlink" }
"~/.local/bin/sjb-update-config" = { source = "script/sjb-update-config", mode = "symlink" }
"~/.local/bin/sjb-webapp-installer" = { source = "script/sjb-webapp-installer", mode = "symlink" }
"~/.local/bin/sysinfo" = { source = "script/sysinfo", mode = "symlink" }
"~/.local/bin/s" = { source = "script/s", mode = "symlink" }
"~/.local/bin/t" = { source = "script/t", mode = "symlink" }
"~/.local/bin/n" = { source = "script/n", mode = "symlink" }
"~/.local/bin/ykswap" = { source = "script/ykswap", mode = "symlink" }
"~/.local/bin/bing-wallpaper" = { source = "script/bing-wallpaper", mode = "symlink" }
"~/.local/bin/omarchy-cmd-missing" = { source = "script/omarchy-cmd-missing", mode = "symlink" }
"~/.local/bin/omarchy-cmd-present" = { source = "script/omarchy-cmd-present", mode = "symlink" }
"~/.local/bin/omarchy-hook" = { source = "script/omarchy-hook", mode = "symlink" }
"~/.local/bin/omarchy-restart-btop" = { source = "script/omarchy-restart-btop", mode = "symlink" }
"~/.local/bin/omarchy-restart-hyprctl" = { source = "script/omarchy-restart-hyprctl", mode = "symlink" }
"~/.local/bin/omarchy-restart-hypridle" = { source = "script/omarchy-restart-hypridle", mode = "symlink" }
"~/.local/bin/omarchy-restart-mako" = { source = "script/omarchy-restart-mako", mode = "symlink" }
"~/.local/bin/omarchy-restart-tmux" = { source = "script/omarchy-restart-tmux", mode = "symlink" }
"~/.local/bin/omarchy-theme-bg-next" = { source = "script/omarchy-theme-bg-next", mode = "symlink" }
"~/.local/bin/omarchy-theme-bg-set" = { source = "script/omarchy-theme-bg-set", mode = "symlink" }
"~/.local/bin/omarchy-theme-colors-from-alacritty" = { source = "script/omarchy-theme-colors-from-alacritty", mode = "symlink" }
"~/.local/bin/omarchy-theme-current" = { source = "script/omarchy-theme-current", mode = "symlink" }
"~/.local/bin/omarchy-theme-install" = { source = "script/omarchy-theme-install", mode = "symlink" }
"~/.local/bin/omarchy-theme-list" = { source = "script/omarchy-theme-list", mode = "symlink" }
"~/.local/bin/omarchy-theme-refresh" = { source = "script/omarchy-theme-refresh", mode = "symlink" }
"~/.local/bin/omarchy-theme-remove" = { source = "script/omarchy-theme-remove", mode = "symlink" }
"~/.local/bin/omarchy-theme-set" = { source = "script/omarchy-theme-set", mode = "symlink" }
"~/.local/bin/omarchy-theme-set-browser" = { source = "script/omarchy-theme-set-browser", mode = "symlink" }
"~/.local/bin/omarchy-theme-set-foot" = { source = "script/omarchy-theme-set-foot", mode = "symlink" }
"~/.local/bin/omarchy-theme-set-gnome" = { source = "script/omarchy-theme-set-gnome", mode = "symlink" }
"~/.local/bin/omarchy-theme-set-keyboard" = { source = "script/omarchy-theme-set-keyboard", mode = "symlink" }
"~/.local/bin/omarchy-theme-set-keyboard-asus-rog" = { source = "script/omarchy-theme-set-keyboard-asus-rog", mode = "symlink" }
"~/.local/bin/omarchy-theme-set-keyboard-f16" = { source = "script/omarchy-theme-set-keyboard-f16", mode = "symlink" }
"~/.local/bin/omarchy-theme-set-obsidian" = { source = "script/omarchy-theme-set-obsidian", mode = "symlink" }
"~/.local/bin/omarchy-theme-set-templates" = { source = "script/omarchy-theme-set-templates", mode = "symlink" }
"~/.local/bin/omarchy-theme-set-vscode" = { source = "script/omarchy-theme-set-vscode", mode = "symlink" }
"~/.local/bin/omarchy-theme-update" = { source = "script/omarchy-theme-update", mode = "symlink" }
[bootstrap.user]
login_shell = "/usr/bin/fish"
[bootstrap.packages]
"pacman:zoxide" = "latest"
"pacman:git" = "latest"
"pacman:tmux" = "latest"
"pacman:fzf" = "latest"
"pacman:neovim" = "latest"
"pacman:harper" = "latest"
"pacman:tree-sitter-cli" = "latest"
[tasks.shells]
description = "Script to setup some cli environment"
run = [
'fish -c "fisher install franciscolourenco/done"',
'test -d ~/.config/tmux/plugins/tpm || git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm',
'tmux run-shell ~/.config/tmux/plugins/tpm/bindings/install_plugins',
'fc-cache',
]
[tasks.desktop]
description = "setup gui"
run = [
'xdg-settings set default-web-browser firefox.desktop',
'gsettings set org.gnome.desktop.interface gtk-enable-primary-paste true',
'systemctl --user enable --now syncthing',
'systemctl --user enable mako.service',
'systemctl --user enable hypridle.service',
'systemctl --user enable awww-daemon.service',
'systemctl --user enable gnome-keyring-daemon.service',
'systemctl --user enable hyprpolkitagent.service',
'systemctl --user enable wallpaper.timer',
'xdg-mime default obsidian.desktop x-scheme-handler/obsidian',
'xdg-settings set default-url-scheme-handler obsidian obsidian.desktop'
]
[tasks.theme]
description = 'configure theme'
run = [
'gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"',
'gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"',
'gsettings set org.gnome.desktop.interface icon-theme "Yaru-blue"',
'omarchy-theme-set "tokyo-night"'
]
[tasks.webapps]
description = 'create all web application'
run = [
'sjb-webapp-installer "WhatsApp" https://web.whatsapp.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/whatsapp.png',
'sjb-webapp-installer "Google Photos" https://photos.google.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-photos.png',
'sjb-webapp-installer "Google Contacts" https://contacts.google.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-contacts.png',
'sjb-webapp-installer "Google Messages" https://messages.google.com/web/conversations https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/google-messages.png',
'sjb-webapp-installer "ChatGPT" https://chatgpt.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/chatgpt.png',
'sjb-webapp-installer "YouTube" https://youtube.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/youtube.png',
'sjb-webapp-installer "GitHub" https://github.com/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/github-light.png',
'sjb-webapp-installer "Figma" https://figma.com/ https://www.veryicon.com/download/png/application/app-icon-7/figma-1?s=256',
'sjb-webapp-installer "Discord" https://discord.com/channels/@me https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/discord.png',
'sjb-webapp-installer "Twitch" https://twitch.tv/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/twitch.png',
'sjb-webapp-installer "Team" https://teams.microsoft.com/v2/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-teams.svg',
'sjb-webapp-installer "Outlook" https://outlook.office.com/mail/inbox/ https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-outlook.svg',
'sjb-webapp-installer "Slack" https://app.slack.com/client/T09M8T3BB1N/C09KZ5N0ZK9 https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/slack.svg',
'sjb-webapp-installer "Copilot" https://m365.cloud.microsoft https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-copilot.svg',
'sjb-webapp-installer "Augureal" https://chat.augureai.ca/chat https://www.svgrepo.com/download/375527/ai-platform.svg',
]
[tasks.bootstrap]
depends = ['shells', 'desktop', 'theme', 'webapps']
+1 -1
View File
@@ -94,7 +94,7 @@ pass-otp
rclone rclone
gopass gopass
weechat weechat
weechat-matrix-rs-git #weechat-matrix-rs-git
yt-dlp yt-dlp
resvg resvg
+1
View File
@@ -98,6 +98,7 @@ xdg-desktop-portal-hyprland
xdg-user-dirs xdg-user-dirs
xorg-xwayland xorg-xwayland
xournalpp xournalpp
yaru-icon-theme
zathura zathura
zathura-pdf-poppler zathura-pdf-poppler
zed zed
View File
-2
View File
@@ -1,2 +0,0 @@
#!/bin/bash
/usr/bin/rclone serve sftp $HOME --addr :2022
-271
View File
@@ -1,271 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
src_dir="$script_dir/config"
dest_dir="${HOME}/.config"
dry_run=false
target_path=""
usage() {
cat <<'EOF'
Usage: sync-config.sh [--dry-run] [path]
path can be:
config (full config)
config/tmux (specific folder)
config/tmux/config (specific file)
.config (full config)
.config/tmux (specific folder)
.config/tmux/config (specific file)
tmux (folder under .config)
tmux/config (file under .config)
EOF
}
for arg in "$@"; do
case "$arg" in
--dry-run)
dry_run=true
;;
-h|--help)
usage
exit 0
;;
*)
if [[ -z "$target_path" ]]; then
target_path="$arg"
else
echo "Error: too many arguments." >&2
usage >&2
exit 1
fi
;;
esac
done
hash_cmd="sha256sum"
if ! command -v "$hash_cmd" >/dev/null 2>&1; then
echo "Error: sha256sum not found. Install coreutils or adjust hash_cmd." >&2
exit 1
fi
file_hash() {
"$hash_cmd" "$1" | awk '{print $1}'
}
copy_file() {
local src="$1"
local dst="$2"
if $dry_run; then
echo "copy: $src -> $dst"
else
mkdir -p "$(dirname "$dst")"
cp -a "$src" "$dst"
echo "copied: $dst"
fi
}
delete_file() {
local dst="$1"
if $dry_run; then
echo "delete: $dst"
else
rm -f "$dst"
echo "deleted: $dst"
fi
}
delete_dir() {
local dst="$1"
if $dry_run; then
echo "delete dir: $dst"
else
rm -rf "$dst"
echo "deleted dir: $dst"
fi
}
if [[ ! -d "$src_dir" ]]; then
echo "Error: source config directory not found: $src_dir" >&2
exit 1
fi
mkdir -p "$dest_dir"
target_rel="$target_path"
if [[ -n "$target_rel" ]]; then
if [[ "$target_rel" == "config" || "$target_rel" == ".config" ]]; then
target_rel=""
elif [[ "$target_rel" == config/* ]]; then
target_rel=${target_rel#config/}
elif [[ "$target_rel" == .config/* ]]; then
target_rel=${target_rel#.config/}
fi
target_rel=${target_rel#./}
if [[ "$target_rel" == "." ]]; then
target_rel=""
fi
if [[ "$target_rel" == /* ]]; then
echo "Error: absolute paths are not supported: $target_path" >&2
exit 1
fi
fi
base_path="$src_dir"
if [[ -n "$target_rel" ]]; then
base_path="$src_dir/$target_rel"
fi
if [[ ! -e "$base_path" ]]; then
echo "Error: path not found in source: $base_path" >&2
exit 1
fi
check_delete_marker() {
local rel_path="$1"
# Check centralized .delete folder: config/.delete/path/to/dir_or_file
if [[ -f "$src_dir/.delete/$rel_path" ]] || [[ -d "$src_dir/.delete/$rel_path" ]]; then
return 0
fi
# Check inline .delete marker: config/path/to/.delete/dir_or_file
local parent_path="$src_dir/$rel_path"
local parent_dir=$(dirname "$parent_path")
local base_name=$(basename "$parent_path")
if [[ -f "$parent_dir/.delete/$base_name" ]] || [[ -d "$parent_dir/.delete/$base_name" ]]; then
return 0
fi
return 1
}
# Check if a path is a .delete directory or inside one (should be skipped during traversal)
is_in_delete_dir() {
local rel_path="$1"
# Check if the path itself is a .delete directory or any parent is .delete
local current="$rel_path"
while [[ "$current" != "." && "$current" != "/" && -n "$current" ]]; do
local base
base=$(basename "$current")
if [[ "$base" == ".delete" ]]; then
return 0
fi
current=$(dirname "$current")
done
return 1
}
sync_file() {
local src_path="$1"
local rel_path=${src_path#"$src_dir"/}
local dst_path="$dest_dir/$rel_path"
# Check if there's a corresponding .delete marker for this file
if check_delete_marker "$rel_path"; then
if [[ -f "$dst_path" ]]; then
delete_file "$dst_path"
deleted_files+=("$dst_path")
fi
return
fi
if [[ ! -f "$dst_path" ]]; then
copy_file "$src_path" "$dst_path"
return
fi
local src_hash
local dst_hash
src_hash=$(file_hash "$src_path")
dst_hash=$(file_hash "$dst_path")
if [[ "$src_hash" != "$dst_hash" ]]; then
copy_file "$src_path" "$dst_path"
fi
}
shopt -s globstar nullglob dotglob
if [[ -f "$base_path" ]]; then
sync_file "$base_path"
elif [[ -d "$base_path" ]]; then
for src_path in "$base_path"/**; do
rel_path=${src_path#"$src_dir"/}
if [[ "$rel_path" == ".git" || "$rel_path" == .git/* ]]; then
continue
fi
# Check if this is a .delete directory - process its contents to delete in destination
if [[ -d "$src_path" && "$(basename "$rel_path")" == ".delete" ]]; then
# Get the parent directory of the .delete folder
parent_rel_path=$(dirname "$rel_path")
# Process all files in this .delete directory to delete corresponding files in destination
for delete_marker in "$src_path"/**; do
if [[ -e "$delete_marker" ]]; then
# Get the basename of the marker (file/dir to delete)
marker_basename=$(basename "$delete_marker")
# Construct the target path in the parent directory
target_rel_path="$parent_rel_path/$marker_basename"
target_dst_path="$dest_dir/$target_rel_path"
if [[ -d "$delete_marker" ]]; then
if [[ -d "$target_dst_path" ]]; then
delete_dir "$target_dst_path"
fi
elif [[ -f "$delete_marker" ]]; then
if [[ -f "$target_dst_path" ]]; then
delete_file "$target_dst_path"
fi
fi
fi
done
# Delete the .delete folder in destination if it exists
delete_dst_path="$dest_dir/$rel_path"
if [[ -d "$delete_dst_path" ]]; then
delete_dir "$delete_dst_path"
fi
continue
fi
# Skip anything inside a .delete directory - don't process or copy
if is_in_delete_dir "$rel_path"; then
continue
fi
dst_path="$dest_dir/$rel_path"
if [[ -d "$src_path" ]]; then
# Check if there's a .delete marker for this directory
if check_delete_marker "$rel_path"; then
if [[ -d "$dst_path" ]]; then
delete_dir "$dst_path"
deleted_dirs+=("$dst_path")
fi
continue
fi
if ! $dry_run; then
mkdir -p "$dst_path"
else
echo "mkdir: $dst_path"
fi
continue
fi
if [[ ! -f "$src_path" ]]; then
continue
fi
sync_file "$src_path"
done
fi
if $dry_run; then
echo "Dry run complete. Re-run without --dry-run to apply changes."
else
echo "Sync complete. Updated files where content differed."
fi
-156
View File
@@ -1,156 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
src_dir="$script_dir/script"
dest_dir="${HOME}/.local/bin"
dry_run=false
target_path=""
usage() {
cat <<'EOF'
Usage: sync-script.sh [--dry-run] [path]
path can be:
script (all scripts)
script/foo (specific file or folder)
.local/bin (all scripts)
.local/bin/foo (specific file or folder)
foo (file or folder under script)
EOF
}
for arg in "$@"; do
case "$arg" in
--dry-run)
dry_run=true
;;
-h|--help)
usage
exit 0
;;
*)
if [[ -z "$target_path" ]]; then
target_path="$arg"
else
echo "Error: too many arguments." >&2
usage >&2
exit 1
fi
;;
esac
done
hash_cmd="sha256sum"
if ! command -v "$hash_cmd" >/dev/null 2>&1; then
echo "Error: sha256sum not found. Install coreutils or adjust hash_cmd." >&2
exit 1
fi
file_hash() {
"$hash_cmd" "$1" | awk '{print $1}'
}
copy_file() {
local src="$1"
local dst="$2"
if $dry_run; then
echo "copy: $src -> $dst"
else
mkdir -p "$(dirname "$dst")"
cp -a "$src" "$dst"
fi
}
if [[ ! -d "$src_dir" ]]; then
echo "Error: source script directory not found: $src_dir" >&2
exit 1
fi
mkdir -p "$dest_dir"
target_rel="$target_path"
if [[ -n "$target_rel" ]]; then
if [[ "$target_rel" == "script" || "$target_rel" == ".local/bin" ]]; then
target_rel=""
elif [[ "$target_rel" == script/* ]]; then
target_rel=${target_rel#script/}
elif [[ "$target_rel" == .local/bin/* ]]; then
target_rel=${target_rel#.local/bin/}
fi
target_rel=${target_rel#./}
if [[ "$target_rel" == "." ]]; then
target_rel=""
fi
if [[ "$target_rel" == /* ]]; then
echo "Error: absolute paths are not supported: $target_path" >&2
exit 1
fi
fi
base_path="$src_dir"
if [[ -n "$target_rel" ]]; then
base_path="$src_dir/$target_rel"
fi
if [[ ! -e "$base_path" ]]; then
echo "Error: path not found in source: $base_path" >&2
exit 1
fi
sync_file() {
local src_path="$1"
local rel_path=${src_path#"$src_dir"/}
local dst_path="$dest_dir/$rel_path"
if [[ ! -f "$dst_path" ]]; then
copy_file "$src_path" "$dst_path"
return
fi
local src_hash
local dst_hash
src_hash=$(file_hash "$src_path")
dst_hash=$(file_hash "$dst_path")
if [[ "$src_hash" != "$dst_hash" ]]; then
copy_file "$src_path" "$dst_path"
fi
}
shopt -s globstar nullglob dotglob
if [[ -f "$base_path" ]]; then
sync_file "$base_path"
elif [[ -d "$base_path" ]]; then
for src_path in "$base_path"/**; do
rel_path=${src_path#"$src_dir"/}
if [[ "$rel_path" == ".git" || "$rel_path" == .git/* ]]; then
continue
fi
dst_path="$dest_dir/$rel_path"
if [[ -d "$src_path" ]]; then
if ! $dry_run; then
mkdir -p "$dst_path"
else
echo "mkdir: $dst_path"
fi
continue
fi
if [[ ! -f "$src_path" ]]; then
continue
fi
sync_file "$src_path"
done
fi
if $dry_run; then
echo "Dry run complete. Re-run without --dry-run to apply changes."
else
echo "Sync complete. Updated files where content differed."
fi

Some files were not shown because too many files have changed in this diff Show More