omarchy
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Arch package build files
|
||||
*.pkg.tar.zst
|
||||
*.pkg.tar.xz
|
||||
*.pkg.tar.gz
|
||||
*.tar.gz
|
||||
*.tar.xz
|
||||
|
||||
# Build directories
|
||||
src/
|
||||
pkg/
|
||||
starter/
|
||||
|
||||
# Makepkg files
|
||||
*.log
|
||||
*.sig
|
||||
!.omarchy/
|
||||
!.omarchy/**
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"source": "local"
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
# Maintainer: Ryan Hughes <ryan@omarchy.org>
|
||||
pkgname=omarchy-nvim
|
||||
pkgver=2026.4.23
|
||||
pkgrel=1
|
||||
pkgdesc="Pre-built LazyVim configuration with cached plugins"
|
||||
arch=('any')
|
||||
url="https://github.com/LazyVim/LazyVim"
|
||||
license=('MIT')
|
||||
depends=('neovim>=0.9.0' 'git')
|
||||
makedepends=('git' 'nodejs' 'npm' 'tree-sitter-cli')
|
||||
conflicts=('omarchy-lazyvim')
|
||||
options=('!debug')
|
||||
source=("https://github.com/LazyVim/starter/archive/refs/heads/main.tar.gz")
|
||||
sha256sums=('d865d50211358358d3c3c1e356773c1e3de1e8964215d85eb1b4c77521e17488')
|
||||
|
||||
build() {
|
||||
cd "$srcdir"
|
||||
|
||||
# Create isolated environment for building
|
||||
export HOME="$srcdir/build-home"
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
|
||||
mkdir -p "$XDG_CONFIG_HOME" "$XDG_DATA_HOME" "$XDG_STATE_HOME" "$XDG_CACHE_HOME"
|
||||
|
||||
# Setup LazyVim starter
|
||||
cp -r "$srcdir/starter-main" "$XDG_CONFIG_HOME/nvim"
|
||||
rm -rf "$XDG_CONFIG_HOME/nvim/.git"
|
||||
|
||||
# Copy our custom configs
|
||||
cp -r "$startdir/lua" "$XDG_CONFIG_HOME/nvim/"
|
||||
cp -r "$startdir/plugin" "$XDG_CONFIG_HOME/nvim/"
|
||||
cp "$startdir/lazyvim.json" "$XDG_CONFIG_HOME/nvim/"
|
||||
|
||||
echo "vim.opt.relativenumber = false" >>"$XDG_CONFIG_HOME/nvim/lua/config/options.lua"
|
||||
|
||||
echo "Installing LazyVim plugins..."
|
||||
nvim --headless \
|
||||
"+Lazy! sync" \
|
||||
"+qa!" || true
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir"
|
||||
|
||||
install -dm755 "$pkgdir/usr/share/$pkgname"
|
||||
|
||||
cp -a "$XDG_CONFIG_HOME/nvim" "$pkgdir/usr/share/$pkgname/config"
|
||||
cp -a "$XDG_DATA_HOME/nvim" "$pkgdir/usr/share/$pkgname/data"
|
||||
|
||||
# Remove everything from site/ directory but keep the directory to prevent error
|
||||
rm -rf "$pkgdir/usr/share/$pkgname/data/site"/*
|
||||
mkdir -p "$pkgdir/usr/share/$pkgname/data/site"
|
||||
|
||||
# Fix permissions to be readable by all users
|
||||
chmod -R 755 "$pkgdir/usr/share/$pkgname"
|
||||
find "$pkgdir/usr/share/$pkgname" -type f -exec chmod 644 {} \;
|
||||
|
||||
# Install setup script to /usr/bin
|
||||
install -Dm755 "$startdir/omarchy-nvim-setup" "$pkgdir/usr/bin/omarchy-nvim-setup"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extras": [
|
||||
"lazyvim.plugins.extras.editor.neo-tree"
|
||||
],
|
||||
"install_version": 8,
|
||||
"news": {
|
||||
"NEWS.md": "10960"
|
||||
},
|
||||
"version": 8
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
return {
|
||||
-- Load all theme plugins but don't apply them
|
||||
-- This ensures all colorschemes are available for hot-reloading
|
||||
{
|
||||
"ribru17/bamboo.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"bjarneo/aether.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"bjarneo/ethereal.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"bjarneo/hackerman.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"bjarneo/vantablack.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"bjarneo/white.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"sainnhe/everforest",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"kepano/flexoki-neovim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"rebelot/kanagawa.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"tahayvr/matteblack.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"loctvl842/monokai-pro.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"shaunsingh/nord.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"OldJobobo/miasma.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"OldJobobo/retro-82.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
{
|
||||
"omacom-io/lumon.nvim",
|
||||
lazy = true,
|
||||
priority = 1000,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
news = {
|
||||
lazyvim = false,
|
||||
neovim = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
return {
|
||||
{
|
||||
name = "theme-hotreload",
|
||||
dir = vim.fn.stdpath("config"),
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
local transparency_file = vim.fn.stdpath("config") .. "/plugin/after/transparency.lua"
|
||||
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyReload",
|
||||
callback = function()
|
||||
-- Unload the theme module
|
||||
package.loaded["plugins.theme"] = nil
|
||||
|
||||
vim.schedule(function()
|
||||
local ok, theme_spec = pcall(require, "plugins.theme")
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
|
||||
-- Find the theme plugin and unload it
|
||||
local theme_plugin_name = nil
|
||||
for _, spec in ipairs(theme_spec) do
|
||||
if spec[1] and spec[1] ~= "LazyVim/LazyVim" then
|
||||
theme_plugin_name = spec.name or spec[1]
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- Clear all highlight groups before applying new theme
|
||||
vim.cmd("highlight clear")
|
||||
if vim.fn.exists("syntax_on") then
|
||||
vim.cmd("syntax reset")
|
||||
end
|
||||
|
||||
-- Reset background to default so colorscheme can set it properly (light themes will set to light)
|
||||
vim.o.background = "dark"
|
||||
|
||||
-- Unload theme plugin modules to force full reload
|
||||
if theme_plugin_name then
|
||||
local plugin = require("lazy.core.config").plugins[theme_plugin_name]
|
||||
if plugin then
|
||||
-- Unload all lua modules from the plugin directory
|
||||
local plugin_dir = plugin.dir .. "/lua"
|
||||
require("lazy.core.util").walkmods(plugin_dir, function(modname)
|
||||
package.loaded[modname] = nil
|
||||
package.preload[modname] = nil
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
-- Find and apply the new colorscheme
|
||||
for _, spec in ipairs(theme_spec) do
|
||||
if spec[1] == "LazyVim/LazyVim" and spec.opts and spec.opts.colorscheme then
|
||||
local colorscheme = spec.opts.colorscheme
|
||||
|
||||
-- Load the colorscheme plugin
|
||||
require("lazy.core.loader").colorscheme(colorscheme)
|
||||
|
||||
vim.defer_fn(function()
|
||||
-- Apply the colorscheme (it will set background itself)
|
||||
pcall(vim.cmd.colorscheme, colorscheme)
|
||||
|
||||
-- Force redraw to update all UI elements
|
||||
vim.cmd("redraw!")
|
||||
|
||||
-- Reload transparency settings
|
||||
if vim.fn.filereadable(transparency_file) == 1 then
|
||||
vim.defer_fn(function()
|
||||
vim.cmd.source(transparency_file)
|
||||
|
||||
-- Trigger UI updates for various plugins
|
||||
vim.api.nvim_exec_autocmds("ColorScheme", { modeline = false })
|
||||
vim.api.nvim_exec_autocmds("VimEnter", { modeline = false })
|
||||
|
||||
-- Final redraw
|
||||
vim.cmd("redraw!")
|
||||
end, 5)
|
||||
end
|
||||
end, 5)
|
||||
|
||||
break
|
||||
end
|
||||
end
|
||||
end)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
scroll = {
|
||||
enabled = false, -- Disable scrolling animations
|
||||
},
|
||||
},
|
||||
}
|
||||
Executable
+78
@@ -0,0 +1,78 @@
|
||||
#!/bin/bash
|
||||
# Setup script for omarchy-nvim
|
||||
# This can be called from Omarchy setup scripts
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
PACKAGE_DIR="/usr/share/omarchy-nvim"
|
||||
CONFIG_DIR="${HOME}/.config/nvim"
|
||||
DATA_DIR="${HOME}/.local/share/nvim"
|
||||
STATE_DIR="${HOME}/.local/state/nvim"
|
||||
CACHE_DIR="${HOME}/.cache/nvim"
|
||||
|
||||
# Check if package is installed
|
||||
if [[ ! -d "$PACKAGE_DIR" ]]; then
|
||||
echo "Error: omarchy-nvim package not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if nvim config already exists
|
||||
if [[ -d "$CONFIG_DIR" ]]; then
|
||||
if gum confirm "$(echo -e "Neovim configuration already exists at $CONFIG_DIR.\nThis will create a backup and overwrite it. Continue?")"; then
|
||||
# Backup existing config
|
||||
BACKUP_DIR="${CONFIG_DIR}.backup.$(date +%Y%m%d-%H%M%S)"
|
||||
echo "Backing up existing config to $BACKUP_DIR"
|
||||
mv "$CONFIG_DIR" "$BACKUP_DIR"
|
||||
else
|
||||
echo "Setup cancelled."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Setting up Neovim configuration..."
|
||||
|
||||
# Make sure everything is clear
|
||||
rm -rf $DATA_DIR $CACHE_DIR $STATE_DIR
|
||||
|
||||
# Create directories if needed
|
||||
mkdir -p "$(dirname "$CONFIG_DIR")"
|
||||
mkdir -p "$(dirname "$DATA_DIR")"
|
||||
|
||||
# Copy files (cache will be regenerated on first use)
|
||||
cp -r "$PACKAGE_DIR/config" "$CONFIG_DIR"
|
||||
cp -r "$PACKAGE_DIR/data" "$DATA_DIR"
|
||||
|
||||
# Ensure proper ownership of all nvim directories
|
||||
chown -R "${USER}:${USER}" "$CONFIG_DIR"
|
||||
chown -R "${USER}:${USER}" "$DATA_DIR"
|
||||
|
||||
# Create link for current theme
|
||||
ln -snf "${HOME}/.config/omarchy/current/theme/neovim.lua" "${CONFIG_DIR}/lua/plugins/theme.lua"
|
||||
|
||||
# Restore git working trees
|
||||
for dir in $DATA_DIR/lazy/*/; do
|
||||
if [ -d "$dir/.git" ]; then
|
||||
git --git-dir="$dir/.git" --work-tree="$dir" restore .
|
||||
fi
|
||||
done
|
||||
|
||||
# Set nvim.desktop as default so it takes priority in Nautilus
|
||||
xdg-mime default nvim.desktop text/plain
|
||||
xdg-mime default nvim.desktop text/english
|
||||
xdg-mime default nvim.desktop text/x-makefile
|
||||
xdg-mime default nvim.desktop text/x-c++hdr
|
||||
xdg-mime default nvim.desktop text/x-c++src
|
||||
xdg-mime default nvim.desktop text/x-chdr
|
||||
xdg-mime default nvim.desktop text/x-csrc
|
||||
xdg-mime default nvim.desktop text/x-java
|
||||
xdg-mime default nvim.desktop text/x-moc
|
||||
xdg-mime default nvim.desktop text/x-pascal
|
||||
xdg-mime default nvim.desktop text/x-tcl
|
||||
xdg-mime default nvim.desktop text/x-tex
|
||||
xdg-mime default nvim.desktop application/x-shellscript
|
||||
xdg-mime default nvim.desktop text/x-c
|
||||
xdg-mime default nvim.desktop text/x-c++
|
||||
xdg-mime default nvim.desktop application/xml
|
||||
xdg-mime default nvim.desktop text/xml
|
||||
|
||||
echo "Neovim setup complete!"
|
||||
@@ -0,0 +1,59 @@
|
||||
-- Make highlight groups transparent while preserving their other attributes
|
||||
local function make_transparent(name)
|
||||
local ok, hl = pcall(vim.api.nvim_get_hl, 0, { name = name, link = false })
|
||||
if ok then
|
||||
hl.bg = nil
|
||||
vim.api.nvim_set_hl(0, name, hl)
|
||||
end
|
||||
end
|
||||
|
||||
local groups = {
|
||||
-- transparent background
|
||||
"Normal",
|
||||
"NormalFloat",
|
||||
"FloatBorder",
|
||||
"Pmenu",
|
||||
"Terminal",
|
||||
"EndOfBuffer",
|
||||
"FoldColumn",
|
||||
"Folded",
|
||||
"SignColumn",
|
||||
"LineNr",
|
||||
"CursorLineNr",
|
||||
"NormalNC",
|
||||
"WhichKeyFloat",
|
||||
"TelescopeBorder",
|
||||
"TelescopeNormal",
|
||||
"TelescopePromptBorder",
|
||||
"TelescopePromptTitle",
|
||||
-- neotree
|
||||
"NeoTreeNormal",
|
||||
"NeoTreeNormalNC",
|
||||
"NeoTreeVertSplit",
|
||||
"NeoTreeWinSeparator",
|
||||
"NeoTreeEndOfBuffer",
|
||||
-- nvim-tree
|
||||
"NvimTreeNormal",
|
||||
"NvimTreeVertSplit",
|
||||
"NvimTreeEndOfBuffer",
|
||||
-- notify
|
||||
"NotifyINFOBody",
|
||||
"NotifyERRORBody",
|
||||
"NotifyWARNBody",
|
||||
"NotifyTRACEBody",
|
||||
"NotifyDEBUGBody",
|
||||
"NotifyINFOTitle",
|
||||
"NotifyERRORTitle",
|
||||
"NotifyWARNTitle",
|
||||
"NotifyTRACETitle",
|
||||
"NotifyDEBUGTitle",
|
||||
"NotifyINFOBorder",
|
||||
"NotifyERRORBorder",
|
||||
"NotifyWARNBorder",
|
||||
"NotifyTRACEBorder",
|
||||
"NotifyDEBUGBorder",
|
||||
}
|
||||
|
||||
for _, name in ipairs(groups) do
|
||||
make_transparent(name)
|
||||
end
|
||||
Reference in New Issue
Block a user