inital commit

This commit is contained in:
2026-03-23 23:50:58 +00:00
commit 503c232b30
110 changed files with 7218 additions and 0 deletions
@@ -0,0 +1,10 @@
return {
[[]],
[[██╗ ██████╗ ██████╗ █████╗ ██╗ ]],
[[██║ ██╔═══██╗██╔════╝██╔══██╗██║ ]],
[[██║ ██║ ██║██║ ███████║██║ ]],
[[██║ ██║ ██║██║ ██╔══██║██║ ]],
[[███████╗╚██████╔╝╚██████╗██║ ██║███████╗]],
[[╚══════╝ ╚═════╝ ╚═════╝╚═╝ ╚═╝╚══════╝]],
[[]],
}
+9
View File
@@ -0,0 +1,9 @@
return {
[[███████╗██╗ ██╗ █████╗ ██████╗ ███╗ ███╗ ███╗ ███╗ ██████╗ ██████╗ ██╗]],
[[██╔════╝██║ ██║██╔══██╗██╔══██╗████╗ ████║ ████╗ ████║██╔════╝ ██╔══██╗ ██║]],
[[███████╗██║ █╗ ██║███████║██████╔╝██╔████╔██║█████╗██╔████╔██║██║ ███╗██████╔╝█████╗██║]],
[[╚════██║██║███╗██║██╔══██║██╔══██╗██║╚██╔╝██║╚════╝██║╚██╔╝██║██║ ██║██╔══██╗╚════╝██║]],
[[███████║╚███╔███╔╝██║ ██║██║ ██║██║ ╚═╝ ██║ ██║ ╚═╝ ██║╚██████╔╝██║ ██║ ██║]],
[[╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝]],
[[]],
}
+8
View File
@@ -0,0 +1,8 @@
return {
[[███████╗██╗ ██╗ █████╗ ██████╗ ███╗ ███╗ ███╗ ███╗ ██████╗ ██████╗ ██████╗]],
[[██╔════╝██║ ██║██╔══██╗██╔══██╗████╗ ████║ ████╗ ████║██╔════╝ ██╔══██╗ ╚════██╗]],
[[███████╗██║ █╗ ██║███████║██████╔╝██╔████╔██║█████╗██╔████╔██║██║ ███╗██████╔╝█████╗ █████╔╝]],
[[╚════██║██║███╗██║██╔══██║██╔══██╗██║╚██╔╝██║╚════╝██║╚██╔╝██║██║ ██║██╔══██╗╚════╝██╔═══╝ ]],
[[███████║╚███╔███╔╝██║ ██║██║ ██║██║ ╚═╝ ██║ ██║ ╚═╝ ██║╚██████╔╝██║ ██║ ███████╗]],
[[╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝]],
}
+8
View File
@@ -0,0 +1,8 @@
return {
[[███████╗██╗ ██╗ █████╗ ██████╗ ███╗ ███╗ ███╗ ███╗ ██████╗ ██████╗ ██████╗ ]],
[[██╔════╝██║ ██║██╔══██╗██╔══██╗████╗ ████║ ████╗ ████║██╔════╝ ██╔══██╗ ╚════██╗]],
[[███████╗██║ █╗ ██║███████║██████╔╝██╔████╔██║█████╗██╔████╔██║██║ ███╗██████╔╝█████╗ █████╔╝]],
[[╚════██║██║███╗██║██╔══██║██╔══██╗██║╚██╔╝██║╚════╝██║╚██╔╝██║██║ ██║██╔══██╗╚════╝ ╚═══██╗]],
[[███████║╚███╔███╔╝██║ ██║██║ ██║██║ ╚═╝ ██║ ██║ ╚═╝ ██║╚██████╔╝██║ ██║ ██████╔╝]],
[[╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ]],
}
+10
View File
@@ -0,0 +1,10 @@
return {
[[]],
[[███╗ ██╗ █████╗ ███████╗███╗ ██╗ ██████╗ ]],
[[████╗ ██║██╔══██╗██╔════╝████╗ ██║██╔════╝ ]],
[[██╔██╗ ██║███████║███████╗██╔██╗ ██║██║ ███╗]],
[[██║╚██╗██║██╔══██║╚════██║██║╚██╗██║██║ ██║]],
[[██║ ╚████║██║ ██║███████║██║ ╚████║╚██████╔╝]],
[[╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═════╝ ]],
[[]]
}
+23
View File
@@ -0,0 +1,23 @@
#export VIM=$HOME/.dotfiles/nvim
#export VIMRUNTIME=$HOME/.config/nvim/runtime
#export NVIM_SERVER="${XDG_CACHE_HOME:-$HOME/.cache}/nvim/server.socket"
# Don't clobber values already injected by ssh.conf or the environment.
# On local: these default to LOCAL / 7777.
# On remote hosts: ssh.conf injects NVIM_NAME=<host> and NVIM_SERVER=127.0.0.1:<port>
# before the shell starts, so :- means those values are preserved.
export NVIM_NAME="${NVIM_NAME:-LOCAL}"
export NVIM_SERVER="${NVIM_SERVER:-127.0.0.1:7777}"
export NVIM_BACKUP_DIR="$HOME/.local/share/nvim/backups"
# Stamp kitty window user vars so nvim_panel.py kitten can read host identity
# without relying on os.environ (kittens run in an isolated subprocess).
# Fires once on first prompt, then removes itself.
if [[ "$LC_TERMINAL" == "kitty" ]] && command -v kitten >/dev/null 2>&1; then
_stamp_kitty_nvim_vars() {
kitten @ set-user-var NVIM_NAME "${NVIM_NAME}" 2>/dev/null
kitten @ set-user-var NVIM_SERVER "${NVIM_SERVER}" 2>/dev/null
add-zsh-hook -d precmd _stamp_kitty_nvim_vars
}
add-zsh-hook precmd _stamp_kitty_nvim_vars
fi
+52
View File
@@ -0,0 +1,52 @@
filetype on
filetype off
packloadall
set autowrite
set mouse=a
set number
set relativenumber
" Brackets Highlighting Colors
hi MatchParen cterm=none ctermbg=black ctermfg=white
" Errors/BadSpellings Higlighing Colors
:highlight clear SpellBad
" CUSOR SETUP
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_SR = "\<Esc>]50;CursorShape=5\x7"
let &t_EI = "\<Esc>]50;CursorShape=6\x7"
" TAB SETUPS
set tabstop=4 " The width of a TAB is set to 4.
" Still it is a \t. It is just that
" Vim will interpret it to be having
" a width of 4.
set shiftwidth=4 " Indents will have a width of 4
set softtabstop=4
set expandtab " Expand TABs to spaces
" Search
set hlsearch "Highlight Search Result
set ignorecase "Ignore case when searching
set incsearch
set smartcase "Automatically switch search to case-sensitive when search query contains an uppercase letter
set wildmenu
set showmatch
nnoremap gV `[v`]
set t_Co=256 " This is may or may not needed.
set background=light
colorscheme PaperColor
syntax enable
set title
set autoindent
filetype plugin indent on
set foldmethod=marker
set nofoldenable
+136
View File
@@ -0,0 +1,136 @@
#!/usr/bin/env bash
set -euo pipefail
TARGET_USER="${1:-}"
PORT="${2:-7777}"
NVIM_BIN="${3:-}"
if [[ -z "$TARGET_USER" ]]; then
echo "Usage: sudo $0 <target-user> [port] [nvim-bin]"
echo 'Example: sudo ./deploy-nevoid.sh ngorse 7777 /home/ngorse/.local/share/mise/shims/nvim'
exit 1
fi
if ! id "$TARGET_USER" >/dev/null 2>&1; then
echo "User does not exist: $TARGET_USER" >&2
exit 1
fi
USER_HOME="$(getent passwd "$TARGET_USER" | cut -d: -f6)"
USER_UID="$(id -u "$TARGET_USER")"
USER_CONFIG_DIR="$USER_HOME/.config/systemd/user"
if [[ -z "$NVIM_BIN" ]]; then
if [[ -x "/opt/usr/bin/nvim" ]]; then
NVIM_BIN="/opt/usr/bin/nvim"
elif sudo -u "$TARGET_USER" bash -lc 'command -v nvim >/dev/null 2>&1'; then
NVIM_BIN="$(sudo -u "$TARGET_USER" bash -lc 'command -v nvim')"
else
echo "Could not find nvim for user $TARGET_USER." >&2
echo "Pass the full path as the third argument." >&2
exit 1
fi
fi
if [[ ! -x "$NVIM_BIN" ]]; then
echo "nvim binary is not executable: $NVIM_BIN" >&2
exit 1
fi
PROXY_BIN="/usr/lib/systemd/systemd-socket-proxyd"
if [[ ! -x "$PROXY_BIN" ]]; then
PROXY_BIN="$(command -v systemd-socket-proxyd || true)"
fi
if [[ -z "$PROXY_BIN" || ! -x "$PROXY_BIN" ]]; then
echo "Could not find systemd-socket-proxyd." >&2
exit 1
fi
mkdir -p "$USER_CONFIG_DIR"
chown -R "$TARGET_USER:$TARGET_USER" "$USER_HOME/.config"
cat >"$USER_CONFIG_DIR/nevoid.socket" <<EOF
[Unit]
Description=Neovim RPC socket (on-demand) on 127.0.0.1:${PORT}
[Socket]
ListenStream=127.0.0.1:${PORT}
NoDelay=true
SocketMode=0600
Service=nevoid-proxy.service
[Install]
WantedBy=sockets.target
EOF
cat >"$USER_CONFIG_DIR/nevoid-proxy.service" <<EOF
[Unit]
Description=Socket proxy: 127.0.0.1:${PORT} -> unix:%t/nevoid/nvim.sock
After=nevoid-backend.service
[Service]
ExecStartPre=/usr/bin/systemctl --user start nevoid-backend.service
ExecStart=${PROXY_BIN} --exit-idle-time=600 %t/nevoid/nvim.sock
Restart=on-failure
RestartSec=1s
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=yes
EOF
cat >"$USER_CONFIG_DIR/nevoid-backend.service" <<EOF
[Unit]
Description=Neovim RPC backend (headless)
[Service]
Type=simple
RuntimeDirectory=nevoid
RuntimeDirectoryMode=0700
ExecStartPre=/bin/rm -f %t/nevoid/nvim.sock
ExecStart=${NVIM_BIN} --headless --listen %t/nevoid/nvim.sock
Restart=on-failure
RestartSec=1s
TimeoutStopSec=10s
KillSignal=SIGTERM
NoNewPrivileges=yes
PrivateTmp=yes
ProtectSystem=strict
ProtectHome=yes
EOF
chown "$TARGET_USER:$TARGET_USER" \
"$USER_CONFIG_DIR/nevoid.socket" \
"$USER_CONFIG_DIR/nevoid-proxy.service" \
"$USER_CONFIG_DIR/nevoid-backend.service"
loginctl enable-linger "$TARGET_USER"
USER_BUS_DIR="/run/user/$USER_UID"
if [[ ! -d "$USER_BUS_DIR" ]]; then
echo "Creating runtime systemd session by starting user@${USER_UID}.service"
systemctl start "user@${USER_UID}.service"
fi
sudo -u "$TARGET_USER" XDG_RUNTIME_DIR="/run/user/$USER_UID" systemctl --user daemon-reload
sudo -u "$TARGET_USER" XDG_RUNTIME_DIR="/run/user/$USER_UID" systemctl --user reset-failed nevoid.socket nevoid-proxy.service nevoid-backend.service || true
sudo -u "$TARGET_USER" XDG_RUNTIME_DIR="/run/user/$USER_UID" systemctl --user enable --now nevoid.socket
echo
echo "Installed successfully for user: $TARGET_USER"
echo "Port: $PORT"
echo "nvim: $NVIM_BIN"
echo
echo "Check status with:"
echo " sudo -u $TARGET_USER XDG_RUNTIME_DIR=/run/user/$USER_UID systemctl --user status nevoid.socket nevoid-proxy.service nevoid-backend.service"
echo
echo "Test locally on the host with:"
echo " nc -vz 127.0.0.1 $PORT"
+9
View File
@@ -0,0 +1,9 @@
autoload -Uz edit-command-line
zle -N edit-command-line
function kitty_scrollback_edit_command_line() {
local VISUAL='/Users/ngorse/.local/share/nvim/lazy/kitty-scrollback.nvim/scripts/edit_command_line.sh'
zle edit-command-line
zle kill-whole-line
}
zle -N kitty_scrollback_edit_command_line
bindkey '^x^e' kitty_scrollback_edit_command_line