From 2f1477668b00f1b46467db2aa1ef7a8a8617dbf1 Mon Sep 17 00:00:00 2001 From: rain Date: Sun, 21 Jun 2026 18:10:54 -0400 Subject: [PATCH] Initial chezmoi-managed dotfiles with bootstrap scripts - Rename master to legacy-2025 on remote (frozen pre-chezmoi snapshot) - New orphan 'main' branch with bootstrap-enabled config - .chezmoi.yaml.tmpl detects os_family (debian | arch) from /etc/os-release - dot_zshrc.tmpl refactored from current miche config with os_family conditional for pacman vs apt aliases - dot_config/: bat, btop, ghostty (with gruvbox themes), kitty (with gruvbox colors), nvim (LazyVim), paru - dot_gitconfig.tmpl, dot_tmux.conf (verbatim from current state) - run_once_00-install-bootstrap-tools.sh.tmpl: age, git, curl, ca-certificates - run_once_10-add-chaotic-aur.sh.tmpl (arch-only): add Chaotic-AUR + install paru - run_once_20-install-user-packages.sh.tmpl: zsh, tmux, neovim (with version check + binary tarball fallback for debian), oh-my-zsh + plugins, tpm, rustup, all CLI tools - run_onchange_30-ensure-cargo.sh.tmpl: rustup fallback - README.md with onboarding runbook --- .chezmoi.yaml.tmpl | 18 ++ .chezmoiignore | 6 + README.md | 96 ++++++ dot_config/bat/config | 28 ++ dot_config/btop/btop.conf | 286 ++++++++++++++++++ dot_config/ghostty/config | 48 +++ .../ghostty/themes/gruvbox-material-hard-dark | 21 ++ .../themes/gruvbox-material-hard-light | 21 ++ .../themes/gruvbox-material-medium-dark | 21 ++ .../themes/gruvbox-material-medium-light | 21 ++ .../ghostty/themes/gruvbox-material-soft-dark | 21 ++ .../themes/gruvbox-material-soft-light | 21 ++ .../colors/gruvbox-material-dark-hard.conf | 47 +++ .../colors/gruvbox-material-dark-medium.conf | 47 +++ .../colors/gruvbox-material-dark-soft.conf | 47 +++ .../colors/gruvbox-material-light-hard.conf | 47 +++ .../colors/gruvbox-material-light-medium.conf | 47 +++ .../colors/gruvbox-material-light-soft.conf | 47 +++ dot_config/kitty/kitty.conf | 7 + dot_config/kitty/other.conf | 8 + dot_config/nvim/.gitignore | 8 + dot_config/nvim/.neoconf.json | 15 + dot_config/nvim/LICENSE | 201 ++++++++++++ dot_config/nvim/README.md | 4 + dot_config/nvim/init.lua | 11 + dot_config/nvim/lazy-lock.json | 48 +++ dot_config/nvim/lazyvim.json | 12 + dot_config/nvim/lua/config/autocmds.lua | 3 + dot_config/nvim/lua/config/keymaps.lua | 3 + dot_config/nvim/lua/config/lazy.lua | 47 +++ dot_config/nvim/lua/config/options.lua | 3 + dot_config/nvim/lua/plugins/colorscheme.lua | 12 + dot_config/nvim/lua/plugins/example.lua | 265 ++++++++++++++++ dot_config/nvim/lua/plugins/godot.lua | 12 + dot_config/nvim/lua/plugins/multicursor.lua | 4 + dot_config/nvim/lua/plugins/opencode.lua | 47 +++ dot_config/nvim/stylua.toml | 3 + dot_config/paru/paru.conf | 30 ++ dot_gitconfig.tmpl | 17 ++ dot_tmux.conf | 23 ++ dot_zshrc.tmpl | 203 +++++++++++++ run_once_00-install-bootstrap-tools.sh.tmpl | 39 +++ run_once_10-add-chaotic-aur.sh.tmpl | 53 ++++ run_once_20-install-user-packages.sh.tmpl | 131 ++++++++ run_onchange_30-ensure-cargo.sh.tmpl | 29 ++ 45 files changed, 2128 insertions(+) create mode 100644 .chezmoi.yaml.tmpl create mode 100644 .chezmoiignore create mode 100644 README.md create mode 100644 dot_config/bat/config create mode 100644 dot_config/btop/btop.conf create mode 100644 dot_config/ghostty/config create mode 100644 dot_config/ghostty/themes/gruvbox-material-hard-dark create mode 100644 dot_config/ghostty/themes/gruvbox-material-hard-light create mode 100644 dot_config/ghostty/themes/gruvbox-material-medium-dark create mode 100644 dot_config/ghostty/themes/gruvbox-material-medium-light create mode 100644 dot_config/ghostty/themes/gruvbox-material-soft-dark create mode 100644 dot_config/ghostty/themes/gruvbox-material-soft-light create mode 100644 dot_config/kitty/colors/gruvbox-material-dark-hard.conf create mode 100644 dot_config/kitty/colors/gruvbox-material-dark-medium.conf create mode 100644 dot_config/kitty/colors/gruvbox-material-dark-soft.conf create mode 100644 dot_config/kitty/colors/gruvbox-material-light-hard.conf create mode 100644 dot_config/kitty/colors/gruvbox-material-light-medium.conf create mode 100644 dot_config/kitty/colors/gruvbox-material-light-soft.conf create mode 100644 dot_config/kitty/kitty.conf create mode 100644 dot_config/kitty/other.conf create mode 100644 dot_config/nvim/.gitignore create mode 100644 dot_config/nvim/.neoconf.json create mode 100644 dot_config/nvim/LICENSE create mode 100644 dot_config/nvim/README.md create mode 100644 dot_config/nvim/init.lua create mode 100644 dot_config/nvim/lazy-lock.json create mode 100644 dot_config/nvim/lazyvim.json create mode 100644 dot_config/nvim/lua/config/autocmds.lua create mode 100644 dot_config/nvim/lua/config/keymaps.lua create mode 100644 dot_config/nvim/lua/config/lazy.lua create mode 100644 dot_config/nvim/lua/config/options.lua create mode 100644 dot_config/nvim/lua/plugins/colorscheme.lua create mode 100644 dot_config/nvim/lua/plugins/example.lua create mode 100644 dot_config/nvim/lua/plugins/godot.lua create mode 100644 dot_config/nvim/lua/plugins/multicursor.lua create mode 100644 dot_config/nvim/lua/plugins/opencode.lua create mode 100644 dot_config/nvim/stylua.toml create mode 100644 dot_config/paru/paru.conf create mode 100644 dot_gitconfig.tmpl create mode 100644 dot_tmux.conf create mode 100644 dot_zshrc.tmpl create mode 100755 run_once_00-install-bootstrap-tools.sh.tmpl create mode 100755 run_once_10-add-chaotic-aur.sh.tmpl create mode 100755 run_once_20-install-user-packages.sh.tmpl create mode 100755 run_onchange_30-ensure-cargo.sh.tmpl diff --git a/.chezmoi.yaml.tmpl b/.chezmoi.yaml.tmpl new file mode 100644 index 0000000..e86fde3 --- /dev/null +++ b/.chezmoi.yaml.tmpl @@ -0,0 +1,18 @@ +{{- $osFamily := "unknown" -}} +{{- if eq .chezmoi.osRelease.idLike "arch" -}} +{{- $osFamily = "arch" -}} +{{- else if or (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.osRelease.idLike "debian") -}} +{{- $osFamily = "debian" -}} +{{- end -}} +encryption: "age" +sourceDir: {{ .chezmoi.sourceDir | quote }} + +# When you have age secrets, uncomment and add recipient public keys here. +# recipients: +# - age1ql3z7hjy54pw3hyww5ayyfg7zqgvc7w3j2elw8zmrj2kg5sfn9aqmcac8p +# - age1miche_pubkey_placeholder +# - age1byte_pubkey_placeholder + +data: + os_family: {{ $osFamily | quote }} + os_id: {{ .chezmoi.osRelease.id | quote }} \ No newline at end of file diff --git a/.chezmoiignore b/.chezmoiignore new file mode 100644 index 0000000..ce83784 --- /dev/null +++ b/.chezmoiignore @@ -0,0 +1,6 @@ +# chezmoi-managed: do not edit by hand, run `chezmoi edit` instead +.git +README.md +*.bak +*.swp +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..ef9483a --- /dev/null +++ b/README.md @@ -0,0 +1,96 @@ +# gnu-plus-dotfiles + +Chezmoi-managed dotfiles synced across all your linux boxes. +Source of truth: `~/.local/share/chezmoi` on your main workstation. +Remote: `ssh://git@git.melonbread.xyz/rain/gnu-plus-dotfiles.git` + +## Branches + +- `main` — current, bootstrap-enabled. All active work. +- `legacy-2025` — frozen snapshot of the pre-chezmoi-bootstrap config. Read-only. + +## What's in here + +``` +.chezmoi.yaml.tmpl os_family detection (debian | arch) +dot_zshrc.tmpl zsh config with os_family-conditional aliases +dot_tmux.conf tmux + tpm + gruvbox plugin stack +dot_gitconfig.tmpl git + delta +dot_config/ + bat/ bat config + btop/ btop theme + options + ghostty/ ghostty terminal + gruvbox themes + kitty/ kitty terminal + gruvbox themes + nvim/ LazyVim + custom plugins + paru/ (arch-only) paru config + +run_once_00-install-bootstrap-tools.sh.tmpl +run_once_10-add-chaotic-aur.sh.tmpl (arch-only) +run_once_20-install-user-packages.sh.tmpl +run_onchange_30-ensure-cargo.sh.tmpl +``` + +## Onboarding a new box + +On a fresh debian-stable or arch-base install: + +```bash +# 1. Install chezmoi binary itself (one-time, before this repo's run_once runs) +sh -c "$(curl -fsSL get.chezmoi.io)" -- -b "$HOME/.local/bin" + +# 2. Initialize from your repo +chezmoi init --apply ssh://git@git.melonbread.xyz/rain/gnu-plus-dotfiles.git + +# 3. The bootstrap scripts run automatically. They will: +# - install age, git, curl (run_once_00) +# - on arch: add Chaotic-AUR + install paru (run_once_10) +# - install zsh, tmux, neovim, oh-my-zsh, all CLI tools (run_once_20) +# - install rustup if cargo missing (run_onchange_30) + +# 4. Reboot or `exec zsh` to start using the new shell +exec zsh +``` + +The first run will take a few minutes (downloading packages, cloning oh-my-zsh plugins, tpm, LazyVim plugins via nvim). + +## Adding age encryption (when you have secrets) + +```bash +# On your main workstation: +mkdir -p ~/.config/chezmoi/keys +age-keygen -o ~/.config/chezmoi/keys/recovery.key +# Save the printed secret key in your password manager. + +# On each machine, generate a per-machine identity: +age-keygen -o ~/.config/chezmoi/key.txt +# Paste the public key back to your main workstation. + +# In .chezmoi.yaml.tmpl, uncomment and fill the recipients block, then: +chezmoi age rekey +``` + +## Editing dotfiles + +```bash +chezmoi edit ~/.zshrc # opens in $EDITOR, auto-applies on save +chezmoi diff # see what's pending +chezmoi apply # apply pending changes +chezmoi cd # jump to the source repo +``` + +From inside `~/.local/share/chezmoi`, you can `git status`, `git diff`, `git push` like any normal repo. + +## Common gotchas + +- **Neovim too old on Debian**: `run_once_20` detects this and installs the official binary. If you see "Edit: command not found" inside LazyVim, neovim <0.9. +- **zsh plugins not loading**: check `~/.oh-my-zsh/custom/plugins/` exists. Bootstrap installs them. +- **paru 404 on arch**: Chaotic-AUR mirrors occasionally lag. Re-run `sudo pacman -Syu` then `chezmoi apply`. +- **fastfetch not running**: command not found, install via package manager. Debian needs `apt install fastfetch` (bookworm+). +- **`Maple Mono NF` font warning in nvim**: set `vim.opt.guifont` in `~/.config/nvim/lua/local.lua` (not in chezmoi). + +## Out of scope (intentionally not in repo) + +- `~/.config/zsh/functions.zsh` — host-specific (reads `~/AI/llama.cpp/key.txt`). Recreate per host. +- KDE plasma configs (kwinrc, kdeglobals, etc.) — live state, varies wildly per host. +- Alacritty, foot, fish — not in use, drop if you want. +- mpv, topgrade, mako — out of scope unless re-added. \ No newline at end of file diff --git a/dot_config/bat/config b/dot_config/bat/config new file mode 100644 index 0000000..2ea2845 --- /dev/null +++ b/dot_config/bat/config @@ -0,0 +1,28 @@ +# This is `bat`s configuration file. Each line either contains a comment or +# a command-line option that you want to pass to `bat` by default. You can +# run `bat --help` to get a list of all possible configuration options. + +# Set pretty print for more "cat" like looks +-pp + +# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes` +# for a list of all available themes +--theme="gruvbox-dark" + +# Enable this to use italic text on the terminal. This is not supported on all +# terminal emulators (like tmux, by default): +#--italic-text=always + +# Uncomment the following line to disable automatic paging: +#--paging=never + +# Uncomment the following line if you are using less version >= 551 and want to +# enable mouse scrolling support in `bat` when running inside tmux. This might +# disable text selection, unless you press shift. +#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse" + +# Syntax mappings: map a certain filename pattern to a language. +# Example 1: use the C++ syntax for .ino files +# Example 2: Use ".gitignore"-style highlighting for ".ignore" files +#--map-syntax "*.ino:C++" +#--map-syntax ".ignore:Git Ignore" diff --git a/dot_config/btop/btop.conf b/dot_config/btop/btop.conf new file mode 100644 index 0000000..52c5e6e --- /dev/null +++ b/dot_config/btop/btop.conf @@ -0,0 +1,286 @@ +#? Config file for btop v.1.4.7 + +#* 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" +color_theme = "/usr/share/btop/themes/gruvbox_dark.theme" + +#* If the theme set background should be shown, set to False if you want terminal background transparency. +theme_background = true + +#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false. +truecolor = true + +#* Set to true to force tty mode regardless if a real tty has been detected or not. +#* 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 + +#* 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. +#* 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. +#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty" +presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty" + +#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists. +#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift. +vim_keys = false + +#* Disable all mouse events. +disable_mouse = false + +#* Rounded corners on boxes, is ignored if TTY mode is ON. +rounded_corners = true + +#* Use terminal synchronized output sequences to reduce flickering on supported terminals. +terminal_sync = true + +#* Default symbols to use for graph creation, "braille", "block" or "tty". +#* "braille" offers the highest resolution but might not be included in all fonts. +#* "block" has half the resolution of braille but uses more common characters. +#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY. +#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view. +graph_symbol = "braille" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_cpu = "default" + +# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty". +graph_symbol_gpu = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_mem = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_net = "default" + +# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty". +graph_symbol_proc = "default" + +#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace. +shown_boxes = "cpu mem proc net" + +#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs. +update_ms = 2300 + +#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct", +#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly. +proc_sorting = "cpu lazy" + +#* Reverse sorting order, True or False. +proc_reversed = false + +#* Show processes as a tree. +proc_tree = false + +#* Use the cpu graph colors in the process list. +proc_colors = true + +#* Use a darkening gradient in the process list. +proc_gradient = true + +#* If process cpu usage should be of the core it's running on or usage of the total available cpu power. +proc_per_core = false + +#* Show process memory as bytes instead of percent. +proc_mem_bytes = true + +#* Show cpu graph for each process. +proc_cpu_graphs = true + +#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate) +proc_info_smaps = false + +#* Show proc box on left side of screen instead of right. +proc_left = false + +#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop). +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. +proc_aggregate = false + +#* Should cpu and memory usage display be preserved for dead processes when paused. +keep_dead_proc_usage = false + +#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_upper = "total" + +#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available. +#* Select from a list of detected attributes from the options menu. +cpu_graph_lower = "total" + +#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off". +show_gpu_info = "Auto" + +#* Toggles if the lower CPU graph should be inverted. +cpu_invert_lower = true + +#* Set to True to completely disable the lower CPU graph. +cpu_single_graph = false + +#* Show cpu box at bottom of screen instead of top. +cpu_bottom = false + +#* Shows the system uptime in the CPU box. +show_uptime = true + +#* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo. +show_cpu_watts = true + +#* Show cpu temperature. +check_temp = true + +#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors. +cpu_sensor = "Auto" + +#* Show temperatures for cpu cores also if check_temp is True and sensors has been found. +show_coretemp = true + +#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core. +#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine. +#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries. +#* Example: "4:0 5:1 6:3" +cpu_core_map = "" + +#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine". +temp_scale = "celsius" + +#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024. +base_10_sizes = false + +#* Show CPU frequency. +show_cpu_freq = true + +#* How to calculate CPU frequency, available values: "first", "range", "lowest", "highest" and "average". +freq_mode = "first" + +#* Draw a clock at top of screen, formatting according to strftime, empty string to disable. +#* Special formatting: /host = hostname | /user = username | /uptime = system uptime +clock_format = "%X" + +#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort. +background_update = true + +#* Custom cpu model name, empty string to disable. +custom_cpu_name = "" + +#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ". +#* Only disks matching the filter will be shown. Prepend exclude= to only show disks not matching the filter. Examples: disk_filter="/boot /home/user", disks_filter="exclude=/boot /home/user" +disks_filter = "" + +#* Show graphs instead of meters for memory values. +mem_graphs = true + +#* Show mem box below net box instead of above. +mem_below_net = false + +#* Count ZFS ARC in cached and available memory. +zfs_arc_cached = true + +#* If swap memory should be shown in memory box. +show_swap = true + +#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk. +swap_disk = true + +#* If mem box should be split to also show disks info. +show_disks = true + +#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar. +only_physical = true + +#* Read disks list from /etc/fstab. This also disables only_physical. +use_fstab = true + +#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool) +zfs_hide_datasets = false + +#* Set to true to show available disk space for privileged users. +disk_free_priv = false + +#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view. +show_io_stat = true + +#* Toggles io mode for disks, showing big graphs for disk read/write speeds. +io_mode = true + +#* Set to True to show combined read/write io graphs in io mode. +io_graph_combined = false + +#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ". +#* Example: "/mnt/media:100 /:20 /boot:1". +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. +net_download = 100 + +net_upload = 100 + +#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest. +net_auto = true + +#* Sync the auto scaling for download and upload to whichever currently has the highest scale. +net_sync = false + +#* Starts with the Network Interface specified here. +net_iface = "" + +#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes. +base_10_bitrate = "Auto" + +#* Show battery stats in top right if battery is present. +show_battery = true + +#* Which battery to use if multiple are present. "Auto" for auto detection. +selected_battery = "Auto" + +#* Show power stats of battery next to charge indicator. +show_battery_watts = true + +#* Set loglevel for "~/.local/state/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG". +#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info. +log_level = "WARNING" + +#* Automatically save current settings to config file on exit. +save_config_on_exit = true + +#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards. +nvml_measure_pcie_speeds = true + +#* Measure PCIe throughput on AMD cards, may impact performance on certain cards. +rsmi_measure_pcie_speeds = true + +#* Horizontally mirror the GPU graph. +gpu_mirror_graph = true + +#* Set which GPU vendors to show. Available values are "nvidia amd intel apple" +shown_gpus = "nvidia amd intel" + +#* Custom gpu0 model name, empty string to disable. +custom_gpu_name0 = "" + +#* Custom gpu1 model name, empty string to disable. +custom_gpu_name1 = "" + +#* Custom gpu2 model name, empty string to disable. +custom_gpu_name2 = "" + +#* Custom gpu3 model name, empty string to disable. +custom_gpu_name3 = "" + +#* Custom gpu4 model name, empty string to disable. +custom_gpu_name4 = "" + +#* Custom gpu5 model name, empty string to disable. +custom_gpu_name5 = "" diff --git a/dot_config/ghostty/config b/dot_config/ghostty/config new file mode 100644 index 0000000..16b6bb5 --- /dev/null +++ b/dot_config/ghostty/config @@ -0,0 +1,48 @@ +# This is the configuration file for Ghostty. +# +# This template file has been automatically created at the following +# path since Ghostty couldn't find any existing config files on your system: +# +# /home/melon/.config/ghostty/config +# +# The template does not set any default options, since Ghostty ships +# with sensible defaults for all options. Users should only need to set +# options that they want to change from the default. +# +# Run `ghostty +show-config --default --docs` to view a list of +# all available config options and their default values. +# +# Additionally, each config option is also explained in detail +# on Ghostty's website, at https://ghostty.org/docs/config. + +# Config syntax crash course +# ========================== +# # The config file consists of simple key-value pairs, +# # separated by equals signs. +# font-family = Iosevka +# window-padding-x = 2 +# +# # Spacing around the equals sign does not matter. +# # All of these are identical: +# key=value +# key= value +# key =value +# key = value +# +# # Any line beginning with a # is a comment. It's not possible to put +# # a comment after a config option, since it would be interpreted as a +# # part of the value. For example, this will have a value of "#123abc": +# background = #123abc +# +# # Empty values are used to reset config keys to default. +# key = +# +# # Some config options have unique syntaxes for their value, +# # which is explained in the docs for that config option. +# # Just for example: +# resize-overlay-duration = 4s 200ms + +theme = gruvbox-material-hard-dark +font-size=14 +font-family = Maple Mono + diff --git a/dot_config/ghostty/themes/gruvbox-material-hard-dark b/dot_config/ghostty/themes/gruvbox-material-hard-dark new file mode 100644 index 0000000..2d915ee --- /dev/null +++ b/dot_config/ghostty/themes/gruvbox-material-hard-dark @@ -0,0 +1,21 @@ +palette = 0=#141617 +palette = 1=#ea6962 +palette = 2=#a9b665 +palette = 3=#d8a657 +palette = 4=#7daea3 +palette = 5=#d3869b +palette = 6=#89b482 +palette = 7=#d4be98 +palette = 8=#32302f +palette = 9=#ea6962 +palette = 10=#a9b665 +palette = 11=#d8a657 +palette = 12=#7daea3 +palette = 13=#d3869b +palette = 14=#89b482 +palette = 15=#d4be98 +background = #1d2021 +foreground = #d4be98 +cursor-color = #d4be98 +selection-background = #32302f +selection-foreground = #d4be98 diff --git a/dot_config/ghostty/themes/gruvbox-material-hard-light b/dot_config/ghostty/themes/gruvbox-material-hard-light new file mode 100644 index 0000000..e224af4 --- /dev/null +++ b/dot_config/ghostty/themes/gruvbox-material-hard-light @@ -0,0 +1,21 @@ +palette = 0=#f3eac7 +palette = 1=#c14a4a +palette = 2=#6c782e +palette = 3=#b47109 +palette = 4=#45707a +palette = 5=#945e80 +palette = 6=#4c7a5d +palette = 7=#654735 +palette = 8=#f3eac7 +palette = 9=#c14a4a +palette = 10=#6c782e +palette = 11=#b47109 +palette = 12=#45707a +palette = 13=#945e80 +palette = 14=#4c7a5d +palette = 15=#654735 +background = #f9f5d7 +foreground = #654735 +cursor-color = #654735 +selection-background = #f3eac7 +selection-foreground = #654735 diff --git a/dot_config/ghostty/themes/gruvbox-material-medium-dark b/dot_config/ghostty/themes/gruvbox-material-medium-dark new file mode 100644 index 0000000..946b33e --- /dev/null +++ b/dot_config/ghostty/themes/gruvbox-material-medium-dark @@ -0,0 +1,21 @@ +palette = 0=#1b1b1b +palette = 1=#ea6962 +palette = 2=#a9b665 +palette = 3=#d8a657 +palette = 4=#7daea3 +palette = 5=#d3869b +palette = 6=#89b482 +palette = 7=#d4be98 +palette = 8=#32302f +palette = 9=#ea6962 +palette = 10=#a9b665 +palette = 11=#d8a657 +palette = 12=#7daea3 +palette = 13=#d3869b +palette = 14=#89b482 +palette = 15=#d4be98 +background = #282828 +foreground = #d4be98 +cursor-color = #d4be98 +selection-background = #3c3836 +selection-foreground = #d4be98 diff --git a/dot_config/ghostty/themes/gruvbox-material-medium-light b/dot_config/ghostty/themes/gruvbox-material-medium-light new file mode 100644 index 0000000..6ee0122 --- /dev/null +++ b/dot_config/ghostty/themes/gruvbox-material-medium-light @@ -0,0 +1,21 @@ +palette = 0=#f2e5bc +palette = 1=#c14a4a +palette = 2=#6c782e +palette = 3=#b47109 +palette = 4=#45707a +palette = 5=#945e80 +palette = 6=#4c7a5d +palette = 7=#654735 +palette = 8=#f3eac7 +palette = 9=#c14a4a +palette = 10=#6c782e +palette = 11=#b47109 +palette = 12=#45707a +palette = 13=#945e80 +palette = 14=#4c7a5d +palette = 15=#654735 +background = #fbf1c7 +foreground = #654735 +cursor-color = #654735 +selection-background = #f2e5bc +selection-foreground = #654735 diff --git a/dot_config/ghostty/themes/gruvbox-material-soft-dark b/dot_config/ghostty/themes/gruvbox-material-soft-dark new file mode 100644 index 0000000..efbc6c2 --- /dev/null +++ b/dot_config/ghostty/themes/gruvbox-material-soft-dark @@ -0,0 +1,21 @@ +palette = 0=252423 +palette = 1=#ea6962 +palette = 2=#a9b665 +palette = 3=#d8a657 +palette = 4=#7daea3 +palette = 5=#d3869b +palette = 6=#89b482 +palette = 7=#d4be98 +palette = 8=#32302f +palette = 9=#ea6962 +palette = 10=#a9b665 +palette = 11=#d8a657 +palette = 12=#7daea3 +palette = 13=#d3869b +palette = 14=#89b482 +palette = 15=#d4be98 +background = #32302f +foreground = #d4be98 +cursor-color = #d4be98 +selection-background = #45403d +selection-foreground = #d4be98 diff --git a/dot_config/ghostty/themes/gruvbox-material-soft-light b/dot_config/ghostty/themes/gruvbox-material-soft-light new file mode 100644 index 0000000..8912adc --- /dev/null +++ b/dot_config/ghostty/themes/gruvbox-material-soft-light @@ -0,0 +1,21 @@ +palette = 0=#ebdbb2 +palette = 1=#c14a4a +palette = 2=#6c782e +palette = 3=#b47109 +palette = 4=#45707a +palette = 5=#945e80 +palette = 6=#4c7a5d +palette = 7=#654735 +palette = 8=#f3eac7 +palette = 9=#c14a4a +palette = 10=#6c782e +palette = 11=#b47109 +palette = 12=#45707a +palette = 13=#945e80 +palette = 14=#4c7a5d +palette = 15=#654735 +background = #f2e5bc +foreground = #654735 +cursor-color = #654735 +selection-background = #ebdbb2 +selection-foreground = #654735 diff --git a/dot_config/kitty/colors/gruvbox-material-dark-hard.conf b/dot_config/kitty/colors/gruvbox-material-dark-hard.conf new file mode 100644 index 0000000..c7852c8 --- /dev/null +++ b/dot_config/kitty/colors/gruvbox-material-dark-hard.conf @@ -0,0 +1,47 @@ +background #1d2021 +foreground #d4be98 + +selection_background #d4be98 +selection_foreground #1d2021 + +cursor #a89984 +cursor_text_color background + +active_tab_background #1d2021 +active_tab_foreground #d4be98 +active_tab_font_style bold +inactive_tab_background #1d2021 +inactive_tab_foreground #a89984 +inactive_tab_font_style normal + +# Black +color0 #665c54 +color8 #928374 + +# Red +color1 #ea6962 +color9 #ea6962 + +# Green +color2 #a9b665 +color10 #a9b665 + +# Yellow +color3 #e78a4e +color11 #d8a657 + +# Blue +color4 #7daea3 +color12 #7daea3 + +# Magenta +color5 #d3869b +color13 #d3869b + +# Cyan +color6 #89b482 +color14 #89b482 + +# White +color7 #d4be98 +color15 #d4be98 diff --git a/dot_config/kitty/colors/gruvbox-material-dark-medium.conf b/dot_config/kitty/colors/gruvbox-material-dark-medium.conf new file mode 100644 index 0000000..a856d7f --- /dev/null +++ b/dot_config/kitty/colors/gruvbox-material-dark-medium.conf @@ -0,0 +1,47 @@ +background #282828 +foreground #d4be98 + +selection_background #d4be98 +selection_foreground #282828 + +cursor #a89984 +cursor_text_color background + +active_tab_background #282828 +active_tab_foreground #d4be98 +active_tab_font_style bold +inactive_tab_background #282828 +inactive_tab_foreground #a89984 +inactive_tab_font_style normal + +# Black +color0 #665c54 +color8 #928374 + +# Red +color1 #ea6962 +color9 #ea6962 + +# Green +color2 #a9b665 +color10 #a9b665 + +# Yellow +color3 #e78a4e +color11 #d8a657 + +# Blue +color4 #7daea3 +color12 #7daea3 + +# Magenta +color5 #d3869b +color13 #d3869b + +# Cyan +color6 #89b482 +color14 #89b482 + +# White +color7 #d4be98 +color15 #d4be98 diff --git a/dot_config/kitty/colors/gruvbox-material-dark-soft.conf b/dot_config/kitty/colors/gruvbox-material-dark-soft.conf new file mode 100644 index 0000000..36ed491 --- /dev/null +++ b/dot_config/kitty/colors/gruvbox-material-dark-soft.conf @@ -0,0 +1,47 @@ +background #32302f +foreground #d4be98 + +selection_background #d4be98 +selection_foreground #32302f + +cursor #a89984 +cursor_text_color background + +active_tab_background #32302f +active_tab_foreground #d4be98 +active_tab_font_style bold +inactive_tab_background #32302f +inactive_tab_foreground #a89984 +inactive_tab_font_style normal + +# Black +color0 #665c54 +color8 #928374 + +# Red +color1 #ea6962 +color9 #ea6962 + +# Green +color2 #a9b665 +color10 #a9b665 + +# Yellow +color3 #e78a4e +color11 #d8a657 + +# Blue +color4 #7daea3 +color12 #7daea3 + +# Magenta +color5 #d3869b +color13 #d3869b + +# Cyan +color6 #89b482 +color14 #89b482 + +# White +color7 #d4be98 +color15 #d4be98 diff --git a/dot_config/kitty/colors/gruvbox-material-light-hard.conf b/dot_config/kitty/colors/gruvbox-material-light-hard.conf new file mode 100644 index 0000000..9399a66 --- /dev/null +++ b/dot_config/kitty/colors/gruvbox-material-light-hard.conf @@ -0,0 +1,47 @@ +background #f9f5d7 +foreground #654735 + +selection_background #654735 +selection_foreground #f9f5d7 + +cursor #928374 +cursor_text_color background + +active_tab_background #f9f5d7 +active_tab_foreground #654735 +active_tab_font_style bold +inactive_tab_background #f9f5d7 +inactive_tab_foreground #7c6f64 +inactive_tab_font_style normal + +# Black +color0 #bdae93 +color8 #928374 + +# Red +color1 #c14a4a +color9 #c14a4a + +# Green +color2 #6c782e +color10 #6c782e + +# Yellow +color3 #c35e0a +color11 #b47109 + +# Blue +color4 #45707a +color12 #45707a + +# Magenta +color5 #945e80 +color13 #945e80 + +# Cyan +color6 #4c7a5d +color14 #4c7a5d + +# White +color7 #654735 +color15 #654735 diff --git a/dot_config/kitty/colors/gruvbox-material-light-medium.conf b/dot_config/kitty/colors/gruvbox-material-light-medium.conf new file mode 100644 index 0000000..00781cc --- /dev/null +++ b/dot_config/kitty/colors/gruvbox-material-light-medium.conf @@ -0,0 +1,47 @@ +background #fbf1c7 +foreground #654735 + +selection_background #654735 +selection_foreground #fbf1c7 + +cursor #928374 +cursor_text_color background + +active_tab_background #fbf1c7 +active_tab_foreground #654735 +active_tab_font_style bold +inactive_tab_background #fbf1c7 +inactive_tab_foreground #7c6f64 +inactive_tab_font_style normal + +# Black +color0 #bdae93 +color8 #928374 + +# Red +color1 #c14a4a +color9 #c14a4a + +# Green +color2 #6c782e +color10 #6c782e + +# Yellow +color3 #c35e0a +color11 #b47109 + +# Blue +color4 #45707a +color12 #45707a + +# Magenta +color5 #945e80 +color13 #945e80 + +# Cyan +color6 #4c7a5d +color14 #4c7a5d + +# White +color7 #654735 +color15 #654735 diff --git a/dot_config/kitty/colors/gruvbox-material-light-soft.conf b/dot_config/kitty/colors/gruvbox-material-light-soft.conf new file mode 100644 index 0000000..c075536 --- /dev/null +++ b/dot_config/kitty/colors/gruvbox-material-light-soft.conf @@ -0,0 +1,47 @@ +background #f2e5bc +foreground #654735 + +selection_background #654735 +selection_foreground #f2e5bc + +cursor #928374 +cursor_text_color background + +active_tab_background #f2e5bc +active_tab_foreground #654735 +active_tab_font_style bold +inactive_tab_background #f2e5bc +inactive_tab_foreground #7c6f64 +inactive_tab_font_style normal + +# Black +color0 #bdae93 +color8 #928374 + +# Red +color1 #c14a4a +color9 #c14a4a + +# Green +color2 #6c782e +color10 #6c782e + +# Yellow +color3 #c35e0a +color11 #b47109 + +# Blue +color4 #45707a +color12 #45707a + +# Magenta +color5 #945e80 +color13 #945e80 + +# Cyan +color6 #4c7a5d +color14 #4c7a5d + +# White +color7 #654735 +color15 #654735 diff --git a/dot_config/kitty/kitty.conf b/dot_config/kitty/kitty.conf new file mode 100644 index 0000000..79aa4ab --- /dev/null +++ b/dot_config/kitty/kitty.conf @@ -0,0 +1,7 @@ +# Custom color scheme for Kitty terminal emulator +# Based on https://github.com/sindresorhus/hyper-snazzy +# Modified by ChefTyler +# Designed with Simoniz0r zsh theme applied https://github.com/simoniz0r/.zshrc + +include other.conf +include colors/gruvbox-material-dark-hard.conf diff --git a/dot_config/kitty/other.conf b/dot_config/kitty/other.conf new file mode 100644 index 0000000..75a8a63 --- /dev/null +++ b/dot_config/kitty/other.conf @@ -0,0 +1,8 @@ +font_size 14.0 +cursor #cccccc +cursor_shape beam +# Fonts are custom to me, you may need to change/modify them +font_family FiraMono Nerd Font +bold_font FiraMono Nerd Font +italic_font FiraMono Nerd Font +bold_italic_font FiraMono Nerd Font diff --git a/dot_config/nvim/.gitignore b/dot_config/nvim/.gitignore new file mode 100644 index 0000000..cc5457a --- /dev/null +++ b/dot_config/nvim/.gitignore @@ -0,0 +1,8 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/dot_config/nvim/.neoconf.json b/dot_config/nvim/.neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/dot_config/nvim/.neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/dot_config/nvim/LICENSE b/dot_config/nvim/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/dot_config/nvim/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/dot_config/nvim/README.md b/dot_config/nvim/README.md new file mode 100644 index 0000000..185280b --- /dev/null +++ b/dot_config/nvim/README.md @@ -0,0 +1,4 @@ +# 💤 LazyVim + +A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). +Refer to the [documentation](https://lazyvim.github.io/installation) to get started. diff --git a/dot_config/nvim/init.lua b/dot_config/nvim/init.lua new file mode 100644 index 0000000..a0e3604 --- /dev/null +++ b/dot_config/nvim/init.lua @@ -0,0 +1,11 @@ +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") + +-- guifont: change per-machine if you don't have Maple Mono NF. +-- Override in a local-only file: ~/.config/nvim/lua/local.lua (not managed by chezmoi) +local ok, localcfg = pcall(require, "local") +if ok and localcfg and localcfg.guifont then + vim.opt.guifont = localcfg.guifont +else + vim.opt.guifont = { "Maple Mono NF", ":h14" } +end \ No newline at end of file diff --git a/dot_config/nvim/lazy-lock.json b/dot_config/nvim/lazy-lock.json new file mode 100644 index 0000000..9f561b8 --- /dev/null +++ b/dot_config/nvim/lazy-lock.json @@ -0,0 +1,48 @@ +{ + "LazyVim": { "branch": "main", "commit": "c10948c50b18fae7f256433afdef09e432410480" }, + "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "catppuccin": { "branch": "main", "commit": "0303a7208dba448c459767486a38a6ec05c4216b" }, + "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, + "flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" }, + "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, + "fzf-lua": { "branch": "main", "commit": "988416cc782dfe28bff3f0da9b8c943b236cd86a" }, + "gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" }, + "grug-far.nvim": { "branch": "main", "commit": "5506c2f59dc9ab2ed6c233585412b24d31d51521" }, + "gruvbox.nvim": { "branch": "main", "commit": "154eb5ff5b96d0641307113fa385eaf0d36d9796" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, + "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, + "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "0a695750d747db1e7e70bcf0267ef8951c95fc83" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, + "mason.nvim": { "branch": "main", "commit": "16ba83bfc8a25f52bb545134f5bee082b195c460" }, + "mini.ai": { "branch": "main", "commit": "4511b3481707c1d021485475d34f2ed2a50bf47b" }, + "mini.icons": { "branch": "main", "commit": "520995f1d75da0e4cc901ee95080b1ff2bc46b94" }, + "mini.pairs": { "branch": "main", "commit": "30cf2f01c4aaa2033db67376b9924fa2442c05d6" }, + "neo-tree.nvim": { "branch": "main", "commit": "655b22b8515f3c4337bcdabe1b5c3f13a7744737" }, + "noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" }, + "nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" }, + "nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" }, + "nvim-lint": { "branch": "master", "commit": "d48f3a76189d03b2239f6df1b2f7e3fa8353743b" }, + "nvim-lspconfig": { "branch": "master", "commit": "229b79051b380377664edc4cbd534930154921a1" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, + "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, + "nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" }, + "opencode.nvim": { "branch": "main", "commit": "b2622d6e0f033d9f449ff995362544ca73f3d50d" }, + "persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" }, + "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, + "render-markdown.nvim": { "branch": "main", "commit": "5adf0895310c1904e5abfaad40a2baad7fe44a07" }, + "snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, + "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, + "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, + "ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" }, + "venv-selector.nvim": { "branch": "main", "commit": "cc4bb3975de8835291f9bb45889e96c6b2795fc4" }, + "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } +} diff --git a/dot_config/nvim/lazyvim.json b/dot_config/nvim/lazyvim.json new file mode 100644 index 0000000..b0021c3 --- /dev/null +++ b/dot_config/nvim/lazyvim.json @@ -0,0 +1,12 @@ +{ + "extras": [ + "lazyvim.plugins.extras.dap.core", + "lazyvim.plugins.extras.formatting.black", + "lazyvim.plugins.extras.lang.markdown", + "lazyvim.plugins.extras.util.gitui" + ], + "news": { + "NEWS.md": "11866" + }, + "version": 8 +} \ No newline at end of file diff --git a/dot_config/nvim/lua/config/autocmds.lua b/dot_config/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..27e9e06 --- /dev/null +++ b/dot_config/nvim/lua/config/autocmds.lua @@ -0,0 +1,3 @@ +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- Add any additional autocmds here diff --git a/dot_config/nvim/lua/config/keymaps.lua b/dot_config/nvim/lua/config/keymaps.lua new file mode 100644 index 0000000..2c134f7 --- /dev/null +++ b/dot_config/nvim/lua/config/keymaps.lua @@ -0,0 +1,3 @@ +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua +-- Add any additional keymaps here diff --git a/dot_config/nvim/lua/config/lazy.lua b/dot_config/nvim/lua/config/lazy.lua new file mode 100644 index 0000000..82e17ee --- /dev/null +++ b/dot_config/nvim/lua/config/lazy.lua @@ -0,0 +1,47 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + -- bootstrap lazy.nvim + -- stylua: ignore + vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) +end +vim.opt.rtp:prepend(vim.env.LAZY or lazypath) + +require("lazy").setup({ + spec = { + -- add LazyVim and import its plugins + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + -- import any extras modules here + -- { import = "lazyvim.plugins.extras.lang.typescript" }, + -- { import = "lazyvim.plugins.extras.lang.json" }, + -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, + -- import/override with your plugins + { import = "lazyvim.plugins.extras.lang.python" }, + { import = "plugins" }, + }, + defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. + -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. + lazy = false, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = false, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + }, + install = { colorscheme = { "tokyonight", "habamax" } }, + checker = { enabled = true }, -- automatically check for plugin updates + performance = { + rtp = { + -- disable some rtp plugins + disabled_plugins = { + "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/dot_config/nvim/lua/config/options.lua b/dot_config/nvim/lua/config/options.lua new file mode 100644 index 0000000..3ea1454 --- /dev/null +++ b/dot_config/nvim/lua/config/options.lua @@ -0,0 +1,3 @@ +-- Options are automatically loaded before lazy.nvim startup +-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua +-- Add any additional options here diff --git a/dot_config/nvim/lua/plugins/colorscheme.lua b/dot_config/nvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..f206ac3 --- /dev/null +++ b/dot_config/nvim/lua/plugins/colorscheme.lua @@ -0,0 +1,12 @@ +return { + -- add gruvbox + { "ellisonleao/gruvbox.nvim" }, + + -- Configure LazyVim to load gruvbox + { + "LazyVim/LazyVim", + opts = { + colorscheme = "gruvbox", + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/example.lua b/dot_config/nvim/lua/plugins/example.lua new file mode 100644 index 0000000..6859c0e --- /dev/null +++ b/dot_config/nvim/lua/plugins/example.lua @@ -0,0 +1,265 @@ +-- since this is just an example spec, don't actually load anything here and return an empty spec +-- stylua: ignore +if true then return {} end + +-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim +-- +-- In your plugin files, you can: +-- * add extra plugins +-- * disable/enabled LazyVim plugins +-- * override the configuration of LazyVim plugins +return { + -- add gruvbox + { "ellisonleao/gruvbox.nvim" }, + + -- Configure LazyVim to load gruvbox + { + "LazyVim/LazyVim", + opts = { + colorscheme = "gruvbox", + }, + }, + + -- change trouble config + { + "folke/trouble.nvim", + -- opts will be merged with the parent spec + opts = { use_diagnostic_signs = true }, + }, + + -- disable trouble + { "folke/trouble.nvim", enabled = false }, + + -- add symbols-outline + { + "simrat39/symbols-outline.nvim", + cmd = "SymbolsOutline", + keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, + config = true, + }, + + -- override nvim-cmp and add cmp-emoji + { + "hrsh7th/nvim-cmp", + dependencies = { "hrsh7th/cmp-emoji" }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, { name = "emoji" }) + end, + }, + + -- change some telescope options and a keymap to browse plugin files + { + "nvim-telescope/telescope.nvim", + keys = { + -- add a keymap to browse plugin files + -- stylua: ignore + { + "fp", + function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, + desc = "Find Plugin File", + }, + }, + -- change some options + opts = { + defaults = { + layout_strategy = "horizontal", + layout_config = { prompt_position = "top" }, + sorting_strategy = "ascending", + winblend = 0, + }, + }, + }, + + -- add telescope-fzf-native + { + "telescope.nvim", + dependencies = { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + config = function() + require("telescope").load_extension("fzf") + end, + }, + }, + + -- add pyright to lspconfig + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- pyright will be automatically installed with mason and loaded with lspconfig + pyright = {}, + }, + }, + }, + + -- add tsserver and setup with typescript.nvim instead of lspconfig + { + "neovim/nvim-lspconfig", + dependencies = { + "jose-elias-alvarez/typescript.nvim", + init = function() + require("lazyvim.util").lsp.on_attach(function(_, buffer) + -- stylua: ignore + vim.keymap.set( "n", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) + vim.keymap.set("n", "cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) + end) + end, + }, + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- tsserver will be automatically installed with mason and loaded with lspconfig + tsserver = {}, + }, + -- you can do any additional lsp server setup here + -- return true if you don't want this server to be setup with lspconfig + ---@type table + setup = { + -- example to setup with typescript.nvim + tsserver = function(_, opts) + require("typescript").setup({ server = opts }) + return true + end, + -- Specify * to use this function as a fallback for any server + -- ["*"] = function(server, opts) end, + }, + }, + }, + + -- for typescript, LazyVim also includes extra specs to properly setup lspconfig, + -- treesitter, mason and typescript.nvim. So instead of the above, you can use: + { import = "lazyvim.plugins.extras.lang.typescript" }, + + -- add more treesitter parsers + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "html", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "yaml", + }, + }, + }, + + -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above + -- would overwrite `ensure_installed` with the new value. + -- If you'd rather extend the default config, use the code below instead: + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + -- add tsx and treesitter + vim.list_extend(opts.ensure_installed, { + "tsx", + "typescript", + }) + end, + }, + + -- the opts function can also be used to change the default opts: + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, "😄") + end, + }, + + -- or you can return new options to override all the defaults + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function() + return { + --[[add your custom lualine config here]] + } + end, + }, + + -- use mini.starter instead of alpha + { import = "lazyvim.plugins.extras.ui.mini-starter" }, + + -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc + { import = "lazyvim.plugins.extras.lang.json" }, + + -- add any tools you want to have installed below + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "stylua", + "shellcheck", + "shfmt", + "flake8", + }, + }, + }, + + -- Use for completion and snippets (supertab) + -- first: disable default and behavior in LuaSnip + { + "L3MON4D3/LuaSnip", + keys = function() + return {} + end, + }, + -- then: setup supertab in cmp + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-emoji", + }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + local has_words_before = function() + unpack = unpack or table.unpack + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + end + + local luasnip = require("luasnip") + local cmp = require("cmp") + + opts.mapping = vim.tbl_extend("force", opts.mapping, { + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() + -- this way you will only jump inside the snippet region + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }) + end, + }, +} diff --git a/dot_config/nvim/lua/plugins/godot.lua b/dot_config/nvim/lua/plugins/godot.lua new file mode 100644 index 0000000..bbeb57a --- /dev/null +++ b/dot_config/nvim/lua/plugins/godot.lua @@ -0,0 +1,12 @@ +return { + { + "neovim/nvim-lspconfig", + opts = { + inlay_hints = { enabled = false }, + servers = { + gdscript = {}, + gdshader_lsp = {}, + }, + }, + }, +} diff --git a/dot_config/nvim/lua/plugins/multicursor.lua b/dot_config/nvim/lua/plugins/multicursor.lua new file mode 100644 index 0000000..f2c0e15 --- /dev/null +++ b/dot_config/nvim/lua/plugins/multicursor.lua @@ -0,0 +1,4 @@ +return { + "mg979/vim-visual-multi", + event = "VeryLazy", -- Load on startup +} diff --git a/dot_config/nvim/lua/plugins/opencode.lua b/dot_config/nvim/lua/plugins/opencode.lua new file mode 100644 index 0000000..d6b228b --- /dev/null +++ b/dot_config/nvim/lua/plugins/opencode.lua @@ -0,0 +1,47 @@ +return { + "NickvanDyke/opencode.nvim", + dependencies = { + -- Recommended for `ask()` and `select()`. + -- Required for `snacks` provider. + ---@module 'snacks' <- Loads `snacks.nvim` types for configuration intellisense. + { "folke/snacks.nvim", opts = { input = {}, picker = {}, terminal = {} } }, + }, + config = function() + ---@type opencode.Opts + vim.g.opencode_opts = { + -- Your configuration, if any — see `lua/opencode/config.lua`, or "goto definition" on the type or field. + } + + -- Required for `opts.events.reload`. + vim.o.autoread = true + + -- Recommended/example keymaps. + vim.keymap.set({ "n", "x" }, "", function() + require("opencode").ask("@this: ", { submit = true }) + end, { desc = "Ask opencode…" }) + vim.keymap.set({ "n", "x" }, "", function() + require("opencode").select() + end, { desc = "Execute opencode action…" }) + vim.keymap.set({ "n", "t" }, "", function() + require("opencode").toggle() + end, { desc = "Toggle opencode" }) + + vim.keymap.set({ "n", "x" }, "go", function() + return require("opencode").operator("@this ") + end, { desc = "Add range to opencode", expr = true }) + vim.keymap.set("n", "goo", function() + return require("opencode").operator("@this ") .. "_" + end, { desc = "Add line to opencode", expr = true }) + + vim.keymap.set("n", "", function() + require("opencode").command("session.half.page.up") + end, { desc = "Scroll opencode up" }) + vim.keymap.set("n", "", function() + require("opencode").command("session.half.page.down") + end, { desc = "Scroll opencode down" }) + + -- You may want these if you stick with the opinionated "" and "" above — otherwise consider "o…". + vim.keymap.set("n", "+", "", { desc = "Increment under cursor", noremap = true }) + vim.keymap.set("n", "-", "", { desc = "Decrement under cursor", noremap = true }) + end, +} diff --git a/dot_config/nvim/stylua.toml b/dot_config/nvim/stylua.toml new file mode 100644 index 0000000..5d6c50d --- /dev/null +++ b/dot_config/nvim/stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 \ No newline at end of file diff --git a/dot_config/paru/paru.conf b/dot_config/paru/paru.conf new file mode 100644 index 0000000..351ad9f --- /dev/null +++ b/dot_config/paru/paru.conf @@ -0,0 +1,30 @@ +# +# $PARU_CONF +# /etc/paru.conf +# ~/.config/paru/paru.conf +# +# See the paru.conf(5) manpage for options + +# +# GENERAL OPTIONS +# +[options] +PgpFetch +Devel +Provides +DevelSuffixes = -git -cvs -svn -bzr -darcs -always +BottomUp +#RemoveMake +SudoLoop +#UseAsk +#CombinedUpgrade +#CleanAfter +#UpgradeMenu +NewsOnUpgrade + +# +# Binary OPTIONS +# +#[bin] +#FileManager = vifm +#MFlags = --skippgpcheck diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl new file mode 100644 index 0000000..8a76a54 --- /dev/null +++ b/dot_gitconfig.tmpl @@ -0,0 +1,17 @@ +[user] + email = rain@melonbread.xyz + name = rain +[core] + editor = nvim + pager = delta +[interactive] + diffFilter = delta --color-only +[delta] + navigate = true + light = false + line-numbers = true + side-by-side = false +[merge] + conflictstyle = diff3 +[init] + defaultBranch = main \ No newline at end of file diff --git a/dot_tmux.conf b/dot_tmux.conf new file mode 100644 index 0000000..7024dd5 --- /dev/null +++ b/dot_tmux.conf @@ -0,0 +1,23 @@ +set-option -g status on +set-option -g status-interval 2 +set-option -g status-justify "centre" +set-option -g status-left-length 60 +set-option -g status-right-length 90 +set -g mouse on + + +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-yank' +#set -g @plugin 'tmux-plugins/tmux-urlview' +set -g @plugin 'tmux-plugins/tmux-sidebar' +set -g @plugin 'tmux-plugins/tmux-prefix-highlight' +set -g @plugin 'jaclu/tmux-menus' +set -g @plugin 'egel/tmux-gruvbox' + +set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run -b '~/.tmux/plugins/tpm/tpm' \ No newline at end of file diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl new file mode 100644 index 0000000..6296013 --- /dev/null +++ b/dot_zshrc.tmpl @@ -0,0 +1,203 @@ +# ============================================================================= +# .zshrc — gnu-plus-dotfiles (chezmoi-managed) +# Refactored from miche's original to use os_family for OS-specific bits. +# Sync source: https://git.melonbread.xyz/rain/gnu-plus-dotfiles +# ============================================================================= + +# --------------------------------------------------------------------------- +# Oh My Zsh +# --------------------------------------------------------------------------- +export ZSH="$HOME/.oh-my-zsh" + +# No theme — using starship +ZSH_THEME="" + +# Plugins (loaded before starship so prompt is clean) +plugins=( + git + fzf + sudo # ESC ESC to add sudo + tmux + systemd + rust + rsync + command-not-found + zsh-syntax-highlighting # fish-style live colors — MUST be near last + zsh-history-substring-search # fish-style Up/Down history search + zsh-autosuggestions # fish-style ghost completions — MUST be last +) + + +source $ZSH/oh-my-zsh.sh + +# --------------------------------------------------------------------------- +# History +# --------------------------------------------------------------------------- +setopt EXTENDED_HISTORY # write timestamp + duration +setopt HIST_IGNORE_DUPS # don't save consecutive duplicates +setopt HIST_IGNORE_ALL_DUPS # remove older duplicates of new commands +setopt HIST_IGNORE_SPACE # commands starting with space → not saved +setopt HIST_REDUCE_BLANKS # trim whitespace +setopt SHARE_HISTORY # share history across sessions in real time +setopt INC_APPEND_HISTORY # append immediately +HISTSIZE=10000 +SAVEHIST=10000 +HISTFILE=~/.zsh_history + +# --------------------------------------------------------------------------- +# Shell options — make zsh feel like fish +# --------------------------------------------------------------------------- +setopt AUTO_CD # `dirname` to cd (like fish) +setopt AUTO_PUSHD # cd pushes to dir stack +setopt PUSHD_IGNORE_DUPS +setopt INTERACTIVE_COMMENTS # # comments in interactive shell +setopt EXTENDED_GLOB +setopt NO_BEEP + +# Ctrl+Space to accept autosuggestion (like fish) +bindkey '^ ' autosuggest-accept +# Up/Down arrows → history substring search (like fish) +# Both raw form (foot, kitty, alacritty, xterm default) and app-cursor form +# (some terminals in DECCKM mode). Unquoted so $terminfo expands. +bindkey '^[[A' history-substring-search-up +bindkey '^[[B' history-substring-search-down +# App-cursor mode: some terminals send ${terminfo[kcuu1]} when DECCKM is set. +# Guard so an unset terminfo entry doesn't warn at startup. +if (( ${+terminfo[kcuu1]} )) && [[ -n "${terminfo[kcuu1]}" ]]; then + bindkey "${terminfo[kcuu1]}" history-substring-search-up +fi +if (( ${+terminfo[kcud1]} )) && [[ -n "${terminfo[kcud1]}" ]]; then + bindkey "${terminfo[kcud1]}" history-substring-search-down +fi + +# --------------------------------------------------------------------------- +# Environment Variables +# --------------------------------------------------------------------------- +export EDITOR=nvim +export LANG=en_US.UTF-8 +export TMUX_PLUGIN_MANAGER_PATH=~/.tmux/plugins/tpm + +{{ if eq .os_family "arch" -}} +# ROCm — on Arch/CachyOS, system handles ROCM_PATH and library paths via +# /etc/profile.d/rocm.sh + /etc/ld.so.conf.d/rocm.conf. +{{ else if eq .os_family "debian" -}} +# Debian: ROCm only relevant if you install it. Leave default until needed. +{{ end -}} + +# --------------------------------------------------------------------------- +# PATH (auto-deduplicated) +# --------------------------------------------------------------------------- +typeset -U path +path=( + $HOME/.local/bin + $HOME/.bin + $path +) + +# --------------------------------------------------------------------------- +# Aliases — common + OS-specific +# --------------------------------------------------------------------------- + +# Directory navigation +alias ..='cd ..' +alias ...='cd ../..' +alias ....='cd ../../..' +alias .....='cd ../../../..' + +# Modern CLI replacements +alias cat='bat' +alias ls='eza -al --color=always --group-directories-first --icons' +alias ll='eza -l --color=always --group-directories-first --icons' +alias la='eza -a --color=always --group-directories-first --icons' +alias lt='eza -aT --color=always --group-directories-first --icons' + +{{ if eq .os_family "arch" -}} +# Pacman / system (Arch-base only) +alias update='sudo pacman -Syu' +alias cleanup='sudo pacman -Rns $(pacman -Qtdq)' +alias fixpacman='sudo rm /var/lib/pacman/db.lck' +alias mirror='sudo cachyos-rate-mirrors || sudo pacman -Syy' +alias please='sudo' +alias jctl='journalctl -p 3 -xb' +alias psmem='ps auxf | sort -nr -k 4' +alias psmem10='ps auxf | sort -nr -k 4 | head -10' +alias hw='hwinfo --short' +alias gitpkg='pacman -Q | grep -i "\-git" | wc -l' +{{ else if eq .os_family "debian" -}} +# Apt / system (Debian-base only) +alias update='sudo apt update && sudo apt upgrade' +alias please='sudo' +alias jctl='journalctl -p 3 -xb' +alias psmem='ps auxf | sort -nr -k 4' +alias psmem10='ps auxf | sort -nr -k 4 | head -10' +{{ end -}} + +# Utilities +alias weather='curl wttr.in' +alias wget='wget -c ' +alias untar='tar -zxvf ' +alias tarnow='tar -acf ' + +# Media +alias yt-dlp-mp4="yt-dlp --format 'bestvideo[height<=720]+bestaudio[ext=m4a]/best[ext=mp4]' --merge-output-format mp4 --remux-video mp4 --audio-quality 128k" +alias yt-dlp-mp4-fedi="yt-dlp --format 'bestvideo[height<=480]+bestaudio[ext=m4a]/best[ext=mp4]' --merge-output-format mp4 --remux-video mp4 --audio-quality 128k" + +# Personal +alias toolbox='distrobox' +alias huggingface-cli='hf' + +# Quick reload / edit +alias zshsource='source ~/.zshrc' +alias zshconfig='chezmoi edit ~/.zshrc' + +# --------------------------------------------------------------------------- +# TERM / TTY fixes (ported from fish config) +# --------------------------------------------------------------------------- +if [[ -z "$TERM" || "$TERM" == "foot-extra" || "$TERM" == "foot+base" ]]; then + if [[ -n "$WAYLAND_DISPLAY" ]] && infocmp foot >/dev/null 2>&1; then + export TERM=foot + elif [[ "$(tty 2>/dev/null)" == /dev/tty* ]]; then + export TERM=linux + elif infocmp xterm-256color >/dev/null 2>&1; then + export TERM=xterm-256color + fi +fi + +if [[ -z "$COLORTERM" && -n "$WAYLAND_DISPLAY" ]]; then + export COLORTERM=truecolor +fi + +# TTY tint (only on real text TTY) +if [[ -z "$DISPLAY" && "$(tty 2>/dev/null)" == /dev/tty* ]]; then + setterm -background black -foreground white 2>/dev/null + export LS_COLORS='di=33:ln=36:ex=32:so=35:bd=33;1:cd=33:pi=33:fi=0:*.tar=31:*.zip=31:*.gz=31:*.tgz=31:*.jpg=35:*.png=35:*.gif=35:*.mp3=36:*.mp4=36:*.conf=37:*.log=33:*.sh=32:*.py=32' +fi + +# --------------------------------------------------------------------------- +# Integrations +# --------------------------------------------------------------------------- +eval "$(starship init zsh)" +eval "$(zoxide init zsh)" +eval "$(fzf --zsh 2>/dev/null)" + +# --------------------------------------------------------------------------- +# Custom functions — sourced if present (host-specific, not chezmoi-managed) +# --------------------------------------------------------------------------- +[[ -f ~/.config/zsh/functions.zsh ]] && source ~/.config/zsh/functions.zsh + +# --------------------------------------------------------------------------- +# Bun (if installed) +# --------------------------------------------------------------------------- +[[ -d "$HOME/.bun/bin" ]] && export PATH="$HOME/.bun/bin:$PATH" + +# --------------------------------------------------------------------------- +# Engram persistent memory — default points at kaiser.local:7438 if unset +# --------------------------------------------------------------------------- +export ENGRAM_URL="${ENGRAM_URL:-http://kaiser.local:7438}" + +# --------------------------------------------------------------------------- +# Fastfetch — run on every interactive shell start +# --------------------------------------------------------------------------- +if command -v fastfetch >/dev/null 2>&1; then + fastfetch +fi \ No newline at end of file diff --git a/run_once_00-install-bootstrap-tools.sh.tmpl b/run_once_00-install-bootstrap-tools.sh.tmpl new file mode 100755 index 0000000..ac5aae0 --- /dev/null +++ b/run_once_00-install-bootstrap-tools.sh.tmpl @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# ============================================================================= +# run_once_00-install-bootstrap-tools.sh.tmpl +# Install age, curl, ca-certificates, git — needed before anything else. +# Idempotent: skips if already installed. +# ============================================================================= +set -euo pipefail + +log() { printf '\033[1;34m[bootstrap]\033[0m %s\n' "$*"; } +die() { printf '\033[1;31m[bootstrap ERROR]\033[0m %s\n' "$*" >&2; exit 1; } + +[[ "$(id -u)" -ne 0 ]] && die "must run as root or via sudo" + +{{ if eq .os_family "arch" -}} +log "pacman-sync" +pacman -Sy --noconfirm + +log "install base tools (arch)" +PACMAN_PKGS=(age curl ca-certificates git base-devel wget) +pacman -S --needed --noconfirm "${PACMAN_PKGS[@]}" + +{{ else if eq .os_family "debian" -}} +export DEBIAN_FRONTEND=noninteractive +log "apt-update" +apt-get update -y +log "apt-upgrade" +apt-get upgrade -y + +log "install base tools (debian)" +APT_PKGS=(age curl ca-certificates git wget gnupg) +apt-get install -y --no-install-recommends "${APT_PKGS[@]}" + +{{ else -}} +die "unsupported os_family: {{ .os_family }} (this script supports arch or debian)" +{{ end -}} + +log "bootstrap tools installed" +command -v age && age --version +command -v git && git --version \ No newline at end of file diff --git a/run_once_10-add-chaotic-aur.sh.tmpl b/run_once_10-add-chaotic-aur.sh.tmpl new file mode 100755 index 0000000..1acd0dc --- /dev/null +++ b/run_once_10-add-chaotic-aur.sh.tmpl @@ -0,0 +1,53 @@ +#!/usr/bin/env bash +# ============================================================================= +# run_once_10-add-chaotic-aur.sh.tmpl (arch-only) +# Add Chaotic-AUR repo + keyring to pacman, then install paru from there. +# Reference: https://aur.chaotic.cx/docs +# +# Steps from chaotic docs: +# 1. Get and sign the key +# 2. Install chaotic-keyring + chaotic-mirrorlist +# 3. Append repo to /etc/pacman.conf +# ============================================================================= +set -euo pipefail + +log() { printf '\033[1;34m[chaotic]\033[0m %s\n' "$*"; } +die() { printf '\033[1;31m[chaotic ERROR]\033[0m %s\n' "$*" >&2; exit 1; } + +[[ "$(id -u)" -ne 0 ]] && die "must run as root or via sudo" + +if command -v paru >/dev/null 2>&1; then + log "paru already installed — skipping chaotic setup" + exit 0 +fi + +# Chaotic's official bootstrap. Run as root because pacman-key needs it. +log "fetching chaotic key (3056513887B78AEB)" +pacman-key --recv-key 3056513887B78AEB +pacman-key --lsign-key 3056513887B78AEB + +log "installing chaotic-keyring and chaotic-mirrorlist" +pacman -U --noconfirm \ + 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-keyring.pkg.tar.zst' \ + 'https://cdn-mirror.chaotic.cx/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst' + +# Append chaotic repo to pacman.conf if not already present +if ! grep -q "^\[chaotic-aur\]" /etc/pacman.conf; then + log "appending chaotic-aur to /etc/pacman.conf" + cat >> /etc/pacman.conf <<'PACMAN_EOF' + +[chaotic-aur] +Include = /etc/pacman.d/chaotic-mirrorlist +PACMAN_EOF +else + log "chaotic-aur already in /etc/pacman.conf" +fi + +log "full system sync with chaotic enabled" +pacman -Syu --noconfirm + +log "installing paru from chaotic-aur" +pacman -S --needed --noconfirm paru + +log "chaotic-aur + paru ready" +paru --version \ No newline at end of file diff --git a/run_once_20-install-user-packages.sh.tmpl b/run_once_20-install-user-packages.sh.tmpl new file mode 100755 index 0000000..6882464 --- /dev/null +++ b/run_once_20-install-user-packages.sh.tmpl @@ -0,0 +1,131 @@ +#!/usr/bin/env bash +# ============================================================================= +# run_once_20-install-user-packages.sh.tmpl +# Install zsh, tmux, neovim, fastfetch, plus the modern CLI replacements +# the .zshrc aliases depend on (bat, btop, eza, fzf, fd, ripgrep, zoxide, +# starship, lazygit, yt-dlp, etc.) +# +# Also: install oh-my-zsh, zsh-autosuggestions, zsh-syntax-highlighting, +# zsh-history-substring-search. +# +# Runs as the unprivileged user, but uses sudo for system packages. +# ============================================================================= +set -euo pipefail + +log() { printf '\033[1;34m[packages]\033[0m %s\n' "$*"; } +die() { printf '\033[1;31m[packages ERROR]\033[0m %s\n' "$*" >&2; exit 1; } + +USER_HOME="${HOME:-$(eval echo "~$(whoami)")}" +ZSH_CUSTOM="${ZSH_CUSTOM:-$USER_HOME/.oh-my-zsh/custom}" + +{{ if eq .os_family "arch" -}} +# ----------------------------- ARCH --------------------------------------- +log "pacman -Syu" +sudo pacman -Syu --noconfirm + +PACMAN_PKGS=( + zsh tmux neovim git base-devel + bat btop htop fastfetch + eza fzf fd ripgrep zoxide starship + lazygit yt-dlp jq + unzip p7zip + openssh +) + +log "installing pacman packages" +sudo pacman -S --needed --noconfirm "${PACMAN_PKGS[@]}" + +{{ else if eq .os_family "debian" -}} +# ----------------------------- DEBIAN -------------------------------------- +export DEBIAN_FRONTEND=noninteractive +sudo apt-get update -y +sudo apt-get upgrade -y + +APT_PKGS=( + zsh tmux git build-essential + bat btop htop fastfetch + eza fzf fd-find ripgrep zoxide starship + lazygit yt-dlp jq + unzip p7zip + openssh-client + ca-certificates curl wget +) + +log "installing apt packages" +sudo apt-get install -y --no-install-recommends "${APT_PKGS[@]}" + +# fd on Debian ships as 'fdfind' to avoid clashing with fd (the dedupe tool). +# Symlink so .zshrc can find 'fd' on PATH. +if command -v fdfind >/dev/null 2>&1 && ! command -v fd >/dev/null 2>&1; then + log "symlinking fdfind -> fd in ~/.local/bin" + mkdir -p "$USER_HOME/.local/bin" + ln -sf "$(command -v fdfind)" "$USER_HOME/.local/bin/fd" +fi + +# Debian's neovim in stable is too old for LazyVim (needs >=0.9). +# If installed neovim is <0.9, fetch the official binary tarball. +if command -v nvim >/dev/null 2>&1; then + NVIM_VER="$(nvim --version | head -1 | awk '{print $2}' | tr -d 'v')" + NVIM_MAJOR="$(echo "$NVIM_VER" | cut -d. -f1)" + NVIM_MINOR="$(echo "$NVIM_VER" | cut -d. -f2)" + if [[ "${NVIM_MAJOR:-0}" -lt 1 || ("$NVIM_MAJOR" -eq 0 && "${NVIM_MINOR:-0}" -lt 9) ]]; then + log "installed neovim $NVIM_VER is too old, installing official binary" + sudo apt-get remove -y neovim || true + cd /tmp + NVIM_LATEST="$(curl -fsSL https://api.github.com/repos/neovim/neovim/releases/latest | grep tag_name | cut -d'"' -f4)" + curl -fL "https://github.com/neovim/neovim/releases/download/${NVIM_LATEST}/nvim-linux64.tar.gz" -o nvim.tar.gz + sudo tar -xzf nvim.tar.gz -C /opt/ + sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/nvim + rm -f nvim.tar.gz + fi +fi + +{{ else -}} +die "unsupported os_family: {{ .os_family }}" +{{ end -}} + +# --------------------------- OH-MY-ZSH ------------------------------------- +if [[ ! -d "$USER_HOME/.oh-my-zsh" ]]; then + log "installing oh-my-zsh (unattended)" + RUNZSH=no CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" +else + log "oh-my-zsh already installed" +fi + +# zsh plugins (loaded by .zshrc) +install_zsh_plugin() { + local repo="$1" target="$2" + if [[ -d "$target" ]]; then + log "plugin already present: $target" + else + log "cloning plugin: $repo" + git clone --depth 1 "https://github.com/$repo.git" "$target" + fi +} + +install_zsh_plugin zsh-users/zsh-autosuggestions "$ZSH_CUSTOM/plugins/zsh-autosuggestions" +install_zsh_plugin zsh-users/zsh-syntax-highlighting "$ZSH_CUSTOM/plugins/zsh-syntax-highlighting" +install_zsh_plugin zsh-users/zsh-history-substring-search "$ZSH_CUSTOM/plugins/zsh-history-substring-search" + +# --------------------------- TPM (tmux plugin manager) --------------------- +if [[ ! -d "$USER_HOME/.tmux/plugins/tpm" ]]; then + log "cloning tmux plugin manager" + mkdir -p "$USER_HOME/.tmux/plugins" + git clone --depth 1 https://github.com/tmux-plugins/tpm "$USER_HOME/.tmux/plugins/tpm" +else + log "tpm already installed" +fi + +# --------------------------- set zsh as default shell --------------------- +USER_SHELL="$(getent passwd "$(whoami)" | cut -d: -f7)" +if [[ "$USER_SHELL" != "$(command -v zsh)" ]]; then + log "changing login shell to zsh" + chsh -s "$(command -v zsh)" +else + log "zsh already the login shell" +fi + +log "all user packages installed" +zsh --version +nvim --version | head -1 +tmux -V \ No newline at end of file diff --git a/run_onchange_30-ensure-cargo.sh.tmpl b/run_onchange_30-ensure-cargo.sh.tmpl new file mode 100755 index 0000000..c2561cd --- /dev/null +++ b/run_onchange_30-ensure-cargo.sh.tmpl @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# ============================================================================= +# run_onchange_30-ensure-cargo.sh.tmpl +# Make sure rustup/cargo is available. If not, install rustup. +# Runs on every apply because the script body rarely changes but we want a +# fresh check after package installs. +# ============================================================================= +set -euo pipefail + +log() { printf '\033[1;34m[cargo]\033[0m %s\n' "$*"; } + +if command -v cargo >/dev/null 2>&1; then + log "cargo already installed: $(cargo --version)" + exit 0 +fi + +if command -v rustup >/dev/null 2>&1; then + log "rustup present but cargo missing — running rustup default" + rustup default stable + exit 0 +fi + +log "no cargo or rustup — installing rustup" +sh -c "$(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs)" -- -y --default-toolchain stable --profile minimal +# shellcheck disable=SC1091 +source "$HOME/.cargo/env" + +log "rustup installed: $(rustup --version)" +log "cargo installed: $(cargo --version)" \ No newline at end of file