Compare commits
1 Commits
theme-swit
...
master
Author | SHA1 | Date | |
---|---|---|---|
f36cb204c4 |
12
README.md
12
README.md
@@ -12,22 +12,28 @@
|
||||
- for aerospace window manager, have only 1 workspace/desktop
|
||||
- manual settings, refer to [ref/macos-system-settings](ref/macos-system-settings.txt)
|
||||
|
||||
--------
|
||||
|
||||
### script run
|
||||
- to do the full setup, from git root dir, run: `./box_setup.sh`
|
||||
- to copy dotfiles only, from git root dir, run: `./copy_dotfiles.sh`
|
||||
|
||||
--------
|
||||
|
||||
### after script run
|
||||
- complete manual actions specified in [ref/post-run](ref/post-run.md)
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
--------
|
||||
|
||||
### todo items
|
||||
- choose window manager for linux, then configure
|
||||
- config for: terminal (ghostty); shell; mpd, mpc, ncmpcpp; mpv
|
||||
- config for: terminal (ghostty? foot? havoc?); shell; mpd, mpc, ncmpcpp; mpv
|
||||
- hyprland config on linux
|
||||
- decide on docker? or alternatives like podman? any license concerns?
|
||||
- switch installation approach, use csv file with programs to install, install types,
|
||||
any extra flags/opts, comments
|
||||
- regarding the system-types idea i'd started to build in already, maybe have a
|
||||
column for filtering in the csv file, or just have multiple csv files corresponding
|
||||
to a base/core install, a music-studio install, a employer/work machine, etc.
|
||||
- alternate idea: columns for "include_in_systems" and/or "excluded_from_systems"
|
||||
- if both, likely apply the include column first, then the exclude (priority)
|
||||
- add command in tmux to perform cd to a given dir in all windows of the current session
|
||||
|
@@ -1,16 +1,18 @@
|
||||
#!/bin/zsh
|
||||
|
||||
# likely on unix systems already: find xargs grep sed awk
|
||||
# likely on unix systems already: find, xargs, awk? (maybe get alternative like nawk?)
|
||||
${=BOX_SETUP_INSTALL_COMMAND} \
|
||||
curl \
|
||||
grep \
|
||||
ripgrep \
|
||||
sed \
|
||||
fzf \
|
||||
jq \
|
||||
parallel \
|
||||
fzf \
|
||||
make \
|
||||
cmake \
|
||||
gettext \
|
||||
grep \
|
||||
ripgrep
|
||||
gettext
|
||||
# TODO: add to above a system info monitor like htop, btop, gotop, or something similar
|
||||
|
||||
utils_package_name_pandoc="pandoc"
|
||||
case $BOX_SETUP_DISTRO in
|
||||
|
@@ -23,6 +23,8 @@ source ./src_files/.config/zsh/.zshenv # ensure env vars set for use below
|
||||
[[ ! -d "$DIR_DEV" ]] && mkdir -p $DIR_DEV
|
||||
[[ ! -d "$DIR_GIT_PROJECTS" ]] && mkdir -p $DIR_GIT_PROJECTS
|
||||
[[ ! -d "$DIR_GIT_PROJECTS/me" ]] && mkdir -p $DIR_DEV/git/me
|
||||
[[ ! -d "$DIR_GIT_PROJECTS/forks" ]] && mkdir -p $DIR_DEV/git/forks
|
||||
[[ ! -d "$DIR_GIT_PROJECTS/learning" ]] && mkdir -p $DIR_DEV/git/learning
|
||||
[[ ! -d "$DIR_GIT_PROJECTS/other" ]] && mkdir -p $DIR_DEV/git/other
|
||||
|
||||
# directories for music/audio production
|
||||
|
@@ -4,7 +4,7 @@ local csgAutocmd = vim.api.nvim_create_autocmd
|
||||
require("settings")
|
||||
require("plugin_manager")
|
||||
require("key_mappings")
|
||||
require("theme")
|
||||
require("colorscheme_settings")
|
||||
|
||||
csgAutocmd({"BufWritePre"}, {
|
||||
group = csGroup,
|
||||
|
17
src_files/.config/nvim/lua/colorscheme_settings.lua
Normal file
17
src_files/.config/nvim/lua/colorscheme_settings.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
local defaultColorScheme = "tokyodark"
|
||||
|
||||
function SetColorSchemeWrapper(scheme)
|
||||
scheme = scheme or defaultColorScheme
|
||||
vim.cmd.colorscheme(scheme)
|
||||
end
|
||||
|
||||
SetColorSchemeWrapper(defaultColorScheme)
|
||||
--
|
||||
-- SetColorSchemeWrapper("tokyodark")
|
||||
-- SetColorSchemeWrapper("tokyonight-night")
|
||||
-- SetColorSchemeWrapper("bamboo-vulgaris")
|
||||
-- SetColorSchemeWrapper("rose-pine-main")
|
||||
-- SetColorSchemeWrapper("gruvbox")
|
||||
-- SetColorSchemeWrapper("slate")
|
||||
-- SetColorSchemeWrapper("sorbet")
|
||||
|
@@ -7,23 +7,23 @@ local kmgAutocmd = vim.api.nvim_create_autocmd
|
||||
-- explore the directory of the current file (using netrw)
|
||||
vim.keymap.set("n", "<leader>n", vim.cmd.Ex)
|
||||
|
||||
-- move selected lines up or down
|
||||
-- move visually-selected lines up or down
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv")
|
||||
|
||||
-- vertically center cursor with half-page jumps
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||
-- reduce effective distance of half-page jumps and vertically-center the cursor
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>4<C-y>M")
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>4<C-e>M")
|
||||
|
||||
-- open folds when iterating search results
|
||||
vim.keymap.set("n", "n", "nzv")
|
||||
vim.keymap.set("n", "N", "Nzv")
|
||||
|
||||
-- maintain cursor position after paragraph formatting
|
||||
vim.keymap.set("n", "=ap", "ma=ap'a")
|
||||
vim.keymap.set("n", "=ap", "mF=ap'F")
|
||||
|
||||
-- shortcuts for deleting into the void register
|
||||
vim.keymap.set({ "n", "v" }, "<leader>d", "\"_d")
|
||||
vim.keymap.set({ "n", "v" }, "<leader>d", [["_d]])
|
||||
vim.keymap.set("x", "<leader>P", [["_dP]]) -- replace selected text, keep main register
|
||||
|
||||
-- shortcuts for using + register (system clipboard)
|
||||
@@ -52,6 +52,16 @@ vim.keymap.set("n", "<C-h>", [[<C-w>h]])
|
||||
vim.keymap.set("n", "<C-j>", [[<C-w>j]])
|
||||
vim.keymap.set("n", "<C-k>", [[<C-w>k]])
|
||||
vim.keymap.set("n", "<C-l>", [[<C-w>l]])
|
||||
kmgAutocmd('FileType', {
|
||||
group = kmGroup,
|
||||
pattern = "netrw",
|
||||
callback = function()
|
||||
vim.keymap.set("n", "<C-h>", [[<C-w>h]], { remap = true, buffer = true })
|
||||
vim.keymap.set("n", "<C-j>", [[<C-w>j]], { remap = true, buffer = true })
|
||||
vim.keymap.set("n", "<C-k>", [[<C-w>k]], { remap = true, buffer = true })
|
||||
vim.keymap.set("n", "<C-l>", [[<C-w>l]], { remap = true, buffer = true })
|
||||
end
|
||||
})
|
||||
|
||||
------------------------------------------------------------------------------------------
|
||||
-- quickfix TODO: learn about quickfix (:help quickfix), then maybe use these
|
||||
@@ -71,14 +81,17 @@ vim.keymap.set("n", "<leader>bo", dap.step_over, { desc = "debug: step over" })
|
||||
vim.keymap.set("n", "<leader>bu", dap.step_out, { desc = "debug: step out" })
|
||||
vim.keymap.set("n", "<leader>blb", dap.list_breakpoints, { desc = "debug: list breakpoints" })
|
||||
vim.keymap.set("n", "<leader>bt", dap.toggle_breakpoint, { desc = "debug: toggle breakpoint" })
|
||||
vim.keymap.set("n", "<leader>bb", dap.set_breakpoint, { desc = "debug: set breakpoint" })
|
||||
|
||||
vim.keymap.set("n", "<leader>bB", function()
|
||||
dap.set_breakpoint(vim.fn.input("breakpoint condition: "))
|
||||
end, { desc = "debug: set conditional breakpoint" })
|
||||
|
||||
vim.keymap.set("n", "<leader>bv", function()
|
||||
require("nvim-dap-virtual-text").toggle()
|
||||
end, { desc = "debug: toggle virtual text" })
|
||||
|
||||
vim.keymap.set("n", "<leader>bq", function()
|
||||
dap.terminate() require("dapui").close() require("nvim-dap-virtual-text").toggle()
|
||||
dap.terminate() require("dapui").close() require("nvim-dap-virtual-text").disable()
|
||||
end, { desc = "debug: quit debugger" })
|
||||
|
||||
-- TODO: decide if i want these or others, add if so
|
||||
@@ -121,8 +134,8 @@ local custom_grep_str_w_regex = function()
|
||||
end
|
||||
vim.keymap.set('n', '<leader>ft', tscBuiltin.live_grep, { desc = 'tscope find text, live_grep' })
|
||||
vim.keymap.set('n', '<leader>fT', custom_grep_str_w_regex, { desc = 'tscope find text, static grep w/regex' })
|
||||
vim.keymap.set('n', '<leader>fg', tscBuiltin.git_files, { desc = 'tscope find git-tracked files' })
|
||||
vim.keymap.set('n', '<leader>ff', tscBuiltin.find_files, { desc = 'tscope find files' })
|
||||
vim.keymap.set('n', '<leader>fg', tscBuiltin.git_files, { desc = 'tscope find git-tracked files' })
|
||||
vim.keymap.set('n', '<leader>fb', tscBuiltin.buffers, { desc = 'tscope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh', tscBuiltin.help_tags, { desc = 'tscope help tags' })
|
||||
|
||||
@@ -133,14 +146,18 @@ vim.keymap.set("n", "<leader>ha", function() harpoon:list():add() end)
|
||||
vim.keymap.set("n", "<leader>hA", function() harpoon:list():prepend() end)
|
||||
vim.keymap.set("n", "<leader>hn", function() harpoon:list():next() end)
|
||||
vim.keymap.set("n", "<leader>hp", function() harpoon:list():prev() end)
|
||||
|
||||
vim.keymap.set("n", "<leader>hz", function() harpoon:list():select(1) end)
|
||||
vim.keymap.set("n", "<leader>hx", function() harpoon:list():select(2) end)
|
||||
vim.keymap.set("n", "<leader>hc", function() harpoon:list():select(3) end)
|
||||
vim.keymap.set("n", "<leader>hv", function() harpoon:list():select(4) end)
|
||||
vim.keymap.set("n", "<leader>hb", function() harpoon:list():select(5) end)
|
||||
|
||||
vim.keymap.set("n", "<leader>hZ", function() harpoon:list():replace_at(1) end)
|
||||
vim.keymap.set("n", "<leader>hX", function() harpoon:list():replace_at(2) end)
|
||||
vim.keymap.set("n", "<leader>hC", function() harpoon:list():replace_at(3) end)
|
||||
vim.keymap.set("n", "<leader>hV", function() harpoon:list():replace_at(4) end)
|
||||
vim.keymap.set("n", "<leader>hB", function() harpoon:list():replace_at(5) end)
|
||||
|
||||
-- undotree
|
||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||
|
@@ -22,13 +22,8 @@ vim.opt.rtp:prepend(path_lazy_nvim)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{ import = "plugins_lazy" },
|
||||
{ import = "plugins_lazy" },
|
||||
},
|
||||
checker = { enabled = false },
|
||||
change_detection = { notify = false },
|
||||
dev = {
|
||||
path = "~/dev/git/other/omarchy/plugins",
|
||||
patterns = { 'LazyVim' },
|
||||
fallback = false,
|
||||
},
|
||||
})
|
||||
|
@@ -70,4 +70,8 @@ return {
|
||||
require('bamboo').load()
|
||||
end,
|
||||
},
|
||||
{
|
||||
dir = os.getenv('DIR_GIT_PROJECTS') .. "/other/omarchy-pina-theme/pina.nvim",
|
||||
name = "pina",
|
||||
},
|
||||
}
|
||||
|
@@ -119,10 +119,5 @@ return {
|
||||
dependencies = {
|
||||
"mfussenegger/nvim-dap",
|
||||
},
|
||||
-- TODO: disabled by default, keymapping to toggle
|
||||
-- config = function()
|
||||
-- local dap_virtual_text = require("nvim-dap-virtual-text")
|
||||
-- dap_virtual_text.setup()
|
||||
-- end,
|
||||
},
|
||||
}
|
||||
|
@@ -1,3 +1,7 @@
|
||||
return {
|
||||
"mbbill/undotree",
|
||||
config = function()
|
||||
vim.g.undotree_SplitWidth = 41
|
||||
vim.g.undotree_DiffpanelHeight = 14
|
||||
end,
|
||||
}
|
||||
|
@@ -1,31 +0,0 @@
|
||||
local defaultColorScheme = "tokyodark"
|
||||
-- local defaultColorScheme = "tokyonight-night"
|
||||
-- local defaultColorScheme = "bamboo-vulgaris"
|
||||
-- local defaultColorScheme = "rose-pine-main"
|
||||
-- local defaultColorScheme = "gruvbox"
|
||||
-- local defaultColorScheme = "slate"
|
||||
-- local defaultColorScheme = "sorbet"
|
||||
|
||||
local ok, theme_specs = pcall(dofile, (os.getenv('DIR_CURRENT_THEME') or "") .. "/neovim.lua")
|
||||
if not ok then
|
||||
vim.notify(
|
||||
'current theme file not found, using default: ' .. defaultColorScheme,
|
||||
vim.log.levels.INFO
|
||||
)
|
||||
vim.cmd.colorscheme(defaultColorScheme)
|
||||
return
|
||||
end
|
||||
|
||||
local first = theme_specs[1]
|
||||
local plugin_name = (type(first.name) == 'string' and first.name)
|
||||
or (type(first[1]) == 'string' and first[1]:match('.*/(.*)'))
|
||||
or 'plugin_name_not_found'
|
||||
|
||||
local last = theme_specs[#theme_specs]
|
||||
local colorscheme = ((type(last.opts) == 'table' and type(last.opts.colorscheme) == 'string') and last.opts.colorscheme)
|
||||
or plugin_name:gsub("%.%w+$", "")
|
||||
|
||||
colorscheme = (colorscheme == 'plugin_name_not_found' and defaultColorScheme)
|
||||
or colorscheme
|
||||
vim.cmd.colorscheme(colorscheme)
|
||||
|
@@ -5,10 +5,10 @@ export TERMINAL='ghostty'
|
||||
|
||||
# env vars used for my organization structure
|
||||
export DIR_HOME_BOX="$HOME/dbox"
|
||||
export DIR_MUSIC="$DIR_HOME_BOX/media/music"
|
||||
export DIR_NOTES="$DIR_HOME_BOX/notes"
|
||||
export DIR_MUSIC="$DIR_HOME_BOX/music/listen"
|
||||
export DIR_DEV="$HOME/dev"
|
||||
export DIR_GIT_PROJECTS="$DIR_DEV/git"
|
||||
export DIR_NOTES="$DIR_HOME_BOX/notes"
|
||||
|
||||
# util dirs; do not change without checking impact on xdg base dirs
|
||||
export DIR_LOCAL="$HOME/.local"
|
||||
|
@@ -1,68 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
name = "gruvbox",
|
||||
-- lazy = false,
|
||||
-- priority = 1000,
|
||||
opts = {
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = true,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- "hard", "soft", or ""
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
style = "night", -- "night", "storm", "moon", "day"
|
||||
styles = {
|
||||
functions = {} -- disable italic for functions
|
||||
},
|
||||
on_colors = function(colors)
|
||||
colors.hint = colors.orange
|
||||
colors.error = "#ff0000"
|
||||
colors.fg_gutter = "#9098B8"
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
"tiagovla/tokyodark.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
custom_highlights = function(highlights, _palette)
|
||||
highlights.Comment['fg'] = "#8a9097"
|
||||
highlights.LineNr['fg'] = "#8088A8"
|
||||
return highlights
|
||||
end,
|
||||
},
|
||||
},
|
||||
{
|
||||
'ribru17/bamboo.nvim',
|
||||
-- lazy = false,
|
||||
-- priority = 1000,
|
||||
config = function()
|
||||
require('bamboo').setup { }
|
||||
require('bamboo').load()
|
||||
end,
|
||||
},
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
return {
|
||||
{
|
||||
'ribru17/bamboo.nvim',
|
||||
-- lazy = false,
|
||||
-- priority = 1000,
|
||||
config = function()
|
||||
require('bamboo').setup { }
|
||||
require('bamboo').load()
|
||||
end,
|
||||
},
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("catppuccin").setup({
|
||||
flavour = "latte", -- other options: "mocha", "frappe", "macchiato"
|
||||
})
|
||||
vim.cmd.colorscheme("catppuccin-latte")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "catppuccin-latte",
|
||||
},
|
||||
},
|
||||
}
|
@@ -1,15 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"neanias/everforest-nvim",
|
||||
opts = {
|
||||
background = "soft",
|
||||
},
|
||||
},
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "everforest",
|
||||
background = "soft",
|
||||
},
|
||||
},
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
name = "gruvbox",
|
||||
-- lazy = false,
|
||||
-- priority = 1000,
|
||||
opts = {
|
||||
terminal_colors = true, -- add neovim terminal colors
|
||||
undercurl = true,
|
||||
underline = true,
|
||||
bold = true,
|
||||
italic = {
|
||||
strings = true,
|
||||
emphasis = true,
|
||||
comments = true,
|
||||
operators = false,
|
||||
folds = true,
|
||||
},
|
||||
strikethrough = true,
|
||||
invert_selection = false,
|
||||
invert_signs = false,
|
||||
invert_tabline = false,
|
||||
inverse = true, -- invert background for search, diffs, statuslines and errors
|
||||
contrast = "", -- "hard", "soft", or ""
|
||||
palette_overrides = {},
|
||||
overrides = {},
|
||||
dim_inactive = false,
|
||||
transparent_mode = false,
|
||||
},
|
||||
},
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
return {
|
||||
{ "tahayvr/matteblack.nvim", lazy = false, priority = 1000 },
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "matteblack",
|
||||
},
|
||||
},
|
||||
}
|
@@ -1,9 +0,0 @@
|
||||
return {
|
||||
{ "EdenEast/nightfox.nvim" },
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "nordfox",
|
||||
},
|
||||
},
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"tiagovla/tokyodark.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
custom_highlights = function(highlights, _palette)
|
||||
highlights.Comment['fg'] = "#8a9097"
|
||||
highlights.LineNr['fg'] = "#8088A8"
|
||||
return highlights
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
style = "night", -- "night", "storm", "moon", "day"
|
||||
styles = {
|
||||
functions = {} -- disable italic for functions
|
||||
},
|
||||
on_colors = function(colors)
|
||||
colors.hint = colors.orange
|
||||
colors.error = "#ff0000"
|
||||
colors.fg_gutter = "#9098B8"
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
return {
|
||||
{
|
||||
"tiagovla/tokyodark.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
custom_highlights = function(highlights, _palette)
|
||||
highlights.Comment['fg'] = "#8a9097"
|
||||
highlights.LineNr['fg'] = "#8088A8"
|
||||
return highlights
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
local M = {}
|
||||
|
||||
M.opts = {}
|
||||
|
||||
function M.setup(opts)
|
||||
end
|
||||
|
||||
return M
|
@@ -1,86 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# OMARCHY_CURRENT_THEME_NEOVIM="~/.config/omarchy/current/theme/neovim.lua"
|
||||
OMARCHY_CURRENT_THEME_NEOVIM="./neovim.lua"
|
||||
|
||||
if [[ ! -f "$OMARCHY_CURRENT_THEME_NEOVIM" ]]; then
|
||||
echo "neovim theme not found for live update: $OMARCHY_CURRENT_THEME_NEOVIM" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
read -r plugin_name colorscheme_name <<< "$(
|
||||
nvim -l <(cat << NESTED_LUA_BLOCK
|
||||
local ok, plugins = pcall(dofile, '${OMARCHY_CURRENT_THEME_NEOVIM}')
|
||||
if not ok then
|
||||
print('ERROR: could not load neovim theme file for live update')
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
local first = plugins[1]
|
||||
local plugin_name = (type(first.name) == 'string' and first.name)
|
||||
or (type(first[1]) == 'string' and first[1]:match('.*/(.*)'))
|
||||
or 'plugin_name_not_found'
|
||||
|
||||
if plugin_name == 'plugin_name_not_found' then
|
||||
print('ERROR: could not detect neovim theme plugin for live update')
|
||||
os.exit(1)
|
||||
end
|
||||
|
||||
local last = plugins[#plugins]
|
||||
local colorscheme = ((type(last.opts) == 'table' and type(last.opts.colorscheme) == 'string') and last.opts.colorscheme)
|
||||
or plugin_name:gsub("%.%w+$", "")
|
||||
|
||||
vim.print(plugin_name .. " " .. colorscheme)
|
||||
NESTED_LUA_BLOCK
|
||||
) > /dev/stdout 2>&1 | tr -d '\r'
|
||||
)"
|
||||
|
||||
nvim --headless +"lua require(\"lazy\").install({ show = false, wait = true })" +q > /dev/null 2>&1
|
||||
|
||||
nvim_stdpath_run=$(dirname $(nvim -l <(echo "vim.cmd.echo('stdpath(\"run\")')") > /dev/stdout 2>&1))
|
||||
find "$nvim_stdpath_run" -type s -name "nvim*" 2> /dev/null |
|
||||
while IFS= read -r nvim_server; do
|
||||
# echo "running for $nvim_server"
|
||||
timeout 2s nvim --server "$nvim_server" \
|
||||
--remote-expr "execute('lua require(\"lazy\").install({ show = false, wait = true })')" \
|
||||
> /dev/null 2>&1
|
||||
timeout 4s nvim --server "$nvim_server" \
|
||||
--remote-expr "execute('lua require(\"lazy\").load({ show = false, wait = true, plugins = { \"$plugin_name\" } })')" \
|
||||
> /dev/null 2>&1
|
||||
timeout 2s nvim --server "$nvim_server" \
|
||||
--remote-expr "execute('colorscheme $colorscheme_name')" \
|
||||
> /dev/null 2>&1
|
||||
# echo "finished for $nvim_server"
|
||||
done
|
||||
|
||||
##########################################################################################
|
||||
|
||||
# ln -snf ~/dev/git/other/omarchy/neovim.lua ~/.config/nvim/lua/plugins_lazy/colorschemes.lua
|
||||
# ref only
|
||||
# lua require("lazy").install({ show = false, wait = true })
|
||||
# lua require("lazy").load({ show = false, wait = true, plugins = { "nightfox.nvim" } })
|
||||
# lua require("lazy").build({ show = false, wait = true, plugins = { name = "tokyonight.nvim" } })
|
||||
# lua require("lazy").reload({ show = false, wait = true, plugins = { name = "tokyonight.nvim" } })
|
||||
|
||||
# get neovim theme file, parse as lua? load the tables and get first value in each, as well as a name if one is set
|
||||
# if name is set, that is plugin name which lazy.nvim knows, if not, then take the value after the / in the git repo name
|
||||
|
||||
# also, in the final table, parse out the colorscheme value, that is what needs to be passed to my loop below
|
||||
# if none is present, then default to the plugin name from above, but trim off any .suffix like .nvim
|
||||
|
||||
# # nvim_sockets=$(find /var/folders -type s -user "$USERNAME" -name "nvim*" -path "*nvim.$USERNAME*" 2> /dev/null)
|
||||
# nvim_sockets=$(find /var/folders -type s -name "nvim*" -path "*nvim.*" 2> /dev/null)
|
||||
# # for s in "${nvim_sockets[@]}"; do
|
||||
# for s in $nvim_sockets; do
|
||||
# echo "will run for $s"
|
||||
# # nvim --server "$s" --remote-expr "execute('colorscheme $1')"
|
||||
# done
|
||||
|
||||
# find /var/folders -type s -name "nvim*" -path "*nvim.*" 2> /dev/null | while IFS= read -r server; do
|
||||
|
||||
# nvim -l <(echo "vim.cmd.echo('stdpath(\"run\")')") > /dev/stdout 2>&1 |
|
||||
# dirname $@ |
|
||||
# find $@ -type s -name "nvim*" 2> /dev/null |
|
||||
# while IFS= read -r server; do
|
||||
# timeout 0.5s nvim --server "$server" --remote-expr "execute('colorscheme $1')" > /dev/null 2>&1
|
||||
# done
|
Reference in New Issue
Block a user