diff --git a/fish/config.lua b/fish/config.lua new file mode 100644 index 0000000..6cf2242 --- /dev/null +++ b/fish/config.lua @@ -0,0 +1,6 @@ +return { + target = { + linux = "~/.config/fish", + default = "~/.config/fish", + }, +} diff --git a/fish/files/completions/bun.fish b/fish/files/completions/bun.fish new file mode 100644 index 0000000..e262bb6 --- /dev/null +++ b/fish/files/completions/bun.fish @@ -0,0 +1,186 @@ +# This is terribly complicated +# It's because: +# 1. bun run has to have dynamic completions +# 2. there are global options +# 3. bun {install add remove} gets special options +# 4. I don't know how to write fish completions well +# Contributions very welcome!! + +function __fish__get_bun_bins + string split ' ' (bun getcompletes b) +end + +function __fish__get_bun_scripts + set -lx SHELL bash + set -lx MAX_DESCRIPTION_LEN 40 + string trim (string split '\n' (string split '\t' (bun getcompletes z))) +end + +function __fish__get_bun_packages + if test (commandline -ct) != "" + set -lx SHELL fish + string split ' ' (bun getcompletes a (commandline -ct)) + end +end + +function __history_completions + set -l tokens (commandline --current-process --tokenize) + history --prefix (commandline) | string replace -r \^$tokens[1]\\s\* "" | string replace -r \^$tokens[2]\\s\* "" | string split ' ' +end + +function __fish__get_bun_bun_js_files + string split ' ' (bun getcompletes j) +end + +set -l bun_install_boolean_flags yarn production optional development no-save dry-run force no-cache silent verbose global +set -l bun_install_boolean_flags_descriptions "Write a yarn.lock file (yarn v1)" "Don't install devDependencies" "Add dependency to optionalDependencies" "Add dependency to devDependencies" "Don't update package.json or save a lockfile" "Don't install anything" "Always request the latest versions from the registry & reinstall all dependencies" "Ignore manifest cache entirely" "Don't output anything" "Excessively verbose logging" "Use global folder" + +set -l bun_builtin_cmds_without_run dev create help bun upgrade discord install remove add init pm x +set -l bun_builtin_cmds_accepting_flags create help bun upgrade discord run init link unlink pm x + +function __bun_complete_bins_scripts --inherit-variable bun_builtin_cmds_without_run -d "Emit bun completions for bins and scripts" + # Do nothing if we already have a builtin subcommand, + # or any subcommand other than "run". + if __fish_seen_subcommand_from $bun_builtin_cmds_without_run + or not __fish_use_subcommand && not __fish_seen_subcommand_from run + return + end + # Do we already have a bin or script subcommand? + set -l bins (__fish__get_bun_bins) + if __fish_seen_subcommand_from $bins + return + end + # Scripts have descriptions appended with a tab separator. + # Strip off descriptions for the purposes of subcommand testing. + set -l scripts (__fish__get_bun_scripts) + if __fish_seen_subcommand_from (string split \t -f 1 -- $scripts) + return + end + # Emit scripts. + for script in $scripts + echo $script + end + # Emit binaries and JS files (but only if we're doing `bun run`). + if __fish_seen_subcommand_from run + for bin in $bins + echo "$bin"\t"package bin" + end + for file in (__fish__get_bun_bun_js_files) + echo "$file"\t"Bun.js" + end + end +end + + +# Clear existing completions +complete -e -c bun + +# Dynamically emit scripts and binaries +complete -c bun -f -a "(__bun_complete_bins_scripts)" + +# Complete flags if we have no subcommand or a flag-friendly one. +set -l flag_applies "__fish_use_subcommand; or __fish_seen_subcommand_from $bun_builtin_cmds_accepting_flags" +complete -c bun \ + -n $flag_applies --no-files -s 'u' -l 'origin' -r -d 'Server URL. Rewrites import paths' +complete -c bun \ + -n $flag_applies --no-files -s 'p' -l 'port' -r -d 'Port number to start server from' +complete -c bun \ + -n $flag_applies --no-files -s 'd' -l 'define' -r -d 'Substitute K:V while parsing, e.g. --define process.env.NODE_ENV:\"development\"' +complete -c bun \ + -n $flag_applies --no-files -s 'e' -l 'external' -r -d 'Exclude module from transpilation (can use * wildcards). ex: -e react' +complete -c bun \ + -n $flag_applies --no-files -l 'use' -r -d 'Use a framework (ex: next)' +complete -c bun \ + -n $flag_applies --no-files -l 'hot' -r -d 'Enable hot reloading in Bun\'s JavaScript runtime' + +# Complete dev and create as first subcommand. +complete -c bun \ + -n "__fish_use_subcommand" -a 'dev' -d 'Start dev server' +complete -c bun \ + -n "__fish_use_subcommand" -a 'create' -f -d 'Create a new project from a template' + +# Complete "next" and "react" if we've seen "create". +complete -c bun \ + -n "__fish_seen_subcommand_from create" -a 'next' -d 'new Next.js project' + +complete -c bun \ + -n "__fish_seen_subcommand_from create" -a 'react' -d 'new React project' + +# Complete "upgrade" as first subcommand. +complete -c bun \ + -n "__fish_use_subcommand" -a 'upgrade' -d 'Upgrade bun to the latest version' -x +# Complete "-h/--help" unconditionally. +complete -c bun \ + -s "h" -l "help" -d 'See all commands and flags' -x + +# Complete "-v/--version" if we have no subcommand. +complete -c bun \ + -n "not __fish_use_subcommand" -l "version" -s "v" -d 'Bun\'s version' -x + +# Complete additional subcommands. +complete -c bun \ + -n "__fish_use_subcommand" -a 'discord' -d 'Open bun\'s Discord server' -x + + +complete -c bun \ + -n "__fish_use_subcommand" -a 'bun' -d 'Generate a new bundle' + + +complete -c bun \ + -n "__fish_seen_subcommand_from bun" -F -d 'Bundle this' + +complete -c bun \ + -n "__fish_seen_subcommand_from create; and __fish_seen_subcommand_from react next" -F -d "Create in directory" + + +complete -c bun \ + -n "__fish_use_subcommand" -a 'init' -F -d 'Start an empty Bun project' + +complete -c bun \ + -n "__fish_use_subcommand" -a 'install' -f -d 'Install packages from package.json' + +complete -c bun \ + -n "__fish_use_subcommand" -a 'add' -F -d 'Add a package to package.json' + +complete -c bun \ + -n "__fish_use_subcommand" -a 'remove' -F -d 'Remove a package from package.json' + + +for i in (seq (count $bun_install_boolean_flags)) + complete -c bun \ + -n "__fish_seen_subcommand_from install add remove" -l "$bun_install_boolean_flags[$i]" -d "$bun_install_boolean_flags_descriptions[$i]" +end + +complete -c bun \ + -n "__fish_seen_subcommand_from install add remove" -l 'cwd' -d 'Change working directory' + +complete -c bun \ + -n "__fish_seen_subcommand_from install add remove" -l 'cache-dir' -d 'Choose a cache directory (default: $HOME/.bun/install/cache)' + +complete -c bun \ + -n "__fish_seen_subcommand_from add" -d 'Popular' -a '(__fish__get_bun_packages)' + +complete -c bun \ + -n "__fish_seen_subcommand_from add" -d 'History' -a '(__history_completions)' + +complete -c bun \ + -n "__fish_seen_subcommand_from pm; and not __fish_seen_subcommand_from (__fish__get_bun_bins) (__fish__get_bun_scripts) cache;" -a 'bin ls cache hash hash-print hash-string' -f + +complete -c bun \ + -n "__fish_seen_subcommand_from pm; and __fish_seen_subcommand_from cache; and not __fish_seen_subcommand_from (__fish__get_bun_bins) (__fish__get_bun_scripts);" -a 'rm' -f + +# Add built-in subcommands with descriptions. +complete -c bun -n "__fish_use_subcommand" -a "create" -f -d "Create a new project from a template" +complete -c bun -n "__fish_use_subcommand" -a "build bun" --require-parameter -F -d "Transpile and bundle one or more files" +complete -c bun -n "__fish_use_subcommand" -a "upgrade" -d "Upgrade Bun" +complete -c bun -n "__fish_use_subcommand" -a "run" -d "Run a script or package binary" +complete -c bun -n "__fish_use_subcommand" -a "install" -d "Install dependencies from package.json" -f +complete -c bun -n "__fish_use_subcommand" -a "remove" -d "Remove a dependency from package.json" -f +complete -c bun -n "__fish_use_subcommand" -a "add" -d "Add a dependency to package.json" -f +complete -c bun -n "__fish_use_subcommand" -a "init" -d "Initialize a Bun project in this directory" -f +complete -c bun -n "__fish_use_subcommand" -a "link" -d "Register or link a local npm package" -f +complete -c bun -n "__fish_use_subcommand" -a "unlink" -d "Unregister a local npm package" -f +complete -c bun -n "__fish_use_subcommand" -a "pm" -d "Additional package management utilities" -f +complete -c bun -n "__fish_use_subcommand" -a "x" -d "Execute a package binary, installing if needed" -f +complete -c bun -n "__fish_use_subcommand" -a "outdated" -d "Display the latest versions of outdated dependencies" -f +complete -c bun -n "__fish_use_subcommand" -a "publish" -d "Publish your package from local to npm" -f diff --git a/fish/files/conf.d/fish_frozen_key_bindings.fish b/fish/files/conf.d/fish_frozen_key_bindings.fish new file mode 100644 index 0000000..dfed4d6 --- /dev/null +++ b/fish/files/conf.d/fish_frozen_key_bindings.fish @@ -0,0 +1,14 @@ +# This file was created by fish when upgrading to version 4.3, to migrate +# the 'fish_key_bindings' variable from its old default scope (universal) +# to its new default scope (global). We recommend you delete this file +# and configure key bindings in ~/.config/fish/config.fish if needed. + +set --global fish_key_bindings fish_vi_key_bindings + +# Prior to version 4.3, fish shipped an event handler that runs +# `set --universal fish_key_bindings fish_default_key_bindings` +# whenever the fish_key_bindings variable is erased. +# This means that as long as any fish < 4.3 is still running on this system, +# we cannot complete the migration. +# As a workaround, erase the universal variable at every shell startup. +set --erase --universal fish_key_bindings diff --git a/fish/files/conf.d/fish_frozen_theme.fish b/fish/files/conf.d/fish_frozen_theme.fish new file mode 100644 index 0000000..5c7cef9 --- /dev/null +++ b/fish/files/conf.d/fish_frozen_theme.fish @@ -0,0 +1,37 @@ +# This file was created by fish when upgrading to version 4.3, to migrate +# theme variables from universal to global scope. +# Don't edit this file, as it will be written by the web-config tool (`fish_config`). +# To customize your theme, delete this file and see +# help interactive#syntax-highlighting +# or +# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING +# for appropriate commands to add to ~/.config/fish/config.fish instead. +# See also the release notes for fish 4.3.0 (run `help relnotes`). + +set --global fish_color_autosuggestion brblack +set --global fish_color_cancel -r +set --global fish_color_command normal +set --global fish_color_comment red +set --global fish_color_cwd green +set --global fish_color_cwd_root red +set --global fish_color_end green +set --global fish_color_error brred +set --global fish_color_escape brcyan +set --global fish_color_history_current --bold +set --global fish_color_host normal +set --global fish_color_host_remote yellow +set --global fish_color_normal normal +set --global fish_color_operator brcyan +set --global fish_color_param cyan +set --global fish_color_quote yellow +set --global fish_color_redirection cyan --bold +set --global fish_color_search_match white --background=brblack +set --global fish_color_selection white --bold --background=brblack +set --global fish_color_status red +set --global fish_color_user brgreen +set --global fish_color_valid_path --underline +set --global fish_pager_color_completion normal +set --global fish_pager_color_description yellow -i +set --global fish_pager_color_prefix normal --bold --underline +set --global fish_pager_color_progress brwhite --background=cyan +set --global fish_pager_color_selected_background -r diff --git a/fish/files/conf.d/rustup.fish b/fish/files/conf.d/rustup.fish new file mode 100644 index 0000000..e4cb363 --- /dev/null +++ b/fish/files/conf.d/rustup.fish @@ -0,0 +1 @@ +source "$HOME/.cargo/env.fish" diff --git a/fish/files/conf.d/uv.env.fish b/fish/files/conf.d/uv.env.fish new file mode 100644 index 0000000..c5be13c --- /dev/null +++ b/fish/files/conf.d/uv.env.fish @@ -0,0 +1,2 @@ + +source "$HOME/.local/bin/env.fish" diff --git a/fish/files/config.fish b/fish/files/config.fish new file mode 100644 index 0000000..1d717a5 --- /dev/null +++ b/fish/files/config.fish @@ -0,0 +1,152 @@ +# Only execute this file once per shell. +set -q __fish_home_manager_config_sourced; and exit +set -g __fish_home_manager_config_sourced 1 + + +# Add ROCm bin directory to PATH +set -gx PATH "/opt/rocm/bin" $PATH + + +set --export VOLTA_HOME "$HOME/.volta" +set --export PATH "$VOLTA_HOME/bin" $PATH + +set --export EDITOR "nvim" + + +status is-login; and begin + + # Login shell initialisation + + +end + +status is-interactive; and begin + + # Abbreviations + + + # Aliases + alias che chezmoi + alias gb 'git branch' + alias gca 'git commit --amend' + alias gchd 'git checkout develop' + alias gchm 'git checkout main' + alias gcho 'git checkout' + alias gcnv 'git commit --no-verify' + alias gd 'git diff' + alias gdc 'git diff --cached' + alias gdt 'git diff-tree --no-commit-id --name-only -r' + alias gf 'git fetch' + alias gl 'git pull' + alias gm 'git merge' + alias gp 'git push' + alias gpuoh 'git push --set-upstream origin HEAD' + alias gr 'git remote' + alias gra 'git remote add' + alias grr 'git remote remove' + alias grv 'git remote -v' + alias gs 'git status' + alias nv nvim + # alias yay paru + alias wo 'pomodoro work' + alias br 'pomodoro break' + + # Interactive shell initialisation + fish_config theme choose rose-pine-moon + set fish_greeting # Disable greeting + test -f /run/current-system/sw/share/autojump/autojump.fish; and source /run/current-system/sw/share/autojump/autojump.fish + [ -f /opt/homebrew/share/autojump/autojump.fish ]; and source /opt/homebrew/share/autojump/autojump.fish + + test -f ~/.env; and source ~/.env + test -f ~/.config/myvars; and source ~/.config/myvars + + nerdfetch + + if test "$TERM" != dumb + eval (starship init fish) + fzf --fish | source + end + + # add completions generated by Home Manager to $fish_complete_path + begin + set -l joined (string join " " $fish_complete_path) + set -l prev_joined (string replace --regex "[^\s]*generated_completions.*" "" $joined) + set -l post_joined (string replace $prev_joined "" $joined) + set -l prev (string split " " (string trim $prev_joined)) + set -l post (string split " " (string trim $post_joined)) + set fish_complete_path $prev "/home/thomasgl/.local/share/fish/home-manager_generated_completions" $post + end + + +end + +# pnpm +switch (uname) + case Linux + set -gx PNPM_HOME "/home/thomasgl/.local/share/pnpm" + case Darwin + set -gx PNPM_HOME "/Users/thomasglopes/.local/share/pnpm" +end + +if not string match -q -- $PNPM_HOME $PATH + set -gx PATH "$PNPM_HOME" $PATH +end +# pnpm end + +set -Ux ENV ~/.config/fish/config.fish + +if not set -q SSH_AUTH_SOCK + # Check if ssh-agent is already running and accessible + set -l agent_pid (pgrep ssh-agent | head -n 1) + + if test -n "$agent_pid" + # Try to find existing socket + set -l sock_path (find /tmp -name "ssh-*" -type d 2>/dev/null | \ + xargs -I {} find {} -name "agent.*" 2>/dev/null | head -n 1) + + if test -n "$sock_path" + set -gx SSH_AUTH_SOCK "$sock_path" + set -gx SSH_AGENT_PID "$agent_pid" + + # Test if agent is responsive + if ssh-add -l >/dev/null 2>&1 + # echo "Connected to existing ssh-agent (PID: $agent_pid)" + return 0 + else + # Clean up stale variables + set -e SSH_AUTH_SOCK SSH_AGENT_PID + end + end + end + + # Start new ssh-agent + # echo "Starting new ssh-agent..." + set -l agent_output (ssh-agent -c) + + # Parse output and set variables + for line in $agent_output + if string match -qr '^setenv SSH_AUTH_SOCK' "$line" + set -gx SSH_AUTH_SOCK (string replace -r '^setenv SSH_AUTH_SOCK (.+);$' '$1' "$line" | string trim -c '"') + else if string match -qr '^setenv SSH_AGENT_PID' "$line" + set -gx SSH_AGENT_PID (string replace -r '^setenv SSH_AGENT_PID (.+);$' '$1' "$line" | string trim -c '"') + end + end + + # Verify agent started successfully + if test -z "$SSH_AUTH_SOCK" -o -z "$SSH_AGENT_PID" + # echo "Error: Failed to start ssh-agent" >&2 + return 1 + end + + # echo "ssh-agent started (PID: $SSH_AGENT_PID)" +end + + +# bun +set --export BUN_INSTALL "$HOME/.bun" +set --export PATH $BUN_INSTALL/bin $PATH + +# opencode +fish_add_path /home/thomasgl/.opencode/bin + +source ~/.safe-chain/scripts/init-fish.fish # Safe-chain Fish initialization script diff --git a/fish/files/config.fish.backup b/fish/files/config.fish.backup new file mode 100644 index 0000000..6519211 --- /dev/null +++ b/fish/files/config.fish.backup @@ -0,0 +1,7 @@ +source /usr/share/cachyos-fish-config/cachyos-config.fish + +# overwrite greeting +# potentially disabling fastfetch +#function fish_greeting +# # smth smth +#end diff --git a/fish/files/functions/bw-create-note.fish b/fish/files/functions/bw-create-note.fish new file mode 100644 index 0000000..fe23777 --- /dev/null +++ b/fish/files/functions/bw-create-note.fish @@ -0,0 +1,30 @@ +function bw-create-note + function bw-create-note --argument-names content_or_name name + if isatty stdin + # Direct input mode + set notes_content $content_or_name + set note_name $name + else + # Pipe mode + read -z notes_content + set note_name $content_or_name + end + + # If no name provided, use default + if test -z "$note_name" + set note_name secure-note + end + + # If no content, show usage + if test -z "$notes_content" + echo "Usage: bw-create-note 'content' 'note name'" + echo "Or: command | bw-create-note 'note name'" + return 1 + end + + bw get template item | jq --arg folderId (bw list folders | jq -r '.[] | select(.name == "chezmoi") | .id') \ + --arg notes "$notes_content" \ + --arg name "$note_name" \ + '.type = 2 | .secureNote.type = 0 | .notes=$notes | .name = $name | .folderId=$folderId' | bw encode | bw create item + end +end diff --git a/fish/files/functions/bw-unlock.fish b/fish/files/functions/bw-unlock.fish new file mode 100644 index 0000000..c167996 --- /dev/null +++ b/fish/files/functions/bw-unlock.fish @@ -0,0 +1,3 @@ +function bw-unlock + set -Ux BW_SESSION (bw unlock --raw || echo "Error unlocking BW") +end diff --git a/fish/files/functions/pomodoro.fish b/fish/files/functions/pomodoro.fish new file mode 100644 index 0000000..6ed8c23 --- /dev/null +++ b/fish/files/functions/pomodoro.fish @@ -0,0 +1,11 @@ +function pomodoro --argument type + set -l durations work 45 break 10 + set -l idx (contains -i -- $type $durations) + + if test -n "$idx" + set -l minutes $durations[(math $idx + 1)] + echo $type | lolcat + timer {$minutes}m + espeak "$type session done" + end +end diff --git a/fish/files/functions/reload-env.fish b/fish/files/functions/reload-env.fish new file mode 100644 index 0000000..eb615a4 --- /dev/null +++ b/fish/files/functions/reload-env.fish @@ -0,0 +1,6 @@ +function reload-env + for line in (grep -v '^#' /etc/environment | grep '=') + set -l pair (string split -m 1 '=' $line) + set -gx $pair[1] $pair[2] + end +end diff --git a/fish/files/functions/y.fish b/fish/files/functions/y.fish new file mode 100644 index 0000000..6b26304 --- /dev/null +++ b/fish/files/functions/y.fish @@ -0,0 +1,8 @@ +function y + set tmp (mktemp -t "yazi-cwd.XXXXXX") + yazi $argv --cwd-file="$tmp" + if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ] + builtin cd -- "$cwd" + end + rm -f -- "$tmp" +end diff --git a/fish/files/script.sh b/fish/files/script.sh new file mode 100755 index 0000000..961ac93 --- /dev/null +++ b/fish/files/script.sh @@ -0,0 +1,49 @@ + + +#!/bin/bash + +# Directory to process +TARGET_DIR="/home/thomasgl/.config/fish-backup" # Make sure this is the correct, full path + +# Check if the directory exists +if [ ! -d "$TARGET_DIR" ]; then + echo "Error: Directory '$TARGET_DIR' not found." + exit 1 +fi + +# Find symlinks and process them +find "$TARGET_DIR" -type l -print0 | while IFS= read -r -d $'\0' SYMLINK; do + echo "Processing symlink: $SYMLINK" + + # Get the target of the symlink + TARGET=$(readlink "$SYMLINK") + + # Check if readlink was successful and the target exists + if [ $? -eq 0 ] && [ -e "$TARGET" ]; then + echo " Target: $TARGET" + + # *** Explicitly remove the symlink BEFORE copying *** + echo " Removing symlink: $SYMLINK" + rm "$SYMLINK" + + # Check if removal was successful + if [ $? -eq 0 ]; then + # Copy the target file to the location where the symlink was + echo " Copying target to $SYMLINK" + cp "$TARGET" "$SYMLINK" + + if [ $? -eq 0 ]; then + echo " Replaced symlink with a copy of the target." + else + echo " Error: Failed to copy target to $SYMLINK." + fi + else + echo " Error: Failed to remove symlink: $SYMLINK. Cannot proceed with copy." + fi + + else + echo " Warning: Could not resolve target for '$SYMLINK' or target does not exist." + fi +done + +echo "Processing complete." diff --git a/fish/files/themes/rose-pine-moon.theme b/fish/files/themes/rose-pine-moon.theme new file mode 100644 index 0000000..a67773e --- /dev/null +++ b/fish/files/themes/rose-pine-moon.theme @@ -0,0 +1,41 @@ +# syntax highlighting variables +# https://fishshell.com/docs/current/interactive.html#syntax-highlighting-variables +fish_color_normal e0def4 +fish_color_command c4a7e7 +fish_color_keyword 9ccfd8 +fish_color_quote f6c177 +fish_color_redirection 3e8fb0 +fish_color_end 908caa +fish_color_error eb6f92 +fish_color_param ea9a97 +fish_color_comment 908caa +# fish_color_match --background=brblue +fish_color_selection --reverse +# fish_color_history_current --bold +fish_color_operator e0def4 +fish_color_escape 3e8fb0 +fish_color_autosuggestion 908caa +fish_color_cwd ea9a97 +# fish_color_cwd_root red +fish_color_user f6c177 +fish_color_host 9ccfd8 +fish_color_host_remote c4a7e7 +fish_color_cancel e0def4 +fish_color_search_match --background=232136 +fish_color_valid_path + +# pager color variables +# https://fishshell.com/docs/current/interactive.html#pager-color-variables +fish_pager_color_progress ea9a97 +fish_pager_color_background --background=2a273f +fish_pager_color_prefix 9ccfd8 +fish_pager_color_completion 908caa +fish_pager_color_description 908caa +fish_pager_color_secondary_background +fish_pager_color_secondary_prefix +fish_pager_color_secondary_completion +fish_pager_color_secondary_description +fish_pager_color_selected_background --background=393552 +fish_pager_color_selected_prefix 9ccfd8 +fish_pager_color_selected_completion e0def4 +fish_pager_color_selected_description e0def4 diff --git a/jj/config.lua b/jj/config.lua new file mode 100644 index 0000000..df30565 --- /dev/null +++ b/jj/config.lua @@ -0,0 +1,6 @@ +return { + target = { + linux = "~/.config/jj", + default = "~/.config/jj", + }, +} diff --git a/jj/files/config.toml b/jj/files/config.toml new file mode 100644 index 0000000..c7bf1ae --- /dev/null +++ b/jj/files/config.toml @@ -0,0 +1,6 @@ +[user] +name = "Thomas G. Lopes" +email = "thomasgl@pm.me" + +[git] +write-change-id-header = true diff --git a/jjui/config.lua b/jjui/config.lua new file mode 100644 index 0000000..7bca0cb --- /dev/null +++ b/jjui/config.lua @@ -0,0 +1,6 @@ +return { + target = { + linux = "~/.config/jjui", + default = "~/.config/jjui", + }, +} diff --git a/jjui/files/config.toml b/jjui/files/config.toml new file mode 100644 index 0000000..0f9b40c --- /dev/null +++ b/jjui/files/config.toml @@ -0,0 +1,3 @@ +[ui.theme] +dark = "matugen" +light = "matugen" diff --git a/jjui/files/themes/matugen.toml b/jjui/files/themes/matugen.toml new file mode 100644 index 0000000..729abfa --- /dev/null +++ b/jjui/files/themes/matugen.toml @@ -0,0 +1,51 @@ +"text" = { fg = "#f0dfd6", bg = "#19120d" } +"dimmed" = { fg = "#d6c3b7" } +"selected" = { bg = "#6d390a", fg = "#ffdcc5" } +"border" = { fg = "#9f8d83" } +"title" = { fg = "#ffb782", bold = true } +"shortcut" = { fg = "#e4bfa7" } +"matched" = { fg = "#c7ca95", underline = true } + +"source_marker" = { bg = "#464920", fg = "#e3e6af" } +"target_marker" = { bg = "#93000a", fg = "#ffdad6" } + +"revisions rebase source_marker" = { bold = true } +"revisions rebase target_marker" = { bold = true } + +"status" = { bg = "#312822" } +"status title" = { fg = "#4f2500", bg = "#ffb782", bold = true } +"status shortcut" = { fg = "#e4bfa7" } +"status dimmed" = { fg = "#d6c3b7" } + +"revset text" = { bold = true } +"revset completion selected" = { bg = "#6d390a", fg = "#ffdcc5" } +"revset completion matched" = { bold = true } +"revset completion dimmed" = { fg = "#d6c3b7" } + +"revisions selected" = { bold = true } +"oplog selected" = { bold = true } + +"evolog selected" = { bg = "#5b412f", fg = "#ffdcc5", bold = true } + +"help" = { bg = "#261e18" } +"help title" = { fg = "#ffb782", bold = true, underline = true } +"help border" = { fg = "#9f8d83" } + +"menu" = { bg = "#261e18" } +"menu title" = { fg = "#ffb782", bold = true } +"menu shortcut" = { fg = "#e4bfa7" } +"menu dimmed" = { fg = "#d6c3b7" } +"menu border" = { fg = "#9f8d83" } +"menu selected" = { bg = "#6d390a", fg = "#ffdcc5" } + +"confirmation" = { bg = "#261e18" } +"confirmation text" = { fg = "#f0dfd6" } +"confirmation selected" = { bg = "#6d390a", fg = "#ffdcc5" } +"confirmation dimmed" = { fg = "#d6c3b7" } +"confirmation border" = { fg = "#ffb782" } + +"undo" = { bg = "#261e18" } +"undo confirmation dimmed" = { fg = "#d6c3b7" } +"undo confirmation selected" = { bg = "#6d390a", fg = "#ffdcc5" } + +"preview" = { fg = "#f0dfd6" } diff --git a/kitty/config.lua b/kitty/config.lua new file mode 100644 index 0000000..6540f3c --- /dev/null +++ b/kitty/config.lua @@ -0,0 +1,6 @@ +return { + target = { + linux = "~/.config/kitty", + default = "~/.config/kitty", + }, +} diff --git a/kitty/files/Catppuccin-Macchiato.conf b/kitty/files/Catppuccin-Macchiato.conf new file mode 100644 index 0000000..a45b09f --- /dev/null +++ b/kitty/files/Catppuccin-Macchiato.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin-Macchiato +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/macchiato.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #CAD3F5 +background #24273A +selection_foreground #24273A +selection_background #F4DBD6 + +# Cursor colors +cursor #F4DBD6 +cursor_text_color #24273A + +# URL underline color when hovering with mouse +url_color #F4DBD6 + +# Kitty window border colors +active_border_color #B7BDF8 +inactive_border_color #6E738D +bell_border_color #EED49F + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #181926 +active_tab_background #C6A0F6 +inactive_tab_foreground #CAD3F5 +inactive_tab_background #1E2030 +tab_bar_background #181926 + +# Colors for marks (marked text in the terminal) +mark1_foreground #24273A +mark1_background #B7BDF8 +mark2_foreground #24273A +mark2_background #C6A0F6 +mark3_foreground #24273A +mark3_background #7DC4E4 + +# The 16 terminal colors + +# black +color0 #494D64 +color8 #5B6078 + +# red +color1 #ED8796 +color9 #ED8796 + +# green +color2 #A6DA95 +color10 #A6DA95 + +# yellow +color3 #EED49F +color11 #EED49F + +# blue +color4 #8AADF4 +color12 #8AADF4 + +# magenta +color5 #F5BDE6 +color13 #F5BDE6 + +# cyan +color6 #8BD5CA +color14 #8BD5CA + +# white +color7 #B8C0E0 +color15 #A5ADCB diff --git a/kitty/files/current-theme.conf b/kitty/files/current-theme.conf new file mode 100644 index 0000000..0e2a4d2 --- /dev/null +++ b/kitty/files/current-theme.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin-Macchiato +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/macchiato.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #CAD3F5 +background #24273A +selection_foreground #24273A +selection_background #F4DBD6 + +# Cursor colors +cursor #F4DBD6 +cursor_text_color #24273A + +# URL underline color when hovering with mouse +url_color #F4DBD6 + +# Kitty window border colors +active_border_color #B7BDF8 +inactive_border_color #6E738D +bell_border_color #EED49F + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #181926 +active_tab_background #7dc4e4 +inactive_tab_foreground #CAD3F5 +inactive_tab_background #1E2030 +tab_bar_background #181926 + +# Colors for marks (marked text in the terminal) +mark1_foreground #24273A +mark1_background #B7BDF8 +mark2_foreground #24273A +mark2_background #C6A0F6 +mark3_foreground #24273A +mark3_background #7DC4E4 + +# The 16 terminal colors + +# black +color0 #494D64 +color8 #5B6078 + +# red +color1 #ED8796 +color9 #ED8796 + +# green +color2 #A6DA95 +color10 #A6DA95 + +# yellow +color3 #EED49F +color11 #EED49F + +# blue +color4 #8AADF4 +color12 #8AADF4 + +# magenta +color5 #F5BDE6 +color13 #F5BDE6 + +# cyan +color6 #8BD5CA +color14 #8BD5CA + +# white +color7 #B8C0E0 +color15 #A5ADCB diff --git a/kitty/files/kitty.conf b/kitty/files/kitty.conf new file mode 100644 index 0000000..6ca41c6 --- /dev/null +++ b/kitty/files/kitty.conf @@ -0,0 +1,2659 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +# BEGIN_KITTY_THEME +# Catppuccin-Macchiato +include current-theme.conf +# END_KITTY_THEME + +#: Fonts {{{ + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. +font_family family="FantasqueSansM Nerd Font" +bold_font auto +italic_font auto +bold_italic_font auto + +# bold_font auto +# italic_font auto +# bold_italic_font auto + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. The easiest way to select fonts is to run the `kitten +#: choose-fonts` command which will present a nice UI for you to +#: select the fonts you want with previews and support for selecting +#: variable fonts and font features. If you want to learn to select +#: fonts manually, read the font specification syntax +#: . + +font_size 12.0 + +#: Font size (in pts). + +# force_ltr no + +#: kitty does not support BIDI (bidirectional text), however, for RTL +#: scripts, words are automatically displayed in RTL. That is to say, +#: in an RTL script, the words "HELLO WORLD" display in kitty as +#: "WORLD HELLO", and if you try to select a substring of an RTL- +#: shaped string, you will get the character that would be there had +#: the string been LTR. For example, assuming the Hebrew word ירושלים, +#: selecting the character that on the screen appears to be ם actually +#: writes into the selection buffer the character י. kitty's default +#: behavior is useful in conjunction with a filter to reverse the word +#: order, however, if you wish to manipulate RTL glyphs, it can be +#: very challenging to work with, so this option is provided to turn +#: it off. Furthermore, this option can be used with the command line +#: program GNU FriBidi +#: to get BIDI support, because it will force kitty to always treat +#: the text as LTR, which FriBidi expects for terminals. + +# symbol_map + +#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols + +#: Map the specified Unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each Unicode code +#: point is specified in the form `U+`. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. This option can be specified multiple times. +#: The syntax is:: + +#: symbol_map codepoints Font Family Name + +# narrow_symbols + +#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 + +#: Usually, for Private Use Unicode characters and some symbol/dingbat +#: characters, if the character is followed by one or more spaces, +#: kitty will use those extra cells to render the character larger, if +#: the character in the font has a wide aspect ratio. Using this +#: option you can force kitty to restrict the specified code points to +#: render in the specified number of cells (defaulting to one cell). +#: This option can be specified multiple times. The syntax is:: + +#: narrow_symbols codepoints [optionally the number of cells] + +# disable_ligatures never + +#: Choose how you want to handle multi-character ligatures. The +#: default is to always render them. You can tell kitty to not render +#: them when the cursor is over them by using cursor to make editing +#: easier, or have kitty never render them at all by using always, if +#: you don't like them. The ligature strategy can be set per-window +#: either using the kitty remote control facility or by defining +#: shortcuts for it in kitty.conf, for example:: + +#: map alt+1 disable_ligatures_in active always +#: map alt+2 disable_ligatures_in all never +#: map alt+3 disable_ligatures_in tab cursor + +#: Note that this refers to programming ligatures, typically +#: implemented using the calt OpenType feature. For disabling general +#: ligatures, use the font_features option. + +# font_features + +#: E.g. font_features none + +#: Choose exactly which OpenType features to enable or disable. Note +#: that for the main fonts, features can be specified when selecting +#: the font using the choose-fonts kitten. This setting is useful for +#: fallback fonts. + +#: Some fonts might have features worthwhile in a terminal. For +#: example, Fira Code includes a discretionary feature, zero, which in +#: that font changes the appearance of the zero (0), to make it more +#: easily distinguishable from Ø. Fira Code also includes other +#: discretionary features known as Stylistic Sets which have the tags +#: ss01 through ss20. + +#: For the exact syntax to use for individual features, see the +#: HarfBuzz documentation . + +#: Note that this code is indexed by PostScript name, and not the font +#: family. This allows you to define very precise feature settings; +#: e.g. you can disable a feature in the italic font but not in the +#: regular font. + +#: On Linux, font features are first read from the FontConfig database +#: and then this option is applied, so they can be configured in a +#: single, central place. + +#: To get the PostScript name for a font, use the `fc-scan file.ttf` +#: command on Linux or the `Font Book tool on macOS +#: `__. + +#: Enable alternate zero and oldstyle numerals:: + +#: font_features FiraCode-Retina +zero +onum + +#: Enable only alternate zero in the bold font:: + +#: font_features FiraCode-Bold +zero + +#: Disable the normal ligatures, but keep the calt feature which (in +#: this font) breaks up monotony:: + +#: font_features TT2020StyleB-Regular -liga +calt + +#: In conjunction with force_ltr, you may want to disable Arabic +#: shaping entirely, and only look at their isolated forms if they +#: show up in a document. You can do this with e.g.:: + +#: font_features UnifontMedium +isol -medi -fina -init + +# modify_font + +#: Modify font characteristics such as the position or thickness of +#: the underline and strikethrough. The modifications can have the +#: suffix px for pixels or % for percentage of original value. No +#: suffix means use pts. For example:: + +#: modify_font underline_position -2 +#: modify_font underline_thickness 150% +#: modify_font strikethrough_position 2px + +#: Additionally, you can modify the size of the cell in which each +#: font glyph is rendered and the baseline at which the glyph is +#: placed in the cell. For example:: + +#: modify_font cell_width 80% +#: modify_font cell_height -2px +#: modify_font baseline 3 + +#: Note that modifying the baseline will automatically adjust the +#: underline and strikethrough positions by the same amount. +#: Increasing the baseline raises glyphs inside the cell and +#: decreasing it lowers them. Decreasing the cell size might cause +#: rendering artifacts, so use with care. + +# box_drawing_scale 0.001, 1, 1.5, 2 + +#: The sizes of the lines used for the box drawing Unicode characters. +#: These values are in pts. They will be scaled by the monitor DPI to +#: arrive at a pixel value. There must be four values corresponding to +#: thin, normal, thick, and very thick lines. + +# undercurl_style thin-sparse + +#: The style with which undercurls are rendered. This option takes the +#: form (thin|thick)-(sparse|dense). Thin and thick control the +#: thickness of the undercurl. Sparse and dense control how often the +#: curl oscillates. With sparse the curl will peak once per character, +#: with dense twice. + +# text_composition_strategy platform + +#: Control how kitty composites text glyphs onto the background color. +#: The default value of platform tries for text rendering as close to +#: "native" for the platform kitty is running on as possible. + +#: A value of legacy uses the old (pre kitty 0.28) strategy for how +#: glyphs are composited. This will make dark text on light +#: backgrounds look thicker and light text on dark backgrounds +#: thinner. It might also make some text appear like the strokes are +#: uneven. + +#: You can fine tune the actual contrast curve used for glyph +#: composition by specifying up to two space-separated numbers for +#: this setting. + +#: The first number is the gamma adjustment, which controls the +#: thickness of dark text on light backgrounds. Increasing the value +#: will make text appear thicker. The default value for this is 1.0 on +#: Linux and 1.7 on macOS. Valid values are 0.01 and above. The result +#: is scaled based on the luminance difference between the background +#: and the foreground. Dark text on light backgrounds receives the +#: full impact of the curve while light text on dark backgrounds is +#: affected very little. + +#: The second number is an additional multiplicative contrast. It is +#: percentage ranging from 0 to 100. The default value is 0 on Linux +#: and 30 on macOS. + +#: If you wish to achieve similar looking thickness in light and dark +#: themes, a good way to experiment is start by setting the value to +#: 1.0 0 and use a dark theme. Then adjust the second parameter until +#: it looks good. Then switch to a light theme and adjust the first +#: parameter until the perceived thickness matches the dark theme. + +# text_fg_override_threshold 0 + +#: The minimum accepted difference in luminance between the foreground +#: and background color, below which kitty will override the +#: foreground color. It is percentage ranging from 0 to 100. If the +#: difference in luminance of the foreground and background is below +#: this threshold, the foreground color will be set to white if the +#: background is dark or black if the background is light. The default +#: value is 0, which means no overriding is performed. Useful when +#: working with applications that use colors that do not contrast well +#: with your preferred color scheme. + +#: WARNING: Some programs use characters (such as block characters) +#: for graphics display and may expect to be able to set the +#: foreground and background to the same color (or similar colors). +#: If you see unexpected stripes, dots, lines, incorrect color, no +#: color where you expect color, or any kind of graphic display +#: problem try setting text_fg_override_threshold to 0 to see if this +#: is the cause of the problem. + +#: }}} + +#: Text cursor customization {{{ + +# cursor #cccccc + +#: Default text cursor color. If set to the special value none the +#: cursor will be rendered with a "reverse video" effect. Its color +#: will be the color of the text in the cell it is over and the text +#: will be rendered with the background color of the cell. Note that +#: if the program running in the terminal sets a cursor color, this +#: takes precedence. Also, the cursor colors are modified if the cell +#: background and foreground colors have very low contrast. Note that +#: some themes set this value, so if you want to override it, place +#: your value after the lines where the theme file is included. + +# cursor_text_color #111111 + +#: The color of text under the cursor. If you want it rendered with +#: the background color of the cell underneath instead, use the +#: special keyword: `background`. Note that if cursor is set to none +#: then this option is ignored. Note that some themes set this value, +#: so if you want to override it, place your value after the lines +#: where the theme file is included. + +# cursor_shape block + +#: The cursor shape can be one of block, beam, underline. Note that +#: when reloading the config this will be changed only if the cursor +#: shape has not been set by the program running in the terminal. This +#: sets the default cursor shape, applications running in the terminal +#: can override it. In particular, shell integration +#: in kitty sets +#: the cursor shape to beam at shell prompts. You can avoid this by +#: setting shell_integration to no-cursor. + +# cursor_shape_unfocused hollow + +#: Defines the text cursor shape when the OS window is not focused. +#: The unfocused cursor shape can be one of block, beam, underline, +#: hollow and unchanged (leave the cursor shape as it is). + +# cursor_beam_thickness 1.5 + +#: The thickness of the beam cursor (in pts). + +# cursor_underline_thickness 2.0 + +#: The thickness of the underline cursor (in pts). + +# cursor_blink_interval -1 + +#: The interval to blink the cursor (in seconds). Set to zero to +#: disable blinking. Negative values mean use system default. Note +#: that the minimum interval will be limited to repaint_delay. You can +#: also animate the cursor blink by specifying an easing function. For +#: example, setting this to option to 0.5 ease-in-out will cause the +#: cursor blink to be animated over a second, in the first half of the +#: second it will go from opaque to transparent and then back again +#: over the next half. You can specify different easing functions for +#: the two halves, for example: -1 linear ease-out. kitty supports all +#: the CSS easing functions . Note that turning on animations +#: uses extra power as it means the screen is redrawn multiple times +#: per blink interval. See also, cursor_stop_blinking_after. + +# cursor_stop_blinking_after 15.0 + +#: Stop blinking cursor after the specified number of seconds of +#: keyboard inactivity. Set to zero to never stop blinking. + +# cursor_trail 0 + +#: Set this to a value larger than zero to enable a "cursor trail" +#: animation. This is an animation that shows a "trail" following the +#: movement of the text cursor. It makes it easy to follow large +#: cursor jumps and makes for a cool visual effect of the cursor +#: zooming around the screen. The actual value of this option controls +#: when the animation is trigerred. It is a number of milliseconds. +#: The trail animation only follows cursors that have stayed in their +#: position for longer than the specified number of milliseconds. This +#: prevents trails from appearing for cursors that rapidly change +#: their positions during UI updates in complex applications. See +#: cursor_trail_decay to control the animation speed and +#: cursor_trail_start_threshold to control when a cursor trail is +#: started. + +# cursor_trail_decay 0.1 0.4 + +#: Controls the decay times for the cursor trail effect when the +#: cursor_trail is enabled. This option accepts two positive float +#: values specifying the fastest and slowest decay times in seconds. +#: The first value corresponds to the fastest decay time (minimum), +#: and the second value corresponds to the slowest decay time +#: (maximum). The second value must be equal to or greater than the +#: first value. Smaller values result in a faster decay of the cursor +#: trail. Adjust these values to control how quickly the cursor trail +#: fades away. + +# cursor_trail_start_threshold 2 + +#: Set the distance threshold for starting the cursor trail. This +#: option accepts a positive integer value that represents the minimum +#: number of cells the cursor must move before the trail is started. +#: When the cursor moves less than this threshold, the trail is +#: skipped, reducing unnecessary cursor trail animation. + +#: }}} + +#: Scrollback {{{ + +# scrollback_lines 2000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. Negative numbers are (effectively) +#: infinite scrollback. Note that using very large scrollback is not +#: recommended as it can slow down performance of the terminal and +#: also use large amounts of RAM. Instead, consider using +#: scrollback_pager_history_size. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollback_indicator_opacity 1.0 + +#: The opacity of the scrollback indicator which is a small colored +#: rectangle that moves along the right hand side of the window as you +#: scroll, indicating what fraction you have scrolled. The default is +#: one which means fully opaque, aka visible. Set to a value between +#: zero and one to make the indicator less visible. + +# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. Similarly CURSOR_LINE and +#: CURSOR_COLUMN will be replaced by the current cursor position or +#: set to 0 if there is no cursor, for example, when showing the last +#: command output. + +# scrollback_pager_history_size 0 + +#: Separate scrollback history size (in MB), used only for browsing +#: the scrollback buffer with pager. This separate buffer is not +#: available for interactive scrolling but will be piped to the pager +#: program when viewing scrollback buffer in a separate window. The +#: current implementation stores the data in UTF-8, so approximately +#: 10000 lines per megabyte at 100 chars per line, for pure ASCII, +#: unformatted text. A value of zero or less disables this feature. +#: The maximum allowed size is 4GB. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollback_fill_enlarged_window no + +#: Fill new space with lines from the scrollback buffer after +#: enlarging a window. + +# wheel_scroll_multiplier 5.0 + +#: Multiplier for the number of lines scrolled by the mouse wheel. +#: Note that this is only used for low precision scrolling devices, +#: not for high precision scrolling devices on platforms such as macOS +#: and Wayland. Use negative numbers to change scroll direction. See +#: also wheel_scroll_min_lines. + +# wheel_scroll_min_lines 1 + +#: The minimum number of lines scrolled by the mouse wheel. The scroll +#: multiplier wheel_scroll_multiplier only takes effect after it +#: reaches this number. Note that this is only used for low precision +#: scrolling devices like wheel mice that scroll by very small amounts +#: when using the wheel. With a negative number, the minimum number of +#: lines will always be added. + +# touch_scroll_multiplier 1.0 + +#: Multiplier for the number of lines scrolled by a touchpad. Note +#: that this is only used for high precision scrolling devices on +#: platforms such as macOS and Wayland. Use negative numbers to change +#: scroll direction. + +#: }}} + +#: Mouse {{{ + +# mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. +#: Set to a negative value to hide the mouse cursor immediately when +#: typing text. Disabled by default on macOS as getting it to work +#: robustly with the ever-changing sea of bugs that is Cocoa is too +#: much effort. + +# url_color #0087bd +# url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, straight, double, curly, dotted, dashed. + +# open_url_with default + +#: The program to open clicked URLs. The special value default will +#: first look for any URL handlers defined via the open_actions +#: facility and if non +#: are found, it will use the Operating System's default URL handler +#: (open on macOS and xdg-open on Linux). + +# url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh + +#: The set of URL prefixes to look for when detecting a URL under the +#: mouse cursor. + +# detect_urls yes + +#: Detect URLs under the mouse. Detected URLs are highlighted with an +#: underline and the mouse cursor becomes a hand over them. Even if +#: this option is disabled, URLs are still clickable. See also the +#: underline_hyperlinks option to control how hyperlinks (as opposed +#: to plain text URLs) are displayed. + +# url_excluded_characters + +#: Additional characters to be disallowed from URLs, when detecting +#: URLs under the mouse cursor. By default, all characters that are +#: legal in URLs are allowed. Additionally, newlines are allowed (but +#: stripped). This is to accommodate programs such as mutt that add +#: hard line breaks even for continued lines. \n can be added to this +#: option to disable this behavior. Special characters can be +#: specified using backslash escapes, to specify a backslash use a +#: double backslash. + +# show_hyperlink_targets no + +#: When the mouse hovers over a terminal hyperlink, show the actual +#: URL that will be activated when the hyperlink is clicked. + +# underline_hyperlinks hover + +#: Control how hyperlinks are underlined. They can either be +#: underlined on mouse hover, always (i.e. permanently underlined) or +#: never which means that kitty will not apply any underline styling +#: to hyperlinks. Note that the value of always only applies to real +#: (OSC 8) hyperlinks not text that is detected to be a URL on mouse +#: hover. Uses the url_style and url_color settings for the underline +#: style. Note that reloading the config and changing this value +#: to/from always will only affect text subsequently received by +#: kitty. + +# copy_on_select no + +#: Copy to clipboard or a private buffer on select. With this set to +#: clipboard, selecting text with the mouse will cause the text to be +#: copied to clipboard. Useful on platforms such as macOS that do not +#: have the concept of primary selection. You can instead specify a +#: name such as a1 to copy to a private kitty buffer. Map a shortcut +#: with the paste_from_buffer action to paste from this private +#: buffer. For example:: + +#: copy_on_select a1 +#: map shift+cmd+v paste_from_buffer a1 + +#: Note that copying to the clipboard is a security risk, as all +#: programs, including websites open in your browser can read the +#: contents of the system clipboard. + +# paste_actions quote-urls-at-prompt,confirm + +#: A comma separated list of actions to take when pasting text into +#: the terminal. The supported paste actions are: + +#: quote-urls-at-prompt: +#: If the text being pasted is a URL and the cursor is at a shell prompt, +#: automatically quote the URL (needs shell_integration). +#: replace-dangerous-control-codes +#: Replace dangerous control codes from pasted text, without confirmation. +#: replace-newline +#: Replace the newline character from pasted text, without confirmation. +#: confirm: +#: Confirm the paste if the text to be pasted contains any terminal control codes +#: as this can be dangerous, leading to code execution if the shell/program running +#: in the terminal does not properly handle these. +#: confirm-if-large +#: Confirm the paste if it is very large (larger than 16KB) as pasting +#: large amounts of text into shells can be very slow. +#: filter: +#: Run the filter_paste() function from the file paste-actions.py in +#: the kitty config directory on the pasted text. The text returned by the +#: function will be actually pasted. +#: no-op: +#: Has no effect. + +# strip_trailing_spaces never + +#: Remove spaces at the end of lines when copying to clipboard. A +#: value of smart will do it when using normal selections, but not +#: rectangle selections. A value of always will always do it. + +# select_by_word_characters @-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alphanumeric character in the Unicode database will be matched. + +# select_by_word_characters_forward + +#: Characters considered part of a word when extending the selection +#: forward on double clicking. In addition to these characters any +#: character that is marked as an alphanumeric character in the +#: Unicode database will be matched. + +#: If empty (default) select_by_word_characters will be used for both +#: directions. + +# click_interval -1.0 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds). Negative numbers will use the system default +#: instead, if available, or fallback to 0.5. + +# focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around. On macOS, this will also cause the OS Window under +#: the mouse to be focused automatically when the mouse enters it. + +# pointer_shape_when_grabbed arrow + +#: The shape of the mouse pointer when the program running in the +#: terminal grabs the mouse. + +# default_pointer_shape beam + +#: The default shape of the mouse pointer. + +# pointer_shape_when_dragging beam + +#: The default shape of the mouse pointer when dragging across text. + +#: Mouse actions {{{ + +#: Mouse buttons can be mapped to perform arbitrary actions. The +#: syntax is: + +#: .. code-block:: none + +#: mouse_map button-name event-type modes action + +#: Where button-name is one of left, middle, right, b1 ... b8 with +#: added keyboard modifiers. For example: ctrl+shift+left refers to +#: holding the Ctrl+Shift keys while clicking with the left mouse +#: button. The value b1 ... b8 can be used to refer to up to eight +#: buttons on a mouse. + +#: event-type is one of press, release, doublepress, triplepress, +#: click, doubleclick. modes indicates whether the action is performed +#: when the mouse is grabbed by the program running in the terminal, +#: or not. The values are grabbed or ungrabbed or a comma separated +#: combination of them. grabbed refers to when the program running in +#: the terminal has requested mouse events. Note that the click and +#: double click events have a delay of click_interval to disambiguate +#: from double and triple presses. + +#: You can run kitty with the kitty --debug-input command line option +#: to see mouse events. See the builtin actions below to get a sense +#: of what is possible. + +#: If you want to unmap a button, map it to nothing. For example, to +#: disable opening of URLs with a plain click:: + +#: mouse_map left click ungrabbed + +#: See all the mappable actions including mouse actions here +#: . + +#: .. note:: +#: Once a selection is started, releasing the button that started it will +#: automatically end it and no release event will be dispatched. + +# clear_all_mouse_actions no + +#: Remove all mouse action definitions up to this point. Useful, for +#: instance, to remove the default mouse actions. + +#: Click the link under the mouse or move the cursor + +# mouse_map left click ungrabbed mouse_handle_click selection link prompt + +#:: First check for a selection and if one exists do nothing. Then +#:: check for a link under the mouse cursor and if one exists, click +#:: it. Finally check if the click happened at the current shell +#:: prompt and if so, move the cursor to the click location. Note +#:: that this requires shell integration +#:: to work. + +#: Click the link under the mouse or move the cursor even when grabbed + +# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt + +#:: Same as above, except that the action is performed even when the +#:: mouse is grabbed by the program running in the terminal. + +#: Click the link under the mouse cursor + +# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link + +#:: Variant with Ctrl+Shift is present because the simple click based +#:: version has an unavoidable delay of click_interval, to +#:: disambiguate clicks from double clicks. + +#: Discard press event for link click + +# mouse_map ctrl+shift+left press grabbed discard_event + +#:: Prevent this press event from being sent to the program that has +#:: grabbed the mouse, as the corresponding release event is used to +#:: open a URL. + +#: Paste from the primary selection + +# mouse_map middle release ungrabbed paste_from_selection + +#: Start selecting text + +# mouse_map left press ungrabbed mouse_selection normal + +#: Start selecting text in a rectangle + +# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle + +#: Select a word + +# mouse_map left doublepress ungrabbed mouse_selection word + +#: Select a line + +# mouse_map left triplepress ungrabbed mouse_selection line + +#: Select line from point + +# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line. If you +#:: would like to select the word at the point and then extend to the +#:: rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection + +# mouse_map right press ungrabbed mouse_selection extend + +#:: If you want only the end of the selection to be moved instead of +#:: the nearest boundary, use move-end instead of extend. + +#: Paste from the primary selection even when grabbed + +# mouse_map shift+middle release ungrabbed,grabbed paste_selection +# mouse_map shift+middle press grabbed discard_event + +#: Start selecting text even when grabbed + +# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal + +#: Start selecting text in a rectangle even when grabbed + +# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle + +#: Select a word even when grabbed + +# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word + +#: Select a line even when grabbed + +# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line + +#: Select line from point even when grabbed + +# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line even when +#:: grabbed. If you would like to select the word at the point and +#:: then extend to the rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection even when grabbed + +# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend + +#: Show clicked command output in pager + +# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output + +#:: Requires shell integration +#:: to work. + +#: }}} + +#: }}} + +#: Performance tuning {{{ + +# repaint_delay 10 + +#: Delay between screen updates (in milliseconds). Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS, you have to +#: either set sync_to_monitor to no or use a monitor with a high +#: refresh rate. Also, to minimize latency when there is pending input +#: to be processed, this option is ignored. + +# input_delay 3 + +#: Delay before input from the program running in the terminal is +#: processed (in milliseconds). Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. +#: This setting is ignored when the input buffer is almost full. + +# sync_to_monitor yes + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents screen tearing +#: when scrolling. +#: However, it limits the rendering speed to the refresh rate of your +#: monitor. With a very high speed mouse/high keyboard repeat rate, +#: you may notice some slight input latency. If so, set this to no. + +#: }}} + +#: Terminal bell {{{ + +# enable_audio_bell yes + +#: The audio bell. Useful to disable it in environments that require +#: silence. + +# visual_bell_duration 0.0 + +#: The visual bell duration (in seconds). Flash the screen when a bell +#: occurs for the specified number of seconds. Set to zero to disable. +#: The flash is animated, fading in and out over the specified +#: duration. The easing function used for the fading can be +#: controlled. For example, 2.0 linear will casuse the flash to fade +#: in and out linearly. The default if unspecified is to use ease-in- +#: out which fades slowly at the start, middle and end. You can +#: specify different easing functions for the fade-in and fade-out +#: parts, like this: 2.0 ease-in linear. kitty supports all the CSS +#: easing functions . + +# visual_bell_color none + +#: The color used by visual bell. Set to none will fall back to +#: selection background color. If you feel that the visual bell is too +#: bright, you can set it to a darker color. + +# window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on Linux. + +# bell_on_tab "🔔 " + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has a bell. If you want to use leading +#: or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +#: For backwards compatibility, values of yes, y and true are +#: converted to the default bell symbol and no, n, false and none are +#: converted to the empty string. + +# command_on_bell none + +#: Program to run when a bell occurs. The environment variable +#: KITTY_CHILD_CMDLINE can be used to get the program running in the +#: window in which the bell occurred. + +# bell_path none + +#: Path to a sound file to play as the bell sound. If set to none, the +#: system default bell sound is used. Must be in a format supported by +#: the operating systems sound API, such as WAV or OGA on Linux +#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound). + +# linux_bell_theme __custom + +#: The XDG Sound Theme kitty will use to play the bell sound. Defaults +#: to the custom theme name specified in the XDG Sound theme +#: specification , falling back to the default +#: freedesktop theme if it does not exist. To change your sound theme +#: desktop wide, create +#: :file:~/.local/share/sounds/__custom/index.theme` with the +#: contents: + +#: [Sound Theme] + +#: Inherits=name-of-the-sound-theme-you-want-to-use + +#: Replace name-of-the-sound-theme-you-want-to-use with the actual +#: theme name. Now all compliant applications should use sounds from +#: this theme. + +#: }}} + +#: Window layout {{{ + +# remember_window_size yes +# initial_window_width 640 +# initial_window_height 400 + +#: If enabled, the OS Window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the OS Window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +# enabled_layouts * + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value all means all layouts. The first listed layout +#: will be used as the startup layout. Default configuration is all +#: layouts in alphabetical order. For a list of available layouts, see +#: the layouts . + +# window_resize_step_cells 2 +# window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing kitty windows in a layout with the shortcut +#: start_resizing_window. The cells value is used for horizontal +#: resizing, and the lines value is used for vertical resizing. + +# window_border_width 0.5pt + +#: The width of window borders. Can be either in pixels (px) or pts +#: (pt). Values in pts will be rounded to the nearest number of pixels +#: based on screen resolution. If not specified, the unit is assumed +#: to be pts. Note that borders are displayed only when more than one +#: window is visible. They are meant to separate multiple windows. + +# draw_minimal_borders yes + +#: Draw only the minimum borders needed. This means that only the +#: borders that separate the window from a neighbor are drawn. Note +#: that setting a non-zero window_margin_width overrides this and +#: causes all borders to be drawn. + +# window_margin_width 0 + +#: The window margin (in pts) (blank area outside the border). A +#: single value sets all four sides. Two values set the vertical and +#: horizontal sides. Three values set top, horizontal and bottom. Four +#: values set top, right, bottom and left. + +# single_window_margin_width -1 + +#: The window margin to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_margin_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# window_padding_width 0 + +#: The window padding (in pts) (blank area between the text and the +#: window border). A single value sets all four sides. Two values set +#: the vertical and horizontal sides. Three values set top, horizontal +#: and bottom. Four values set top, right, bottom and left. + +# single_window_padding_width -1 + +#: The window padding to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_padding_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# placement_strategy center + +#: When the window size is not an exact multiple of the cell size, the +#: cell area of the terminal window will have some extra padding on +#: the sides. You can control how that padding is distributed with +#: this option. Using a value of center means the cell area will be +#: placed centrally. A value of top-left means the padding will be +#: only at the bottom and right edges. The value can be one of: top- +#: left, top, top-right, left, center, right, bottom-left, bottom, +#: bottom-right. + +# active_border_color #00ff00 + +#: The color for the border of the active window. Set this to none to +#: not draw borders around the active window. + +# inactive_border_color #cccccc + +#: The color for the border of inactive windows. + +# bell_border_color #ff5a00 + +#: The color for the border of inactive windows in which a bell has +#: occurred. + +# inactive_text_alpha 1.0 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +# hide_window_decorations no + +#: Hide the window decorations (title-bar and window borders) with +#: yes. On macOS, titlebar-only and titlebar-and-corners can be used +#: to only hide the titlebar and the rounded corners. Whether this +#: works and exactly what effect it has depends on the window +#: manager/operating system. Note that the effects of changing this +#: option when reloading config are undefined. When using titlebar- +#: only, it is useful to also set window_margin_width and +#: placement_strategy to prevent the rounded corners from clipping +#: text. Or use titlebar-and-corners. + +# window_logo_path none + +#: Path to a logo image. Must be in PNG/JPEG/WEBP/GIF/TIFF/BMP format. +#: Relative paths are interpreted relative to the kitty config +#: directory. The logo is displayed in a corner of every kitty window. +#: The position is controlled by window_logo_position. Individual +#: windows can be configured to have different logos either using the +#: launch action or the remote control +#: facility. + +# window_logo_position bottom-right + +#: Where to position the window logo in the window. The value can be +#: one of: top-left, top, top-right, left, center, right, bottom-left, +#: bottom, bottom-right. + +# window_logo_alpha 0.5 + +#: The amount the logo should be faded into the background. With zero +#: being fully faded and one being fully opaque. + +# window_logo_scale 0 + +#: The percentage (0-100] of the window size to which the logo should +#: scale. Using a single number means the logo is scaled to that +#: percentage of the shortest window dimension, while preseving aspect +#: ratio of the logo image. + +#: Using two numbers means the width and height of the logo are scaled +#: to the respective percentage of the window's width and height. + +#: Using zero as the percentage disables scaling in that dimension. A +#: single zero (the default) disables all scaling of the window logo. + +# resize_debounce_time 0.1 0.5 + +#: The time to wait (in seconds) before asking the program running in +#: kitty to resize and redraw the screen during a live resize of the +#: OS window, when no new resize events have been received, i.e. when +#: resizing is either paused or finished. On platforms such as macOS, +#: where the operating system sends events corresponding to the start +#: and end of a live resize, the second number is used for redraw- +#: after-pause since kitty can distinguish between a pause and end of +#: resizing. On such systems the first number is ignored and redraw is +#: immediate after end of resize. On other systems only the first +#: number is used so that kitty is ready quickly after the end of +#: resizing, while not also continuously redrawing, to save energy. + +# resize_in_steps no + +#: Resize the OS window in steps as large as the cells, instead of +#: with the usual pixel accuracy. Combined with initial_window_width +#: and initial_window_height in number of cells, this option can be +#: used to keep the margins as small as possible when resizing the OS +#: window. Note that this does not currently work on Wayland. + +# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ + +#: The list of characters for visual window selection. For example, +#: for selecting a window to focus on with focus_visible_window. The +#: value should be a series of unique numbers or alphabets, case +#: insensitive, from the set 0-9A-Z\-=[];',./\\`. Specify your +#: preference as a string of characters. + +# confirm_os_window_close -1 + +#: Ask for confirmation when closing an OS window or a tab with at +#: least this number of kitty windows in it by window manager (e.g. +#: clicking the window close button or pressing the operating system +#: shortcut to close windows) or by the close_tab action. A value of +#: zero disables confirmation. This confirmation also applies to +#: requests to quit the entire application (all OS windows, via the +#: quit action). Negative values are converted to positive ones, +#: however, with shell_integration enabled, using negative values +#: means windows sitting at a shell prompt are not counted, only +#: windows where some command is currently running. Note that if you +#: want confirmation when closing individual windows, you can map the +#: close_window_with_confirmation action. + +#: }}} + +#: Tab bar {{{ + +tab_bar_min_tabs 1 +tab_bar_edge bottom +# tab_title_template {title}{' :{}:'.format(num_windows) if num_windows > 1 else ''} +tab_bar_margin_width 0.0 +tab_bar_margin_height 0.0 0.0 +tab_bar_style powerline +tab_bar_align left +tab_separator +tab_activity_sybol none +tab_title_template {index}  {tab.active_wd.rsplit('/', 1)[-1]} + +#: The edge to show the tab bar on, top or bottom. + +# tab_bar_margin_width 0.0 + +#: The margin to the left and right of the tab bar (in pts). + +# tab_bar_margin_height 0.0 0.0 + +#: The margin above and below the tab bar (in pts). The first number +#: is the margin between the edge of the OS Window and the tab bar. +#: The second number is the margin between the tab bar and the +#: contents of the current tab. + +# tab_bar_style fade + +#: The tab bar style, can be one of: + +#: fade +#: Each tab's edges fade into the background color. (See also tab_fade) +#: slant +#: Tabs look like the tabs in a physical file. +#: separator +#: Tabs are separated by a configurable separator. (See also +#: tab_separator) +#: powerline +#: Tabs are shown as a continuous line with "fancy" separators. +#: (See also tab_powerline_style) +#: custom +#: A user-supplied Python function called draw_tab is loaded from the file +#: tab_bar.py in the kitty config directory. For examples of how to +#: write such a function, see the functions named draw_tab_with_* in +#: kitty's source code: kitty/tab_bar.py. See also +#: this discussion +#: for examples from kitty users. +#: hidden +#: The tab bar is hidden. If you use this, you might want to create +#: a mapping for the select_tab action which presents you with a list of +#: tabs and allows for easy switching to a tab. + +# tab_bar_align left + +#: The horizontal alignment of the tab bar, can be one of: left, +#: center, right. + +# tab_bar_min_tabs 2 + +#: The minimum number of tabs that must exist before the tab bar is +#: shown. + +# tab_switch_strategy previous + +#: The algorithm to use when switching to a tab when the current tab +#: is closed. The default of previous will switch to the last used +#: tab. A value of left will switch to the tab to the left of the +#: closed tab. A value of right will switch to the tab to the right of +#: the closed tab. A value of last will switch to the right-most tab. + +# tab_fade 0.25 0.5 0.75 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +# tab_separator " ┇" + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +# tab_powerline_style angled + +#: The powerline separator style between tabs in the tab bar when +#: using powerline as the tab_bar_style, can be one of: angled, +#: slanted, round. + +# tab_activity_symbol none + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has some activity. If you want to use +#: leading or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +# tab_title_max_length 0 + +#: The maximum number of cells that can be used to render the text in +#: a tab. A value of zero means that no limit is applied. + +# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" + +#: A template to render the tab title. The default just renders the +#: title with optional symbols for bell and activity. If you wish to +#: include the tab-index as well, use something like: {index}:{title}. +#: Useful if you have shortcuts mapped for goto_tab N. If you prefer +#: to see the index as a superscript, use {sup.index}. All data +#: available is: + +#: title +#: The current tab title. +#: index +#: The tab index usable with goto_tab N goto_tab shortcuts. +#: layout_name +#: The current layout name. +#: num_windows +#: The number of windows in the tab. +#: num_window_groups +#: The number of window groups (a window group is a window and all of its overlay windows) in the tab. +#: tab.active_wd +#: The working directory of the currently active window in the tab +#: (expensive, requires syscall). Use active_oldest_wd to get +#: the directory of the oldest foreground process rather than the newest. +#: tab.active_exe +#: The name of the executable running in the foreground of the currently +#: active window in the tab (expensive, requires syscall). Use +#: active_oldest_exe for the oldest foreground process. +#: max_title_length +#: The maximum title length available. +#: keyboard_mode +#: The name of the current keyboard mode or the empty string if no keyboard mode is active. + +#: Note that formatting is done by Python's string formatting +#: machinery, so you can use, for instance, {layout_name[:2].upper()} +#: to show only the first two letters of the layout name, upper-cased. +#: If you want to style the text, you can use styling directives, for +#: example: +#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. +#: Similarly, for bold and italic: +#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. +#: The 256 eight terminal colors can be used as `fmt.fg.color0` +#: through `fmt.fg.color255`. Note that for backward compatibility, if +#: {bell_symbol} or {activity_symbol} are not present in the template, +#: they are prepended to it. + +# active_tab_title_template none + +#: Template to use for active tabs. If not specified falls back to +#: tab_title_template. + +# active_tab_foreground #000 +# active_tab_background #eee +# active_tab_font_style bold-italic +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# inactive_tab_font_style normal + +#: Tab bar colors and styles. + +# tab_bar_background none + +#: Background color for the tab bar. Defaults to using the terminal +#: background color. + +# tab_bar_margin_color none + +#: Color for the tab bar margin area. Defaults to using the terminal +#: background color for margins above and below the tab bar. For side +#: margins the default color is chosen to match the background color +#: of the neighboring tab. + +#: }}} + +#: Color scheme {{{ + +# foreground #dddddd +# background #000000 + +#: The foreground and background colors. + +# background_opacity 1.0 + +#: The opacity of the background. A number between zero and one, where +#: one is opaque and zero is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the background color's opacity in +#: cells that have the same background color as the default terminal +#: background, so that things like the status bar in vim, powerline +#: prompts, etc. still look good. But it means that if you use a color +#: theme with a background color in your editor, it will not be +#: rendered as transparent. Instead you should change the default +#: background color in your kitty config and not use a background +#: color in the editor color scheme. Or use the escape codes to set +#: the terminals default colors in a shell script to launch your +#: editor. See also transparent_background_colors. Be aware that using +#: a value less than 1.0 is a (possibly significant) performance hit. +#: When using a low value for this setting, it is desirable that you +#: set the background color to a color the matches the general color +#: of the desktop background, for best text rendering. If you want to +#: dynamically change transparency of windows, set +#: dynamic_background_opacity to yes (this is off by default as it has +#: a performance cost). Changing this option when reloading the config +#: will only work if dynamic_background_opacity was enabled in the +#: original config. + +# background_blur 0 + +#: Set to a positive value to enable background blur (blurring of the +#: visuals behind a transparent window) on platforms that support it. +#: Only takes effect when background_opacity is less than one. On +#: macOS, this will also control the blur radius (amount of blurring). +#: Setting it to too high a value will cause severe performance issues +#: and/or rendering artifacts. Usually, values up to 64 work well. +#: Note that this might cause performance issues, depending on how the +#: platform implements it, so use with care. Currently supported on +#: macOS and KDE. + +# background_image none + +#: Path to a background image. Must be in PNG/JPEG/WEBP/TIFF/GIF/BMP +#: format. + +# background_image_layout tiled + +#: Whether to tile, scale or clamp the background image. The value can +#: be one of tiled, mirror-tiled, scaled, clamped, centered or +#: cscaled. The scaled and cscaled values scale the image to the +#: window size, with cscaled preserving the image aspect ratio. + +# background_image_linear no + +#: When background image is scaled, whether linear interpolation +#: should be used. + +# transparent_background_colors + +#: A space separated list of upto 7 colors, with opacity. When the +#: background color of a cell matches one of these colors, it is +#: rendered semi-transparent using the specified opacity. + +#: Useful in more complex UIs like editors where you could want more +#: than a single background color to be rendered as transparent, for +#: instance, for a cursor highlight line background or a highlighted +#: block. Terminal applications can set this color using The kitty +#: color control escape code. + +#: The syntax for specifiying colors is: color@opacity, where the +#: @opacity part is optional. When unspecified, the value of +#: background_opacity is used. For example:: + +#: transparent_background_colors red@0.5 #00ff00@0.3 + +# dynamic_background_opacity no + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +#: Changing this option by reloading the config is not supported. + +# background_tint 0.0 + +#: How much to tint the background image by the background color. This +#: option makes it easier to read the text. Tinting is done using the +#: current background color for each window. This option applies only +#: if background_opacity is set and transparent windows are supported +#: or background_image is set. + +# background_tint_gaps 1.0 + +#: How much to tint the background image at the window gaps by the +#: background color, after applying background_tint. Since this is +#: multiplicative with background_tint, it can be used to lighten the +#: tint over the window gaps for a *separated* look. + +# dim_opacity 0.4 + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). + +# selection_foreground #000000 +# selection_background #fffacd + +#: The foreground and background colors for text selected with the +#: mouse. Setting both of these to none will cause a "reverse video" +#: effect for selections, where the selection will be the cell text +#: color and the text will become the cell background color. Setting +#: only selection_foreground to none will cause the foreground color +#: to be used unchanged. Note that these colors can be overridden by +#: the program running in the terminal. + +#: The color table {{{ + +#: The 256 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version, for the first 16 colors. You can set the +#: remaining 240 colors as color16 to color255. + +# color0 #000000 +# color8 #767676 + +#: black + +# color1 #cc0403 +# color9 #f2201f + +#: red + +# color2 #19cb00 +# color10 #23fd00 + +#: green + +# color3 #cecb00 +# color11 #fffd00 + +#: yellow + +# color4 #0d73cc +# color12 #1a8fff + +#: blue + +# color5 #cb1ed1 +# color13 #fd28ff + +#: magenta + +# color6 #0dcdcd +# color14 #14ffff + +#: cyan + +# color7 #dddddd +# color15 #ffffff + +#: white + +# mark1_foreground black + +#: Color for marks of type 1 + +# mark1_background #98d3cb + +#: Color for marks of type 1 (light steel blue) + +# mark2_foreground black + +#: Color for marks of type 2 + +# mark2_background #f2dcd3 + +#: Color for marks of type 1 (beige) + +# mark3_foreground black + +#: Color for marks of type 3 + +# mark3_background #f274bc + +#: Color for marks of type 3 (violet) + +#: }}} + +#: }}} + +#: Advanced {{{ + +# shell . + +#: The shell program to execute. The default value of . means to use +#: the value of of the SHELL environment variable or if unset, +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login and --interactive to ensure that the shell starts in +#: interactive mode and reads its startup rc files. Environment +#: variables are expanded in this setting. + +# editor . + +#: The terminal based text editor (such as vim or nano) to use when +#: editing the kitty config file or similar tasks. + +#: The default value of . means to use the environment variables +#: VISUAL and EDITOR in that order. If these variables aren't set, +#: kitty will run your shell ($SHELL -l -i -c env) to see if your +#: shell startup rc files set VISUAL or EDITOR. If that doesn't work, +#: kitty will cycle through various known editors (vim, emacs, etc.) +#: and take the first one that exists on your system. + +# close_on_child_death no + +#: Close the window when the child process (usually the shell) exits. +#: With the default value no, the terminal will remain open when the +#: child exits as long as there are still other processes outputting +#: to the terminal (for example disowned or backgrounded processes). +#: When enabled with yes, the window will close as soon as the child +#: process exits. Note that setting it to yes means that any +#: background processes still using the terminal can fail silently +#: because their stdout/stderr/stdin no longer work. + +# remote_control_password + +#: Allow other programs to control kitty using passwords. This option +#: can be specified multiple times to add multiple passwords. If no +#: passwords are present kitty will ask the user for permission if a +#: program tries to use remote control with a password. A password can +#: also *optionally* be associated with a set of allowed remote +#: control actions. For example:: + +#: remote_control_password "my passphrase" get-colors set-colors focus-window focus-tab + +#: Only the specified actions will be allowed when using this +#: password. Glob patterns can be used too, for example:: + +#: remote_control_password "my passphrase" set-tab-* resize-* + +#: To get a list of available actions, run:: + +#: kitten @ --help + +#: A set of actions to be allowed when no password is sent can be +#: specified by using an empty password. For example:: + +#: remote_control_password "" *-colors + +#: Finally, the path to a python module can be specified that provides +#: a function is_cmd_allowed that is used to check every remote +#: control command. For example:: + +#: remote_control_password "my passphrase" my_rc_command_checker.py + +#: Relative paths are resolved from the kitty configuration directory. +#: See rc_custom_auth for details. + +# allow_remote_control no + +#: Allow other programs to control kitty. If you turn this on, other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over SSH +#: connections. The default setting of no prevents any form of remote +#: control. The meaning of the various values are: + +#: password +#: Remote control requests received over both the TTY device and the socket +#: are confirmed based on passwords, see remote_control_password. + +#: socket-only +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are denied. +#: See listen_on. + +#: socket +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are confirmed based on +#: password. + +#: no +#: Remote control is completely disabled. + +#: yes +#: Remote control requests are always accepted. + +# listen_on none + +#: Listen to the specified socket for remote control connections. Note +#: that this will apply to all kitty instances. It can be overridden +#: by the kitty --listen-on command line option. For UNIX sockets, +#: such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). +#: Environment variables are expanded and relative paths are resolved +#: with respect to the temporary directory. If {kitty_pid} is present, +#: then it is replaced by the PID of the kitty process, otherwise the +#: PID of the kitty process is appended to the value, with a hyphen. +#: For TCP sockets such as tcp:localhost:0 a random port is always +#: used even if a non-zero port number is specified. See the help for +#: kitty --listen-on for more details. Note that this will be ignored +#: unless allow_remote_control is set to either: yes, socket or +#: socket-only. Changing this option by reloading the config is not +#: supported. + +# env + +#: Specify the environment variables to be set in all child processes. +#: Using the name with an equal sign (e.g. env VAR=) will set it to +#: the empty string. Specifying only the name (e.g. env VAR) will +#: remove the variable from the child process' environment. Note that +#: environment variables are expanded recursively, for example:: + +#: env VAR1=a +#: env VAR2=${HOME}/${VAR1}/b + +#: The value of VAR2 will be /a/b. + +# filter_notification + +#: Specify rules to filter out notifications sent by applications +#: running in kitty. Can be specified multiple times to create +#: multiple filter rules. A rule specification is of the form +#: field:regexp. A filter rule can match on any of the fields: title, +#: body, app, type. The special value of all filters out all +#: notifications. Rules can be combined using Boolean operators. Some +#: examples:: + +#: filter_notification title:hello or body:"abc.*def" +#: # filter out notification from vim except for ones about updates, (?i) +#: # makes matching case insesitive. +#: filter_notification app:"[ng]?vim" and not body:"(?i)update" +#: # filter out all notifications +#: filter_notification all + +#: The field app is the name of the application sending the +#: notification and type is the type of the notification. Not all +#: applications will send these fields, so you can also match on the +#: title and body of the notification text. More sophisticated +#: programmatic filtering and custom actions on notifications can be +#: done by creating a notifications.py file in the kitty config +#: directory (~/.config/kitty). An annotated sample is available +#: . + +# watcher + +#: Path to python file which will be loaded for watchers +#: . Can be +#: specified more than once to load multiple watchers. The watchers +#: will be added to every kitty window. Relative paths are resolved +#: relative to the kitty config directory. Note that reloading the +#: config will only affect windows created after the reload. + +# exe_search_path + +#: Control where kitty finds the programs to run. The default search +#: order is: First search the system wide PATH, then ~/.local/bin and +#: ~/bin. If still not found, the PATH defined in the login shell +#: after sourcing all its startup files is tried. Finally, if present, +#: the PATH specified by the env option is tried. + +#: This option allows you to prepend, append, or remove paths from +#: this search order. It can be specified multiple times for multiple +#: paths. A simple path will be prepended to the search order. A path +#: that starts with the + sign will be append to the search order, +#: after ~/bin above. A path that starts with the - sign will be +#: removed from the entire search order. For example:: + +#: exe_search_path /some/prepended/path +#: exe_search_path +/some/appended/path +#: exe_search_path -/some/excluded/path + +# update_check_interval 24 + +#: The interval to periodically check if an update to kitty is +#: available (in hours). If an update is found, a system notification +#: is displayed informing you of the available update. The default is +#: to check every 24 hours, set to zero to disable. Update checking is +#: only done by the official binary builds. Distro packages or source +#: builds do not do update checking. Changing this option by reloading +#: the config is not supported. + +# startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session =none command line option +#: for individual instances. See sessions +#: in the kitty +#: documentation for details. Note that relative paths are interpreted +#: with respect to the kitty config directory. Environment variables +#: in the path are expanded. Changing this option by reloading the +#: config is not supported. Note that if kitty is invoked with command +#: line arguments specifying a command to run, this option is ignored. + +# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: possible actions are: write-clipboard, read-clipboard, write- +#: primary, read-primary, read-clipboard-ask, read-primary-ask. The +#: default is to allow writing to the clipboard and primary selection +#: and to ask for permission when a program tries to read from the +#: clipboard. Note that disabling the read confirmation is a security +#: risk as it means that any program, even the ones running on a +#: remote server via SSH can read your clipboard. See also +#: clipboard_max_size. + +# clipboard_max_size 512 + +#: The maximum size (in MB) of data from programs running in kitty +#: that will be stored for writing to the system clipboard. A value of +#: zero means no size limit is applied. See also clipboard_control. + +# file_transfer_confirmation_bypass + +#: The password that can be supplied to the file transfer kitten +#: to skip the +#: transfer confirmation prompt. This should only be used when +#: initiating transfers from trusted computers, over trusted networks +#: or encrypted transports, as it allows any programs running on the +#: remote machine to read/write to the local filesystem, without +#: permission. + +# allow_hyperlinks yes + +#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 +#: escape sequences are ignored. Otherwise they become clickable +#: links, that you can click with the mouse or by using the hints +#: kitten . The +#: special value of ask means that kitty will ask before opening the +#: link when clicked. + +# shell_integration enabled + +#: Enable shell integration on supported shells. This enables features +#: such as jumping to previous prompts, browsing the output of the +#: previous command in a pager, etc. on supported shells. Set to +#: disabled to turn off shell integration, completely. It is also +#: possible to disable individual features, set to a space separated +#: list of these values: no-rc, no-cursor, no-title, no-cwd, no- +#: prompt-mark, no-complete, no-sudo. See Shell integration +#: for details. + +# allow_cloning ask + +#: Control whether programs running in the terminal can request new +#: windows to be created. The canonical example is clone-in-kitty +#: . +#: By default, kitty will ask for permission for each clone request. +#: Allowing cloning unconditionally gives programs running in the +#: terminal (including over SSH) permission to execute arbitrary code, +#: as the user who is running the terminal, on the computer that the +#: terminal is running on. + +# clone_source_strategies venv,conda,env_var,path + +#: Control what shell code is sourced when running clone-in-kitty in +#: the newly cloned window. The supported strategies are: + +#: venv +#: Source the file $VIRTUAL_ENV/bin/activate. This is used by the +#: Python stdlib venv module and allows cloning venvs automatically. +#: conda +#: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual +#: environments created by conda. +#: env_var +#: Execute the contents of the environment variable +#: KITTY_CLONE_SOURCE_CODE with eval. +#: path +#: Source the file pointed to by the environment variable +#: KITTY_CLONE_SOURCE_PATH. + +#: This option must be a comma separated list of the above values. +#: Only the first valid match, in the order specified, is sourced. + +# notify_on_cmd_finish never + +#: Show a desktop notification when a long-running command finishes +#: (needs shell_integration). The possible values are: + +#: never +#: Never send a notification. + +#: unfocused +#: Only send a notification when the window does not have keyboard focus. + +#: invisible +#: Only send a notification when the window both is unfocused and not visible +#: to the user, for example, because it is in an inactive tab or its OS window +#: is not currently active. + +#: always +#: Always send a notification, regardless of window state. + +#: There are two optional arguments: + +#: First, the minimum duration for what is considered a long running +#: command. The default is 5 seconds. Specify a second argument to set +#: the duration. For example: invisible 15. Do not set the value too +#: small, otherwise a command that launches a new OS Window and exits +#: will spam a notification. + +#: Second, the action to perform. The default is notify. The possible +#: values are: + +#: notify +#: Send a desktop notification. + +#: bell +#: Ring the terminal bell. + +#: command +#: Run a custom command. All subsequent arguments are the cmdline to run. + +#: Some more examples:: + +#: # Send a notification when a command takes more than 5 seconds in an unfocused window +#: notify_on_cmd_finish unfocused +#: # Send a notification when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 +#: # Ring a bell when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 bell +#: # Run 'notify-send' when a command takes more than 10 seconds in a invisible window +#: # Here %c is replaced by the current command line and %s by the job exit code +#: notify_on_cmd_finish invisible 10.0 command notify-send "job finished with status: %s" %c + +# term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on "Stack Overflow" +#: to change it. The TERM variable is used by various programs to get +#: information about the capabilities and behavior of the terminal. If +#: you change it, depending on what programs you run, and how +#: different the terminal you are changing it to is, various things +#: from key-presses, to colors, to various advanced features may not +#: work. Changing this option by reloading the config will only affect +#: newly created windows. + +# terminfo_type path + +#: The value of the TERMINFO environment variable to set. This +#: variable is used by programs running in the terminal to search for +#: terminfo databases. The default value of path causes kitty to set +#: it to a filesystem location containing the kitty terminfo database. +#: A value of direct means put the entire database into the env var +#: directly. This can be useful when connecting to containers, for +#: example. But, note that not all software supports this. A value of +#: none means do not touch the variable. + +# forward_stdio no + +#: Forward STDOUT and STDERR of the kitty process to child processes. +#: This is useful for debugging as it allows child processes to print +#: to kitty's STDOUT directly. For example, echo hello world +#: >&$KITTY_STDIO_FORWARDED in a shell will print to the parent +#: kitty's STDOUT. Sets the KITTY_STDIO_FORWARDED=fdnum environment +#: variable so child processes know about the forwarding. Note that on +#: macOS this prevents the shell from being run via the login utility +#: so getlogin() will not work in programs run in this session. + +# menu_map + +#: Specify entries for various menus in kitty. Currently only the +#: global menubar on macOS is supported. For example:: + +#: menu_map global "Actions::Launch something special" launch --hold --type=os-window sh -c "echo hello world" + +#: This will create a menu entry named "Launch something special" in +#: an "Actions" menu in the macOS global menubar. Sub-menus can be +#: created by adding more levels separated by the :: characters. + +#: }}} + +#: OS specific tweaks {{{ + +# wayland_titlebar_color system + +#: The color of the kitty window's titlebar on Wayland systems with +#: client side window decorations such as GNOME. A value of system +#: means to use the default system colors, a value of background means +#: to use the background color of the currently active kitty window +#: and finally you can use an arbitrary color, such as #12af59 or red. + +# macos_titlebar_color system + +#: The color of the kitty window's titlebar on macOS. A value of +#: system means to use the default system color, light or dark can +#: also be used to set it explicitly. A value of background means to +#: use the background color of the currently active window and finally +#: you can use an arbitrary color, such as #12af59 or red. WARNING: +#: This option works by using a hack when arbitrary color (or +#: background) is configured, as there is no proper Cocoa API for it. +#: It sets the background color of the entire window and makes the +#: titlebar transparent. As such it is incompatible with +#: background_opacity. If you want to use both, you are probably +#: better off just hiding the titlebar with hide_window_decorations. + +# macos_option_as_alt no + +#: Use the Option key as an Alt key on macOS. With this set to no, +#: kitty will use the macOS native Option+Key to enter Unicode +#: character behavior. This will break any Alt+Key keyboard shortcuts +#: in your terminal programs, but you can use the macOS Unicode input +#: technique. You can use the values: left, right or both to use only +#: the left, right or both Option keys as Alt, instead. Note that +#: kitty itself always treats Option the same as Alt. This means you +#: cannot use this option to configure different kitty shortcuts for +#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using +#: Option/Alt+Key will take priority, so that any such key presses +#: will not be passed to terminal programs running inside kitty. +#: Changing this option by reloading the config is not supported. + +# macos_hide_from_tasks no + +#: Hide the kitty window from running tasks on macOS (⌘+Tab and the +#: Dock). Changing this option by reloading the config is not +#: supported. + +# macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed on macOS. +#: By default, kitty will stay running, even with no open windows, as +#: is the expected behavior on macOS. + +# macos_window_resizable yes + +#: Disable this if you want kitty top-level OS windows to not be +#: resizable on macOS. + +# macos_thicken_font 0 + +#: Draw an extra border around the font with the given width, to +#: increase legibility at small font sizes on macOS. For example, a +#: value of 0.75 will result in rendering that looks similar to sub- +#: pixel antialiasing at common font sizes. Note that in modern kitty, +#: this option is obsolete (although still supported). Consider using +#: text_composition_strategy instead. + +# macos_traditional_fullscreen no + +#: Use the macOS traditional full-screen transition, that is faster, +#: but less pretty. + +# macos_show_window_title_in all + +#: Control where the window title is displayed on macOS. A value of +#: window will show the title of the currently active window at the +#: top of the macOS window. A value of menubar will show the title of +#: the currently active window in the macOS global menu bar, making +#: use of otherwise wasted space. A value of all will show the title +#: in both places, and none hides the title. See +#: macos_menubar_title_max_length for how to control the length of the +#: title in the menu bar. + +# macos_menubar_title_max_length 0 + +#: The maximum number of characters from the window title to show in +#: the macOS global menu bar. Values less than one means that there is +#: no maximum limit. + +# macos_custom_beam_cursor no + +#: Use a custom mouse cursor for macOS that is easier to see on both +#: light and dark backgrounds. Nowadays, the default macOS cursor +#: already comes with a white border. WARNING: this might make your +#: mouse cursor invisible on dual GPU machines. Changing this option +#: by reloading the config is not supported. + +# macos_colorspace srgb + +#: The colorspace in which to interpret terminal colors. The default +#: of srgb will cause colors to match those seen in web browsers. The +#: value of default will use whatever the native colorspace of the +#: display is. The value of displayp3 will use Apple's special +#: snowflake display P3 color space, which will result in over +#: saturated (brighter) colors with some color shift. Reloading +#: configuration will change this value only for newly created OS +#: windows. + +# linux_display_server auto + +#: Choose between Wayland and X11 backends. By default, an appropriate +#: backend based on the system state is chosen automatically. Set it +#: to x11 or wayland to force the choice. Changing this option by +#: reloading the config is not supported. + +# wayland_enable_ime yes + +#: Enable Input Method Extension on Wayland. This is typically used +#: for inputting text in East Asian languages. However, its +#: implementation in Wayland is often buggy and introduces latency +#: into the input loop, so disable this if you know you dont need it. +#: Changing this option by reloading the config is not supported, it +#: will not have any effect. + +#: }}} + +#: Keyboard shortcuts {{{ + +#: Keys are identified simply by their lowercase Unicode characters. +#: For example: a for the A key, [ for the left square bracket key, +#: etc. For functional keys, such as Enter or Escape, the names are +#: present at Functional key definitions +#: . +#: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt +#: (opt, option, ⌥), super (cmd, command, ⌘). + +#: Simple shortcut mapping is done with the map directive. For full +#: details on advanced mapping including modal and per application +#: maps, see mapping . Some +#: quick examples to illustrate common tasks:: + +#: # unmap a keyboard shortcut, passing it to the program running in kitty +#: map kitty_mod+space +#: # completely ignore a keyboard event +#: map ctrl+alt+f1 discard_event +#: # combine multiple actions +#: map kitty_mod+e combine : new_window : next_layout +#: # multi-key shortcuts +#: map ctrl+x>ctrl+y>z action + +#: The full list of actions that can be mapped to key presses is +#: available here . + +# kitty_mod ctrl+shift + +#: Special modifier key alias for default shortcuts. You can change +#: the value of this option to alter all default shortcuts that use +#: kitty_mod. + +# clear_all_shortcuts no + +#: Remove all shortcut definitions up to this point. Useful, for +#: instance, to remove the default shortcuts. + +# action_alias + +#: E.g. action_alias launch_tab launch --type=tab --cwd=current + +#: Define action aliases to avoid repeating the same options in +#: multiple mappings. Aliases can be defined for any action and will +#: be expanded recursively. For example, the above alias allows you to +#: create mappings to launch a new tab in the current working +#: directory without duplication:: + +#: map f1 launch_tab vim +#: map f2 launch_tab emacs + +#: Similarly, to alias kitten invocation:: + +#: action_alias hints kitten hints --hints-offset=0 + +# kitten_alias + +#: E.g. kitten_alias hints hints --hints-offset=0 + +#: Like action_alias above, but specifically for kittens. Generally, +#: prefer to use action_alias. This option is a legacy version, +#: present for backwards compatibility. It causes all invocations of +#: the aliased kitten to be substituted. So the example above will +#: cause all invocations of the hints kitten to have the --hints- +#: offset=0 option applied. + +#: Clipboard {{{ + +#: Copy to clipboard + +# map kitty_mod+c copy_to_clipboard +# map cmd+c copy_to_clipboard + +#:: There is also a copy_or_interrupt action that can be optionally +#:: mapped to Ctrl+C. It will copy only if there is a selection and +#:: send an interrupt otherwise. Similarly, +#:: copy_and_clear_or_interrupt will copy and clear the selection or +#:: send an interrupt if there is no selection. + +#: Paste from clipboard + +# map kitty_mod+v paste_from_clipboard +# map cmd+v paste_from_clipboard + +#: Paste from selection + +# map kitty_mod+s paste_from_selection +# map shift+insert paste_from_selection + +#: Pass selection to program + +# map kitty_mod+o pass_selection_to_program + +#:: You can also pass the contents of the current selection to any +#:: program with pass_selection_to_program. By default, the system's +#:: open program is used, but you can specify your own, the selection +#:: will be passed as a command line argument to the program. For +#:: example:: + +#:: map kitty_mod+o pass_selection_to_program firefox + +#:: You can pass the current selection to a terminal program running +#:: in a new kitty window, by using the @selection placeholder:: + +#:: map kitty_mod+y new_window less @selection + +#: }}} + +#: Scrolling {{{ + +#: Scroll line up + +# map kitty_mod+up scroll_line_up +# map kitty_mod+k scroll_line_up +# map opt+cmd+page_up scroll_line_up +# map cmd+up scroll_line_up + +#: Scroll line down + +# map kitty_mod+down scroll_line_down +# map kitty_mod+j scroll_line_down +# map opt+cmd+page_down scroll_line_down +# map cmd+down scroll_line_down + +#: Scroll page up + +# map kitty_mod+page_up scroll_page_up +# map cmd+page_up scroll_page_up + +#: Scroll page down + +# map kitty_mod+page_down scroll_page_down +# map cmd+page_down scroll_page_down + +#: Scroll to top + +# map kitty_mod+home scroll_home +# map cmd+home scroll_home + +#: Scroll to bottom + +# map kitty_mod+end scroll_end +# map cmd+end scroll_end + +#: Scroll to previous shell prompt + +# map kitty_mod+z scroll_to_prompt -1 + +#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last +#:: jumped to or the last clicked position. Requires shell +#:: integration +#:: to work. + +#: Scroll to next shell prompt + +# map kitty_mod+x scroll_to_prompt 1 + +#: Browse scrollback buffer in pager + +# map kitty_mod+h show_scrollback + +#:: You can pipe the contents of the current screen and history +#:: buffer as STDIN to an arbitrary program using launch --stdin- +#:: source. For example, the following opens the scrollback buffer in +#:: less in an overlay window:: + +#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R + +#:: For more details on piping screen and buffer contents to external +#:: programs, see launch . + +#: Browse output of the last shell command in pager + +# map kitty_mod+g show_last_command_output + +#:: You can also define additional shortcuts to get the command +#:: output. For example, to get the first command output on screen:: + +#:: map f1 show_first_command_output_on_screen + +#:: To get the command output that was last accessed by a keyboard +#:: action or mouse action:: + +#:: map f1 show_last_visited_command_output + +#:: You can pipe the output of the last command run in the shell +#:: using the launch action. For example, the following opens the +#:: output in less in an overlay window:: + +#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R + +#:: To get the output of the first command on the screen, use +#:: @first_cmd_output_on_screen. To get the output of the last jumped +#:: to command, use @last_visited_cmd_output. + +#:: Requires shell integration +#:: to work. + +#: }}} + +#: Window management {{{ + +#: New window + +# map kitty_mod+enter new_window +# map cmd+enter new_window + +#:: You can open a new kitty window running an arbitrary program, for +#:: example:: + +#:: map kitty_mod+y launch mutt + +#:: You can open a new window with the current working directory set +#:: to the working directory of the current window using:: + +#:: map ctrl+alt+enter launch --cwd=current + +#:: You can open a new window that is allowed to control kitty via +#:: the kitty remote control facility with launch --allow-remote- +#:: control. Any programs running in that window will be allowed to +#:: control kitty. For example:: + +#:: map ctrl+enter launch --allow-remote-control some_program + +#:: You can open a new window next to the currently active window or +#:: as the first window, with:: + +#:: map ctrl+n launch --location=neighbor +#:: map ctrl+f launch --location=first + +#:: For more details, see launch +#:: . + +#: New OS window + +# map kitty_mod+n new_os_window +# map cmd+n new_os_window + +#:: Works like new_window above, except that it opens a top-level OS +#:: window. In particular you can use new_os_window_with_cwd to open +#:: a window with the current working directory. + +#: Close window + +# map kitty_mod+w close_window +# map shift+cmd+d close_window + +#: Next window + +# map kitty_mod+] next_window + +#: Previous window + +# map kitty_mod+[ previous_window + +#: Move window forward + +# map kitty_mod+f move_window_forward + +#: Move window backward + +# map kitty_mod+b move_window_backward + +#: Move window to top + +# map kitty_mod+` move_window_to_top + +#: Start resizing window + +# map kitty_mod+r start_resizing_window +# map cmd+r start_resizing_window + +#: First window + +# map kitty_mod+1 first_window +# map cmd+1 first_window + +#: Second window + +# map kitty_mod+2 second_window +# map cmd+2 second_window + +#: Third window + +# map kitty_mod+3 third_window +# map cmd+3 third_window + +#: Fourth window + +# map kitty_mod+4 fourth_window +# map cmd+4 fourth_window + +#: Fifth window + +# map kitty_mod+5 fifth_window +# map cmd+5 fifth_window + +#: Sixth window + +# map kitty_mod+6 sixth_window +# map cmd+6 sixth_window + +#: Seventh window + +# map kitty_mod+7 seventh_window +# map cmd+7 seventh_window + +#: Eighth window + +# map kitty_mod+8 eighth_window +# map cmd+8 eighth_window + +#: Ninth window + +# map kitty_mod+9 ninth_window +# map cmd+9 ninth_window + +#: Tenth window + +# map kitty_mod+0 tenth_window + +#: Visually select and focus window + +# map kitty_mod+f7 focus_visible_window + +#:: Display overlay numbers and alphabets on the window, and switch +#:: the focus to the window when you press the key. When there are +#:: only two windows, the focus will be switched directly without +#:: displaying the overlay. You can change the overlay characters and +#:: their order with option visual_window_select_characters. + +#: Visually swap window with another + +# map kitty_mod+f8 swap_with_window + +#:: Works like focus_visible_window above, but swaps the window. + +#: }}} + +#: Tab management {{{ + +#: Next tab + +# map kitty_mod+right next_tab +# map shift+cmd+] next_tab +# map ctrl+tab next_tab + +#: Previous tab + +# map kitty_mod+left previous_tab +# map shift+cmd+[ previous_tab +# map ctrl+shift+tab previous_tab + +#: New tab + +# map kitty_mod+t new_tab +# map cmd+t new_tab + +#: Close tab + +# map kitty_mod+q close_tab +# map cmd+w close_tab + +#: Close OS window + +# map shift+cmd+w close_os_window + +#: Move tab forward + +# map kitty_mod+. move_tab_forward + +#: Move tab backward + +# map kitty_mod+, move_tab_backward + +#: Set tab title + +# map kitty_mod+alt+t set_tab_title +# map shift+cmd+i set_tab_title + + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab, 2 the second tab and -1 being the previously active +#: tab, -2 being the tab active before the previously active tab and +#: so on. Any number larger than the number of tabs goes to the last +#: tab and any number less than the number of previously used tabs in +#: the history goes to the oldest previously used tab in the history:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and new_tab_with_cwd. +#: Finally, if you want the new tab to open next to the current tab +#: rather than at the end of the tabs list, use:: + +#: map ctrl+t new_tab !neighbor [optional cmd to run] +#: }}} + +#: Layout management {{{ + +#: Next layout + +# map kitty_mod+l next_layout + + +#: You can also create shortcuts to switch to specific layouts:: + +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack + +#: Similarly, to switch back to the previous layout:: + +#: map ctrl+alt+p last_used_layout + +#: There is also a toggle_layout action that switches to the named +#: layout or back to the previous layout if in the named layout. +#: Useful to temporarily "zoom" the active window by switching to the +#: stack layout:: + +#: map ctrl+alt+z toggle_layout stack +#: }}} + +#: Font sizes {{{ + +#: You can change the font size for all top-level kitty OS windows at +#: a time or only the current one. + +#: Increase font size + +# map kitty_mod+equal change_font_size all +2.0 +# map kitty_mod+plus change_font_size all +2.0 +# map kitty_mod+kp_add change_font_size all +2.0 +# map cmd+plus change_font_size all +2.0 +# map cmd+equal change_font_size all +2.0 +# map shift+cmd+equal change_font_size all +2.0 + +#: Decrease font size + +# map kitty_mod+minus change_font_size all -2.0 +# map kitty_mod+kp_subtract change_font_size all -2.0 +# map cmd+minus change_font_size all -2.0 +# map shift+cmd+minus change_font_size all -2.0 + +#: Reset font size + +# map kitty_mod+backspace change_font_size all 0 +# map cmd+0 change_font_size all 0 + + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current OS window's font +#: size:: + +#: map kitty_mod+f6 change_font_size current 10.0 +#: }}} + +#: Select and act on visible text {{{ + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +#: Open URL + +# map kitty_mod+e open_url_with_hints + +#:: Open a currently visible URL using the keyboard. The program used +#:: to open the URL is specified in open_url_with. + +#: Insert selected path + +# map kitty_mod+p>f kitten hints --type path --program - + +#:: Select a path/filename and insert it into the terminal. Useful, +#:: for instance to run git commands on a filename output from a +#:: previous git command. + +#: Open selected path + +# map kitty_mod+p>shift+f kitten hints --type path + +#:: Select a path/filename and open it with the default open program. + +#: Insert selected line + +# map kitty_mod+p>l kitten hints --type line --program - + +#:: Select a line of text and insert it into the terminal. Useful for +#:: the output of things like: `ls -1`. + +#: Insert selected word + +# map kitty_mod+p>w kitten hints --type word --program - + +#:: Select words and insert into terminal. + +#: Insert selected hash + +# map kitty_mod+p>h kitten hints --type hash --program - + +#:: Select something that looks like a hash and insert it into the +#:: terminal. Useful with git, which uses SHA1 hashes to identify +#:: commits. + +#: Open the selected file at the selected line + +# map kitty_mod+p>n kitten hints --type linenum + +#:: Select something that looks like filename:linenum and open it in +#:: your default editor at the specified line number. + +#: Open the selected hyperlink + +# map kitty_mod+p>y kitten hints --type hyperlink + +#:: Select a hyperlink (i.e. a URL that has been marked as such by +#:: the terminal program, for example, by `ls --hyperlink=auto`). + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see hints kitten +#: . +#: }}} + +#: Miscellaneous {{{ + +#: Show documentation + +# map kitty_mod+f1 show_kitty_doc overview + +#: Toggle fullscreen + +# map kitty_mod+f11 toggle_fullscreen +# map ctrl+cmd+f toggle_fullscreen + +#: Toggle maximized + +# map kitty_mod+f10 toggle_maximized + +#: Toggle macOS secure keyboard entry + +# map opt+cmd+s toggle_macos_secure_keyboard_entry + +#: Unicode input + +# map kitty_mod+u kitten unicode_input +# map ctrl+cmd+space kitten unicode_input + +#: Edit config file + +# map kitty_mod+f2 edit_config_file +# map cmd+, edit_config_file + +#: Open the kitty command shell + +# map kitty_mod+escape kitty_shell window + +#:: Open the kitty shell in a new window / tab / overlay / os_window +#:: to control kitty using commands. + +#: Increase background opacity + +# map kitty_mod+a>m set_background_opacity +0.1 + +#: Decrease background opacity + +# map kitty_mod+a>l set_background_opacity -0.1 + +#: Make background fully opaque + +# map kitty_mod+a>1 set_background_opacity 1 + +#: Reset background opacity + +# map kitty_mod+a>d set_background_opacity default + +#: Reset the terminal + +# map kitty_mod+delete clear_terminal reset active +# map opt+cmd+r clear_terminal reset active + +#:: You can create shortcuts to clear/reset the terminal. For +#:: example:: + +#:: # Reset the terminal +#:: map f1 clear_terminal reset active +#:: # Clear the terminal screen by erasing all contents +#:: map f1 clear_terminal clear active +#:: # Clear the terminal scrollback by erasing it +#:: map f1 clear_terminal scrollback active +#:: # Scroll the contents of the screen into the scrollback +#:: map f1 clear_terminal scroll active +#:: # Clear everything on screen up to the line with the cursor or the start of the current prompt (needs shell integration) +#:: map f1 clear_terminal to_cursor active +#:: # Same as above except cleared lines are moved into scrollback +#:: map f1 clear_terminal to_cursor_scroll active + +#:: If you want to operate on all kitty windows instead of just the +#:: current one, use all instead of active. + +#:: Some useful functions that can be defined in the shell rc files +#:: to perform various kinds of clearing of the current window: + +#:: .. code-block:: sh + +#:: clear-only-screen() { +#:: printf "\e[H\e[2J" +#:: } + +#:: clear-screen-and-scrollback() { +#:: printf "\e[H\e[3J" +#:: } + +#:: clear-screen-saving-contents-in-scrollback() { +#:: printf "\e[H\e[22J" +#:: } + +#:: For instance, using these escape codes, it is possible to remap +#:: Ctrl+L to both scroll the current screen contents into the +#:: scrollback buffer and clear the screen, instead of just clearing +#:: the screen. For ZSH, in ~/.zshrc, add: + +#:: .. code-block:: zsh + +#:: ctrl_l() { +#:: builtin print -rn -- $'\r\e[0J\e[H\e[22J' >"$TTY" +#:: builtin zle .reset-prompt +#:: builtin zle -R +#:: } +#:: zle -N ctrl_l +#:: bindkey '^l' ctrl_l + +#:: Alternatively, you can just add map ctrl+l clear_terminal +#:: to_cursor_scroll active to kitty.conf which works with no changes +#:: to the shell rc files, but only clears up to the prompt, it does +#:: not clear anytext at the prompt itself. + +#: Clear up to cursor line + +# map cmd+k clear_terminal to_cursor active + +#: Reload kitty.conf + +# map kitty_mod+f5 load_config_file +# map ctrl+cmd+, load_config_file + +#:: Reload kitty.conf, applying any changes since the last time it +#:: was loaded. Note that a handful of options cannot be dynamically +#:: changed and require a full restart of kitty. Particularly, when +#:: changing shortcuts for actions located on the macOS global menu +#:: bar, a full restart is needed. You can also map a keybinding to +#:: load a different config file, for example:: + +#:: map f5 load_config /path/to/alternative/kitty.conf + +#:: Note that all options from the original kitty.conf are discarded, +#:: in other words the new configuration *replace* the old ones. + +#: Debug kitty configuration + +# map kitty_mod+f6 debug_config +# map opt+cmd+, debug_config + +#:: Show details about exactly what configuration kitty is running +#:: with and its host environment. Useful for debugging issues. + +#: Send arbitrary text on key presses + +#:: E.g. map ctrl+shift+alt+h send_text all Hello World + +#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#:: client program when pressing specified shortcut keys. For +#:: example:: + +#:: map ctrl+alt+a send_text all Special text + +#:: This will send "Special text" when you press the Ctrl+Alt+A key +#:: combination. The text to be sent decodes ANSI C escapes +#:: so you can use escapes like \e to send control +#:: codes or \u21fb to send Unicode characters (or you can just input +#:: the Unicode characters directly as UTF-8 text). You can use +#:: `kitten show-key` to get the key escape codes you want to +#:: emulate. + +#:: The first argument to send_text is the keyboard modes in which to +#:: activate the shortcut. The possible values are normal, +#:: application, kitty or a comma separated combination of them. The +#:: modes normal and application refer to the DECCKM cursor key mode +#:: for terminals, and kitty refers to the kitty extended keyboard +#:: protocol. The special value all means all of them. + +#:: Some more examples:: + +#:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) +#:: map ctrl+alt+a send_text normal Word\e[H +#:: map ctrl+alt+a send_text application Word\eOH +#:: # Run a command at a shell prompt (like typing the command and pressing Enter) +#:: map ctrl+alt+a send_text normal,application some command with arguments\r + +#: Open kitty Website + +# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ + +#: Hide macOS kitty application + +# map cmd+h hide_macos_app + +#: Hide macOS other applications + +# map opt+cmd+h hide_macos_other_apps + +#: Minimize macOS window + +# map cmd+m minimize_macos_window + +#: Quit kitty + +# map cmd+q quit + +#: }}} + +#: }}} + + diff --git a/kitty/files/kitty.conf.bak b/kitty/files/kitty.conf.bak new file mode 100644 index 0000000..7045b5b --- /dev/null +++ b/kitty/files/kitty.conf.bak @@ -0,0 +1,2653 @@ +# vim:fileencoding=utf-8:foldmethod=marker + +# BEGIN_KITTY_THEME +# Catppuccin-Macchiato +include current-theme.conf +# END_KITTY_THEME + +#: Fonts {{{ + +#: kitty has very powerful font management. You can configure +#: individual font faces and even specify special fonts for particular +#: characters. +# font_family Ubuntu + +# bold_font auto +# italic_font auto +# bold_italic_font auto + +#: You can specify different fonts for the bold/italic/bold-italic +#: variants. The easiest way to select fonts is to run the `kitten +#: choose-fonts` command which will present a nice UI for you to +#: select the fonts you want with previews and support for selecting +#: variable fonts and font features. If you want to learn to select +#: fonts manually, read the font specification syntax +#: . + +# font_size 11.0 + +#: Font size (in pts). + +# force_ltr no + +#: kitty does not support BIDI (bidirectional text), however, for RTL +#: scripts, words are automatically displayed in RTL. That is to say, +#: in an RTL script, the words "HELLO WORLD" display in kitty as +#: "WORLD HELLO", and if you try to select a substring of an RTL- +#: shaped string, you will get the character that would be there had +#: the string been LTR. For example, assuming the Hebrew word ירושלים, +#: selecting the character that on the screen appears to be ם actually +#: writes into the selection buffer the character י. kitty's default +#: behavior is useful in conjunction with a filter to reverse the word +#: order, however, if you wish to manipulate RTL glyphs, it can be +#: very challenging to work with, so this option is provided to turn +#: it off. Furthermore, this option can be used with the command line +#: program GNU FriBidi +#: to get BIDI support, because it will force kitty to always treat +#: the text as LTR, which FriBidi expects for terminals. + +# symbol_map + +#: E.g. symbol_map U+E0A0-U+E0A3,U+E0C0-U+E0C7 PowerlineSymbols + +#: Map the specified Unicode codepoints to a particular font. Useful +#: if you need special rendering for some symbols, such as for +#: Powerline. Avoids the need for patched fonts. Each Unicode code +#: point is specified in the form `U+`. You +#: can specify multiple code points, separated by commas and ranges +#: separated by hyphens. This option can be specified multiple times. +#: The syntax is:: + +#: symbol_map codepoints Font Family Name + +# narrow_symbols + +#: E.g. narrow_symbols U+E0A0-U+E0A3,U+E0C0-U+E0C7 1 + +#: Usually, for Private Use Unicode characters and some symbol/dingbat +#: characters, if the character is followed by one or more spaces, +#: kitty will use those extra cells to render the character larger, if +#: the character in the font has a wide aspect ratio. Using this +#: option you can force kitty to restrict the specified code points to +#: render in the specified number of cells (defaulting to one cell). +#: This option can be specified multiple times. The syntax is:: + +#: narrow_symbols codepoints [optionally the number of cells] + +# disable_ligatures never + +#: Choose how you want to handle multi-character ligatures. The +#: default is to always render them. You can tell kitty to not render +#: them when the cursor is over them by using cursor to make editing +#: easier, or have kitty never render them at all by using always, if +#: you don't like them. The ligature strategy can be set per-window +#: either using the kitty remote control facility or by defining +#: shortcuts for it in kitty.conf, for example:: + +#: map alt+1 disable_ligatures_in active always +#: map alt+2 disable_ligatures_in all never +#: map alt+3 disable_ligatures_in tab cursor + +#: Note that this refers to programming ligatures, typically +#: implemented using the calt OpenType feature. For disabling general +#: ligatures, use the font_features option. + +# font_features + +#: E.g. font_features none + +#: Choose exactly which OpenType features to enable or disable. Note +#: that for the main fonts, features can be specified when selecting +#: the font using the choose-fonts kitten. This setting is useful for +#: fallback fonts. + +#: Some fonts might have features worthwhile in a terminal. For +#: example, Fira Code includes a discretionary feature, zero, which in +#: that font changes the appearance of the zero (0), to make it more +#: easily distinguishable from Ø. Fira Code also includes other +#: discretionary features known as Stylistic Sets which have the tags +#: ss01 through ss20. + +#: For the exact syntax to use for individual features, see the +#: HarfBuzz documentation . + +#: Note that this code is indexed by PostScript name, and not the font +#: family. This allows you to define very precise feature settings; +#: e.g. you can disable a feature in the italic font but not in the +#: regular font. + +#: On Linux, font features are first read from the FontConfig database +#: and then this option is applied, so they can be configured in a +#: single, central place. + +#: To get the PostScript name for a font, use the `fc-scan file.ttf` +#: command on Linux or the `Font Book tool on macOS +#: `__. + +#: Enable alternate zero and oldstyle numerals:: + +#: font_features FiraCode-Retina +zero +onum + +#: Enable only alternate zero in the bold font:: + +#: font_features FiraCode-Bold +zero + +#: Disable the normal ligatures, but keep the calt feature which (in +#: this font) breaks up monotony:: + +#: font_features TT2020StyleB-Regular -liga +calt + +#: In conjunction with force_ltr, you may want to disable Arabic +#: shaping entirely, and only look at their isolated forms if they +#: show up in a document. You can do this with e.g.:: + +#: font_features UnifontMedium +isol -medi -fina -init + +# modify_font + +#: Modify font characteristics such as the position or thickness of +#: the underline and strikethrough. The modifications can have the +#: suffix px for pixels or % for percentage of original value. No +#: suffix means use pts. For example:: + +#: modify_font underline_position -2 +#: modify_font underline_thickness 150% +#: modify_font strikethrough_position 2px + +#: Additionally, you can modify the size of the cell in which each +#: font glyph is rendered and the baseline at which the glyph is +#: placed in the cell. For example:: + +#: modify_font cell_width 80% +#: modify_font cell_height -2px +#: modify_font baseline 3 + +#: Note that modifying the baseline will automatically adjust the +#: underline and strikethrough positions by the same amount. +#: Increasing the baseline raises glyphs inside the cell and +#: decreasing it lowers them. Decreasing the cell size might cause +#: rendering artifacts, so use with care. + +# box_drawing_scale 0.001, 1, 1.5, 2 + +#: The sizes of the lines used for the box drawing Unicode characters. +#: These values are in pts. They will be scaled by the monitor DPI to +#: arrive at a pixel value. There must be four values corresponding to +#: thin, normal, thick, and very thick lines. + +# undercurl_style thin-sparse + +#: The style with which undercurls are rendered. This option takes the +#: form (thin|thick)-(sparse|dense). Thin and thick control the +#: thickness of the undercurl. Sparse and dense control how often the +#: curl oscillates. With sparse the curl will peak once per character, +#: with dense twice. + +# text_composition_strategy platform + +#: Control how kitty composites text glyphs onto the background color. +#: The default value of platform tries for text rendering as close to +#: "native" for the platform kitty is running on as possible. + +#: A value of legacy uses the old (pre kitty 0.28) strategy for how +#: glyphs are composited. This will make dark text on light +#: backgrounds look thicker and light text on dark backgrounds +#: thinner. It might also make some text appear like the strokes are +#: uneven. + +#: You can fine tune the actual contrast curve used for glyph +#: composition by specifying up to two space-separated numbers for +#: this setting. + +#: The first number is the gamma adjustment, which controls the +#: thickness of dark text on light backgrounds. Increasing the value +#: will make text appear thicker. The default value for this is 1.0 on +#: Linux and 1.7 on macOS. Valid values are 0.01 and above. The result +#: is scaled based on the luminance difference between the background +#: and the foreground. Dark text on light backgrounds receives the +#: full impact of the curve while light text on dark backgrounds is +#: affected very little. + +#: The second number is an additional multiplicative contrast. It is +#: percentage ranging from 0 to 100. The default value is 0 on Linux +#: and 30 on macOS. + +#: If you wish to achieve similar looking thickness in light and dark +#: themes, a good way to experiment is start by setting the value to +#: 1.0 0 and use a dark theme. Then adjust the second parameter until +#: it looks good. Then switch to a light theme and adjust the first +#: parameter until the perceived thickness matches the dark theme. + +# text_fg_override_threshold 0 + +#: The minimum accepted difference in luminance between the foreground +#: and background color, below which kitty will override the +#: foreground color. It is percentage ranging from 0 to 100. If the +#: difference in luminance of the foreground and background is below +#: this threshold, the foreground color will be set to white if the +#: background is dark or black if the background is light. The default +#: value is 0, which means no overriding is performed. Useful when +#: working with applications that use colors that do not contrast well +#: with your preferred color scheme. + +#: WARNING: Some programs use characters (such as block characters) +#: for graphics display and may expect to be able to set the +#: foreground and background to the same color (or similar colors). +#: If you see unexpected stripes, dots, lines, incorrect color, no +#: color where you expect color, or any kind of graphic display +#: problem try setting text_fg_override_threshold to 0 to see if this +#: is the cause of the problem. + +#: }}} + +#: Text cursor customization {{{ + +# cursor #cccccc + +#: Default text cursor color. If set to the special value none the +#: cursor will be rendered with a "reverse video" effect. Its color +#: will be the color of the text in the cell it is over and the text +#: will be rendered with the background color of the cell. Note that +#: if the program running in the terminal sets a cursor color, this +#: takes precedence. Also, the cursor colors are modified if the cell +#: background and foreground colors have very low contrast. Note that +#: some themes set this value, so if you want to override it, place +#: your value after the lines where the theme file is included. + +# cursor_text_color #111111 + +#: The color of text under the cursor. If you want it rendered with +#: the background color of the cell underneath instead, use the +#: special keyword: `background`. Note that if cursor is set to none +#: then this option is ignored. Note that some themes set this value, +#: so if you want to override it, place your value after the lines +#: where the theme file is included. + +# cursor_shape block + +#: The cursor shape can be one of block, beam, underline. Note that +#: when reloading the config this will be changed only if the cursor +#: shape has not been set by the program running in the terminal. This +#: sets the default cursor shape, applications running in the terminal +#: can override it. In particular, shell integration +#: in kitty sets +#: the cursor shape to beam at shell prompts. You can avoid this by +#: setting shell_integration to no-cursor. + +# cursor_shape_unfocused hollow + +#: Defines the text cursor shape when the OS window is not focused. +#: The unfocused cursor shape can be one of block, beam, underline, +#: hollow and unchanged (leave the cursor shape as it is). + +# cursor_beam_thickness 1.5 + +#: The thickness of the beam cursor (in pts). + +# cursor_underline_thickness 2.0 + +#: The thickness of the underline cursor (in pts). + +# cursor_blink_interval -1 + +#: The interval to blink the cursor (in seconds). Set to zero to +#: disable blinking. Negative values mean use system default. Note +#: that the minimum interval will be limited to repaint_delay. You can +#: also animate the cursor blink by specifying an easing function. For +#: example, setting this to option to 0.5 ease-in-out will cause the +#: cursor blink to be animated over a second, in the first half of the +#: second it will go from opaque to transparent and then back again +#: over the next half. You can specify different easing functions for +#: the two halves, for example: -1 linear ease-out. kitty supports all +#: the CSS easing functions . Note that turning on animations +#: uses extra power as it means the screen is redrawn multiple times +#: per blink interval. See also, cursor_stop_blinking_after. + +# cursor_stop_blinking_after 15.0 + +#: Stop blinking cursor after the specified number of seconds of +#: keyboard inactivity. Set to zero to never stop blinking. + +# cursor_trail 0 + +#: Set this to a value larger than zero to enable a "cursor trail" +#: animation. This is an animation that shows a "trail" following the +#: movement of the text cursor. It makes it easy to follow large +#: cursor jumps and makes for a cool visual effect of the cursor +#: zooming around the screen. The actual value of this option controls +#: when the animation is trigerred. It is a number of milliseconds. +#: The trail animation only follows cursors that have stayed in their +#: position for longer than the specified number of milliseconds. This +#: prevents trails from appearing for cursors that rapidly change +#: their positions during UI updates in complex applications. See +#: cursor_trail_decay to control the animation speed and +#: cursor_trail_start_threshold to control when a cursor trail is +#: started. + +# cursor_trail_decay 0.1 0.4 + +#: Controls the decay times for the cursor trail effect when the +#: cursor_trail is enabled. This option accepts two positive float +#: values specifying the fastest and slowest decay times in seconds. +#: The first value corresponds to the fastest decay time (minimum), +#: and the second value corresponds to the slowest decay time +#: (maximum). The second value must be equal to or greater than the +#: first value. Smaller values result in a faster decay of the cursor +#: trail. Adjust these values to control how quickly the cursor trail +#: fades away. + +# cursor_trail_start_threshold 2 + +#: Set the distance threshold for starting the cursor trail. This +#: option accepts a positive integer value that represents the minimum +#: number of cells the cursor must move before the trail is started. +#: When the cursor moves less than this threshold, the trail is +#: skipped, reducing unnecessary cursor trail animation. + +#: }}} + +#: Scrollback {{{ + +# scrollback_lines 2000 + +#: Number of lines of history to keep in memory for scrolling back. +#: Memory is allocated on demand. Negative numbers are (effectively) +#: infinite scrollback. Note that using very large scrollback is not +#: recommended as it can slow down performance of the terminal and +#: also use large amounts of RAM. Instead, consider using +#: scrollback_pager_history_size. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollback_indicator_opacity 1.0 + +#: The opacity of the scrollback indicator which is a small colored +#: rectangle that moves along the right hand side of the window as you +#: scroll, indicating what fraction you have scrolled. The default is +#: one which means fully opaque, aka visible. Set to a value between +#: zero and one to make the indicator less visible. + +# scrollback_pager less --chop-long-lines --RAW-CONTROL-CHARS +INPUT_LINE_NUMBER + +#: Program with which to view scrollback in a new window. The +#: scrollback buffer is passed as STDIN to this program. If you change +#: it, make sure the program you use can handle ANSI escape sequences +#: for colors and text formatting. INPUT_LINE_NUMBER in the command +#: line above will be replaced by an integer representing which line +#: should be at the top of the screen. Similarly CURSOR_LINE and +#: CURSOR_COLUMN will be replaced by the current cursor position or +#: set to 0 if there is no cursor, for example, when showing the last +#: command output. + +# scrollback_pager_history_size 0 + +#: Separate scrollback history size (in MB), used only for browsing +#: the scrollback buffer with pager. This separate buffer is not +#: available for interactive scrolling but will be piped to the pager +#: program when viewing scrollback buffer in a separate window. The +#: current implementation stores the data in UTF-8, so approximately +#: 10000 lines per megabyte at 100 chars per line, for pure ASCII, +#: unformatted text. A value of zero or less disables this feature. +#: The maximum allowed size is 4GB. Note that on config reload if this +#: is changed it will only affect newly created windows, not existing +#: ones. + +# scrollback_fill_enlarged_window no + +#: Fill new space with lines from the scrollback buffer after +#: enlarging a window. + +# wheel_scroll_multiplier 5.0 + +#: Multiplier for the number of lines scrolled by the mouse wheel. +#: Note that this is only used for low precision scrolling devices, +#: not for high precision scrolling devices on platforms such as macOS +#: and Wayland. Use negative numbers to change scroll direction. See +#: also wheel_scroll_min_lines. + +# wheel_scroll_min_lines 1 + +#: The minimum number of lines scrolled by the mouse wheel. The scroll +#: multiplier wheel_scroll_multiplier only takes effect after it +#: reaches this number. Note that this is only used for low precision +#: scrolling devices like wheel mice that scroll by very small amounts +#: when using the wheel. With a negative number, the minimum number of +#: lines will always be added. + +# touch_scroll_multiplier 1.0 + +#: Multiplier for the number of lines scrolled by a touchpad. Note +#: that this is only used for high precision scrolling devices on +#: platforms such as macOS and Wayland. Use negative numbers to change +#: scroll direction. + +#: }}} + +#: Mouse {{{ + +# mouse_hide_wait 3.0 + +#: Hide mouse cursor after the specified number of seconds of the +#: mouse not being used. Set to zero to disable mouse cursor hiding. +#: Set to a negative value to hide the mouse cursor immediately when +#: typing text. Disabled by default on macOS as getting it to work +#: robustly with the ever-changing sea of bugs that is Cocoa is too +#: much effort. + +# url_color #0087bd +# url_style curly + +#: The color and style for highlighting URLs on mouse-over. url_style +#: can be one of: none, straight, double, curly, dotted, dashed. + +# open_url_with default + +#: The program to open clicked URLs. The special value default will +#: first look for any URL handlers defined via the open_actions +#: facility and if non +#: are found, it will use the Operating System's default URL handler +#: (open on macOS and xdg-open on Linux). + +# url_prefixes file ftp ftps gemini git gopher http https irc ircs kitty mailto news sftp ssh + +#: The set of URL prefixes to look for when detecting a URL under the +#: mouse cursor. + +# detect_urls yes + +#: Detect URLs under the mouse. Detected URLs are highlighted with an +#: underline and the mouse cursor becomes a hand over them. Even if +#: this option is disabled, URLs are still clickable. See also the +#: underline_hyperlinks option to control how hyperlinks (as opposed +#: to plain text URLs) are displayed. + +# url_excluded_characters + +#: Additional characters to be disallowed from URLs, when detecting +#: URLs under the mouse cursor. By default, all characters that are +#: legal in URLs are allowed. Additionally, newlines are allowed (but +#: stripped). This is to accommodate programs such as mutt that add +#: hard line breaks even for continued lines. \n can be added to this +#: option to disable this behavior. Special characters can be +#: specified using backslash escapes, to specify a backslash use a +#: double backslash. + +# show_hyperlink_targets no + +#: When the mouse hovers over a terminal hyperlink, show the actual +#: URL that will be activated when the hyperlink is clicked. + +# underline_hyperlinks hover + +#: Control how hyperlinks are underlined. They can either be +#: underlined on mouse hover, always (i.e. permanently underlined) or +#: never which means that kitty will not apply any underline styling +#: to hyperlinks. Note that the value of always only applies to real +#: (OSC 8) hyperlinks not text that is detected to be a URL on mouse +#: hover. Uses the url_style and url_color settings for the underline +#: style. Note that reloading the config and changing this value +#: to/from always will only affect text subsequently received by +#: kitty. + +# copy_on_select no + +#: Copy to clipboard or a private buffer on select. With this set to +#: clipboard, selecting text with the mouse will cause the text to be +#: copied to clipboard. Useful on platforms such as macOS that do not +#: have the concept of primary selection. You can instead specify a +#: name such as a1 to copy to a private kitty buffer. Map a shortcut +#: with the paste_from_buffer action to paste from this private +#: buffer. For example:: + +#: copy_on_select a1 +#: map shift+cmd+v paste_from_buffer a1 + +#: Note that copying to the clipboard is a security risk, as all +#: programs, including websites open in your browser can read the +#: contents of the system clipboard. + +# paste_actions quote-urls-at-prompt,confirm + +#: A comma separated list of actions to take when pasting text into +#: the terminal. The supported paste actions are: + +#: quote-urls-at-prompt: +#: If the text being pasted is a URL and the cursor is at a shell prompt, +#: automatically quote the URL (needs shell_integration). +#: replace-dangerous-control-codes +#: Replace dangerous control codes from pasted text, without confirmation. +#: replace-newline +#: Replace the newline character from pasted text, without confirmation. +#: confirm: +#: Confirm the paste if the text to be pasted contains any terminal control codes +#: as this can be dangerous, leading to code execution if the shell/program running +#: in the terminal does not properly handle these. +#: confirm-if-large +#: Confirm the paste if it is very large (larger than 16KB) as pasting +#: large amounts of text into shells can be very slow. +#: filter: +#: Run the filter_paste() function from the file paste-actions.py in +#: the kitty config directory on the pasted text. The text returned by the +#: function will be actually pasted. +#: no-op: +#: Has no effect. + +# strip_trailing_spaces never + +#: Remove spaces at the end of lines when copying to clipboard. A +#: value of smart will do it when using normal selections, but not +#: rectangle selections. A value of always will always do it. + +# select_by_word_characters @-./_~?&=%+# + +#: Characters considered part of a word when double clicking. In +#: addition to these characters any character that is marked as an +#: alphanumeric character in the Unicode database will be matched. + +# select_by_word_characters_forward + +#: Characters considered part of a word when extending the selection +#: forward on double clicking. In addition to these characters any +#: character that is marked as an alphanumeric character in the +#: Unicode database will be matched. + +#: If empty (default) select_by_word_characters will be used for both +#: directions. + +# click_interval -1.0 + +#: The interval between successive clicks to detect double/triple +#: clicks (in seconds). Negative numbers will use the system default +#: instead, if available, or fallback to 0.5. + +# focus_follows_mouse no + +#: Set the active window to the window under the mouse when moving the +#: mouse around. On macOS, this will also cause the OS Window under +#: the mouse to be focused automatically when the mouse enters it. + +# pointer_shape_when_grabbed arrow + +#: The shape of the mouse pointer when the program running in the +#: terminal grabs the mouse. + +# default_pointer_shape beam + +#: The default shape of the mouse pointer. + +# pointer_shape_when_dragging beam + +#: The default shape of the mouse pointer when dragging across text. + +#: Mouse actions {{{ + +#: Mouse buttons can be mapped to perform arbitrary actions. The +#: syntax is: + +#: .. code-block:: none + +#: mouse_map button-name event-type modes action + +#: Where button-name is one of left, middle, right, b1 ... b8 with +#: added keyboard modifiers. For example: ctrl+shift+left refers to +#: holding the Ctrl+Shift keys while clicking with the left mouse +#: button. The value b1 ... b8 can be used to refer to up to eight +#: buttons on a mouse. + +#: event-type is one of press, release, doublepress, triplepress, +#: click, doubleclick. modes indicates whether the action is performed +#: when the mouse is grabbed by the program running in the terminal, +#: or not. The values are grabbed or ungrabbed or a comma separated +#: combination of them. grabbed refers to when the program running in +#: the terminal has requested mouse events. Note that the click and +#: double click events have a delay of click_interval to disambiguate +#: from double and triple presses. + +#: You can run kitty with the kitty --debug-input command line option +#: to see mouse events. See the builtin actions below to get a sense +#: of what is possible. + +#: If you want to unmap a button, map it to nothing. For example, to +#: disable opening of URLs with a plain click:: + +#: mouse_map left click ungrabbed + +#: See all the mappable actions including mouse actions here +#: . + +#: .. note:: +#: Once a selection is started, releasing the button that started it will +#: automatically end it and no release event will be dispatched. + +# clear_all_mouse_actions no + +#: Remove all mouse action definitions up to this point. Useful, for +#: instance, to remove the default mouse actions. + +#: Click the link under the mouse or move the cursor + +# mouse_map left click ungrabbed mouse_handle_click selection link prompt + +#:: First check for a selection and if one exists do nothing. Then +#:: check for a link under the mouse cursor and if one exists, click +#:: it. Finally check if the click happened at the current shell +#:: prompt and if so, move the cursor to the click location. Note +#:: that this requires shell integration +#:: to work. + +#: Click the link under the mouse or move the cursor even when grabbed + +# mouse_map shift+left click grabbed,ungrabbed mouse_handle_click selection link prompt + +#:: Same as above, except that the action is performed even when the +#:: mouse is grabbed by the program running in the terminal. + +#: Click the link under the mouse cursor + +# mouse_map ctrl+shift+left release grabbed,ungrabbed mouse_handle_click link + +#:: Variant with Ctrl+Shift is present because the simple click based +#:: version has an unavoidable delay of click_interval, to +#:: disambiguate clicks from double clicks. + +#: Discard press event for link click + +# mouse_map ctrl+shift+left press grabbed discard_event + +#:: Prevent this press event from being sent to the program that has +#:: grabbed the mouse, as the corresponding release event is used to +#:: open a URL. + +#: Paste from the primary selection + +# mouse_map middle release ungrabbed paste_from_selection + +#: Start selecting text + +# mouse_map left press ungrabbed mouse_selection normal + +#: Start selecting text in a rectangle + +# mouse_map ctrl+alt+left press ungrabbed mouse_selection rectangle + +#: Select a word + +# mouse_map left doublepress ungrabbed mouse_selection word + +#: Select a line + +# mouse_map left triplepress ungrabbed mouse_selection line + +#: Select line from point + +# mouse_map ctrl+alt+left triplepress ungrabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line. If you +#:: would like to select the word at the point and then extend to the +#:: rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection + +# mouse_map right press ungrabbed mouse_selection extend + +#:: If you want only the end of the selection to be moved instead of +#:: the nearest boundary, use move-end instead of extend. + +#: Paste from the primary selection even when grabbed + +# mouse_map shift+middle release ungrabbed,grabbed paste_selection +# mouse_map shift+middle press grabbed discard_event + +#: Start selecting text even when grabbed + +# mouse_map shift+left press ungrabbed,grabbed mouse_selection normal + +#: Start selecting text in a rectangle even when grabbed + +# mouse_map ctrl+shift+alt+left press ungrabbed,grabbed mouse_selection rectangle + +#: Select a word even when grabbed + +# mouse_map shift+left doublepress ungrabbed,grabbed mouse_selection word + +#: Select a line even when grabbed + +# mouse_map shift+left triplepress ungrabbed,grabbed mouse_selection line + +#: Select line from point even when grabbed + +# mouse_map ctrl+shift+alt+left triplepress ungrabbed,grabbed mouse_selection line_from_point + +#:: Select from the clicked point to the end of the line even when +#:: grabbed. If you would like to select the word at the point and +#:: then extend to the rest of the line, change `line_from_point` to +#:: `word_and_line_from_point`. + +#: Extend the current selection even when grabbed + +# mouse_map shift+right press ungrabbed,grabbed mouse_selection extend + +#: Show clicked command output in pager + +# mouse_map ctrl+shift+right press ungrabbed mouse_show_command_output + +#:: Requires shell integration +#:: to work. + +#: }}} + +#: }}} + +#: Performance tuning {{{ + +# repaint_delay 10 + +#: Delay between screen updates (in milliseconds). Decreasing it, +#: increases frames-per-second (FPS) at the cost of more CPU usage. +#: The default value yields ~100 FPS which is more than sufficient for +#: most uses. Note that to actually achieve 100 FPS, you have to +#: either set sync_to_monitor to no or use a monitor with a high +#: refresh rate. Also, to minimize latency when there is pending input +#: to be processed, this option is ignored. + +# input_delay 3 + +#: Delay before input from the program running in the terminal is +#: processed (in milliseconds). Note that decreasing it will increase +#: responsiveness, but also increase CPU usage and might cause flicker +#: in full screen programs that redraw the entire screen on each loop, +#: because kitty is so fast that partial screen updates will be drawn. +#: This setting is ignored when the input buffer is almost full. + +# sync_to_monitor yes + +#: Sync screen updates to the refresh rate of the monitor. This +#: prevents screen tearing +#: when scrolling. +#: However, it limits the rendering speed to the refresh rate of your +#: monitor. With a very high speed mouse/high keyboard repeat rate, +#: you may notice some slight input latency. If so, set this to no. + +#: }}} + +#: Terminal bell {{{ + +# enable_audio_bell yes + +#: The audio bell. Useful to disable it in environments that require +#: silence. + +# visual_bell_duration 0.0 + +#: The visual bell duration (in seconds). Flash the screen when a bell +#: occurs for the specified number of seconds. Set to zero to disable. +#: The flash is animated, fading in and out over the specified +#: duration. The easing function used for the fading can be +#: controlled. For example, 2.0 linear will casuse the flash to fade +#: in and out linearly. The default if unspecified is to use ease-in- +#: out which fades slowly at the start, middle and end. You can +#: specify different easing functions for the fade-in and fade-out +#: parts, like this: 2.0 ease-in linear. kitty supports all the CSS +#: easing functions . + +# visual_bell_color none + +#: The color used by visual bell. Set to none will fall back to +#: selection background color. If you feel that the visual bell is too +#: bright, you can set it to a darker color. + +# window_alert_on_bell yes + +#: Request window attention on bell. Makes the dock icon bounce on +#: macOS or the taskbar flash on Linux. + +# bell_on_tab "🔔 " + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has a bell. If you want to use leading +#: or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +#: For backwards compatibility, values of yes, y and true are +#: converted to the default bell symbol and no, n, false and none are +#: converted to the empty string. + +# command_on_bell none + +#: Program to run when a bell occurs. The environment variable +#: KITTY_CHILD_CMDLINE can be used to get the program running in the +#: window in which the bell occurred. + +# bell_path none + +#: Path to a sound file to play as the bell sound. If set to none, the +#: system default bell sound is used. Must be in a format supported by +#: the operating systems sound API, such as WAV or OGA on Linux +#: (libcanberra) or AIFF, MP3 or WAV on macOS (NSSound). + +# linux_bell_theme __custom + +#: The XDG Sound Theme kitty will use to play the bell sound. Defaults +#: to the custom theme name specified in the XDG Sound theme +#: specification , falling back to the default +#: freedesktop theme if it does not exist. To change your sound theme +#: desktop wide, create +#: :file:~/.local/share/sounds/__custom/index.theme` with the +#: contents: + +#: [Sound Theme] + +#: Inherits=name-of-the-sound-theme-you-want-to-use + +#: Replace name-of-the-sound-theme-you-want-to-use with the actual +#: theme name. Now all compliant applications should use sounds from +#: this theme. + +#: }}} + +#: Window layout {{{ + +# remember_window_size yes +# initial_window_width 640 +# initial_window_height 400 + +#: If enabled, the OS Window size will be remembered so that new +#: instances of kitty will have the same size as the previous +#: instance. If disabled, the OS Window will initially have size +#: configured by initial_window_width/height, in pixels. You can use a +#: suffix of "c" on the width/height values to have them interpreted +#: as number of cells instead of pixels. + +# enabled_layouts * + +#: The enabled window layouts. A comma separated list of layout names. +#: The special value all means all layouts. The first listed layout +#: will be used as the startup layout. Default configuration is all +#: layouts in alphabetical order. For a list of available layouts, see +#: the layouts . + +# window_resize_step_cells 2 +# window_resize_step_lines 2 + +#: The step size (in units of cell width/cell height) to use when +#: resizing kitty windows in a layout with the shortcut +#: start_resizing_window. The cells value is used for horizontal +#: resizing, and the lines value is used for vertical resizing. + +# window_border_width 0.5pt + +#: The width of window borders. Can be either in pixels (px) or pts +#: (pt). Values in pts will be rounded to the nearest number of pixels +#: based on screen resolution. If not specified, the unit is assumed +#: to be pts. Note that borders are displayed only when more than one +#: window is visible. They are meant to separate multiple windows. + +# draw_minimal_borders yes + +#: Draw only the minimum borders needed. This means that only the +#: borders that separate the window from a neighbor are drawn. Note +#: that setting a non-zero window_margin_width overrides this and +#: causes all borders to be drawn. + +# window_margin_width 0 + +#: The window margin (in pts) (blank area outside the border). A +#: single value sets all four sides. Two values set the vertical and +#: horizontal sides. Three values set top, horizontal and bottom. Four +#: values set top, right, bottom and left. + +# single_window_margin_width -1 + +#: The window margin to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_margin_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# window_padding_width 0 + +#: The window padding (in pts) (blank area between the text and the +#: window border). A single value sets all four sides. Two values set +#: the vertical and horizontal sides. Three values set top, horizontal +#: and bottom. Four values set top, right, bottom and left. + +# single_window_padding_width -1 + +#: The window padding to use when only a single window is visible (in +#: pts). Negative values will cause the value of window_padding_width +#: to be used instead. A single value sets all four sides. Two values +#: set the vertical and horizontal sides. Three values set top, +#: horizontal and bottom. Four values set top, right, bottom and left. + +# placement_strategy center + +#: When the window size is not an exact multiple of the cell size, the +#: cell area of the terminal window will have some extra padding on +#: the sides. You can control how that padding is distributed with +#: this option. Using a value of center means the cell area will be +#: placed centrally. A value of top-left means the padding will be +#: only at the bottom and right edges. The value can be one of: top- +#: left, top, top-right, left, center, right, bottom-left, bottom, +#: bottom-right. + +# active_border_color #00ff00 + +#: The color for the border of the active window. Set this to none to +#: not draw borders around the active window. + +# inactive_border_color #cccccc + +#: The color for the border of inactive windows. + +# bell_border_color #ff5a00 + +#: The color for the border of inactive windows in which a bell has +#: occurred. + +# inactive_text_alpha 1.0 + +#: Fade the text in inactive windows by the specified amount (a number +#: between zero and one, with zero being fully faded). + +# hide_window_decorations no + +#: Hide the window decorations (title-bar and window borders) with +#: yes. On macOS, titlebar-only and titlebar-and-corners can be used +#: to only hide the titlebar and the rounded corners. Whether this +#: works and exactly what effect it has depends on the window +#: manager/operating system. Note that the effects of changing this +#: option when reloading config are undefined. When using titlebar- +#: only, it is useful to also set window_margin_width and +#: placement_strategy to prevent the rounded corners from clipping +#: text. Or use titlebar-and-corners. + +# window_logo_path none + +#: Path to a logo image. Must be in PNG/JPEG/WEBP/GIF/TIFF/BMP format. +#: Relative paths are interpreted relative to the kitty config +#: directory. The logo is displayed in a corner of every kitty window. +#: The position is controlled by window_logo_position. Individual +#: windows can be configured to have different logos either using the +#: launch action or the remote control +#: facility. + +# window_logo_position bottom-right + +#: Where to position the window logo in the window. The value can be +#: one of: top-left, top, top-right, left, center, right, bottom-left, +#: bottom, bottom-right. + +# window_logo_alpha 0.5 + +#: The amount the logo should be faded into the background. With zero +#: being fully faded and one being fully opaque. + +# window_logo_scale 0 + +#: The percentage (0-100] of the window size to which the logo should +#: scale. Using a single number means the logo is scaled to that +#: percentage of the shortest window dimension, while preseving aspect +#: ratio of the logo image. + +#: Using two numbers means the width and height of the logo are scaled +#: to the respective percentage of the window's width and height. + +#: Using zero as the percentage disables scaling in that dimension. A +#: single zero (the default) disables all scaling of the window logo. + +# resize_debounce_time 0.1 0.5 + +#: The time to wait (in seconds) before asking the program running in +#: kitty to resize and redraw the screen during a live resize of the +#: OS window, when no new resize events have been received, i.e. when +#: resizing is either paused or finished. On platforms such as macOS, +#: where the operating system sends events corresponding to the start +#: and end of a live resize, the second number is used for redraw- +#: after-pause since kitty can distinguish between a pause and end of +#: resizing. On such systems the first number is ignored and redraw is +#: immediate after end of resize. On other systems only the first +#: number is used so that kitty is "ready" quickly after the end of +#: resizing, while not also continuously redrawing, to save energy. + +# resize_in_steps no + +#: Resize the OS window in steps as large as the cells, instead of +#: with the usual pixel accuracy. Combined with initial_window_width +#: and initial_window_height in number of cells, this option can be +#: used to keep the margins as small as possible when resizing the OS +#: window. Note that this does not currently work on Wayland. + +# visual_window_select_characters 1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ + +#: The list of characters for visual window selection. For example, +#: for selecting a window to focus on with focus_visible_window. The +#: value should be a series of unique numbers or alphabets, case +#: insensitive, from the set 0-9A-Z\-=[];',./\\`. Specify your +#: preference as a string of characters. + +# confirm_os_window_close -1 + +#: Ask for confirmation when closing an OS window or a tab with at +#: least this number of kitty windows in it by window manager (e.g. +#: clicking the window close button or pressing the operating system +#: shortcut to close windows) or by the close_tab action. A value of +#: zero disables confirmation. This confirmation also applies to +#: requests to quit the entire application (all OS windows, via the +#: quit action). Negative values are converted to positive ones, +#: however, with shell_integration enabled, using negative values +#: means windows sitting at a shell prompt are not counted, only +#: windows where some command is currently running. Note that if you +#: want confirmation when closing individual windows, you can map the +#: close_window_with_confirmation action. + +#: }}} + +#: Tab bar {{{ + +# tab_bar_edge bottom + +#: The edge to show the tab bar on, top or bottom. + +# tab_bar_margin_width 0.0 + +#: The margin to the left and right of the tab bar (in pts). + +# tab_bar_margin_height 0.0 0.0 + +#: The margin above and below the tab bar (in pts). The first number +#: is the margin between the edge of the OS Window and the tab bar. +#: The second number is the margin between the tab bar and the +#: contents of the current tab. + +# tab_bar_style fade + +#: The tab bar style, can be one of: + +#: fade +#: Each tab's edges fade into the background color. (See also tab_fade) +#: slant +#: Tabs look like the tabs in a physical file. +#: separator +#: Tabs are separated by a configurable separator. (See also +#: tab_separator) +#: powerline +#: Tabs are shown as a continuous line with "fancy" separators. +#: (See also tab_powerline_style) +#: custom +#: A user-supplied Python function called draw_tab is loaded from the file +#: tab_bar.py in the kitty config directory. For examples of how to +#: write such a function, see the functions named draw_tab_with_* in +#: kitty's source code: kitty/tab_bar.py. See also +#: this discussion +#: for examples from kitty users. +#: hidden +#: The tab bar is hidden. If you use this, you might want to create +#: a mapping for the select_tab action which presents you with a list of +#: tabs and allows for easy switching to a tab. + +# tab_bar_align left + +#: The horizontal alignment of the tab bar, can be one of: left, +#: center, right. + +# tab_bar_min_tabs 2 + +#: The minimum number of tabs that must exist before the tab bar is +#: shown. + +# tab_switch_strategy previous + +#: The algorithm to use when switching to a tab when the current tab +#: is closed. The default of previous will switch to the last used +#: tab. A value of left will switch to the tab to the left of the +#: closed tab. A value of right will switch to the tab to the right of +#: the closed tab. A value of last will switch to the right-most tab. + +# tab_fade 0.25 0.5 0.75 1 + +#: Control how each tab fades into the background when using fade for +#: the tab_bar_style. Each number is an alpha (between zero and one) +#: that controls how much the corresponding cell fades into the +#: background, with zero being no fade and one being full fade. You +#: can change the number of cells used by adding/removing entries to +#: this list. + +# tab_separator " ┇" + +#: The separator between tabs in the tab bar when using separator as +#: the tab_bar_style. + +# tab_powerline_style angled + +#: The powerline separator style between tabs in the tab bar when +#: using powerline as the tab_bar_style, can be one of: angled, +#: slanted, round. + +# tab_activity_symbol none + +#: Some text or a Unicode symbol to show on the tab if a window in the +#: tab that does not have focus has some activity. If you want to use +#: leading or trailing spaces, surround the text with quotes. See +#: tab_title_template for how this is rendered. + +# tab_title_max_length 0 + +#: The maximum number of cells that can be used to render the text in +#: a tab. A value of zero means that no limit is applied. + +# tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title}" + +#: A template to render the tab title. The default just renders the +#: title with optional symbols for bell and activity. If you wish to +#: include the tab-index as well, use something like: {index}:{title}. +#: Useful if you have shortcuts mapped for goto_tab N. If you prefer +#: to see the index as a superscript, use {sup.index}. All data +#: available is: + +#: title +#: The current tab title. +#: index +#: The tab index usable with goto_tab N goto_tab shortcuts. +#: layout_name +#: The current layout name. +#: num_windows +#: The number of windows in the tab. +#: num_window_groups +#: The number of window groups (a window group is a window and all of its overlay windows) in the tab. +#: tab.active_wd +#: The working directory of the currently active window in the tab +#: (expensive, requires syscall). Use active_oldest_wd to get +#: the directory of the oldest foreground process rather than the newest. +#: tab.active_exe +#: The name of the executable running in the foreground of the currently +#: active window in the tab (expensive, requires syscall). Use +#: active_oldest_exe for the oldest foreground process. +#: max_title_length +#: The maximum title length available. +#: keyboard_mode +#: The name of the current keyboard mode or the empty string if no keyboard mode is active. + +#: Note that formatting is done by Python's string formatting +#: machinery, so you can use, for instance, {layout_name[:2].upper()} +#: to show only the first two letters of the layout name, upper-cased. +#: If you want to style the text, you can use styling directives, for +#: example: +#: `{fmt.fg.red}red{fmt.fg.tab}normal{fmt.bg._00FF00}greenbg{fmt.bg.tab}`. +#: Similarly, for bold and italic: +#: `{fmt.bold}bold{fmt.nobold}normal{fmt.italic}italic{fmt.noitalic}`. +#: The 256 eight terminal colors can be used as `fmt.fg.color0` +#: through `fmt.fg.color255`. Note that for backward compatibility, if +#: {bell_symbol} or {activity_symbol} are not present in the template, +#: they are prepended to it. + +# active_tab_title_template none + +#: Template to use for active tabs. If not specified falls back to +#: tab_title_template. + +# active_tab_foreground #000 +# active_tab_background #eee +# active_tab_font_style bold-italic +# inactive_tab_foreground #444 +# inactive_tab_background #999 +# inactive_tab_font_style normal + +#: Tab bar colors and styles. + +# tab_bar_background none + +#: Background color for the tab bar. Defaults to using the terminal +#: background color. + +# tab_bar_margin_color none + +#: Color for the tab bar margin area. Defaults to using the terminal +#: background color for margins above and below the tab bar. For side +#: margins the default color is chosen to match the background color +#: of the neighboring tab. + +#: }}} + +#: Color scheme {{{ + +# foreground #dddddd +# background #000000 + +#: The foreground and background colors. + +# background_opacity 1.0 + +#: The opacity of the background. A number between zero and one, where +#: one is opaque and zero is fully transparent. This will only work if +#: supported by the OS (for instance, when using a compositor under +#: X11). Note that it only sets the background color's opacity in +#: cells that have the same background color as the default terminal +#: background, so that things like the status bar in vim, powerline +#: prompts, etc. still look good. But it means that if you use a color +#: theme with a background color in your editor, it will not be +#: rendered as transparent. Instead you should change the default +#: background color in your kitty config and not use a background +#: color in the editor color scheme. Or use the escape codes to set +#: the terminals default colors in a shell script to launch your +#: editor. See also transparent_background_colors. Be aware that using +#: a value less than 1.0 is a (possibly significant) performance hit. +#: When using a low value for this setting, it is desirable that you +#: set the background color to a color the matches the general color +#: of the desktop background, for best text rendering. If you want to +#: dynamically change transparency of windows, set +#: dynamic_background_opacity to yes (this is off by default as it has +#: a performance cost). Changing this option when reloading the config +#: will only work if dynamic_background_opacity was enabled in the +#: original config. + +# background_blur 0 + +#: Set to a positive value to enable background blur (blurring of the +#: visuals behind a transparent window) on platforms that support it. +#: Only takes effect when background_opacity is less than one. On +#: macOS, this will also control the blur radius (amount of blurring). +#: Setting it to too high a value will cause severe performance issues +#: and/or rendering artifacts. Usually, values up to 64 work well. +#: Note that this might cause performance issues, depending on how the +#: platform implements it, so use with care. Currently supported on +#: macOS and KDE. + +# background_image none + +#: Path to a background image. Must be in PNG/JPEG/WEBP/TIFF/GIF/BMP +#: format. + +# background_image_layout tiled + +#: Whether to tile, scale or clamp the background image. The value can +#: be one of tiled, mirror-tiled, scaled, clamped, centered or +#: cscaled. The scaled and cscaled values scale the image to the +#: window size, with cscaled preserving the image aspect ratio. + +# background_image_linear no + +#: When background image is scaled, whether linear interpolation +#: should be used. + +# transparent_background_colors + +#: A space separated list of upto 7 colors, with opacity. When the +#: background color of a cell matches one of these colors, it is +#: rendered semi-transparent using the specified opacity. + +#: Useful in more complex UIs like editors where you could want more +#: than a single background color to be rendered as transparent, for +#: instance, for a cursor highlight line background or a highlighted +#: block. Terminal applications can set this color using The kitty +#: color control escape code. + +#: The syntax for specifiying colors is: color@opacity, where the +#: @opacity part is optional. When unspecified, the value of +#: background_opacity is used. For example:: + +#: transparent_background_colors red@0.5 #00ff00@0.3 + +# dynamic_background_opacity no + +#: Allow changing of the background_opacity dynamically, using either +#: keyboard shortcuts (increase_background_opacity and +#: decrease_background_opacity) or the remote control facility. +#: Changing this option by reloading the config is not supported. + +# background_tint 0.0 + +#: How much to tint the background image by the background color. This +#: option makes it easier to read the text. Tinting is done using the +#: current background color for each window. This option applies only +#: if background_opacity is set and transparent windows are supported +#: or background_image is set. + +# background_tint_gaps 1.0 + +#: How much to tint the background image at the window gaps by the +#: background color, after applying background_tint. Since this is +#: multiplicative with background_tint, it can be used to lighten the +#: tint over the window gaps for a *separated* look. + +# dim_opacity 0.4 + +#: How much to dim text that has the DIM/FAINT attribute set. One +#: means no dimming and zero means fully dimmed (i.e. invisible). + +# selection_foreground #000000 +# selection_background #fffacd + +#: The foreground and background colors for text selected with the +#: mouse. Setting both of these to none will cause a "reverse video" +#: effect for selections, where the selection will be the cell text +#: color and the text will become the cell background color. Setting +#: only selection_foreground to none will cause the foreground color +#: to be used unchanged. Note that these colors can be overridden by +#: the program running in the terminal. + +#: The color table {{{ + +#: The 256 terminal colors. There are 8 basic colors, each color has a +#: dull and bright version, for the first 16 colors. You can set the +#: remaining 240 colors as color16 to color255. + +# color0 #000000 +# color8 #767676 + +#: black + +# color1 #cc0403 +# color9 #f2201f + +#: red + +# color2 #19cb00 +# color10 #23fd00 + +#: green + +# color3 #cecb00 +# color11 #fffd00 + +#: yellow + +# color4 #0d73cc +# color12 #1a8fff + +#: blue + +# color5 #cb1ed1 +# color13 #fd28ff + +#: magenta + +# color6 #0dcdcd +# color14 #14ffff + +#: cyan + +# color7 #dddddd +# color15 #ffffff + +#: white + +# mark1_foreground black + +#: Color for marks of type 1 + +# mark1_background #98d3cb + +#: Color for marks of type 1 (light steel blue) + +# mark2_foreground black + +#: Color for marks of type 2 + +# mark2_background #f2dcd3 + +#: Color for marks of type 1 (beige) + +# mark3_foreground black + +#: Color for marks of type 3 + +# mark3_background #f274bc + +#: Color for marks of type 3 (violet) + +#: }}} + +#: }}} + +#: Advanced {{{ + +# shell . + +#: The shell program to execute. The default value of . means to use +#: the value of of the SHELL environment variable or if unset, +#: whatever shell is set as the default shell for the current user. +#: Note that on macOS if you change this, you might need to add +#: --login and --interactive to ensure that the shell starts in +#: interactive mode and reads its startup rc files. Environment +#: variables are expanded in this setting. + +# editor . + +#: The terminal based text editor (such as vim or nano) to use when +#: editing the kitty config file or similar tasks. + +#: The default value of . means to use the environment variables +#: VISUAL and EDITOR in that order. If these variables aren't set, +#: kitty will run your shell ($SHELL -l -i -c env) to see if your +#: shell startup rc files set VISUAL or EDITOR. If that doesn't work, +#: kitty will cycle through various known editors (vim, emacs, etc.) +#: and take the first one that exists on your system. + +# close_on_child_death no + +#: Close the window when the child process (usually the shell) exits. +#: With the default value no, the terminal will remain open when the +#: child exits as long as there are still other processes outputting +#: to the terminal (for example disowned or backgrounded processes). +#: When enabled with yes, the window will close as soon as the child +#: process exits. Note that setting it to yes means that any +#: background processes still using the terminal can fail silently +#: because their stdout/stderr/stdin no longer work. + +# remote_control_password + +#: Allow other programs to control kitty using passwords. This option +#: can be specified multiple times to add multiple passwords. If no +#: passwords are present kitty will ask the user for permission if a +#: program tries to use remote control with a password. A password can +#: also *optionally* be associated with a set of allowed remote +#: control actions. For example:: + +#: remote_control_password "my passphrase" get-colors set-colors focus-window focus-tab + +#: Only the specified actions will be allowed when using this +#: password. Glob patterns can be used too, for example:: + +#: remote_control_password "my passphrase" set-tab-* resize-* + +#: To get a list of available actions, run:: + +#: kitten @ --help + +#: A set of actions to be allowed when no password is sent can be +#: specified by using an empty password. For example:: + +#: remote_control_password "" *-colors + +#: Finally, the path to a python module can be specified that provides +#: a function is_cmd_allowed that is used to check every remote +#: control command. For example:: + +#: remote_control_password "my passphrase" my_rc_command_checker.py + +#: Relative paths are resolved from the kitty configuration directory. +#: See rc_custom_auth for details. + +# allow_remote_control no + +#: Allow other programs to control kitty. If you turn this on, other +#: programs can control all aspects of kitty, including sending text +#: to kitty windows, opening new windows, closing windows, reading the +#: content of windows, etc. Note that this even works over SSH +#: connections. The default setting of no prevents any form of remote +#: control. The meaning of the various values are: + +#: password +#: Remote control requests received over both the TTY device and the socket +#: are confirmed based on passwords, see remote_control_password. + +#: socket-only +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are denied. +#: See listen_on. + +#: socket +#: Remote control requests received over a socket are accepted +#: unconditionally. Requests received over the TTY are confirmed based on +#: password. + +#: no +#: Remote control is completely disabled. + +#: yes +#: Remote control requests are always accepted. + +# listen_on none + +#: Listen to the specified socket for remote control connections. Note +#: that this will apply to all kitty instances. It can be overridden +#: by the kitty --listen-on command line option. For UNIX sockets, +#: such as unix:${TEMP}/mykitty or unix:@mykitty (on Linux). +#: Environment variables are expanded and relative paths are resolved +#: with respect to the temporary directory. If {kitty_pid} is present, +#: then it is replaced by the PID of the kitty process, otherwise the +#: PID of the kitty process is appended to the value, with a hyphen. +#: For TCP sockets such as tcp:localhost:0 a random port is always +#: used even if a non-zero port number is specified. See the help for +#: kitty --listen-on for more details. Note that this will be ignored +#: unless allow_remote_control is set to either: yes, socket or +#: socket-only. Changing this option by reloading the config is not +#: supported. + +# env + +#: Specify the environment variables to be set in all child processes. +#: Using the name with an equal sign (e.g. env VAR=) will set it to +#: the empty string. Specifying only the name (e.g. env VAR) will +#: remove the variable from the child process' environment. Note that +#: environment variables are expanded recursively, for example:: + +#: env VAR1=a +#: env VAR2=${HOME}/${VAR1}/b + +#: The value of VAR2 will be /a/b. + +# filter_notification + +#: Specify rules to filter out notifications sent by applications +#: running in kitty. Can be specified multiple times to create +#: multiple filter rules. A rule specification is of the form +#: field:regexp. A filter rule can match on any of the fields: title, +#: body, app, type. The special value of all filters out all +#: notifications. Rules can be combined using Boolean operators. Some +#: examples:: + +#: filter_notification title:hello or body:"abc.*def" +#: # filter out notification from vim except for ones about updates, (?i) +#: # makes matching case insesitive. +#: filter_notification app:"[ng]?vim" and not body:"(?i)update" +#: # filter out all notifications +#: filter_notification all + +#: The field app is the name of the application sending the +#: notification and type is the type of the notification. Not all +#: applications will send these fields, so you can also match on the +#: title and body of the notification text. More sophisticated +#: programmatic filtering and custom actions on notifications can be +#: done by creating a notifications.py file in the kitty config +#: directory (~/.config/kitty). An annotated sample is available +#: . + +# watcher + +#: Path to python file which will be loaded for watchers +#: . Can be +#: specified more than once to load multiple watchers. The watchers +#: will be added to every kitty window. Relative paths are resolved +#: relative to the kitty config directory. Note that reloading the +#: config will only affect windows created after the reload. + +# exe_search_path + +#: Control where kitty finds the programs to run. The default search +#: order is: First search the system wide PATH, then ~/.local/bin and +#: ~/bin. If still not found, the PATH defined in the login shell +#: after sourcing all its startup files is tried. Finally, if present, +#: the PATH specified by the env option is tried. + +#: This option allows you to prepend, append, or remove paths from +#: this search order. It can be specified multiple times for multiple +#: paths. A simple path will be prepended to the search order. A path +#: that starts with the + sign will be append to the search order, +#: after ~/bin above. A path that starts with the - sign will be +#: removed from the entire search order. For example:: + +#: exe_search_path /some/prepended/path +#: exe_search_path +/some/appended/path +#: exe_search_path -/some/excluded/path + +# update_check_interval 24 + +#: The interval to periodically check if an update to kitty is +#: available (in hours). If an update is found, a system notification +#: is displayed informing you of the available update. The default is +#: to check every 24 hours, set to zero to disable. Update checking is +#: only done by the official binary builds. Distro packages or source +#: builds do not do update checking. Changing this option by reloading +#: the config is not supported. + +# startup_session none + +#: Path to a session file to use for all kitty instances. Can be +#: overridden by using the kitty --session =none command line option +#: for individual instances. See sessions +#: in the kitty +#: documentation for details. Note that relative paths are interpreted +#: with respect to the kitty config directory. Environment variables +#: in the path are expanded. Changing this option by reloading the +#: config is not supported. Note that if kitty is invoked with command +#: line arguments specifying a command to run, this option is ignored. + +# clipboard_control write-clipboard write-primary read-clipboard-ask read-primary-ask + +#: Allow programs running in kitty to read and write from the +#: clipboard. You can control exactly which actions are allowed. The +#: possible actions are: write-clipboard, read-clipboard, write- +#: primary, read-primary, read-clipboard-ask, read-primary-ask. The +#: default is to allow writing to the clipboard and primary selection +#: and to ask for permission when a program tries to read from the +#: clipboard. Note that disabling the read confirmation is a security +#: risk as it means that any program, even the ones running on a +#: remote server via SSH can read your clipboard. See also +#: clipboard_max_size. + +# clipboard_max_size 512 + +#: The maximum size (in MB) of data from programs running in kitty +#: that will be stored for writing to the system clipboard. A value of +#: zero means no size limit is applied. See also clipboard_control. + +# file_transfer_confirmation_bypass + +#: The password that can be supplied to the file transfer kitten +#: to skip the +#: transfer confirmation prompt. This should only be used when +#: initiating transfers from trusted computers, over trusted networks +#: or encrypted transports, as it allows any programs running on the +#: remote machine to read/write to the local filesystem, without +#: permission. + +# allow_hyperlinks yes + +#: Process hyperlink escape sequences (OSC 8). If disabled OSC 8 +#: escape sequences are ignored. Otherwise they become clickable +#: links, that you can click with the mouse or by using the hints +#: kitten . The +#: special value of ask means that kitty will ask before opening the +#: link when clicked. + +# shell_integration enabled + +#: Enable shell integration on supported shells. This enables features +#: such as jumping to previous prompts, browsing the output of the +#: previous command in a pager, etc. on supported shells. Set to +#: disabled to turn off shell integration, completely. It is also +#: possible to disable individual features, set to a space separated +#: list of these values: no-rc, no-cursor, no-title, no-cwd, no- +#: prompt-mark, no-complete, no-sudo. See Shell integration +#: for details. + +# allow_cloning ask + +#: Control whether programs running in the terminal can request new +#: windows to be created. The canonical example is clone-in-kitty +#: . +#: By default, kitty will ask for permission for each clone request. +#: Allowing cloning unconditionally gives programs running in the +#: terminal (including over SSH) permission to execute arbitrary code, +#: as the user who is running the terminal, on the computer that the +#: terminal is running on. + +# clone_source_strategies venv,conda,env_var,path + +#: Control what shell code is sourced when running clone-in-kitty in +#: the newly cloned window. The supported strategies are: + +#: venv +#: Source the file $VIRTUAL_ENV/bin/activate. This is used by the +#: Python stdlib venv module and allows cloning venvs automatically. +#: conda +#: Run conda activate $CONDA_DEFAULT_ENV. This supports the virtual +#: environments created by conda. +#: env_var +#: Execute the contents of the environment variable +#: KITTY_CLONE_SOURCE_CODE with eval. +#: path +#: Source the file pointed to by the environment variable +#: KITTY_CLONE_SOURCE_PATH. + +#: This option must be a comma separated list of the above values. +#: Only the first valid match, in the order specified, is sourced. + +# notify_on_cmd_finish never + +#: Show a desktop notification when a long-running command finishes +#: (needs shell_integration). The possible values are: + +#: never +#: Never send a notification. + +#: unfocused +#: Only send a notification when the window does not have keyboard focus. + +#: invisible +#: Only send a notification when the window both is unfocused and not visible +#: to the user, for example, because it is in an inactive tab or its OS window +#: is not currently active. + +#: always +#: Always send a notification, regardless of window state. + +#: There are two optional arguments: + +#: First, the minimum duration for what is considered a long running +#: command. The default is 5 seconds. Specify a second argument to set +#: the duration. For example: invisible 15. Do not set the value too +#: small, otherwise a command that launches a new OS Window and exits +#: will spam a notification. + +#: Second, the action to perform. The default is notify. The possible +#: values are: + +#: notify +#: Send a desktop notification. + +#: bell +#: Ring the terminal bell. + +#: command +#: Run a custom command. All subsequent arguments are the cmdline to run. + +#: Some more examples:: + +#: # Send a notification when a command takes more than 5 seconds in an unfocused window +#: notify_on_cmd_finish unfocused +#: # Send a notification when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 +#: # Ring a bell when a command takes more than 10 seconds in a invisible window +#: notify_on_cmd_finish invisible 10.0 bell +#: # Run 'notify-send' when a command takes more than 10 seconds in a invisible window +#: # Here %c is replaced by the current command line and %s by the job exit code +#: notify_on_cmd_finish invisible 10.0 command notify-send "job finished with status: %s" %c + +# term xterm-kitty + +#: The value of the TERM environment variable to set. Changing this +#: can break many terminal programs, only change it if you know what +#: you are doing, not because you read some advice on "Stack Overflow" +#: to change it. The TERM variable is used by various programs to get +#: information about the capabilities and behavior of the terminal. If +#: you change it, depending on what programs you run, and how +#: different the terminal you are changing it to is, various things +#: from key-presses, to colors, to various advanced features may not +#: work. Changing this option by reloading the config will only affect +#: newly created windows. + +# terminfo_type path + +#: The value of the TERMINFO environment variable to set. This +#: variable is used by programs running in the terminal to search for +#: terminfo databases. The default value of path causes kitty to set +#: it to a filesystem location containing the kitty terminfo database. +#: A value of direct means put the entire database into the env var +#: directly. This can be useful when connecting to containers, for +#: example. But, note that not all software supports this. A value of +#: none means do not touch the variable. + +# forward_stdio no + +#: Forward STDOUT and STDERR of the kitty process to child processes. +#: This is useful for debugging as it allows child processes to print +#: to kitty's STDOUT directly. For example, echo hello world +#: >&$KITTY_STDIO_FORWARDED in a shell will print to the parent +#: kitty's STDOUT. Sets the KITTY_STDIO_FORWARDED=fdnum environment +#: variable so child processes know about the forwarding. Note that on +#: macOS this prevents the shell from being run via the login utility +#: so getlogin() will not work in programs run in this session. + +# menu_map + +#: Specify entries for various menus in kitty. Currently only the +#: global menubar on macOS is supported. For example:: + +#: menu_map global "Actions::Launch something special" launch --hold --type=os-window sh -c "echo hello world" + +#: This will create a menu entry named "Launch something special" in +#: an "Actions" menu in the macOS global menubar. Sub-menus can be +#: created by adding more levels separated by the :: characters. + +#: }}} + +#: OS specific tweaks {{{ + +# wayland_titlebar_color system + +#: The color of the kitty window's titlebar on Wayland systems with +#: client side window decorations such as GNOME. A value of system +#: means to use the default system colors, a value of background means +#: to use the background color of the currently active kitty window +#: and finally you can use an arbitrary color, such as #12af59 or red. + +# macos_titlebar_color system + +#: The color of the kitty window's titlebar on macOS. A value of +#: system means to use the default system color, light or dark can +#: also be used to set it explicitly. A value of background means to +#: use the background color of the currently active window and finally +#: you can use an arbitrary color, such as #12af59 or red. WARNING: +#: This option works by using a hack when arbitrary color (or +#: background) is configured, as there is no proper Cocoa API for it. +#: It sets the background color of the entire window and makes the +#: titlebar transparent. As such it is incompatible with +#: background_opacity. If you want to use both, you are probably +#: better off just hiding the titlebar with hide_window_decorations. + +# macos_option_as_alt no + +#: Use the Option key as an Alt key on macOS. With this set to no, +#: kitty will use the macOS native Option+Key to enter Unicode +#: character behavior. This will break any Alt+Key keyboard shortcuts +#: in your terminal programs, but you can use the macOS Unicode input +#: technique. You can use the values: left, right or both to use only +#: the left, right or both Option keys as Alt, instead. Note that +#: kitty itself always treats Option the same as Alt. This means you +#: cannot use this option to configure different kitty shortcuts for +#: Option+Key vs. Alt+Key. Also, any kitty shortcuts using +#: Option/Alt+Key will take priority, so that any such key presses +#: will not be passed to terminal programs running inside kitty. +#: Changing this option by reloading the config is not supported. + +# macos_hide_from_tasks no + +#: Hide the kitty window from running tasks on macOS (⌘+Tab and the +#: Dock). Changing this option by reloading the config is not +#: supported. + +# macos_quit_when_last_window_closed no + +#: Have kitty quit when all the top-level windows are closed on macOS. +#: By default, kitty will stay running, even with no open windows, as +#: is the expected behavior on macOS. + +# macos_window_resizable yes + +#: Disable this if you want kitty top-level OS windows to not be +#: resizable on macOS. + +# macos_thicken_font 0 + +#: Draw an extra border around the font with the given width, to +#: increase legibility at small font sizes on macOS. For example, a +#: value of 0.75 will result in rendering that looks similar to sub- +#: pixel antialiasing at common font sizes. Note that in modern kitty, +#: this option is obsolete (although still supported). Consider using +#: text_composition_strategy instead. + +# macos_traditional_fullscreen no + +#: Use the macOS traditional full-screen transition, that is faster, +#: but less pretty. + +# macos_show_window_title_in all + +#: Control where the window title is displayed on macOS. A value of +#: window will show the title of the currently active window at the +#: top of the macOS window. A value of menubar will show the title of +#: the currently active window in the macOS global menu bar, making +#: use of otherwise wasted space. A value of all will show the title +#: in both places, and none hides the title. See +#: macos_menubar_title_max_length for how to control the length of the +#: title in the menu bar. + +# macos_menubar_title_max_length 0 + +#: The maximum number of characters from the window title to show in +#: the macOS global menu bar. Values less than one means that there is +#: no maximum limit. + +# macos_custom_beam_cursor no + +#: Use a custom mouse cursor for macOS that is easier to see on both +#: light and dark backgrounds. Nowadays, the default macOS cursor +#: already comes with a white border. WARNING: this might make your +#: mouse cursor invisible on dual GPU machines. Changing this option +#: by reloading the config is not supported. + +# macos_colorspace srgb + +#: The colorspace in which to interpret terminal colors. The default +#: of srgb will cause colors to match those seen in web browsers. The +#: value of default will use whatever the native colorspace of the +#: display is. The value of displayp3 will use Apple's special +#: snowflake display P3 color space, which will result in over +#: saturated (brighter) colors with some color shift. Reloading +#: configuration will change this value only for newly created OS +#: windows. + +# linux_display_server auto + +#: Choose between Wayland and X11 backends. By default, an appropriate +#: backend based on the system state is chosen automatically. Set it +#: to x11 or wayland to force the choice. Changing this option by +#: reloading the config is not supported. + +# wayland_enable_ime yes + +#: Enable Input Method Extension on Wayland. This is typically used +#: for inputting text in East Asian languages. However, its +#: implementation in Wayland is often buggy and introduces latency +#: into the input loop, so disable this if you know you dont need it. +#: Changing this option by reloading the config is not supported, it +#: will not have any effect. + +#: }}} + +#: Keyboard shortcuts {{{ + +#: Keys are identified simply by their lowercase Unicode characters. +#: For example: a for the A key, [ for the left square bracket key, +#: etc. For functional keys, such as Enter or Escape, the names are +#: present at Functional key definitions +#: . +#: For modifier keys, the names are ctrl (control, ⌃), shift (⇧), alt +#: (opt, option, ⌥), super (cmd, command, ⌘). + +#: Simple shortcut mapping is done with the map directive. For full +#: details on advanced mapping including modal and per application +#: maps, see mapping . Some +#: quick examples to illustrate common tasks:: + +#: # unmap a keyboard shortcut, passing it to the program running in kitty +#: map kitty_mod+space +#: # completely ignore a keyboard event +#: map ctrl+alt+f1 discard_event +#: # combine multiple actions +#: map kitty_mod+e combine : new_window : next_layout +#: # multi-key shortcuts +#: map ctrl+x>ctrl+y>z action + +#: The full list of actions that can be mapped to key presses is +#: available here . + +# kitty_mod ctrl+shift + +#: Special modifier key alias for default shortcuts. You can change +#: the value of this option to alter all default shortcuts that use +#: kitty_mod. + +# clear_all_shortcuts no + +#: Remove all shortcut definitions up to this point. Useful, for +#: instance, to remove the default shortcuts. + +# action_alias + +#: E.g. action_alias launch_tab launch --type=tab --cwd=current + +#: Define action aliases to avoid repeating the same options in +#: multiple mappings. Aliases can be defined for any action and will +#: be expanded recursively. For example, the above alias allows you to +#: create mappings to launch a new tab in the current working +#: directory without duplication:: + +#: map f1 launch_tab vim +#: map f2 launch_tab emacs + +#: Similarly, to alias kitten invocation:: + +#: action_alias hints kitten hints --hints-offset=0 + +# kitten_alias + +#: E.g. kitten_alias hints hints --hints-offset=0 + +#: Like action_alias above, but specifically for kittens. Generally, +#: prefer to use action_alias. This option is a legacy version, +#: present for backwards compatibility. It causes all invocations of +#: the aliased kitten to be substituted. So the example above will +#: cause all invocations of the hints kitten to have the --hints- +#: offset=0 option applied. + +#: Clipboard {{{ + +#: Copy to clipboard + +# map kitty_mod+c copy_to_clipboard +# map cmd+c copy_to_clipboard + +#:: There is also a copy_or_interrupt action that can be optionally +#:: mapped to Ctrl+C. It will copy only if there is a selection and +#:: send an interrupt otherwise. Similarly, +#:: copy_and_clear_or_interrupt will copy and clear the selection or +#:: send an interrupt if there is no selection. + +#: Paste from clipboard + +# map kitty_mod+v paste_from_clipboard +# map cmd+v paste_from_clipboard + +#: Paste from selection + +# map kitty_mod+s paste_from_selection +# map shift+insert paste_from_selection + +#: Pass selection to program + +# map kitty_mod+o pass_selection_to_program + +#:: You can also pass the contents of the current selection to any +#:: program with pass_selection_to_program. By default, the system's +#:: open program is used, but you can specify your own, the selection +#:: will be passed as a command line argument to the program. For +#:: example:: + +#:: map kitty_mod+o pass_selection_to_program firefox + +#:: You can pass the current selection to a terminal program running +#:: in a new kitty window, by using the @selection placeholder:: + +#:: map kitty_mod+y new_window less @selection + +#: }}} + +#: Scrolling {{{ + +#: Scroll line up + +# map kitty_mod+up scroll_line_up +# map kitty_mod+k scroll_line_up +# map opt+cmd+page_up scroll_line_up +# map cmd+up scroll_line_up + +#: Scroll line down + +# map kitty_mod+down scroll_line_down +# map kitty_mod+j scroll_line_down +# map opt+cmd+page_down scroll_line_down +# map cmd+down scroll_line_down + +#: Scroll page up + +# map kitty_mod+page_up scroll_page_up +# map cmd+page_up scroll_page_up + +#: Scroll page down + +# map kitty_mod+page_down scroll_page_down +# map cmd+page_down scroll_page_down + +#: Scroll to top + +# map kitty_mod+home scroll_home +# map cmd+home scroll_home + +#: Scroll to bottom + +# map kitty_mod+end scroll_end +# map cmd+end scroll_end + +#: Scroll to previous shell prompt + +# map kitty_mod+z scroll_to_prompt -1 + +#:: Use a parameter of 0 for scroll_to_prompt to scroll to the last +#:: jumped to or the last clicked position. Requires shell +#:: integration +#:: to work. + +#: Scroll to next shell prompt + +# map kitty_mod+x scroll_to_prompt 1 + +#: Browse scrollback buffer in pager + +# map kitty_mod+h show_scrollback + +#:: You can pipe the contents of the current screen and history +#:: buffer as STDIN to an arbitrary program using launch --stdin- +#:: source. For example, the following opens the scrollback buffer in +#:: less in an overlay window:: + +#:: map f1 launch --stdin-source=@screen_scrollback --stdin-add-formatting --type=overlay less +G -R + +#:: For more details on piping screen and buffer contents to external +#:: programs, see launch . + +#: Browse output of the last shell command in pager + +# map kitty_mod+g show_last_command_output + +#:: You can also define additional shortcuts to get the command +#:: output. For example, to get the first command output on screen:: + +#:: map f1 show_first_command_output_on_screen + +#:: To get the command output that was last accessed by a keyboard +#:: action or mouse action:: + +#:: map f1 show_last_visited_command_output + +#:: You can pipe the output of the last command run in the shell +#:: using the launch action. For example, the following opens the +#:: output in less in an overlay window:: + +#:: map f1 launch --stdin-source=@last_cmd_output --stdin-add-formatting --type=overlay less +G -R + +#:: To get the output of the first command on the screen, use +#:: @first_cmd_output_on_screen. To get the output of the last jumped +#:: to command, use @last_visited_cmd_output. + +#:: Requires shell integration +#:: to work. + +#: }}} + +#: Window management {{{ + +#: New window + +# map kitty_mod+enter new_window +# map cmd+enter new_window + +#:: You can open a new kitty window running an arbitrary program, for +#:: example:: + +#:: map kitty_mod+y launch mutt + +#:: You can open a new window with the current working directory set +#:: to the working directory of the current window using:: + +#:: map ctrl+alt+enter launch --cwd=current + +#:: You can open a new window that is allowed to control kitty via +#:: the kitty remote control facility with launch --allow-remote- +#:: control. Any programs running in that window will be allowed to +#:: control kitty. For example:: + +#:: map ctrl+enter launch --allow-remote-control some_program + +#:: You can open a new window next to the currently active window or +#:: as the first window, with:: + +#:: map ctrl+n launch --location=neighbor +#:: map ctrl+f launch --location=first + +#:: For more details, see launch +#:: . + +#: New OS window + +# map kitty_mod+n new_os_window +# map cmd+n new_os_window + +#:: Works like new_window above, except that it opens a top-level OS +#:: window. In particular you can use new_os_window_with_cwd to open +#:: a window with the current working directory. + +#: Close window + +# map kitty_mod+w close_window +# map shift+cmd+d close_window + +#: Next window + +# map kitty_mod+] next_window + +#: Previous window + +# map kitty_mod+[ previous_window + +#: Move window forward + +# map kitty_mod+f move_window_forward + +#: Move window backward + +# map kitty_mod+b move_window_backward + +#: Move window to top + +# map kitty_mod+` move_window_to_top + +#: Start resizing window + +# map kitty_mod+r start_resizing_window +# map cmd+r start_resizing_window + +#: First window + +# map kitty_mod+1 first_window +# map cmd+1 first_window + +#: Second window + +# map kitty_mod+2 second_window +# map cmd+2 second_window + +#: Third window + +# map kitty_mod+3 third_window +# map cmd+3 third_window + +#: Fourth window + +# map kitty_mod+4 fourth_window +# map cmd+4 fourth_window + +#: Fifth window + +# map kitty_mod+5 fifth_window +# map cmd+5 fifth_window + +#: Sixth window + +# map kitty_mod+6 sixth_window +# map cmd+6 sixth_window + +#: Seventh window + +# map kitty_mod+7 seventh_window +# map cmd+7 seventh_window + +#: Eighth window + +# map kitty_mod+8 eighth_window +# map cmd+8 eighth_window + +#: Ninth window + +# map kitty_mod+9 ninth_window +# map cmd+9 ninth_window + +#: Tenth window + +# map kitty_mod+0 tenth_window + +#: Visually select and focus window + +# map kitty_mod+f7 focus_visible_window + +#:: Display overlay numbers and alphabets on the window, and switch +#:: the focus to the window when you press the key. When there are +#:: only two windows, the focus will be switched directly without +#:: displaying the overlay. You can change the overlay characters and +#:: their order with option visual_window_select_characters. + +#: Visually swap window with another + +# map kitty_mod+f8 swap_with_window + +#:: Works like focus_visible_window above, but swaps the window. + +#: }}} + +#: Tab management {{{ + +#: Next tab + +# map kitty_mod+right next_tab +# map shift+cmd+] next_tab +# map ctrl+tab next_tab + +#: Previous tab + +# map kitty_mod+left previous_tab +# map shift+cmd+[ previous_tab +# map ctrl+shift+tab previous_tab + +#: New tab + +# map kitty_mod+t new_tab +# map cmd+t new_tab + +#: Close tab + +# map kitty_mod+q close_tab +# map cmd+w close_tab + +#: Close OS window + +# map shift+cmd+w close_os_window + +#: Move tab forward + +# map kitty_mod+. move_tab_forward + +#: Move tab backward + +# map kitty_mod+, move_tab_backward + +#: Set tab title + +# map kitty_mod+alt+t set_tab_title +# map shift+cmd+i set_tab_title + + +#: You can also create shortcuts to go to specific tabs, with 1 being +#: the first tab, 2 the second tab and -1 being the previously active +#: tab, -2 being the tab active before the previously active tab and +#: so on. Any number larger than the number of tabs goes to the last +#: tab and any number less than the number of previously used tabs in +#: the history goes to the oldest previously used tab in the history:: + +#: map ctrl+alt+1 goto_tab 1 +#: map ctrl+alt+2 goto_tab 2 + +#: Just as with new_window above, you can also pass the name of +#: arbitrary commands to run when using new_tab and new_tab_with_cwd. +#: Finally, if you want the new tab to open next to the current tab +#: rather than at the end of the tabs list, use:: + +#: map ctrl+t new_tab !neighbor [optional cmd to run] +#: }}} + +#: Layout management {{{ + +#: Next layout + +# map kitty_mod+l next_layout + + +#: You can also create shortcuts to switch to specific layouts:: + +#: map ctrl+alt+t goto_layout tall +#: map ctrl+alt+s goto_layout stack + +#: Similarly, to switch back to the previous layout:: + +#: map ctrl+alt+p last_used_layout + +#: There is also a toggle_layout action that switches to the named +#: layout or back to the previous layout if in the named layout. +#: Useful to temporarily "zoom" the active window by switching to the +#: stack layout:: + +#: map ctrl+alt+z toggle_layout stack +#: }}} + +#: Font sizes {{{ + +#: You can change the font size for all top-level kitty OS windows at +#: a time or only the current one. + +#: Increase font size + +# map kitty_mod+equal change_font_size all +2.0 +# map kitty_mod+plus change_font_size all +2.0 +# map kitty_mod+kp_add change_font_size all +2.0 +# map cmd+plus change_font_size all +2.0 +# map cmd+equal change_font_size all +2.0 +# map shift+cmd+equal change_font_size all +2.0 + +#: Decrease font size + +# map kitty_mod+minus change_font_size all -2.0 +# map kitty_mod+kp_subtract change_font_size all -2.0 +# map cmd+minus change_font_size all -2.0 +# map shift+cmd+minus change_font_size all -2.0 + +#: Reset font size + +# map kitty_mod+backspace change_font_size all 0 +# map cmd+0 change_font_size all 0 + + +#: To setup shortcuts for specific font sizes:: + +#: map kitty_mod+f6 change_font_size all 10.0 + +#: To setup shortcuts to change only the current OS window's font +#: size:: + +#: map kitty_mod+f6 change_font_size current 10.0 +#: }}} + +#: Select and act on visible text {{{ + +#: Use the hints kitten to select text and either pass it to an +#: external program or insert it into the terminal or copy it to the +#: clipboard. + +#: Open URL + +# map kitty_mod+e open_url_with_hints + +#:: Open a currently visible URL using the keyboard. The program used +#:: to open the URL is specified in open_url_with. + +#: Insert selected path + +# map kitty_mod+p>f kitten hints --type path --program - + +#:: Select a path/filename and insert it into the terminal. Useful, +#:: for instance to run git commands on a filename output from a +#:: previous git command. + +#: Open selected path + +# map kitty_mod+p>shift+f kitten hints --type path + +#:: Select a path/filename and open it with the default open program. + +#: Insert selected line + +# map kitty_mod+p>l kitten hints --type line --program - + +#:: Select a line of text and insert it into the terminal. Useful for +#:: the output of things like: `ls -1`. + +#: Insert selected word + +# map kitty_mod+p>w kitten hints --type word --program - + +#:: Select words and insert into terminal. + +#: Insert selected hash + +# map kitty_mod+p>h kitten hints --type hash --program - + +#:: Select something that looks like a hash and insert it into the +#:: terminal. Useful with git, which uses SHA1 hashes to identify +#:: commits. + +#: Open the selected file at the selected line + +# map kitty_mod+p>n kitten hints --type linenum + +#:: Select something that looks like filename:linenum and open it in +#:: your default editor at the specified line number. + +#: Open the selected hyperlink + +# map kitty_mod+p>y kitten hints --type hyperlink + +#:: Select a hyperlink (i.e. a URL that has been marked as such by +#:: the terminal program, for example, by `ls --hyperlink=auto`). + + +#: The hints kitten has many more modes of operation that you can map +#: to different shortcuts. For a full description see hints kitten +#: . +#: }}} + +#: Miscellaneous {{{ + +#: Show documentation + +# map kitty_mod+f1 show_kitty_doc overview + +#: Toggle fullscreen + +# map kitty_mod+f11 toggle_fullscreen +# map ctrl+cmd+f toggle_fullscreen + +#: Toggle maximized + +# map kitty_mod+f10 toggle_maximized + +#: Toggle macOS secure keyboard entry + +# map opt+cmd+s toggle_macos_secure_keyboard_entry + +#: Unicode input + +# map kitty_mod+u kitten unicode_input +# map ctrl+cmd+space kitten unicode_input + +#: Edit config file + +# map kitty_mod+f2 edit_config_file +# map cmd+, edit_config_file + +#: Open the kitty command shell + +# map kitty_mod+escape kitty_shell window + +#:: Open the kitty shell in a new window / tab / overlay / os_window +#:: to control kitty using commands. + +#: Increase background opacity + +# map kitty_mod+a>m set_background_opacity +0.1 + +#: Decrease background opacity + +# map kitty_mod+a>l set_background_opacity -0.1 + +#: Make background fully opaque + +# map kitty_mod+a>1 set_background_opacity 1 + +#: Reset background opacity + +# map kitty_mod+a>d set_background_opacity default + +#: Reset the terminal + +# map kitty_mod+delete clear_terminal reset active +# map opt+cmd+r clear_terminal reset active + +#:: You can create shortcuts to clear/reset the terminal. For +#:: example:: + +#:: # Reset the terminal +#:: map f1 clear_terminal reset active +#:: # Clear the terminal screen by erasing all contents +#:: map f1 clear_terminal clear active +#:: # Clear the terminal scrollback by erasing it +#:: map f1 clear_terminal scrollback active +#:: # Scroll the contents of the screen into the scrollback +#:: map f1 clear_terminal scroll active +#:: # Clear everything on screen up to the line with the cursor or the start of the current prompt (needs shell integration) +#:: map f1 clear_terminal to_cursor active +#:: # Same as above except cleared lines are moved into scrollback +#:: map f1 clear_terminal to_cursor_scroll active + +#:: If you want to operate on all kitty windows instead of just the +#:: current one, use all instead of active. + +#:: Some useful functions that can be defined in the shell rc files +#:: to perform various kinds of clearing of the current window: + +#:: .. code-block:: sh + +#:: clear-only-screen() { +#:: printf "\e[H\e[2J" +#:: } + +#:: clear-screen-and-scrollback() { +#:: printf "\e[H\e[3J" +#:: } + +#:: clear-screen-saving-contents-in-scrollback() { +#:: printf "\e[H\e[22J" +#:: } + +#:: For instance, using these escape codes, it is possible to remap +#:: Ctrl+L to both scroll the current screen contents into the +#:: scrollback buffer and clear the screen, instead of just clearing +#:: the screen. For ZSH, in ~/.zshrc, add: + +#:: .. code-block:: zsh + +#:: ctrl_l() { +#:: builtin print -rn -- $'\r\e[0J\e[H\e[22J' >"$TTY" +#:: builtin zle .reset-prompt +#:: builtin zle -R +#:: } +#:: zle -N ctrl_l +#:: bindkey '^l' ctrl_l + +#:: Alternatively, you can just add map ctrl+l clear_terminal +#:: to_cursor_scroll active to kitty.conf which works with no changes +#:: to the shell rc files, but only clears up to the prompt, it does +#:: not clear anytext at the prompt itself. + +#: Clear up to cursor line + +# map cmd+k clear_terminal to_cursor active + +#: Reload kitty.conf + +# map kitty_mod+f5 load_config_file +# map ctrl+cmd+, load_config_file + +#:: Reload kitty.conf, applying any changes since the last time it +#:: was loaded. Note that a handful of options cannot be dynamically +#:: changed and require a full restart of kitty. Particularly, when +#:: changing shortcuts for actions located on the macOS global menu +#:: bar, a full restart is needed. You can also map a keybinding to +#:: load a different config file, for example:: + +#:: map f5 load_config /path/to/alternative/kitty.conf + +#:: Note that all options from the original kitty.conf are discarded, +#:: in other words the new configuration *replace* the old ones. + +#: Debug kitty configuration + +# map kitty_mod+f6 debug_config +# map opt+cmd+, debug_config + +#:: Show details about exactly what configuration kitty is running +#:: with and its host environment. Useful for debugging issues. + +#: Send arbitrary text on key presses + +#:: E.g. map ctrl+shift+alt+h send_text all Hello World + +#:: You can tell kitty to send arbitrary (UTF-8) encoded text to the +#:: client program when pressing specified shortcut keys. For +#:: example:: + +#:: map ctrl+alt+a send_text all Special text + +#:: This will send "Special text" when you press the Ctrl+Alt+A key +#:: combination. The text to be sent decodes ANSI C escapes +#:: so you can use escapes like \e to send control +#:: codes or \u21fb to send Unicode characters (or you can just input +#:: the Unicode characters directly as UTF-8 text). You can use +#:: `kitten show-key` to get the key escape codes you want to +#:: emulate. + +#:: The first argument to send_text is the keyboard modes in which to +#:: activate the shortcut. The possible values are normal, +#:: application, kitty or a comma separated combination of them. The +#:: modes normal and application refer to the DECCKM cursor key mode +#:: for terminals, and kitty refers to the kitty extended keyboard +#:: protocol. The special value all means all of them. + +#:: Some more examples:: + +#:: # Output a word and move the cursor to the start of the line (like typing and pressing Home) +#:: map ctrl+alt+a send_text normal Word\e[H +#:: map ctrl+alt+a send_text application Word\eOH +#:: # Run a command at a shell prompt (like typing the command and pressing Enter) +#:: map ctrl+alt+a send_text normal,application some command with arguments\r + +#: Open kitty Website + +# map shift+cmd+/ open_url https://sw.kovidgoyal.net/kitty/ + +#: Hide macOS kitty application + +# map cmd+h hide_macos_app + +#: Hide macOS other applications + +# map opt+cmd+h hide_macos_other_apps + +#: Minimize macOS window + +# map cmd+m minimize_macos_window + +#: Quit kitty + +# map cmd+q quit + +#: }}} + +#: }}} + + +# BEGIN_KITTY_FONTS +font_family family="CaskaydiaCove Nerd Font" +bold_font auto +italic_font auto +bold_italic_font auto +# END_KITTY_FONTS \ No newline at end of file diff --git a/nvim/config.lua b/nvim/config.lua new file mode 100644 index 0000000..5a6401f --- /dev/null +++ b/nvim/config.lua @@ -0,0 +1,6 @@ +return { + target = { + linux = "~/.config/nvim", + default = "~/.config/nvim", + }, +} diff --git a/nvim/files/Session.vim b/nvim/files/Session.vim new file mode 100644 index 0000000..418cee2 --- /dev/null +++ b/nvim/files/Session.vim @@ -0,0 +1,56 @@ +let SessionLoad = 1 +let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1 +let v:this_session=expand(":p") +silent only +silent tabonly +cd ~/.config/nvim +if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' + let s:wipebuf = bufnr('%') +endif +let s:shortmess_save = &shortmess +if &shortmess =~ 'A' + set shortmess=aoOA +else + set shortmess=aoO +endif +badd +198 lua/thomasgen/lazy/mini.lua +badd +1 lua/thomasgen/lazy/telescope.lua +badd +3 lua/thomasgen/lazy/colors.lua +badd +1 ~/.config/nvim/lua/thomasgen/lazy/alpha.lua +argglobal +%argdel +edit ~/.config/nvim/lua/thomasgen/lazy/alpha.lua +argglobal +balt lua/thomasgen/lazy/mini.lua +setlocal fdm=manual +setlocal fde=0 +setlocal fmr={{{,}}} +setlocal fdi=# +setlocal fdl=0 +setlocal fml=1 +setlocal fdn=20 +setlocal fen +silent! normal! zE +let &fdl = &fdl +let s:l = 10 - ((9 * winheight(0) + 29) / 59) +if s:l < 1 | let s:l = 1 | endif +keepjumps exe s:l +normal! zt +keepjumps 10 +normal! 0 +tabnext 1 +if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal' + silent exe 'bwipe ' . s:wipebuf +endif +unlet! s:wipebuf +set winheight=1 winwidth=20 +let &shortmess = s:shortmess_save +let s:sx = expand(":p:r")."x.vim" +if filereadable(s:sx) + exe "source " . fnameescape(s:sx) +endif +let &g:so = s:so_save | let &g:siso = s:siso_save +nohlsearch +doautoall SessionLoadPost +unlet SessionLoad +" vim: set ft=vim : diff --git a/nvim/files/colors/matugen.lua b/nvim/files/colors/matugen.lua new file mode 100644 index 0000000..90cf264 --- /dev/null +++ b/nvim/files/colors/matugen.lua @@ -0,0 +1,11 @@ +-- Material You colorscheme for Neovim +-- Generated by matugen + +-- Load the matugen module which has the theme setup +local ok, matugen = pcall(require, "matugen") +if not ok then + vim.notify("Failed to load matugen module", vim.log.levels.ERROR) + return +end + +-- The module will automatically set up the colorscheme \ No newline at end of file diff --git a/nvim/files/init.lua b/nvim/files/init.lua new file mode 100644 index 0000000..9fd41ee --- /dev/null +++ b/nvim/files/init.lua @@ -0,0 +1,42 @@ +require("set") +require("remap") + +-- [[ Install `lazy.nvim` plugin manager ]] +-- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + error("Error cloning lazy.nvim:\n" .. out) + end +end + +---@type vim.Option +local rtp = vim.opt.rtp +rtp:prepend(lazypath) + +require("lazy").setup({ + import = "plugins", +}, { + ui = { + icons = vim.g.have_nerd_font and {} or { + cmd = "⌘", + config = "🛠", + event = "📅", + ft = "📂", + init = "⚙", + keys = "🗝", + plugin = "🔌", + runtime = "💻", + require = "🌙", + source = "📄", + start = "🚀", + task = "📌", + lazy = "💤 ", + }, + }, +}) + +-- The line beneath this is called `modeline`. See `:help modeline` +-- vim: ts=2 sts=2 sw=2 et diff --git a/nvim/files/lsp/biome.lua b/nvim/files/lsp/biome.lua new file mode 100644 index 0000000..0b6a6d2 --- /dev/null +++ b/nvim/files/lsp/biome.lua @@ -0,0 +1,25 @@ +return { + cmd = { "biome", "lsp-proxy" }, + filetypes = { + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "json", + "jsonc", + "astro", + "css", + "graphql", + "vue", + "svelte", + }, + root_markers = { "biome.json", "biome.jsonc" }, + on_attach = function(client, bufnr) + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = bufnr, + callback = function() + vim.lsp.buf.format({ bufnr = bufnr, id = client.id }) + end, + }) + end, +} diff --git a/nvim/files/lsp/cssls.lua b/nvim/files/lsp/cssls.lua new file mode 100644 index 0000000..5c966a1 --- /dev/null +++ b/nvim/files/lsp/cssls.lua @@ -0,0 +1,10 @@ +return { + cmd = { "vscode-css-language-server", "--stdio" }, + filetypes = { "css", "scss", "less" }, + root_markers = { "package.json", ".git" }, + settings = { + css = { validate = true }, + scss = { validate = true }, + less = { validate = true }, + }, +} diff --git a/nvim/files/lsp/eslint.lua b/nvim/files/lsp/eslint.lua new file mode 100644 index 0000000..ccf1c5e --- /dev/null +++ b/nvim/files/lsp/eslint.lua @@ -0,0 +1,82 @@ +return { + cmd = { "vscode-eslint-language-server", "--stdio" }, + filetypes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + "vue", + "svelte", + "astro", + }, + root_dir = function(bufnr, on_dir) + local fname = vim.api.nvim_buf_get_name(bufnr) + local root = vim.fs.root(fname, { + ".eslintrc", + ".eslintrc.js", + ".eslintrc.cjs", + ".eslintrc.yaml", + ".eslintrc.yml", + ".eslintrc.json", + "eslint.config.js", + "eslint.config.mjs", + "eslint.config.cjs", + "eslint.config.ts", + "eslint.config.mts", + "eslint.config.cts", + "package.json", + }) + + -- Disable ESLint if Biome is detected + if root then + local biome_json = vim.fs.joinpath(root, "biome.json") + local biome_jsonc = vim.fs.joinpath(root, "biome.jsonc") + local has_biome = vim.fn.filereadable(biome_json) == 1 or vim.fn.filereadable(biome_jsonc) == 1 + + if has_biome then + vim.notify("ESLint disabled - Biome detected in " .. root, vim.log.levels.INFO) + on_dir(nil) + return + end + end + + on_dir(root) + end, + settings = { + codeAction = { + disableRuleComment = { + enable = true, + location = "separateLine", + }, + showDocumentation = { + enable = true, + }, + }, + codeActionOnSave = { + enable = false, + mode = "all", + }, + format = true, + nodePath = "", + onIgnoredFiles = "off", + problems = { + shortenToSingleLine = false, + }, + quiet = false, + rulesCustomizations = {}, + run = "onType", + useESLintClass = false, + validate = "on", + workingDirectory = { + mode = "location", + }, + }, + on_attach = function(_, bufnr) + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = bufnr, + command = "EslintFixAll", + }) + end, +} diff --git a/nvim/files/lsp/gdscript.lua b/nvim/files/lsp/gdscript.lua new file mode 100644 index 0000000..e753997 --- /dev/null +++ b/nvim/files/lsp/gdscript.lua @@ -0,0 +1,5 @@ +return { + cmd = { "nc", "localhost", "6005" }, + filetypes = { "gd", "gdscript", "gdscript3" }, + root_markers = { "project.godot", ".git" }, +} diff --git a/nvim/files/lsp/lua_ls.lua b/nvim/files/lsp/lua_ls.lua new file mode 100644 index 0000000..08949d1 --- /dev/null +++ b/nvim/files/lsp/lua_ls.lua @@ -0,0 +1,12 @@ +return { + cmd = { "lua-language-server" }, + filetypes = { "lua" }, + root_markers = { ".luarc.json", ".luarc.jsonc", ".git" }, + settings = { + Lua = { + completion = { + callSnippet = "Replace", + }, + }, + }, +} diff --git a/nvim/files/lsp/pyright.lua b/nvim/files/lsp/pyright.lua new file mode 100644 index 0000000..33d26b1 --- /dev/null +++ b/nvim/files/lsp/pyright.lua @@ -0,0 +1,38 @@ +return { + cmd = { "pyright-langserver", "--stdio" }, + filetypes = { "python" }, + root_markers = { "pyproject.toml", "setup.py", "setup.cfg", "requirements.txt", ".git" }, + on_new_config = function(new_config, root_dir) + local resolved_root = vim.fs.normalize(vim.fn.expand(root_dir)) + local venv_python = resolved_root .. "/.venv/bin/python" + if vim.uv.fs_stat(venv_python) then + new_config.settings = new_config.settings or {} + new_config.settings.python = new_config.settings.python or {} + new_config.settings.python.pythonPath = venv_python + end + end, + on_init = function(client) + local root_dir = client.config.root_dir + if not root_dir then + return + end + + local resolved_root = vim.fs.normalize(vim.fn.expand(root_dir)) + local venv_python = resolved_root .. "/.venv/bin/python" + if vim.uv.fs_stat(venv_python) then + client.config.settings = client.config.settings or {} + client.config.settings.python = client.config.settings.python or {} + client.config.settings.python.pythonPath = venv_python + client.notify("workspace/didChangeConfiguration", { settings = client.config.settings }) + end + end, + settings = { + python = { + analysis = { + autoSearchPaths = true, + useLibraryCodeForTypes = true, + diagnosticMode = "openFilesOnly", + }, + }, + }, +} diff --git a/nvim/files/lsp/svelte.lua b/nvim/files/lsp/svelte.lua new file mode 100644 index 0000000..1f730a0 --- /dev/null +++ b/nvim/files/lsp/svelte.lua @@ -0,0 +1,5 @@ +return { + cmd = { "svelteserver", "--stdio" }, + filetypes = { "svelte" }, + root_markers = { "svelte.config.js", "svelte.config.mjs", "svelte.config.cjs", "package.json", ".git" }, +} diff --git a/nvim/files/lsp/tailwindcss.lua b/nvim/files/lsp/tailwindcss.lua new file mode 100644 index 0000000..3ac854f --- /dev/null +++ b/nvim/files/lsp/tailwindcss.lua @@ -0,0 +1,52 @@ +return { + filetypes = { + "aspnetcorerazor", + "astro", + "astro-markdown", + "blade", + "clojure", + "django-html", + "htmldjango", + "edge", + "eelixir", + "elixir", + "ejs", + "erb", + "eruby", + "gohtml", + "gohtmltmpl", + "haml", + "handlebars", + "hbs", + "html", + "html-eex", + "heex", + "jade", + "leaf", + "liquid", + "markdown", + "mdx", + "mustache", + "njk", + "nunjucks", + "php", + "razor", + "slim", + "twig", + "css", + "less", + "postcss", + "sass", + "scss", + "stylus", + "sugarss", + "javascript", + "javascriptreact", + "reason", + "rescript", + "typescript", + "typescriptreact", + "vue", + "svelte", + }, +} diff --git a/nvim/files/lsp/tsgo.lua b/nvim/files/lsp/tsgo.lua new file mode 100644 index 0000000..6f1596f --- /dev/null +++ b/nvim/files/lsp/tsgo.lua @@ -0,0 +1,36 @@ +return { + cmd = { "tsgo", "--lsp", "--stdio" }, + filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact" }, + -- Use .git to find monorepo root so vtsls indexes ALL packages + root_markers = { ".git" }, + -- Reuse client across projects for cross-package references + reuse_client = function(client, config) + return client.name == config.name + end, + settings = { + vtsls = { + autoWorkspaceCache = true, -- Helps index the workspace in the background + tsserver = { + maxMemory = 8192, -- Give it 8GB of RAM for large projects + globalPlugins = { + { + name = "typescript-svelte-plugin", + location = vim.fn.stdpath("data") + .. "/mason/packages/svelte-language-server/node_modules/typescript-svelte-plugin", + enableForWorkspaceTypeScriptVersions = true, + }, + }, + }, + }, + typescript = { + tsserver = { + maxTsServerMemory = 8192, + maxMemory = 8192, -- Give it 8GB of RAM for large projects + }, + }, + }, + commands = { + -- Suppress "does not support command" notification for organize imports + ["_typescript.didOrganizeImports"] = function() end, + }, +} diff --git a/nvim/files/lsp/vtsls.lua b/nvim/files/lsp/vtsls.lua new file mode 100644 index 0000000..5dc2fab --- /dev/null +++ b/nvim/files/lsp/vtsls.lua @@ -0,0 +1,35 @@ +return { + cmd = { "vtsls", "--stdio" }, + filetypes = { "javascript", "javascriptreact", "typescript", "typescriptreact" }, + -- Use .git to find monorepo root so vtsls indexes ALL packages + root_markers = { ".git" }, + -- Reuse client across projects for cross-package references + reuse_client = function(client, config) + return client.name == config.name + end, + settings = { + vtsls = { + autoWorkspaceCache = true, -- Helps index the workspace in the background + tsserver = { + maxMemory = 8192, -- Give it 8GB of RAM for large projects + globalPlugins = { + { + name = "typescript-svelte-plugin", + location = vim.fn.stdpath("data") + .. "/mason/packages/svelte-language-server/node_modules/typescript-svelte-plugin", + enableForWorkspaceTypeScriptVersions = true, + }, + }, + }, + }, + typescript = { + tsserver = { + maxTsServerMemory = 8192, + }, + }, + }, + commands = { + -- Suppress "does not support command" notification for organize imports + ["_typescript.didOrganizeImports"] = function() end, + }, +} diff --git a/nvim/files/lua/plugins/abolish.lua b/nvim/files/lua/plugins/abolish.lua new file mode 100644 index 0000000..89c1125 --- /dev/null +++ b/nvim/files/lua/plugins/abolish.lua @@ -0,0 +1,4 @@ +return { + "tpope/vim-abolish", + enabled = true, +} diff --git a/nvim/files/lua/plugins/alpha.lua b/nvim/files/lua/plugins/alpha.lua new file mode 100644 index 0000000..a29b7ea --- /dev/null +++ b/nvim/files/lua/plugins/alpha.lua @@ -0,0 +1,53 @@ +return { + "goolord/alpha-nvim", + dependencies = { + { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, -- Load colorscheme before other plugins + }, + "echasnovski/mini.icons", + "nvim-lua/plenary.nvim", + }, + config = function() + local alpha_c = function() + local alpha = require("alpha") + local dashboard = require("alpha.themes.dashboard") + local scan = require("plenary.scandir") + + -- Get the runtime path where your headers are stored + local runtime_path = vim.fn.stdpath("config") .. "/lua/plugins/alpha_headers" + + -- Scan for all Lua files in the headers directory + local headers = {} + for _, file in ipairs(scan.scan_dir(runtime_path, { search_pattern = "%.lua$" })) do + -- Extract just the filename without extension and path + local header_name = vim.fn.fnamemodify(file, ":t:r") + table.insert(headers, header_name) + end + + -- Randomly select a header + math.randomseed(os.time()) -- Initialize random seed + local random_header = headers[math.random(#headers)] + + -- Construct the full path and require the header + local header = "plugins.alpha_headers." .. random_header + require(header).setup(dashboard) + + dashboard.section.buttons.val = { + dashboard.button("n", " New file", "ene "), + dashboard.button("SPC p f", " Find file"), + dashboard.button("SPC p v", " Open Oil"), + dashboard.button("SPC w q", " Quit"), + } + for _, a in ipairs(dashboard.section.buttons.val) do + a.opts.width = 49 + a.opts.cursor = -2 + end + + alpha.setup(dashboard.config) + end + + alpha_c() + end, +} diff --git a/nvim/files/lua/plugins/alpha_headers/bee.lua b/nvim/files/lua/plugins/alpha_headers/bee.lua new file mode 100644 index 0000000..34465d3 --- /dev/null +++ b/nvim/files/lua/plugins/alpha_headers/bee.lua @@ -0,0 +1,142 @@ +local function getLen(str, start_pos) + local byte = string.byte(str, start_pos) + if not byte then + return nil + end + + return (byte < 0x80 and 1) or (byte < 0xE0 and 2) or (byte < 0xF0 and 3) or (byte < 0xF8 and 4) or 1 +end + +local function colorize(header, header_color_map, colors) + for letter, color in pairs(colors) do + local color_name = "AlphaJemuelKwelKwelWalangTatay" .. letter + vim.api.nvim_set_hl(0, color_name, color) + colors[letter] = color_name + end + + local colorized = {} + + for i, line in ipairs(header_color_map) do + local colorized_line = {} + local pos = 0 + + for j = 1, #line do + local start = pos + pos = pos + getLen(header[i], start + 1) + + local color_name = colors[line:sub(j, j)] + if color_name then + table.insert(colorized_line, { color_name, start, pos }) + end + end + + table.insert(colorized, colorized_line) + end + + return colorized +end + +local M = {} + +M.setup = function(dashboard) + local color = require("util.color") + local alpha = require("alpha") + + local mocha = require("catppuccin.palettes").get_palette("mocha") + + local color_map = { + [[ AAAA]], + [[AAAAAA AAAA]], + [[AA AAAA AAAA KKHHKKHHHH]], + [[AAAA AAAA AA HHBBKKKKKKKKKKKKKK]], + [[ AAAAAA AAKKBBHHKKBBYYBBKKKKHHKKKKKK]], + [[ AAAA BBAAKKHHBBBBKKKKBBYYBBHHHHKKKKKK]], + [[ BBAABBKKYYYYHHKKYYYYKKKKBBBBBBZZZZZZ]], + [[ YYBBYYBBKKYYYYYYYYYYKKKKBBKKAAAAZZOOZZZZ]], + [[ XXXXYYYYBBYYYYYYYYBBBBBBKKKKBBBBAAAAZZZZ]], + [[ XXXXUUUUYYYYBBYYYYYYBBKKBBZZOOAAZZOOAAAAAA]], + [[ ZZZZZZXXUUXXXXYYYYYYYYBBAAAAZZOOOOAAOOZZZZAAAA]], + [[ ZZUUZZXXUUUUXXXXUUXXFFFFFFFFAAAAOOZZAAZZZZ AA]], + [[ RRRRUUUUZZZZZZZZXXOOFFFFOOZZOOAAAAAAZZZZAA]], + [[ CCSSUUUUZZXXXXZZXXOOFFFFOOZZOOOOZZOOAAAA]], + [[ CCCCUUUUUUUUUURRRROOFFFFOOZZOOOOZZOOZZZZ]], + [[ CCCCUUUUUUUUSSCCCCEEQQQQOOZZOOOOZZOOZZZZ]], + [[ CCCCUUGGUUUUCCCCCCEEQQQQOOZZOOOOZZEEZZ]], + [[ RRRRGGGGUUGGCCCCCCOOOOOOOOZZOOEEZZII]], + [[ IIRRGGGGGGCCCCCCOOOOOOOOZZEEII]], + [[ GGRRCCCCCCOOOOEEEEII II]], + [[ RRRRRREEEE IIII]], + [[ II]], + [[]], + } + + local yellow = "#FAC87C" + local orange = "#BF854E" + local maroon = "#502E2B" + local brown = "#38291B" + local colors = { + ["A"] = { fg = mocha.rosewater }, + ["Y"] = { fg = yellow }, + ["B"] = { fg = color.darken(yellow, 5) }, + ["X"] = { fg = color.darken(yellow, 20) }, + ["U"] = { fg = color.darken(yellow, 25) }, + ["F"] = { fg = color.darken(yellow, 35) }, + ["O"] = { fg = color.darken(yellow, 45) }, + ["K"] = { fg = maroon }, + ["H"] = { fg = color.darken(maroon, 10) }, + ["Z"] = { fg = mocha.crust }, + ["G"] = { fg = color.darken(yellow, 25) }, + ["R"] = { fg = orange }, + ["Q"] = { fg = color.darken(orange, 20) }, + ["E"] = { fg = color.darken(orange, 35) }, + ["I"] = { fg = brown }, + ["C"] = { fg = mocha.mantle }, + ["S"] = { fg = mocha.subtext1 }, + } + + local header = {} + for _, line in ipairs(color_map) do + local header_line = [[]] + for i = 1, #line do + if line:sub(i, i) ~= " " then + header_line = header_line .. "█" + else + header_line = header_line .. " " + end + end + table.insert(header, header_line) + end + + local header_add = [[ N E O B E E ]] + table.insert(header, header_add) + + local hl_add = {} + for i = 1, #header_add do + table.insert(hl_add, { "NeoBeeTitle", 1, i }) + end + + dashboard.section.header.val = header + local colorized = colorize(header, color_map, colors) + + table.insert(colorized, hl_add) + + dashboard.section.header.opts = { + hl = colorized, + position = "center", + } + + dashboard.section.buttons.val = { + dashboard.button("SPC e e", " New file", "ene "), + dashboard.button("SPC f f", " Find file"), + dashboard.button("SPC s s", " NeoBee config", "Neotree reveal ~/.config/nvim"), + dashboard.button("SPC q q", " Quit", "qa"), + } + for _, a in ipairs(dashboard.section.buttons.val) do + a.opts.width = 49 + a.opts.cursor = -2 + end + + alpha.setup(dashboard.config) +end + +return M diff --git a/nvim/files/lua/plugins/alpha_headers/cat_gun.lua b/nvim/files/lua/plugins/alpha_headers/cat_gun.lua new file mode 100644 index 0000000..15762b1 --- /dev/null +++ b/nvim/files/lua/plugins/alpha_headers/cat_gun.lua @@ -0,0 +1,37 @@ +local M = {} + +M.setup = function(dashboard) + vim.api.nvim_set_hl(0, "AlphaHeaderRed", { fg = _G.matugen_palette.color12, bold = true }) + + local logo = { + "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠋⠀⢀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠈⠉⠉⠙⠛⠛⠻⢿⣿⡿⠟⠁⠀⣀⣴⣿⣿⣿⣿⣿⠟", + "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠛⣉⣡⠀⣠⣴⣶⣶⣦⠄⣀⡀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⡿⢃⣾", + "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⣾⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⣠⣾⡟⢡⣾⣿⣿⣿⡿⢋⣴⣿⡿⢀⣴⣾⣿⣿⣿⣿⣿⣿⣿⢡⣾⣿", + "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠃⠀⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⣼⣿⡟⣰⣿⣿⣿⣿⠏⣰⣿⣿⠟⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢚⣛⢿", + "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⠸⣿⠟⢰⣿⣿⣿⣿⠃⣾⣿⣿⠏⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢋⣾", + "⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠻⠻⠃⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⢉⣴⣿⣿⣿⣿⡇⠘⣿⣿⠋⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡘⣿", + "⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⣿⣿⣿⣿⠁⢀⣀⠀⢀⣾⣿⣿⣿⣿⣿⣿⠟⠉⠉⠉⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣤⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣌", + "⣿⣿⣿⣿⣿⣿⡿⠁⣀⣤⡀⠀⠈⠻⢿⠀⣼⣿⣷⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿", + "⣿⣿⣿⠟⠛⠙⠃⠀⣿⣿⣿⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⡿⠿⠿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⠁⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿", + "⣿⠟⠁⢀⣴⣶⣶⣾⣿⣿⣿⣿⣶⡐⢦⣄⠀⠀⠈⠛⢿⣿⣿⣿⣿⡀⠀⠀⠀⠀⢀⣼⡿⢛⣩⣴⣶⣶⣶⣶⣶⣶⣭⣙⠻⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿", + "⠁⠀⣴⣿⣿⣿⣿⠿⠿⣿⣿⣿⣿⣿⣦⡙⠻⣶⣄⡀⠀⠈⠙⢿⣿⣷⣦⣤⣤⣴⣿⡏⣠⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣌⠻⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿", + "⠀⢸⣿⣿⣿⠋⣠⠔⠀⠀⠻⣿⣿⣿⣿⢉⡳⢦⣉⠛⢷⣤⣀⠀⠈⠙⠿⣿⣿⣿⣿⢸⣿⡄⠻⣿⣿⠟⡈⣿⣿⣿⣿⣿⢉⣿⣧⢹⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿", + "⠀⢸⣿⣿⡇⠠⡇⠀⠀⠀⠀⣿⣿⣿⣿⢸⣿⣷⣤⣙⠢⢌⡛⠷⣤⣄⠀⠈⠙⠿⣿⣿⣿⣿⣷⣦⣴⣾⣿⣤⣙⣛⣛⣥⣾⣿⣿⡌⣿⣿⣿⣷⣤⣀⣀⣀⣠⣴⣿⣿⣿⣿⣿⣿⣿", + "⠀⢸⣿⣿⣷⡀⠡⠀⠀⠀⣰⣿⣿⣿⣿⢸⣿⣿⣿⣿⣿⣦⣌⡓⠤⣙⣿⣦⡄⠀⠈⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢡⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⢸⣿⣿⣿⣿⣶⣤⣴⣾⣿⣿⣿⣿⣿⢸⣿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣷⠀⣶⡄⠀⠈⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢃⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⢸⣿⣿⣿⣿⣿⠟⠻⣿⣿⡏⣉⣭⣭⡘⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⣿⡇⢸⡇⢠⡀⠈⠙⠋⠉⠉⠉⠉⠛⠫⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⢸⣿⣿⠛⣿⣿⣀⣀⣾⡿⢀⣿⣿⣿⢻⣷⣦⢈⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⠀⣿⡇⢸⡇⢸⣿⠀⣦⠀⠀⠶⣶⣦⣀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⢸⣿⣿⣦⣈⡛⠿⠟⣋⣤⣾⣿⣿⣿⣸⣿⣿⢸⡇⢰⡆⢈⡙⠻⢿⣿⣿⣿⠀⢿⡇⢸⡇⢸⣿⢠⣿⡇⣿⡆⢈⡙⠻⠧⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿", + "⠀⠀⣝⠛⢿⣿⣿⣿⣿⣿⣿⠟⣁⠀⠀⢈⠛⠿⢸⣇⢸⡇⢸⡇⣶⣦⣌⡙⠻⢄⡀⠁⠘⠇⠘⣿⢸⣿⡇⣿⡇⢸⡛⠷⣦⣄⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿", + } + + -- Keep the logo as a single string to preserve formatting + dashboard.section.header.val = logo + dashboard.section.header.opts = { + position = "center", + hl = "AlphaHeaderRed", + shrink_margin = false, + } +end + +return M diff --git a/nvim/files/lua/plugins/alpha_headers/doom.lua b/nvim/files/lua/plugins/alpha_headers/doom.lua new file mode 100644 index 0000000..c7704ab --- /dev/null +++ b/nvim/files/lua/plugins/alpha_headers/doom.lua @@ -0,0 +1,52 @@ +local M = {} + +M.setup = function(dashboard) + vim.api.nvim_set_hl(0, "AlphaHeaderRed", { fg = _G.matugen_palette.color12, bold = true }) + + local logo = { + " :h- Nhy` ", + " -mh. h. `Ndho ", + " hmh+ oNm. oNdhh ", + " `Nmhd` /NNmd /NNhhd ", + " -NNhhy `hMNmmm`+NNdhhh ", + " .NNmhhs ```....`..-:/./mNdhhh+ ", + " mNNdhhh- `.-::///+++////++//:--.`-/sd` ", + " oNNNdhhdo..://++//++++++/+++//++///++/-.` ", + " y. `mNNNmhhhdy+/++++//+/////++//+++///++////-` `/oos: ", + " . Nmy: :NNNNmhhhhdy+/++/+++///:.....--:////+++///:.`:s+ ", + " h- dNmNmy oNNNNNdhhhhy:/+/+++/- ---:/+++//++//.` ", + " hd+` -NNNy`./dNNNNNhhhh+-:///// -+oo:` ::-:+////++///:` ", + " /Nmhs+oss-:++/dNNNmhho:--::/// /mmmmmo ../-///++///////. ", + " oNNdhhhhhhhs//osso/:---:::/// /yyyyso ..o+-//////////:/. ", + " /mNNNmdhhhh/://+///:::////// -:::- ..+sy+:////////::/:/. ", + " /hNNNdhhs--:/+++////++/////. ..-/yhhs-/////////::/::/` ", + " .ooo+/-::::/+///////++++//-/ossyyhhhhs/:///////:::/::::/: ", + " -///:::::::////++///+++/////:/+ooo+/::///////.::://::---+` ", + " /////+//++++/////+////-..//////////::-:::--`.:///:---:::/: ", + " //+++//++++++////+++///::-- .::::-------:: ", + " :/++++///////////++++//////. -:/:----::../- ", + " -/++++//++///+////////////// .::::---:::-.+` ", + " `////////////////////////////:. --::-----...-/ ", + " -///://////////////////////::::-.. :-:-:-..-::.`.+` ", + " :/://///:///::://::://::::::/:::::::-:---::-.-....``/- - ", + " ::::://::://::::::::::::::----------..-:....`.../- -+oo/ ", + " -/:::-:::::---://:-::-::::----::---.-.......`-/. ``", + " s-`::--:::------:////----:---.-:::...-.....`./: ", + " yMNy.`::-.--::..-dmmhhhs-..-.-.......`.....-/:` ", + " oMNNNh. `-::--...:NNNdhhh/.--.`..``.......:/- ", + " :dy+:` .-::-..NNNhhd+``..`...````.-::-` ", + " .-:mNdhh:.......--::::-` ", + " yNh/..------..` ", + " ", + } + + -- Keep the logo as a single string to preserve formatting + dashboard.section.header.val = logo + dashboard.section.header.opts = { + position = "center", + hl = "AlphaHeaderRed", + shrink_margin = false, + } +end + +return M diff --git a/nvim/files/lua/plugins/alpha_headers/fallout.lua b/nvim/files/lua/plugins/alpha_headers/fallout.lua new file mode 100644 index 0000000..1b7b86f --- /dev/null +++ b/nvim/files/lua/plugins/alpha_headers/fallout.lua @@ -0,0 +1,48 @@ +local M = {} + +M.setup = function(dashboard) + vim.api.nvim_set_hl(0, "AlphaHeaderGreen", { fg = _G.matugen_palette.color12, bold = true }) + + local logo = [[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡿⠛⢶⣦⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣦⠀⣠⡾⠛⠙⠛⠋⠀⠀⠀⠈⠉⠛⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢾⡇⠙⠛⠋⢀⣤⣀⠀⣀⣤⣤⡀⠀⠀⠀⠈⠻⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡤⠤⠴⠾⠋⠉⠛⢾⡏⠙⠿⠦⠤⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣧⡀⢀⡤⠋⠀⠈⠉⠉⠀⠉⠳⠤⠤⠴⢦⡄⠸⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡤⢶⣿⠉⢀⣀⡠⠆⠀⠀⠀⠀⠀⠀⠀⢤⣀⣀⠈⢹⣦⢤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣀⡿⠿⠾⠀⠀⠀⠀⠀⢴⣦⡀⠀⠀⠀⣠⠟⠀⢹⡇⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣤⣿⣁⡡⣴⡏⠀⠀⠀⢀⠀⢧⣀⠄⠀⠀⠀⣀⣰⠆⢀⠁⠀⠀⢈⣶⡤⣀⢹⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡟⠀⣴⡄⠀⢀⡄⠀⠀⣦⡈⠃⠀⠀⡾⣳⣄⠀⣼⡇⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⣠⢴⠟⢁⡝⠀⠁⠀⠃⠉⠀⠀⠘⣯⠀⡀⠾⣤⣄⣠⢤⠾⠄⠀⣸⠖⠀⠀⠈⠀⠃⠀⠀⠹⡄⠙⣶⢤⡀⠀⠀⠀⠀⠀⠀⠀⣠⡶⠟⠻⠶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡿⠀⠀⠿⠁⢀⡞⠁⠀⠀⣿⠗⠀⠀⠀⣟⢮⣿⣆⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⣠⠾⡇⠈⣀⡞⠀⠀⠀⠀⡀⠀⢀⣠⣄⣇⠀⣳⠴⠃⠀⠀⠀⠣⢴⠉⣰⣇⣀⣀⠀⠀⡄⠀⠀⠀⢹⣄⡘⠈⡷⣦⠀⠀⠀ ⠀⢸⠏⠀⠀⠀⣰⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⡇⠀⠀⠀⠰⣯⡀⠀⠀⠀⠀⠀⠀⠀⠀⠪⣳⡵⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⢠⠞⠉⢻⡄⠀⠀⠈⠙⠀⠀⠀⠀⠙⣶⣏⣤⣤⠟⠉⠁⠀⠀⠀⠀⠀⠀⠀⠉⠙⢦⣱⣌⣷⠊⠀⠀⠀⠀⠈⠁⠀⠀⠀⡝⠉⠻⣄ ⢸⡀⠀⠀⢰⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣇⠀⣦⣀⠀⠈⠉⢀⣀⣰⣦⡀⠀⠀⠀⠀⠈⠉⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⣴⠛⢀⡠⢼⡇⠀⠀⢀⡄⠀⢀⣀⡽⠚⠁⠀⠀⠀⢠⡀⢠⣀⠠⣔⢁⡀⠀⣄⠀⡄⠀⠀⠀⠈⠑⠺⣄⡀⠀⠠⡀⠀⠀⢠⡧⠄⠀⠘⢧ ⠘⣷⠀⠀⠘⢷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡆⠻⠦⣌⣉⣉⣁⡤⠔⠻⡇⠀⠀⠀⣀⣠⣼⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⣿⡶⠋⠀⠀⠈⣠⣈⣩⠗⠒⠋⠀⠀⠀⠀⣀⣠⣆⡼⣷⣞⠛⠻⡉⠉⡟⠒⡛⣶⠧⣀⣀⣀⠀⠀⠀⠀⠈⠓⠺⢏⣉⣠⠋⠀⠀⠀⡾⠛⠉⠙⠛⠲⢦⣄⠀⠙⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣄⠀⠀⠲⠇⠀⠀⠀⠀⠀⠀⢀⣴⢏⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⣿⠇⠐⠤⠤⠖⠁⣿⣀⣀⠀⠀⠀⠀⠀⠉⠁⠈⠉⠙⠛⢿⣷⡄⢣⡼⠀⣾⣿⠧⠒⠓⠚⠛⠉⠀⠀⠀⠀⠀⢀⣀⣾⡉⠓⠤⡤⠄⣇⣀⣀⣀⡀⠀⠀⠈⣧⠀⠈⣿⣦⣄⡀⠀⠀⠀⠀⠀⠀⢀⣻⣦⣄⠀⠀⠀⠀⠀⠀⡠⠔⣿⠓⢶⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +⠹⣆⣤⠀⠀⠠⠀⠈⠓⠈⠓⠤⡀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣿⣿⢸⠀⢸⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⢀⡤⠒⠁⠰⠃⠀⠠⠀⠀⢀⠟⠁⠀⠈⠉⠙⠳⢴⡏⠀⠀⣿⡇⠈⠙⠻⠶⠤⠴⠶⠛⠋⠹⡀⠈⠻⣶⣤⠤⠄⣀⣠⠞⠁⠀⢸⠀⠈⠙⠳⢦⣄⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠉⠓⢲⣄⡈⢀⣠⠀⠀⠀⡸⠶⠂⠀⠀⢀⠀⠀⠤⠞⢻⡇⠀⠀⢘⡟⠑⠤⠄⠀⢀⠀⠀⠐⠲⢿⡀⠀⠀⢤⣀⢈⣀⡴⠖⠋⣧⣤⣤⣤⣤⣀⡀⠀⣷⢀⣼⠃⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢦⣀⠀⠉⠉⠉⠉⠀⠀⢀⣴⠏⠀⠀⠀⠀⠀⠉⠻⣦⣄⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠈⠉⠉⠙⠓⠒⣾⣁⣀⣴⠀⣀⠙⢧⠂⢀⣆⣀⣷⣤⣀⣾⣇⣀⡆⠀⢢⠛⢁⠀⢰⣀⣀⣹⠒⠒⠛⠉⠉⠉⠀⠀⠀⡏⠀⢠⠀⠀⠈⠉⢺⠁⢈⡞⢀⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⠒⢦⠀⠀⠀⢸⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢷⡄⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠁⠈⠉⠉⠛⠉⠙⠉⠀⠀⣿⡟⣿⣿⠀⠀⠈⠉⠉⠙⠋⠉⠉⠀⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣦⣈⠙⠶⠤⠴⢞⣠⠞⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⢀⣦⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠈⡆⠀⠀⠀⢰⠀⠀⠀⠀⠀⠀⠀⠈⠻⣆⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡇⢻⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠛⠛⠛⠯⢤⣤⣎⣀⠀⠀⠀⢀⣀⣠⣤⣾⠛⠁⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⢻⠀⠀⠀⠈⡆⠀⠀⡀⠀⠀⠀⠀⠀⠙⣇ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣾⣿⣿⠁⠀⢹⡛⣟⡶⢤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠙⠛⠛⠛⠛⠉⠉⠠⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⢇⠀⠀⠀⠀⡇⠀⠀⠀⡇⠀⣰⠏⠀⠀⠀⠀⠀⠀⡿ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⠛⢯⣽⡟⢿⣿⠛⠿⠳⠞⠻⣿⠻⣆⢽⠟⣶⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⢃⠀⠀⠀⢸⣰⠁⠀⠀⠀⠀⠀⠀⣸⠇ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠃⠲⠯⠴⣦⣼⣷⣤⣤⣶⣤⣩⡧⠽⠷⠐⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⠀⠀⢸⠀⠀⢀⣸⡇⠀⠀⠀⠀⠀⠀⣰⠏⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⡇⠀⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠛⠢⣄⡀⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠸⣤⠴⠛⠁⣿⠤⢤⡀⠀⢀⡼⠏⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣄⡀⢀⣀⣠⡾⡿⢡⢐██████⣀⣄⡀█████⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀███⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠉⠉⠓⠒⠶⠶⠞⠁⠀⠀⠀⠀⠁⠀⠀⠀⢿⠀⠀⠈⢳⡟⠁⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⢴⡏⠁⠀⠝⠉⣡⠟⣰⠃⢸░░██████⠀░░███⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀░░░⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⢻⠀⠀⣀⡼⠃⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⡟⠀⠈⣿⢄⡴⠞⠻⣄⣰⣡⠤⣞⣸░███░███⣶░███⡀⠀█████⠀█████⠀████⠀⠀█████████████⡀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⡴⠞⠋⠀⠀⡇⠛⣻⡄⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠀⢀⣴⣶⡿⠃⠉⢺⠁⠙⠒⠀⠀⣠⡉⠀⠉⠚⠉⠉░███░░███░███⢻░░███⠀░░███⠀░░███⠀░░███░░███░░███⠉⠛⠛⠛⠛⠛⠉⠉⠉⠀⠀⠀⠀⠀⠀⡟⠛⠋⠁⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⣠⣾⣿⣇⠁⢈⡦⠀⡍⠋⠁⡀⠸⡋⠀⠀⠀⢘⠏⠉░███⢉░░██████⠈⢁░███⠀⠀░███⠀ ░███⠀⠀░███⠀░███⠀░███⠀⠀⠀⠀⠀⢰⡖⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀ +⠀⠀⠀⠀⠀⠀⠉⣁⠀⠉⠉⠉⠙⠛⠛⠒⠚⠳⠤⢼⣤⣠⠤⣮⣠⣤░███⣿⠤░░█████⠉⠉░░███⠀███⠀⠀ ░███⠀⠀░███⠀░███⠀░███⠀⠀⠀⠀⢠⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀ + █████ ░░█████ ░░█████ █████ █████░███ █████ + ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░ ░░░░░ + + ]] + + -- Keep the logo as a single string to preserve formatting + dashboard.section.header.val = vim.split(logo, "\n") + dashboard.section.header.opts = { + position = "center", + hl = "AlphaHeaderGreen", + shrink_margin = false, + } +end + +return M diff --git a/nvim/files/lua/plugins/alpha_headers/nyan.lua b/nvim/files/lua/plugins/alpha_headers/nyan.lua new file mode 100644 index 0000000..2a28717 --- /dev/null +++ b/nvim/files/lua/plugins/alpha_headers/nyan.lua @@ -0,0 +1,124 @@ +local function getLen(str, start_pos) + local byte = string.byte(str, start_pos) + if not byte then + return nil + end + + return (byte < 0x80 and 1) or (byte < 0xE0 and 2) or (byte < 0xF0 and 3) or (byte < 0xF8 and 4) or 1 +end + +local function colorize(header, header_color_map, colors) + for letter, color in pairs(colors) do + local color_name = "AlphaJemuelKwelKwelWalangTatay" .. letter + vim.api.nvim_set_hl(0, color_name, color) + colors[letter] = color_name + end + + local colorized = {} + + for i, line in ipairs(header_color_map) do + local colorized_line = {} + local pos = 0 + + for j = 1, #line do + local start = pos + pos = pos + getLen(header[i], start + 1) + + local color_name = colors[line:sub(j, j)] + if color_name then + table.insert(colorized_line, { color_name, start, pos }) + end + end + + table.insert(colorized, colorized_line) + end + + return colorized +end + +local M = {} + +M.setup = function(dashboard) + local header = { + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + [[ ██████████████████████████████████████████████████████████████████████████████████████████████████████ ]], + } + + local color_map = { + [[ WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBWWWWWWWWWWWWWW ]], + [[ RRRRWWWWWWWWWWWWWWWWRRRRRRRRRRRRRRRRWWWWWWWWWWWWWWWWBBPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPBBWWWWWWWWWWWW ]], + [[ RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRBBPPPPPPHHHHHHHHHHHHHHHHHHHHHHHHHHPPPPPPBBWWWWWWWWWW ]], + [[ RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRBBPPPPHHHHHHHHHHHHFFHHHHFFHHHHHHHHHHPPPPBBWWWWWWWWWW ]], + [[ OOOORRRRRRRRRRRRRRRROOOOOOOOOOOOOOOORRRRRRRRRRRRRRBBPPHHHHFFHHHHHHHHHHHHHHHHHHHHHHHHHHHHPPBBWWWWWWWWWW ]], + [[ OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBBPPHHHHHHHHHHHHHHHHHHHHBBBBHHHHFFHHHHPPBBWWBBBBWWWW ]], + [[ OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBBPPHHHHHHHHHHHHHHHHHHBBMMMMBBHHHHHHHHPPBBBBMMMMBBWW ]], + [[ YYYYOOOOOOOOOOOOOOOOYYYYYYYYYYYYYYYYOOBBBBBBBBOOOOBBPPHHHHHHHHHHHHFFHHHHBBMMMMMMBBHHHHHHPPBBMMMMMMBBWW ]], + [[ YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBMMMMBBBBOOBBPPHHHHHHHHHHHHHHHHHHBBMMMMMMMMBBBBBBBBMMMMMMMMBBWW ]], + [[ YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBBBMMMMBBBBBBPPHHHHHHFFHHHHHHHHHHBBMMMMMMMMMMMMMMMMMMMMMMMMBBWW ]], + [[ GGGGYYYYYYYYYYYYYYYYGGGGGGGGGGGGGGGGYYYYBBBBMMMMBBBBPPHHHHHHHHHHHHHHFFBBMMMMMMMMMMMMMMMMMMMMMMMMMMMMBB ]], + [[ GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBMMMMBBPPHHFFHHHHHHHHHHHHBBMMMMMMCCBBMMMMMMMMMMCCBBMMMMBB ]], + [[ GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGBBBBBBBBPPHHHHHHHHHHHHHHHHBBMMMMMMBBBBMMMMMMBBMMBBBBMMMMBB ]], + [[ UUUUGGGGGGGGGGGGGGGGUUUUUUUUUUUUUUUUGGGGGGGGGGGGBBBBPPHHHHHHHHHHFFHHHHBBMMRRRRMMMMMMMMMMMMMMMMMMRRRRBB ]], + [[ UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUBBPPPPHHFFHHHHHHHHHHBBMMRRRRMMBBMMMMBBMMMMBBMMRRRRBB ]], + [[ UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUBBPPPPPPHHHHHHHHHHHHHHBBMMMMMMBBBBBBBBBBBBBBMMMMBBWW ]], + [[ VVVVUUUUUUUUUUUUUUUUVVVVVVVVVVVVVVVVUUUUUUUUUUUUBBBBBBPPPPPPPPPPPPPPPPPPPPBBMMMMMMMMMMMMMMMMMMMMBBWWWW ]], + [[ VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBBMMMMMMBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBWWWWWW ]], + [[ VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBBMMMMBBBBWWBBMMMMBBWWWWWWWWWWBBMMMMBBWWBBMMMMBBWWWWWWWW ]], + [[ WWWWVVVVVVVVVVVVVVVVWWWWWWWWWWWWWWWWVVVVVVVVVVBBBBBBBBWWWWBBBBBBWWWWWWWWWWWWWWBBBBBBWWWWBBBBWWWWWWWWWW ]], + } + + local c = { + color0 = "#191724", + color1 = "#eb6f92", + color2 = "#31748f", + color3 = "#f6c177", + color4 = "#9ccfd8", + color5 = "#c4a7e7", + color6 = "#ebbcba", + color7 = "#908caa", + color8 = "#26233a", + color15 = "#e0def4", + } + + local colors = { + ["W"] = { fg = c.color0 }, + ["C"] = { fg = c.color15 }, + ["B"] = { fg = c.color8 }, + ["R"] = { fg = c.color1 }, + ["O"] = { fg = c.color6 }, + ["Y"] = { fg = c.color3 }, + ["G"] = { fg = c.color4 }, + ["U"] = { fg = c.color2 }, + ["P"] = { fg = c.color3 }, + ["H"] = { fg = c.color5 }, + ["F"] = { fg = c.color1 }, + ["M"] = { fg = c.color7 }, + ["V"] = { fg = c.color5 }, + } + + dashboard.section.header.val = header + dashboard.section.header.opts = { + hl = colorize(header, color_map, colors), + position = "center", + } +end + +return M diff --git a/nvim/files/lua/plugins/alpha_headers/outer_wilds.lua b/nvim/files/lua/plugins/alpha_headers/outer_wilds.lua new file mode 100644 index 0000000..835b068 --- /dev/null +++ b/nvim/files/lua/plugins/alpha_headers/outer_wilds.lua @@ -0,0 +1,31 @@ +local M = {} + +M.setup = function(dashboard) + vim.api.nvim_set_hl(0, "AlphaHeaderColor", { fg = _G.matugen_palette.color12, bold = true }) + + dashboard.section.header.val = { + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣾⣿⣄⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣄⠀⠀⠀⠀⠀⠀⢴⣾⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⡿⠛⠉⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣟⠛⠛⠛⠛⣻⣿⣿⡿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠈⢿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣦⠀⠀⣼⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⡟⢻⣿⣿⣆⠀⠀⠀⠀⠀⠀⢻⣿⣿⣧⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⢀⣤⣶⣿⣿⣿⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣷⣼⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⡟⠀⠀⠻⣿⣿⣧⡀⠀⠀⠀⠀⠀⢻⣿⣿⣧⠀⠀⠀⠀⠀", + "⠀⠀⠀⣀⣤⣾⣿⣿⣿⠟⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⠏⠀⠀⠀⠀⠙⣿⣿⣷⡀⠀⠀⠀⠀⠀⠹⣿⣿⣷⡀⠀⠀⠀", + "⠀⠀⠀⠙⣿⣿⣿⡍⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣷⡄⠀⠀⠀⠀⠀⠙⣿⣿⣷⡀⠀⠀⠀⠀⢠⣾⣿⣿⠃⠀⠀⠀", + "⠀⠀⠀⠀⠈⢿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⢿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣄⠀⠀⠀⠀⠀⠘⢿⣿⣿⣄⠀⠀⣠⣿⣿⡿⠁⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠈⢿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⡿⠁⠈⢿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣆⠀⠀⠀⠀⠀⠈⢿⣿⣿⣆⣰⣿⣿⡿⠁⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⡟⠁⠀⠀⠈⢻⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣦⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⡟⠁⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⡧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢼⣿⣿⡟⠀⠀⠀⠀⠀⠀⢻⣿⣿⡧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⡧⠀⠀⠀⠀⠀⠀⢻⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀", + "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠋⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠹⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀", + "", + "", + } + + dashboard.section.header.opts = { + position = "center", + hl = "AlphaHeaderColor", + shrink_margin = false, + } +end + +return M diff --git a/nvim/files/lua/plugins/blink.lua b/nvim/files/lua/plugins/blink.lua new file mode 100644 index 0000000..36ee464 --- /dev/null +++ b/nvim/files/lua/plugins/blink.lua @@ -0,0 +1,99 @@ +return { + -- Autocompletion + "saghen/blink.cmp", + event = "VimEnter", + version = "1.*", + dependencies = { + -- Snippet Engine + { + "L3MON4D3/LuaSnip", + version = "2.*", + build = (function() + -- Build Step is needed for regex support in snippets. + -- This step is not supported in many windows environments. + -- Remove the below condition to re-enable on windows. + if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then + return + end + return "make install_jsregexp" + end)(), + dependencies = { + -- `friendly-snippets` contains a variety of premade snippets. + -- See the README about individual language/framework/plugin snippets: + -- https://github.com/rafamadriz/friendly-snippets + -- { + -- 'rafamadriz/friendly-snippets', + -- config = function() + -- require('luasnip.loaders.from_vscode').lazy_load() + -- end, + -- }, + }, + opts = {}, + }, + "folke/lazydev.nvim", + }, + --- @module 'blink.cmp' + --- @type blink.cmp.Config + opts = { + keymap = { + -- 'default' (recommended) for mappings similar to built-in completions + -- to accept ([y]es) the completion. + -- This will auto-import if your LSP supports it. + -- This will expand snippets if the LSP sent a snippet. + -- 'super-tab' for tab to accept + -- 'enter' for enter to accept + -- 'none' for no mappings + -- + -- For an understanding of why the 'default' preset is recommended, + -- you will need to read `:help ins-completion` + -- + -- No, but seriously. Please read `:help ins-completion`, it is really good! + -- + -- All presets have the following mappings: + -- /: move to right/left of your snippet expansion + -- : Open menu or open docs if already open + -- / or /: Select next/previous item + -- : Hide menu + -- : Toggle signature help + -- + -- See :h blink-cmp-config-keymap for defining your own keymap + preset = "default", + + -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: + -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps + }, + + appearance = { + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- Adjusts spacing to ensure icons are aligned + nerd_font_variant = "mono", + }, + + completion = { + -- By default, you may press `` to show the documentation. + -- Optionally, set `auto_show = true` to show the documentation after a delay. + documentation = { auto_show = false, auto_show_delay_ms = 500 }, + }, + + sources = { + default = { "lsp", "path", "snippets", "lazydev" }, + providers = { + lazydev = { module = "lazydev.integrations.blink", score_offset = 100 }, + }, + }, + + snippets = { preset = "luasnip" }, + + -- Blink.cmp includes an optional, recommended rust fuzzy matcher, + -- which automatically downloads a prebuilt binary when enabled. + -- + -- By default, we use the Lua implementation instead, but you may enable + -- the rust implementation via `'prefer_rust_with_warning'` + -- + -- See :h blink-cmp-config-fuzzy for more information + fuzzy = { implementation = "lua" }, + + -- Shows a signature help window while you type arguments for a function + signature = { enabled = true }, + }, +} diff --git a/nvim/files/lua/plugins/chezmoi.lua b/nvim/files/lua/plugins/chezmoi.lua new file mode 100644 index 0000000..81e69b0 --- /dev/null +++ b/nvim/files/lua/plugins/chezmoi.lua @@ -0,0 +1,19 @@ +return { + 'xvzc/chezmoi.nvim', + dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + require("chezmoi").setup { + -- e.g. ~/.local/share/chezmoi/* + vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, { + pattern = { os.getenv("HOME") .. "/.local/share/chezmoi/*" }, + callback = function(ev) + local bufnr = ev.buf + local edit_watch = function() + require("chezmoi.commands.__edit").watch(bufnr) + end + vim.schedule(edit_watch) + end, + }) + } + end +} diff --git a/nvim/files/lua/plugins/colors.lua b/nvim/files/lua/plugins/colors.lua new file mode 100644 index 0000000..7317541 --- /dev/null +++ b/nvim/files/lua/plugins/colors.lua @@ -0,0 +1,90 @@ +return { + { + "rose-pine/neovim", + name = "rose-pine", + enabled = false, + config = function() + vim.opt.laststatus = 2 -- Or 3 for global statusline + vim.opt.statusline = " %f %m %= %l:%c ♥ " + + require("rose-pine").setup({ + variant = "moon", -- auto, main, moon, or dawn + dark_variant = "moon", -- main, moon, or dawn + dim_inactive_windows = false, + extend_background_behind_borders = true, + + enable = { + terminal = true, + legacy_highlights = true, -- Improve compatibility for previous versions of Neovim + migrations = true, -- Handle deprecated options automatically + }, + + styles = { + bold = true, + italic = true, + transparency = true, + }, + + groups = { + border = "muted", + link = "iris", + panel = "surface", + + error = "love", + hint = "iris", + info = "foam", + note = "pine", + todo = "rose", + warn = "gold", + + git_add = "foam", + git_change = "rose", + git_delete = "love", + git_dirty = "rose", + git_ignore = "muted", + git_merge = "iris", + git_rename = "pine", + git_stage = "iris", + git_text = "rose", + git_untracked = "subtle", + + h1 = "iris", + h2 = "foam", + h3 = "rose", + h4 = "gold", + h5 = "pine", + h6 = "foam", + }, + + highlight_groups = { + -- Comment = { fg = "foam" }, + -- VertSplit = { fg = "muted", bg = "muted" }, + StatusLine = { fg = "love", bg = "love", blend = 10 }, + StatusLineNC = { fg = "subtle", bg = "surface" }, + + -- Transparent Telescope + TelescopeBorder = { fg = "highlight_high", bg = "none" }, + TelescopeNormal = { bg = "none" }, + TelescopePromptNormal = { bg = "base" }, + TelescopeResultsNormal = { fg = "subtle", bg = "none" }, + TelescopeSelection = { fg = "text", bg = "base" }, + TelescopeSelectionCaret = { fg = "rose", bg = "rose" }, + }, + + before_highlight = function(group, highlight, palette) + -- Disable all undercurls + -- if highlight.undercurl then + -- highlight.undercurl = false + -- end + -- + -- Change palette colour + -- if highlight.fg == palette.pine then + -- highlight.fg = palette.foam + -- end + end, + }) + + vim.cmd("colorscheme rose-pine") + end, + }, +} diff --git a/nvim/files/lua/plugins/conform.lua b/nvim/files/lua/plugins/conform.lua new file mode 100644 index 0000000..37e7d92 --- /dev/null +++ b/nvim/files/lua/plugins/conform.lua @@ -0,0 +1,66 @@ +return { + "stevearc/conform.nvim", + event = { "BufReadPre", "BufNewFile" }, + config = function() + local conform = require("conform") + + conform.setup({ + formatters_by_ft = { + javascript = { "prettierd" }, + typescript = { "prettierd" }, + javascriptreact = { "prettierd" }, + typescriptreact = { "prettierd" }, + svelte = { "prettierd" }, + vue = { "prettierd" }, + css = { "prettierd" }, + html = { "prettierd" }, + json = { "prettierd" }, + yaml = { "prettierd" }, + markdown = { "prettierd" }, + graphql = { "prettierd" }, + lua = { "stylua" }, + python = { "isort", "black" }, + astro = { "prettierd" }, + nix = { "alejandra" }, + }, + format_on_save = function(bufnr) + -- Disable with a global or buffer-local variable + if vim.g.disable_autoformat or vim.b[bufnr].disable_autoformat then + return + end + return { timeout_ms = 1000, lsp_format = "fallback" } + end, + }) + + vim.api.nvim_create_user_command("Format", function(args) + local range = nil + if args.count ~= -1 then + local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1] + range = { + start = { args.line1, 0 }, + ["end"] = { args.line2, end_line:len() }, + } + end + require("conform").format({ async = true, lsp_fallback = true, range = range }) + end, { range = true }) + + vim.api.nvim_create_user_command("FormatDisable", function(args) + if args.bang then + -- FormatDisable! will disable formatting just for this buffer + vim.b.disable_autoformat = true + else + vim.g.disable_autoformat = true + end + end, { + desc = "Disable autoformat-on-save", + bang = true, + }) + + vim.api.nvim_create_user_command("FormatEnable", function() + vim.b.disable_autoformat = false + vim.g.disable_autoformat = false + end, { + desc = "Re-enable autoformat-on-save", + }) + end, +} diff --git a/nvim/files/lua/plugins/context.lua b/nvim/files/lua/plugins/context.lua new file mode 100644 index 0000000..856b3b5 --- /dev/null +++ b/nvim/files/lua/plugins/context.lua @@ -0,0 +1,24 @@ +return { + "nvim-treesitter/nvim-treesitter-context", + config = function() + local c = _G.matugen_palette + or { + color0 = "#191724", + color1 = "#eb6f92", + color2 = "#31748f", + color3 = "#f6c177", + color4 = "#9ccfd8", + color5 = "#c4a7e7", + color6 = "#ebbcba", + color7 = "#908caa", + color8 = "#26233a", + color15 = "#e0def4", + } + + local color = require("util.color") + vim.api.nvim_set_hl(0, "TreesitterContext", { + bg = color.blend(c.color15, c.color0, 0.8), + ctermbg = "blue", + }) + end, +} diff --git a/nvim/files/lua/plugins/copilot.lua b/nvim/files/lua/plugins/copilot.lua new file mode 100644 index 0000000..f32352d --- /dev/null +++ b/nvim/files/lua/plugins/copilot.lua @@ -0,0 +1,78 @@ +return { + "zbirenbaum/copilot.lua", + cmd = "Copilot", + event = "InsertEnter", + enabled = false, + config = function() + require("copilot").setup({ + panel = { + enabled = true, + auto_refresh = false, + keymap = { + jump_prev = "[[", + jump_next = "]]", + accept = "", + refresh = "gr", + open = "", + }, + layout = { + position = "bottom", -- | top | left | right | bottom | + ratio = 0.4, + }, + }, + suggestion = { + enabled = true, + auto_trigger = false, + hide_during_completion = true, + debounce = 75, + trigger_on_accept = true, + keymap = { + accept = "", + accept_word = false, + accept_line = false, + next = "", + prev = "", + dismiss = "", + }, + }, + nes = { + enabled = false, -- requires copilot-lsp as a dependency + auto_trigger = false, + keymap = { + accept_and_goto = false, + accept = false, + dismiss = false, + }, + }, + }) + end, + -- opts = { + -- suggestion = { + -- enabled = true, + -- auto_trigger = false, -- Don't show suggestions automatically + -- keymap = { + -- accept = "", + -- accept_word = "", + -- accept_line = "", + -- next = "", -- Request/cycle suggestions + -- prev = "", + -- dismiss = "", + -- }, + -- }, + -- panel = { + -- enabled = true, + -- }, + -- }, + -- keys = { + -- { + -- "ct", + -- "Copilot toggle", + -- desc = "Copilot: Toggle auto-suggestions", + -- }, + -- { + -- "cp", + -- "Copilot panel", + -- desc = "Copilot: Open panel", + -- }, + -- }, +} diff --git a/nvim/files/lua/plugins/dankcolors.lua b/nvim/files/lua/plugins/dankcolors.lua new file mode 100644 index 0000000..22c0e2f --- /dev/null +++ b/nvim/files/lua/plugins/dankcolors.lua @@ -0,0 +1,124 @@ +-- Matugen-generated palette for use by other plugins +_G.matugen_palette = { + color0 = "#19120d", + color1 = "#ff7972", + color2 = "#95ff7f", + color3 = "#ffe672", + color4 = "#f2a063", + color5 = "#76380b", + color6 = "#ffb782", + color7 = "#fff6ef", + color8 = "#a59e99", + color9 = "#ffa49f", + color10 = "#b5ffa5", + color11 = "#ffefa5", + color12 = "#ffc194", + color13 = "#ffcca7", + color14 = "#ffdec6", + color15 = "#fffbf8", +} + +return { + { + "RRethy/base16-nvim", + priority = 1000, + config = function() + require("base16-colorscheme").setup({ + base00 = "#19120d", + base01 = "#19120d", + base02 = "#a59e99", + base03 = "#a59e99", + base04 = "#fff6ef", + base05 = "#fffbf8", + base06 = "#fffbf8", + base07 = "#fffbf8", + base08 = "#ffa49f", + base09 = "#ffa49f", + base0A = "#ffc194", + base0B = "#b5ffa5", + base0C = "#ffdec6", + base0D = "#ffc194", + base0E = "#ffcca7", + base0F = "#ffcca7", + }) + + vim.api.nvim_set_hl(0, "Visual", { + bg = "#a59e99", + fg = "#fffbf8", + bold = true, + }) + vim.api.nvim_set_hl(0, "Statusline", { + bg = "#ffc194", + fg = "#19120d", + }) + vim.api.nvim_set_hl(0, "LineNr", { fg = "#a59e99" }) + vim.api.nvim_set_hl(0, "CursorLineNr", { fg = "#ffdec6", bold = true }) + + vim.api.nvim_set_hl(0, "Statement", { + fg = "#ffcca7", + bold = true, + }) + vim.api.nvim_set_hl(0, "Keyword", { link = "Statement" }) + vim.api.nvim_set_hl(0, "Repeat", { link = "Statement" }) + vim.api.nvim_set_hl(0, "Conditional", { link = "Statement" }) + + vim.api.nvim_set_hl(0, "Function", { + fg = "#ffc194", + bold = true, + }) + vim.api.nvim_set_hl(0, "Macro", { + fg = "#ffc194", + italic = true, + }) + vim.api.nvim_set_hl(0, "@function.macro", { link = "Macro" }) + + vim.api.nvim_set_hl(0, "Type", { + fg = "#ffdec6", + bold = true, + italic = true, + }) + vim.api.nvim_set_hl(0, "Structure", { link = "Type" }) + + vim.api.nvim_set_hl(0, "String", { + fg = "#b5ffa5", + italic = true, + }) + + vim.api.nvim_set_hl(0, "Operator", { fg = "#fff6ef" }) + vim.api.nvim_set_hl(0, "Delimiter", { fg = "#fff6ef" }) + vim.api.nvim_set_hl(0, "@punctuation.bracket", { link = "Delimiter" }) + vim.api.nvim_set_hl(0, "@punctuation.delimiter", { link = "Delimiter" }) + + vim.api.nvim_set_hl(0, "Comment", { + fg = "#a59e99", + italic = true, + }) + + -- Transparent background + vim.api.nvim_set_hl(0, "Normal", { bg = "NONE" }) + vim.api.nvim_set_hl(0, "NormalNC", { bg = "NONE" }) + vim.api.nvim_set_hl(0, "NormalFloat", { bg = "NONE" }) + vim.api.nvim_set_hl(0, "SignColumn", { bg = "NONE" }) + vim.api.nvim_set_hl(0, "EndOfBuffer", { bg = "NONE" }) + + -- Emit event for other plugins to react to theme changes + vim.api.nvim_exec_autocmds("User", { pattern = "MatugenReload" }) + + local current_file_path = vim.fn.stdpath("config") .. "/lua/plugins/dankcolors.lua" + if not _G._matugen_theme_watcher then + local uv = vim.uv or vim.loop + _G._matugen_theme_watcher = uv.new_fs_event() + _G._matugen_theme_watcher:start( + current_file_path, + {}, + vim.schedule_wrap(function() + local new_spec = dofile(current_file_path) + if new_spec and new_spec[1] and new_spec[1].config then + new_spec[1].config() + end + end) + ) + end + end, + }, +} diff --git a/nvim/files/lua/plugins/fugitive.lua b/nvim/files/lua/plugins/fugitive.lua new file mode 100644 index 0000000..3fd48b0 --- /dev/null +++ b/nvim/files/lua/plugins/fugitive.lua @@ -0,0 +1,4 @@ +return { + "tpope/vim-fugitive", + enabled = true, +} diff --git a/nvim/files/lua/plugins/gitblame.lua b/nvim/files/lua/plugins/gitblame.lua new file mode 100644 index 0000000..295e7e8 --- /dev/null +++ b/nvim/files/lua/plugins/gitblame.lua @@ -0,0 +1,10 @@ +return { + "f-person/git-blame.nvim", + -- enabled = false, + config = function() + require("gitblame").setup({ enabled = false }) + vim.keymap.set("n", "gb", ":GitBlameToggle", { + desc = "Toggle git blame", + }) + end, +} diff --git a/nvim/files/lua/plugins/gitsigns.lua b/nvim/files/lua/plugins/gitsigns.lua new file mode 100644 index 0000000..2f827a7 --- /dev/null +++ b/nvim/files/lua/plugins/gitsigns.lua @@ -0,0 +1,51 @@ +return { + "lewis6991/gitsigns.nvim", + config = function(bufnr) + require("gitsigns").setup({ + on_attach = function(bufnr) + local gitsigns = require("gitsigns") + + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end + + -- Navigation + -- map('n', ']c', function() + -- if vim.wo.diff then + -- vim.cmd.normal({ ']c', bang = true }) + -- else + -- gitsigns.nav_hunk('next') + -- end + -- end) + + -- map('n', '[c', function() + -- if vim.wo.diff then + -- vim.cmd.normal({ '[c', bang = true }) + -- else + -- gitsigns.nav_hunk('prev') + -- end + -- end) + + -- -- Actions + -- map('n', 'hs', gitsigns.stage_hunk) + -- map('n', 'hr', gitsigns.reset_hunk) + -- map('v', 'hs', function() gitsigns.stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end) + -- map('v', 'hr', function() gitsigns.reset_hunk { vim.fn.line('.'), vim.fn.line('v') } end) + -- map('n', 'hS', gitsigns.stage_buffer) + -- map('n', 'hu', gitsigns.undo_stage_hunk) + -- map('n', 'hR', gitsigns.reset_buffer) + map("n", "gp", gitsigns.preview_hunk, { desc = "Preview hunk" }) + -- map('n', 'hb', function() gitsigns.blame_line { full = true } end) + -- map('n', 'tb', gitsigns.toggle_current_line_blame) + map("n", "gD", gitsigns.diffthis, { desc = "Diff this" }) + -- map('n', 'hD', function() gitsigns.diffthis('~') end) + -- map('n', 'td', gitsigns.toggle_deleted) + + -- -- Text object + -- map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk') + end, + }) + end, +} diff --git a/nvim/files/lua/plugins/harpoon.lua b/nvim/files/lua/plugins/harpoon.lua new file mode 100644 index 0000000..797c72d --- /dev/null +++ b/nvim/files/lua/plugins/harpoon.lua @@ -0,0 +1,79 @@ +return { + "theprimeagen/harpoon", + branch = "harpoon2", + dependencies = { "nvim-lua/plenary.nvim", "nvim-telescope/telescope.nvim" }, + + config = function() + local harpoon = require("harpoon") + harpoon:setup({ + settings = { save_on_toggle = true }, + }) + + vim.keymap.set("n", "a", function() + harpoon:list():add() + end) + vim.keymap.set("n", "h", function() + harpoon.ui:toggle_quick_menu(harpoon:list()) + end, { desc = "Toggle harpoon quick menu" }) + + vim.keymap.set("n", "1", function() + harpoon:list():select(1) + end) + vim.keymap.set("n", "2", function() + harpoon:list():select(2) + end) + vim.keymap.set("n", "3", function() + harpoon:list():select(3) + end) + vim.keymap.set("n", "4", function() + harpoon:list():select(4) + end) + vim.keymap.set("n", "5", function() + harpoon:list():select(5) + end) + vim.keymap.set("n", "6", function() + harpoon:list():select(6) + end) + vim.keymap.set("n", "7", function() + harpoon:list():select(7) + end) + vim.keymap.set("n", "8", function() + harpoon:list():select(8) + end) + vim.keymap.set("n", "9", function() + harpoon:list():select(9) + end) + + -- Toggle previous & next buffers stored within Harpoon list + vim.keymap.set("n", "", function() + harpoon:list():prev() + end) + vim.keymap.set("n", "", function() + harpoon:list():next() + end) + + -- basic telescope configuration + local conf = require("telescope.config").values + local function toggle_telescope(harpoon_files) + local file_paths = {} + for _, item in ipairs(harpoon_files.items) do + table.insert(file_paths, item.value) + end + + require("telescope.pickers") + .new({}, { + prompt_title = "Harpoon", + finder = require("telescope.finders").new_table({ + results = file_paths, + }), + previewer = conf.file_previewer({}), + sorter = conf.generic_sorter({}), + }) + :find() + end + + vim.keymap.set("n", "", function() + toggle_telescope(harpoon:list()) + end, { desc = "Open harpoon window" }) + end, +} diff --git a/nvim/files/lua/plugins/indent_line.lua b/nvim/files/lua/plugins/indent_line.lua new file mode 100644 index 0000000..f048a3c --- /dev/null +++ b/nvim/files/lua/plugins/indent_line.lua @@ -0,0 +1,7 @@ +return { + "lukas-reineke/indent-blankline.nvim", + enabled = true, + config = function() + require("ibl").setup() + end, +} diff --git a/nvim/files/lua/plugins/init.lua b/nvim/files/lua/plugins/init.lua new file mode 100644 index 0000000..3695671 --- /dev/null +++ b/nvim/files/lua/plugins/init.lua @@ -0,0 +1,10 @@ +return { + "NMAC427/guess-indent.nvim", -- Detect tabstop and shiftwidth automatically + -- Highlight todo, notes, etc in comments + { + "folke/todo-comments.nvim", + event = "VimEnter", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { signs = false }, + }, +} diff --git a/nvim/files/lua/plugins/jjui.lua b/nvim/files/lua/plugins/jjui.lua new file mode 100644 index 0000000..c8d1fd6 --- /dev/null +++ b/nvim/files/lua/plugins/jjui.lua @@ -0,0 +1,22 @@ +return { + "HotThoughts/jjui.nvim", + cmd = { + "JJUI", + "JJUICurrentFile", + "JJUIFilter", + "JJUIFilterCurrentFile", + "JJConfig", + }, + -- Setting the keybinding here helps lazy-loading + keys = { + { "jj", "JJUI", desc = "JJUI" }, + { "jc", "JJUICurrentFile", desc = "JJUI (current file)" }, + { "jl", "JJUIFilter", desc = "JJUI Log" }, + { "jf", "JJUIFilterCurrentFile", desc = "JJUI Log (current file)" }, + }, + config = function() + require("jjui").setup({ + -- configuration options (see below) + }) + end, +} diff --git a/nvim/files/lua/plugins/lazydev.lua b/nvim/files/lua/plugins/lazydev.lua new file mode 100644 index 0000000..cac9610 --- /dev/null +++ b/nvim/files/lua/plugins/lazydev.lua @@ -0,0 +1,12 @@ +return { + -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins + -- used for completion, annotations and signatures of Neovim apis + "folke/lazydev.nvim", + ft = "lua", + opts = { + library = { + -- Load luvit types when the `vim.uv` word is found + { path = "${3rd}/luv/library", words = { "vim%.uv" } }, + }, + }, +} diff --git a/nvim/files/lua/plugins/lsp.lua b/nvim/files/lua/plugins/lsp.lua new file mode 100644 index 0000000..de6be4b --- /dev/null +++ b/nvim/files/lua/plugins/lsp.lua @@ -0,0 +1,221 @@ +return { + -- Mason for installing LSP servers + { "mason-org/mason.nvim", opts = {} }, + "WhoIsSethDaniel/mason-tool-installer.nvim", + + -- Useful status updates for LSP. + { "j-hui/fidget.nvim", opts = {} }, + + -- Allows extra capabilities provided by blink.cmp + { + "saghen/blink.cmp", + config = function(_, opts) + require("blink.cmp").setup(opts) + -- Add blink.cmp capabilities to the default LSP client capabilities + vim.lsp.config("*", { + capabilities = require("blink.cmp").get_lsp_capabilities(), + }) + end, + }, + + -- LSP Configuration (using native vim.lsp.config for Neovim 0.11+) + { + "neovim/nvim-lspconfig", + config = function() + -- This function gets run when an LSP attaches to a particular buffer. + vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }), + callback = function(event) + local map = function(keys, func, desc, mode) + mode = mode or "n" + vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc }) + end + + -- map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition") + map("lr", ":LspRestart", "Restart LSP") + + map("K", function() + vim.lsp.buf.hover({ border = "rounded" }) + end, "Show documentation for symbol under cursor") + + -- Rename the variable under your cursor. + map("rn", function() + vim.api.nvim_create_autocmd({ "CmdlineEnter" }, { + callback = function() + local key = vim.api.nvim_replace_termcodes("", true, false, true) + vim.api.nvim_feedkeys(key, "c", false) + vim.api.nvim_feedkeys("0", "n", false) + return true + end, + }) + vim.lsp.buf.rename() + end, "[R]e[n]ame") + + -- Execute a code action + map("ca", vim.lsp.buf.code_action, "[C]ode [A]ction", { "n", "x" }) + + -- Find references for the word under your cursor. + map("gtref", require("telescope.builtin").lsp_references, "[G]oto [R]eferences") + + -- Jump to the implementation of the word under your cursor. + -- map("gI", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation") + + -- Goto Declaration (e.g., in C this would take you to the header) + map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration") + + -- Fuzzy find all the symbols in your current document. + -- map("ds", require("telescope.builtin").lsp_document_symbols, "[D]ocument [S]ymbols") + + -- Fuzzy find all the symbols in your current workspace. + -- map("gW", require("telescope.builtin").lsp_dynamic_workspace_symbols, "Open Workspace Symbols") + + -- Jump to the type of the word under your cursor. + -- map("gt", require("telescope.builtin").lsp_type_definitions, "[G]oto [T]ype Definition") + + map("vd", function() + vim.diagnostic.open_float() + end, "[V]iew [D]iagnostics") + + map("[d", function() + vim.diagnostic.goto_prev() + end, "Prev Diagnostic") + map("]d", function() + vim.diagnostic.goto_next() + end, "Next Diagnostic") + + local client = vim.lsp.get_client_by_id(event.data.client_id) + + -- Highlight references of the word under cursor + if + client + and client:supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) + then + local highlight_augroup = + vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false }) + vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { + buffer = event.buf, + group = highlight_augroup, + callback = vim.lsp.buf.document_highlight, + }) + + vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, { + buffer = event.buf, + group = highlight_augroup, + callback = vim.lsp.buf.clear_references, + }) + + vim.api.nvim_create_autocmd("LspDetach", { + group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }), + callback = function(event2) + vim.lsp.buf.clear_references() + vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event2.buf }) + end, + }) + end + + -- Toggle inlay hints keymap + if + client and client:supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) + then + map("th", function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf })) + end, "[T]oggle Inlay [H]ints") + end + + -- Svelte-specific: notify on TS/JS file changes + -- https://github.com/sveltejs/language-tools/issues/2008#issuecomment-2351976230 + if client and client.name == "svelte" then + vim.api.nvim_create_autocmd("BufWritePost", { + pattern = { "*.js", "*.ts" }, + group = vim.api.nvim_create_augroup("svelte-on-did-change-ts-or-js-file", { clear = true }), + callback = function(args) + client:notify("$/onDidChangeTsOrJsFile", { + uri = args.match, + }) + end, + }) + end + end, + }) + + -- Extra keymaps + vim.keymap.set("n", "oi", function() + vim.lsp.buf.code_action({ + context = { + only = { "source.organizeImports" }, + diagnostics = {}, + }, + apply = true, + }) + end, { desc = "Organize Imports" }) + + -- Diagnostic Config + vim.diagnostic.config({ + severity_sort = true, + float = { border = "rounded", source = "if_many" }, + underline = { severity = vim.diagnostic.severity.ERROR }, + signs = vim.g.have_nerd_font and { + text = { + [vim.diagnostic.severity.ERROR] = "󰅚 ", + [vim.diagnostic.severity.WARN] = "󰀪 ", + [vim.diagnostic.severity.INFO] = "󰋽 ", + [vim.diagnostic.severity.HINT] = "󰌶 ", + }, + } or {}, + virtual_text = { + source = "if_many", + spacing = 2, + format = function(diagnostic) + local diagnostic_message = { + [vim.diagnostic.severity.ERROR] = diagnostic.message, + [vim.diagnostic.severity.WARN] = diagnostic.message, + [vim.diagnostic.severity.INFO] = diagnostic.message, + [vim.diagnostic.severity.HINT] = diagnostic.message, + } + return diagnostic_message[diagnostic.severity] + end, + }, + }) + + -- Install tools via mason-tool-installer + require("mason-tool-installer").setup({ + ensure_installed = { + "stylua", + "lua-language-server", + "pyright", + "css-lsp", + "eslint-lsp", + "vtsls", + "tailwindcss-language-server", + "biome", + }, + }) + + -- Load custom LSP configs from nvim/lsp/*.lua to override nvim-lspconfig defaults + local lsp_path = vim.fn.stdpath("config") .. "/lsp" + for _, file in ipairs(vim.fn.readdir(lsp_path)) do + if file:match("%.lua$") then + local name = file:gsub("%.lua$", "") + local config = dofile(lsp_path .. "/" .. file) + if type(config) == "table" then + vim.lsp.config(name, config) + end + end + end + + -- Enable LSP servers (configs are in nvim/lsp/*.lua) + vim.lsp.enable({ + "lua_ls", + "pyright", + "cssls", + "eslint", + "gdscript", + -- "vtsls", + "tsgo", + "svelte", + "tailwindcss", + "biome", + }) + end, + }, +} diff --git a/nvim/files/lua/plugins/lualine.lua b/nvim/files/lua/plugins/lualine.lua new file mode 100644 index 0000000..fee940f --- /dev/null +++ b/nvim/files/lua/plugins/lualine.lua @@ -0,0 +1,136 @@ +local fallback_palette = { + color0 = "#191724", + color1 = "#eb6f92", + color2 = "#31748f", + color3 = "#f6c177", + color4 = "#9ccfd8", + color5 = "#c4a7e7", + color6 = "#ebbcba", + color7 = "#908caa", + color8 = "#26233a", + color9 = "#eb6f92", + color10 = "#31748f", + color11 = "#f6c177", + color12 = "#9ccfd8", + color13 = "#c4a7e7", + color14 = "#ebbcba", + color15 = "#e0def4", +} + +local function build_theme() + local c = _G.matugen_palette or fallback_palette + local bg_base = "NONE" + local dark = "#000000" + local color = require("util.color") + + return { + normal = { + a = { bg = c.color4, fg = dark, gui = "bold" }, + b = { bg = color.darken(c.color4, 50), fg = c.color15 }, + c = { bg = c.color0, fg = c.color15 }, + }, + insert = { + a = { bg = c.color2, fg = dark, gui = "bold" }, + b = { bg = color.darken(c.color2, 50), fg = c.color15 }, + }, + visual = { + a = { bg = c.color5, fg = dark, gui = "bold" }, + b = { bg = color.darken(c.color5, 50), fg = c.color15 }, + }, + replace = { + a = { bg = c.color3, fg = dark, gui = "bold" }, + b = { bg = color.darken(c.color3, 50), fg = c.color15 }, + }, + command = { + a = { bg = c.color1, fg = dark, gui = "bold" }, + b = { bg = color.darken(c.color1, 50), fg = c.color15 }, + }, + inactive = { + a = { bg = bg_base, fg = c.color7, gui = "bold" }, + b = { bg = bg_base, fg = c.color7 }, + }, + } +end + +local function setup_macro_refresh(lualine) + vim.api.nvim_create_autocmd("RecordingEnter", { + callback = function() + lualine.refresh({ place = { "statusline" } }) + end, + }) + vim.api.nvim_create_autocmd("RecordingLeave", { + callback = function() + local timer = vim.loop.new_timer() + timer:start( + 50, + 0, + vim.schedule_wrap(function() + lualine.refresh({ place = { "statusline" } }) + end) + ) + end, + }) +end + +local function macro_recording_status() + return { + "macro-recording", + fmt = function() + local register = vim.fn.reg_recording() + return register == "" and "" or "RECORDING @" .. register + end, + } +end + +local function heart() + return [[♥ ]] +end + +return { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + dependencies = { "nvim-tree/nvim-web-devicons" }, + init = function() + vim.opt.laststatus = 0 + end, + config = function() + vim.opt.laststatus = 3 + + local lualine = require("lualine") + setup_macro_refresh(lualine) + + local function do_setup() + lualine.setup({ + options = { + theme = build_theme(), + component_separators = "", + section_separators = { left = "", right = "" }, + disabled_filetypes = { "alpha" }, + }, + sections = { + lualine_a = { + { "mode", separator = { left = "", right = "" }, right_padding = 2 }, + macro_recording_status(), + }, + lualine_b = { "diff", "diagnostics" }, + lualine_c = { { "filename", path = 1 } }, + lualine_x = { "filetype" }, + lualine_y = { "progress" }, + lualine_z = { + { "location", separator = { left = "" }, left_padding = 2 }, + { heart, separator = { right = "" } }, + }, + }, + extensions = { "nvim-tree", "fzf" }, + }) + end + + do_setup() + + -- Re-setup lualine when matugen reloads theme + vim.api.nvim_create_autocmd("User", { + pattern = "MatugenReload", + callback = do_setup, + }) + end, +} diff --git a/nvim/files/lua/plugins/marks.lua b/nvim/files/lua/plugins/marks.lua new file mode 100644 index 0000000..3275f1f --- /dev/null +++ b/nvim/files/lua/plugins/marks.lua @@ -0,0 +1,5 @@ +return { + "chentoast/marks.nvim", + event = "VeryLazy", + opts = {}, +} diff --git a/nvim/files/lua/plugins/matchup.lua b/nvim/files/lua/plugins/matchup.lua new file mode 100644 index 0000000..75ec927 --- /dev/null +++ b/nvim/files/lua/plugins/matchup.lua @@ -0,0 +1,3 @@ +return { + 'andymass/vim-matchup', +} diff --git a/nvim/files/lua/plugins/mdx.lua b/nvim/files/lua/plugins/mdx.lua new file mode 100644 index 0000000..0b63745 --- /dev/null +++ b/nvim/files/lua/plugins/mdx.lua @@ -0,0 +1,6 @@ +return { + "davidmh/mdx.nvim", + config = true, + enabled = false, + dependencies = { "nvim-treesitter/nvim-treesitter" }, +} diff --git a/nvim/files/lua/plugins/mini.lua b/nvim/files/lua/plugins/mini.lua new file mode 100644 index 0000000..8643454 --- /dev/null +++ b/nvim/files/lua/plugins/mini.lua @@ -0,0 +1,450 @@ +return { + "echasnovski/mini.nvim", + version = false, + config = function() + require("mini.ai").setup({ + -- Table with textobject id as fields, textobject specification as values. + -- Also use this to disable builtin textobjects. See |MiniAi.config|. + custom_textobjects = nil, + + -- Module mappings. Use `''` (empty string) to disable one. + mappings = { + -- Main textobject prefixes + around = "a", + inside = "i", + + -- Next/last variants + around_next = "an", + inside_next = "in", + around_last = "al", + inside_last = "il", + + -- Move cursor to corresponding edge of `a` textobject + goto_left = "g[", + goto_right = "g]", + }, + + -- Number of lines within which textobject is searched + n_lines = 1000, + + -- How to search for object (first inside current line, then inside + -- neighborhood). One of 'cover', 'cover_or_next', 'cover_or_prev', + -- 'cover_or_nearest', 'next', 'previous', 'nearest'. + search_method = "cover_or_next", + + -- Whether to disable showing non-error feedback + -- This also affects (purely informational) helper messages shown after + -- idle time if user input is required. + silent = false, + }) + + require("mini.surround").setup( + -- No need to copy this inside `setup()`. Will be used automatically. + { + -- Add custom surroundings to be used on top of builtin ones. For more + -- information with examples, see `:h MiniSurround.config`. + custom_surroundings = nil, + + -- Duration (in ms) of highlight when calling `MiniSurround.highlight()` + highlight_duration = 500, + + -- Module mappings. Use `''` (empty string) to disable one. + mappings = { + add = "sa", -- Add surrounding in Normal and Visual modes + delete = "sd", -- Delete surrounding + find = "sf", -- Find surrounding (to the right) + find_left = "sF", -- Find surrounding (to the left) + highlight = "sh", -- Highlight surrounding + replace = "sr", -- Replace surrounding + update_n_lines = "sn", -- Update `n_lines` + + suffix_last = "l", -- Suffix to search with "prev" method + suffix_next = "n", -- Suffix to search with "next" method + }, + + -- Number of lines within which surrounding is searched + n_lines = 1000, + + -- Whether to respect selection type: + -- - Place surroundings on separate lines in linewise mode. + -- - Place surroundings on each line in blockwise mode. + respect_selection_type = false, + + -- How to search for surrounding (first inside current line, then inside + -- neighborhood). One of 'cover', 'cover_or_next', 'cover_or_prev', + -- 'cover_or_nearest', 'next', 'prev', 'nearest'. For more details, + -- see `:h MiniSurround.config`. + search_method = "cover", + + -- Whether to disable showing non-error feedback + -- This also affects (purely informational) helper messages shown after + -- idle time if user input is required. + silent = false, + } + ) + + -- Create a custom command to wrap double quotes with {[]} at cursor position + vim.api.nvim_create_user_command("WrapQuotesWithBrackets", function() + -- Get cursor position (1-indexed for line, 0-indexed for column) + local cursor = vim.api.nvim_win_get_cursor(0) + local line_num = cursor[1] + local col_num = cursor[2] + 1 -- Convert to 1-indexed for string operations + + -- Get the current line + local line = vim.api.nvim_get_current_line() + + -- Find all quote pairs in the line + local quote_start, quote_end = nil, nil + local pos = 1 + + while pos <= #line do + local start_pos = line:find('"', pos) + if not start_pos then + break + end + + local end_pos = line:find('"', start_pos + 1) + if not end_pos then + break + end + + -- Check if cursor is within or on this quote pair + if col_num >= start_pos and col_num <= end_pos then + quote_start = start_pos + quote_end = end_pos + break + end + + pos = end_pos + 1 + end + + -- If we found quotes surrounding the cursor, wrap them + if quote_start and quote_end then + local before = line:sub(1, quote_start - 1) + local quoted_content = line:sub(quote_start, quote_end) + local after = line:sub(quote_end + 1) + + local new_line = before .. "{[" .. quoted_content .. "]}" .. after + + -- Replace the line + vim.api.nvim_set_current_line(new_line) + + -- Adjust cursor position (move it after the inserted characters) + local new_col = col_num + 2 -- Account for the added '{[' characters + vim.api.nvim_win_set_cursor(0, { line_num, new_col - 1 }) -- Convert back to 0-indexed + else + print("No quotes found at cursor position") + end + end, { + desc = "Wrap double quotes at cursor with {[]}", + }) + + -- require("mini.pairs").setup({ + -- -- In which modes mappings from this `config` should be created + -- modes = { insert = true, command = false, terminal = false }, + -- + -- -- Global mappings. Each right hand side should be a pair information, a + -- -- table with at least these fields (see more in |MiniPairs.map|): + -- -- - - one of 'open', 'close', 'closeopen'. + -- -- - - two character string for pair to be used. + -- -- By default pair is not inserted after `\`, quotes are not recognized by + -- -- ``, `'` does not insert pair after a letter. + -- -- Only parts of tables can be tweaked (others will use these defaults). + -- mappings = { + -- ["("] = { action = "open", pair = "()", neigh_pattern = "[^\\]." }, + -- ["["] = { action = "open", pair = "[]", neigh_pattern = "[^\\]." }, + -- ["{"] = { action = "open", pair = "{}", neigh_pattern = "[^\\]." }, + -- ["<"] = { action = "open", pair = "<>", neigh_pattern = "[^\\]." }, + -- + -- [")"] = { action = "close", pair = "()", neigh_pattern = "[^\\]." }, + -- ["]"] = { action = "close", pair = "[]", neigh_pattern = "[^\\]." }, + -- ["}"] = { action = "close", pair = "{}", neigh_pattern = "[^\\]." }, + -- [">"] = { action = "close", pair = "<>", neigh_pattern = "[^\\]." }, + -- + -- ['"'] = { action = "closeopen", pair = '""', neigh_pattern = "[^\\].", register = { cr = false } }, + -- ["'"] = { action = "closeopen", pair = "''", neigh_pattern = "[^%a\\].", register = { cr = false } }, + -- ["`"] = { action = "closeopen", pair = "``", neigh_pattern = "[^\\].", register = { cr = false } }, + -- }, + -- }) + + require("mini.comment").setup({ + -- Options which control module behavior + options = { + -- Function to compute custom 'commentstring' (optional) + custom_commentstring = nil, + + -- Whether to ignore blank lines when commenting + ignore_blank_line = false, + + -- Whether to recognize as comment only lines without indent + start_of_line = false, + + -- Whether to force single space inner padding for comment parts + pad_comment_parts = true, + }, + + -- Module mappings. Use `''` (empty string) to disable one. + mappings = { + -- Toggle comment (like `gcip` - comment inner paragraph) for both + -- Normal and Visual modes + comment = "gc", + + -- Toggle comment on current line + comment_line = "gcc", + + -- Toggle comment on visual selection + comment_visual = "gc", + + -- Define 'comment' textobject (like `dgc` - delete whole comment block) + -- Works also in Visual mode if mapping differs from `comment_visual` + textobject = "gc", + }, + + -- Hook functions to be executed at certain stage of commenting + hooks = { + -- Before successful commenting. Does nothing by default. + pre = function() end, + -- After successful commenting. Does nothing by default. + post = function() end, + }, + }) + + local miniclue = require("mini.clue") + miniclue.setup({ + triggers = { + -- Leader triggers + { mode = "n", keys = "" }, + { mode = "x", keys = "" }, + + -- Built-in completion + { mode = "i", keys = "" }, + + -- `g` key + { mode = "n", keys = "g" }, + { mode = "x", keys = "g" }, + + -- Marks + { mode = "n", keys = "'" }, + { mode = "n", keys = "`" }, + { mode = "x", keys = "'" }, + { mode = "x", keys = "`" }, + + -- Registers + { mode = "n", keys = '"' }, + { mode = "x", keys = '"' }, + { mode = "i", keys = "" }, + { mode = "c", keys = "" }, + + -- Window commands + { mode = "n", keys = "" }, + + -- `z` key + { mode = "n", keys = "z" }, + { mode = "x", keys = "z" }, + }, + + clues = { + -- Enhance this by adding descriptions for mapping groups + miniclue.gen_clues.builtin_completion(), + miniclue.gen_clues.g(), + miniclue.gen_clues.marks(), + miniclue.gen_clues.registers(), + miniclue.gen_clues.windows(), + miniclue.gen_clues.z(), + }, + }) + + -- local starter = require("mini.starter") + -- starter.setup({ + -- evaluate_single = true, + -- header = "hi", + -- items = { + -- starter.sections.builtin_actions(), + -- starter.sections.telescope(), + -- starter.sections.sessions(5, true), + -- }, + -- }) + + -- local sessions = require("mini.sessions") + -- sessions.setup({ + -- autoread = true, + -- }) + + require("mini.move").setup({ + -- Module mappings. Use `''` (empty string) to disable one. + mappings = { + -- Move visual selection in Visual mode. Defaults are Alt (Meta) + hjkl. + left = "", + right = "", + down = "", + up = "", + + -- Move current line in Normal mode + line_left = "", + line_right = "", + line_down = "", + line_up = "", + }, + + -- Options which control moving behavior + options = { + -- Automatically reindent selection during linewise vertical move + reindent_linewise = true, + }, + }) + + require("mini.icons").setup({ + extension = { + ["spec.ts"] = { glyph = "", hl = "MiniIconsAzure" }, + ["test.ts"] = { glyph = "", hl = "MiniIconsAzure" }, + ["spec.svelte.ts"] = { glyph = "", hl = "MiniIconsAzure" }, + ["test.svelte.ts"] = { glyph = "", hl = "MiniIconsAzure" }, + ["svelte.ts"] = { glyph = "", hl = "MiniIconsAzure" }, + }, + }) + + require("mini.files").setup({ + -- Customization of shown content + content = { + -- Predicate for which file system entries to show + filter = nil, + -- What prefix to show to the left of file system entry + prefix = nil, + -- In which order to show file system entries + sort = nil, + }, + -- Module mappings created only inside explorer. + -- Use `''` (empty string) to not create one. + mappings = { + close = "q", + go_in = "", + go_in_plus = "L", + go_out = "", + go_out_plus = "H", + mark_goto = "'", + mark_set = "m", + reset = "", + reveal_cwd = "@", + show_help = "g?", + synchronize = "=", + trim_left = "<", + trim_right = ">", + }, + -- General options + options = { + -- Whether to delete permanently or move into module-specific trash + permanent_delete = true, + -- Whether to use for editing directories + use_as_default_explorer = false, + }, + -- Customization of explorer windows + windows = { + -- Maximum number of windows to show side by side + max_number = math.huge, + -- Whether to show preview of file/directory under cursor + preview = false, + -- Width of focused window + width_focus = 50, + -- Width of other windows + width_nofocus = 15, + }, + }) + + vim.api.nvim_create_autocmd("User", { + pattern = "MiniFilesActionRename", + callback = function(event) + Snacks.rename.on_rename_file(event.data.from, event.data.to) + end, + }) + + -- local MiniPick = require("mini.pick") + -- MiniPick.setup({ + -- -- Delays (in ms; should be at least 1) + -- delay = { + -- -- Delay between forcing asynchronous behavior + -- async = 10, + -- + -- -- Delay between computation start and visual feedback about it + -- busy = 50, + -- }, + -- + -- -- Keys for performing actions. See `:h MiniPick-actions`. + -- mappings = { + -- caret_left = "", + -- caret_right = "", + -- + -- choose = "", + -- choose_in_split = "", + -- choose_in_tabpage = "", + -- choose_in_vsplit = "", + -- choose_marked = "", + -- + -- delete_char = "", + -- delete_char_right = "", + -- delete_left = "", + -- delete_word = "", + -- + -- mark = "", + -- mark_all = "", + -- + -- move_down = "", + -- move_start = "", + -- move_up = "", + -- + -- paste = "", + -- + -- refine = "", + -- refine_marked = "", + -- + -- scroll_down = "", + -- scroll_left = "", + -- scroll_right = "", + -- scroll_up = "", + -- + -- stop = "", + -- + -- toggle_info = "", + -- toggle_preview = "", + -- }, + -- + -- -- General options + -- options = { + -- -- Whether to show content from bottom to top + -- content_from_bottom = false, + -- + -- -- Whether to cache matches (more speed and memory on repeated prompts) + -- use_cache = false, + -- }, + -- + -- -- Source definition. See `:h MiniPick-source`. + -- source = { + -- items = nil, + -- name = nil, + -- cwd = nil, + -- + -- match = nil, + -- show = nil, + -- preview = nil, + -- + -- choose = nil, + -- choose_marked = nil, + -- }, + -- + -- -- Window related options + -- window = { + -- -- Float window config (table or callable returning it) + -- config = nil, + -- + -- -- String to use as caret in prompt + -- prompt_caret = "▏", + -- + -- -- String to use as prefix in prompt + -- prompt_prefix = "> ", + -- }, + -- }) + -- + -- vim.keymap.set("n", "pf", function() + -- MiniPick.builtin.files({ tool = "git" }) + -- end, { desc = "Find [F]iles" }) + end, +} diff --git a/nvim/files/lua/plugins/minuet.lua b/nvim/files/lua/plugins/minuet.lua new file mode 100644 index 0000000..4129579 --- /dev/null +++ b/nvim/files/lua/plugins/minuet.lua @@ -0,0 +1,61 @@ +return { + { + "milanglacier/minuet-ai.nvim", + priority = 1000, + config = function() + require("minuet").setup({ + provider = "openai_compatible", + request_timeout = 2.5, + throttle = 1500, -- Increase to reduce costs and avoid rate limits + debounce = 600, -- Increase to reduce costs and avoid rate limits + provider_options = { + openai_compatible = { + api_key = "OPENROUTER_API_KEY", + end_point = "https://openrouter.ai/api/v1/chat/completions", + model = "moonshotai/kimi-k2", + name = "Openrouter", + optional = { + max_tokens = 56, + top_p = 0.9, + provider = { + -- Prioritize throughput for faster completion + sort = "throughput", + }, + }, + }, + }, + }) + end, + }, + { "nvim-lua/plenary.nvim" }, + -- optional, if you are using virtual-text frontend, blink is not required. + { + "Saghen/blink.cmp", + config = function() + require("blink-cmp").setup({ + keymap = { + -- Manually invoke minuet completion. + [""] = require("minuet").make_blink_map(), + }, + sources = { + -- Enable minuet for autocomplete + default = { "lsp", "path", "buffer", "snippets", "minuet" }, + -- For manual completion only, remove 'minuet' from default + providers = { + minuet = { + name = "minuet", + module = "minuet.blink", + async = true, + -- Should match minuet.config.request_timeout * 1000, + -- since minuet.config.request_timeout is in seconds + timeout_ms = 3000, + score_offset = 50, -- Gives minuet higher priority among suggestions + }, + }, + }, + -- Recommended to avoid unnecessary request + completion = { trigger = { prefetch_on_insert = false } }, + }) + end, + }, +} diff --git a/nvim/files/lua/plugins/multicursor.lua b/nvim/files/lua/plugins/multicursor.lua new file mode 100644 index 0000000..cca1fce --- /dev/null +++ b/nvim/files/lua/plugins/multicursor.lua @@ -0,0 +1,85 @@ +return { + "jake-stewart/multicursor.nvim", + branch = "1.0", + enabled = true, + config = function() + local mc = require("multicursor-nvim") + + mc.setup() + + -- Add cursors above/below the main cursor. + vim.keymap.set({ "n", "v" }, "", function() + mc.addCursor("k") + end) + vim.keymap.set({ "n", "v" }, "", function() + mc.addCursor("j") + end) + + -- Add a cursor and jump to the next word under cursor. + vim.keymap.set({ "n", "v" }, "", function() + mc.addCursor("*") + end) + + -- Jump to the next word under cursor but do not add a cursor. + vim.keymap.set({ "n", "v" }, "", function() + mc.skipCursor("*") + end) + + -- Rotate the main cursor. + vim.keymap.set({ "n", "v" }, "", mc.nextCursor) + vim.keymap.set({ "n", "v" }, "", mc.prevCursor) + + -- Delete the main cursor. + vim.keymap.set({ "n", "v" }, "x", mc.deleteCursor) + + -- Add and remove cursors with control + left click. + vim.keymap.set("n", "", mc.handleMouse) + + vim.keymap.set({ "n", "v" }, "", function() + if mc.cursorsEnabled() then + -- Stop other cursors from moving. + -- This allows you to reposition the main cursor. + mc.disableCursors() + else + mc.addCursor() + end + end) + + vim.keymap.set("n", "", function() + if not mc.cursorsEnabled() then + mc.enableCursors() + elseif mc.hasCursors() then + mc.clearCursors() + else + -- Default handler. + end + end) + + -- Align cursor columns. + -- vim.keymap.set("n", "a", mc.alignCursors) + + -- Split visual selections by regex. + vim.keymap.set("v", "S", mc.splitCursors) + + -- Append/insert for each line of visual selections. + vim.keymap.set("v", "I", mc.insertVisual) + vim.keymap.set("v", "A", mc.appendVisual) + + -- match new cursors within visual selections by regex. + vim.keymap.set("v", "M", mc.matchCursors) + + -- Rotate visual selection contents. + vim.keymap.set("v", "t", function() + mc.transposeCursors(1) + end) + vim.keymap.set("v", "T", function() + mc.transposeCursors(-1) + end) + + -- Customize how cursors look. + vim.api.nvim_set_hl(0, "MultiCursorCursor", { link = "Cursor" }) + vim.api.nvim_set_hl(0, "MultiCursorVisual", { link = "Visual" }) + vim.api.nvim_set_hl(0, "MultiCursorDisabledCursor", { link = "Visual" }) + vim.api.nvim_set_hl(0, "MultiCursorDisabledVisual", { link = "Visual" }) + end, +} diff --git a/nvim/files/lua/plugins/no-neck-pain.lua b/nvim/files/lua/plugins/no-neck-pain.lua new file mode 100644 index 0000000..3721481 --- /dev/null +++ b/nvim/files/lua/plugins/no-neck-pain.lua @@ -0,0 +1,14 @@ +return { + "shortcuts/no-neck-pain.nvim", + opts = { + width = 140, + autocmds = { + enableOnVimEnter = true, + }, + integrations = { + dashboard = { + enabled = true, + }, + }, + }, +} diff --git a/nvim/files/lua/plugins/oil.lua b/nvim/files/lua/plugins/oil.lua new file mode 100644 index 0000000..5ca85ad --- /dev/null +++ b/nvim/files/lua/plugins/oil.lua @@ -0,0 +1,210 @@ +return { + "stevearc/oil.nvim", + ---@module 'oil' + ---@type oil.SetupOpts + opts = { + -- Oil will take over directory buffers (e.g. `vim .` or `:e src/`) + -- Set to false if you want some other plugin (e.g. netrw) to open when you edit directories. + default_file_explorer = true, + -- Id is automatically added at the beginning, and name at the end + -- See :help oil-columns + columns = { + "icon", + -- "permissions", + -- "size", + -- "mtime", + }, + -- Buffer-local options to use for oil buffers + buf_options = { + buflisted = false, + bufhidden = "hide", + }, + -- Window-local options to use for oil buffers + win_options = { + wrap = false, + signcolumn = "no", + cursorcolumn = false, + foldcolumn = "0", + spell = false, + list = false, + conceallevel = 3, + concealcursor = "nvic", + }, + -- Send deleted files to the trash instead of permanently deleting them (:help oil-trash) + delete_to_trash = false, + -- Skip the confirmation popup for simple operations (:help oil.skip_confirm_for_simple_edits) + skip_confirm_for_simple_edits = false, + -- Selecting a new/moved/renamed file or directory will prompt you to save changes first + -- (:help prompt_save_on_select_new_entry) + prompt_save_on_select_new_entry = true, + -- Oil will automatically delete hidden buffers after this delay + -- You can set the delay to false to disable cleanup entirely + -- Note that the cleanup process only starts when none of the oil buffers are currently displayed + cleanup_delay_ms = 2000, + lsp_file_methods = { + -- Enable or disable LSP file operations + enabled = true, + -- Time to wait for LSP file operations to complete before skipping + timeout_ms = 1000, + -- Set to true to autosave buffers that are updated with LSP willRenameFiles + -- Set to "unmodified" to only save unmodified buffers + autosave_changes = false, + }, + -- Constrain the cursor to the editable parts of the oil buffer + -- Set to `false` to disable, or "name" to keep it on the file names + constrain_cursor = "editable", + -- Set to true to watch the filesystem for changes and reload oil + watch_for_changes = true, + -- Keymaps in oil buffer. Can be any value that `vim.keymap.set` accepts OR a table of keymap + -- options with a `callback` (e.g. { callback = function() ... end, desc = "", mode = "n" }) + -- Additionally, if it is a string that matches "actions.", + -- it will use the mapping at require("oil.actions"). + -- Set to `false` to remove a keymap + -- See :help oil-actions for a list of all available actions + keymaps = { + ["g?"] = "actions.show_help", + [""] = "actions.select", + [""] = { "actions.select", opts = { vertical = true }, desc = "Open the entry in a vertical split" }, + [""] = { + "actions.select", + opts = { horizontal = true }, + desc = "Open the entry in a horizontal split", + }, + [""] = { "actions.select", opts = { tab = true }, desc = "Open the entry in new tab" }, + [""] = "actions.preview", + [""] = "actions.close", + [""] = "actions.refresh", + ["-"] = "actions.parent", + ["_"] = "actions.open_cwd", + ["`"] = "actions.cd", + ["~"] = { "actions.cd", opts = { scope = "tab" }, desc = ":tcd to the current oil directory", mode = "n" }, + ["gs"] = "actions.change_sort", + ["gx"] = "actions.open_external", + ["g."] = "actions.toggle_hidden", + ["g\\"] = "actions.toggle_trash", + [""] = "actions.send_to_qflist", + }, + -- Set to false to disable all of the above keymaps + use_default_keymaps = true, + view_options = { + -- Show files and directories that start with "." + show_hidden = true, + -- This function defines what is considered a "hidden" file + is_hidden_file = function(name, bufnr) + local m = name:match("^%.") + return m ~= nil + end, + -- This function defines what will never be shown, even when `show_hidden` is set + is_always_hidden = function(name, bufnr) + return false + end, + -- Sort file names with numbers in a more intuitive order for humans. + -- Can be "fast", true, or false. "fast" will turn it off for large directories. + natural_order = "fast", + -- Sort file and directory names case insensitive + case_insensitive = false, + sort = { + -- sort order can be "asc" or "desc" + -- see :help oil-columns to see which columns are sortable + { "type", "asc" }, + { "name", "asc" }, + }, + }, + -- Extra arguments to pass to SCP when moving/copying files over SSH + extra_scp_args = {}, + -- EXPERIMENTAL support for performing file operations with git + git = { + -- Return true to automatically git add/mv/rm files + add = function(path) + return false + end, + mv = function(src_path, dest_path) + return false + end, + rm = function(path) + return false + end, + }, + -- Configuration for the floating window in oil.open_float + float = { + -- Padding around the floating window + padding = 2, + max_width = 0, + max_height = 0, + border = "rounded", + win_options = { + winblend = 0, + }, + -- optionally override the oil buffers window title with custom function: fun(winid: integer): string + get_win_title = nil, + -- preview_split: Split direction: "auto", "left", "right", "above", "below". + preview_split = "auto", + -- This is the config that will be passed to nvim_open_win. + -- Change values here to customize the layout + override = function(conf) + return conf + end, + }, + -- Configuration for the file preview window + preview_win = { + -- Whether the preview window is automatically updated when the cursor is moved + update_on_cursor_moved = true, + -- How to open the preview window "load"|"scratch"|"fast_scratch" + preview_method = "fast_scratch", + -- A function that returns true to disable preview on a file e.g. to avoid lag + disable_preview = function(filename) + return false + end, + -- Window-local options to use for preview window buffers + win_options = {}, + }, + -- Configuration for the floating action confirmation window + confirmation = { + -- Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) + -- min_width and max_width can be a single value or a list of mixed integer/float types. + -- max_width = {100, 0.8} means "the lesser of 100 columns or 80% of total" + max_width = 0.9, + -- min_width = {40, 0.4} means "the greater of 40 columns or 40% of total" + min_width = { 40, 0.4 }, + -- optionally define an integer/float for the exact width of the preview window + width = nil, + -- Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%) + -- min_height and max_height can be a single value or a list of mixed integer/float types. + -- max_height = {80, 0.9} means "the lesser of 80 columns or 90% of total" + max_height = 0.9, + -- min_height = {5, 0.1} means "the greater of 5 columns or 10% of total" + min_height = { 5, 0.1 }, + -- optionally define an integer/float for the exact height of the preview window + height = nil, + border = "rounded", + win_options = { + winblend = 0, + }, + }, + -- Configuration for the floating progress window + progress = { + max_width = 0.9, + min_width = { 40, 0.4 }, + width = nil, + max_height = { 10, 0.9 }, + min_height = { 5, 0.1 }, + height = nil, + border = "rounded", + minimized_border = "none", + win_options = { + winblend = 0, + }, + }, + -- Configuration for the floating SSH window + ssh = { + border = "rounded", + }, + -- Configuration for the floating keymaps help window + keymaps_help = { + border = "rounded", + }, + }, + -- Optional dependencies + dependencies = { { "echasnovski/mini.icons", opts = {} } }, + -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons +} diff --git a/nvim/files/lua/plugins/ripple.lua b/nvim/files/lua/plugins/ripple.lua new file mode 100644 index 0000000..d9dd109 --- /dev/null +++ b/nvim/files/lua/plugins/ripple.lua @@ -0,0 +1,7 @@ +return { + "Ripple-TS/ripple", + config = function(plugin) + vim.opt.rtp:append(plugin.dir .. "/packages/nvim-plugin") + require("ripple").setup(plugin) + end, +} diff --git a/nvim/files/lua/plugins/snacks.lua b/nvim/files/lua/plugins/snacks.lua new file mode 100644 index 0000000..b7835a3 --- /dev/null +++ b/nvim/files/lua/plugins/snacks.lua @@ -0,0 +1,540 @@ +return { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + bigfile = { enabled = true }, + notifier = { enabled = true }, + quickfile = { enabled = true }, + statuscolumn = { enabled = true }, + words = { enabled = true }, + picker = {}, + explorer = {}, + }, + keys = { + { + ".", + function() + Snacks.scratch() + end, + desc = "Toggle Scratch Buffer", + }, + { + "S", + function() + Snacks.scratch.select() + end, + desc = "Select Scratch Buffer", + }, + { + "n", + function() + Snacks.notifier.show_history() + end, + desc = "Notification History", + }, + + { + "gB", + function() + Snacks.gitbrowse() + end, + desc = "Git Browse", + }, + -- { + -- "gb", + -- function() + -- Snacks.git.blame_line() + -- end, + -- desc = "Git Blame Line", + -- }, + { + "gf", + function() + Snacks.lazygit.log_file() + end, + desc = "Lazygit Current File History", + }, + { + "lg", + function() + Snacks.lazygit() + end, + desc = "Lazygit", + }, + { + "gl", + function() + Snacks.lazygit.log() + end, + desc = "Lazygit Log (cwd)", + }, + { + "dn", + function() + Snacks.notifier.hide() + end, + desc = "Dismiss All Notifications", + }, + { + "", + function() + Snacks.terminal() + end, + desc = "Toggle Terminal", + }, + { + "", + function() + Snacks.terminal() + end, + desc = "which_key_ignore", + }, + { + "]]", + function() + Snacks.words.jump(vim.v.count1) + end, + desc = "Next Reference", + mode = { "n", "t" }, + }, + { + "[[", + function() + Snacks.words.jump(-vim.v.count1) + end, + desc = "Prev Reference", + mode = { "n", "t" }, + }, + { + "N", + desc = "Neovim News", + function() + Snacks.win({ + file = vim.api.nvim_get_runtime_file("doc/news.txt", false)[1], + width = 0.6, + height = 0.6, + wo = { + spell = false, + wrap = false, + signcolumn = "yes", + statuscolumn = " ", + conceallevel = 3, + }, + }) + end, + }, + -- Snacks Picker + -- Top Pickers & Explorer + { + "", + function() + Snacks.picker.smart() + end, + desc = "Smart Find Files", + }, + { + ",", + function() + Snacks.picker.buffers() + end, + desc = "Buffers", + }, + { + "/", + function() + Snacks.picker.grep() + end, + desc = "Grep", + }, + { + ":", + function() + Snacks.picker.command_history() + end, + desc = "Command History", + }, + { + "n", + function() + Snacks.picker.notifications() + end, + desc = "Notification History", + }, + { + "e", + function() + Snacks.explorer() + end, + desc = "File Explorer", + }, + -- find + { + "fb", + function() + Snacks.picker.buffers() + end, + desc = "Buffers", + }, + { + "fc", + function() + Snacks.picker.files({ cwd = vim.fn.stdpath("config") }) + end, + desc = "Find Config File", + }, + { + "ff", + function() + Snacks.picker.files() + end, + desc = "Find Files", + }, + { + "fg", + function() + Snacks.picker.git_files() + end, + desc = "Find Git Files", + }, + { + "fp", + function() + Snacks.picker.projects() + end, + desc = "Projects", + }, + { + "fr", + function() + Snacks.picker.recent() + end, + desc = "Recent", + }, + -- git + { + "gb", + function() + Snacks.picker.git_branches() + end, + desc = "Git Branches", + }, + { + "gl", + function() + Snacks.picker.git_log() + end, + desc = "Git Log", + }, + { + "gL", + function() + Snacks.picker.git_log_line() + end, + desc = "Git Log Line", + }, + { + "gs", + function() + Snacks.picker.git_status() + end, + desc = "Git Status", + }, + { + "gS", + function() + Snacks.picker.git_stash() + end, + desc = "Git Stash", + }, + { + "gd", + function() + Snacks.picker.git_diff() + end, + desc = "Git Diff (Hunks)", + }, + { + "gf", + function() + Snacks.picker.git_log_file() + end, + desc = "Git Log File", + }, + -- gh + { + "gi", + function() + Snacks.picker.gh_issue() + end, + desc = "GitHub Issues (open)", + }, + { + "gI", + function() + Snacks.picker.gh_issue({ state = "all" }) + end, + desc = "GitHub Issues (all)", + }, + { + "gp", + function() + Snacks.picker.gh_pr() + end, + desc = "GitHub Pull Requests (open)", + }, + { + "gP", + function() + Snacks.picker.gh_pr({ state = "all" }) + end, + desc = "GitHub Pull Requests (all)", + }, + -- Grep + { + "sb", + function() + Snacks.picker.lines() + end, + desc = "Buffer Lines", + }, + { + "sB", + function() + Snacks.picker.grep_buffers() + end, + desc = "Grep Open Buffers", + }, + { + "sg", + function() + Snacks.picker.grep() + end, + desc = "Grep", + }, + { + "sw", + function() + Snacks.picker.grep_word() + end, + desc = "Visual selection or word", + mode = { "n", "x" }, + }, + -- search + { + 's"', + function() + Snacks.picker.registers() + end, + desc = "Registers", + }, + { + "s/", + function() + Snacks.picker.search_history() + end, + desc = "Search History", + }, + { + "sa", + function() + Snacks.picker.autocmds() + end, + desc = "Autocmds", + }, + { + "sb", + function() + Snacks.picker.lines() + end, + desc = "Buffer Lines", + }, + { + "sc", + function() + Snacks.picker.command_history() + end, + desc = "Command History", + }, + { + "sC", + function() + Snacks.picker.commands() + end, + desc = "Commands", + }, + { + "sd", + function() + Snacks.picker.diagnostics() + end, + desc = "Diagnostics", + }, + { + "sD", + function() + Snacks.picker.diagnostics_buffer() + end, + desc = "Buffer Diagnostics", + }, + { + "sh", + function() + Snacks.picker.help() + end, + desc = "Help Pages", + }, + { + "sH", + function() + Snacks.picker.highlights() + end, + desc = "Highlights", + }, + { + "si", + function() + Snacks.picker.icons() + end, + desc = "Icons", + }, + { + "sj", + function() + Snacks.picker.jumps() + end, + desc = "Jumps", + }, + { + "sk", + function() + Snacks.picker.keymaps() + end, + desc = "Keymaps", + }, + { + "sl", + function() + Snacks.picker.loclist() + end, + desc = "Location List", + }, + { + "sm", + function() + Snacks.picker.marks() + end, + desc = "Marks", + }, + { + "sM", + function() + Snacks.picker.man() + end, + desc = "Man Pages", + }, + { + "sp", + function() + Snacks.picker.lazy() + end, + desc = "Search for Plugin Spec", + }, + { + "sq", + function() + Snacks.picker.qflist() + end, + desc = "Quickfix List", + }, + { + "sr", + function() + Snacks.picker.resume() + end, + desc = "Resume", + }, + { + "su", + function() + Snacks.picker.undo() + end, + desc = "Undo History", + }, + { + "uC", + function() + Snacks.picker.colorschemes() + end, + desc = "Colorschemes", + }, + -- LSP + { + "gd", + function() + Snacks.picker.lsp_definitions() + end, + desc = "Goto Definition", + }, + { + "gD", + function() + Snacks.picker.lsp_declarations() + end, + desc = "Goto Declaration", + }, + { + "gref", + function() + Snacks.picker.lsp_references() + end, + nowait = true, + desc = "References", + }, + { + "gI", + function() + Snacks.picker.lsp_implementations() + end, + desc = "Goto Implementation", + }, + { + "gy", + function() + Snacks.picker.lsp_type_definitions() + end, + desc = "Goto T[y]pe Definition", + }, + { + "gai", + function() + Snacks.picker.lsp_incoming_calls() + end, + desc = "C[a]lls Incoming", + }, + { + "gao", + function() + Snacks.picker.lsp_outgoing_calls() + end, + desc = "C[a]lls Outgoing", + }, + { + "ss", + function() + Snacks.picker.lsp_symbols() + end, + desc = "LSP Symbols", + }, + { + "sS", + function() + Snacks.picker.lsp_workspace_symbols() + end, + desc = "LSP Workspace Symbols", + }, + }, +} diff --git a/nvim/files/lua/plugins/sort.lua b/nvim/files/lua/plugins/sort.lua new file mode 100644 index 0000000..91cdc27 --- /dev/null +++ b/nvim/files/lua/plugins/sort.lua @@ -0,0 +1,3 @@ +return { + "sQVe/sort.nvim", +} diff --git a/nvim/files/lua/plugins/suda.lua b/nvim/files/lua/plugins/suda.lua new file mode 100644 index 0000000..5bff1b3 --- /dev/null +++ b/nvim/files/lua/plugins/suda.lua @@ -0,0 +1,3 @@ +return { + 'lambdalisue/vim-suda' +} diff --git a/nvim/files/lua/plugins/supermaven.lua b/nvim/files/lua/plugins/supermaven.lua new file mode 100644 index 0000000..61b2f7c --- /dev/null +++ b/nvim/files/lua/plugins/supermaven.lua @@ -0,0 +1,7 @@ +return { + "supermaven-inc/supermaven-nvim", + enabled = false, + config = function() + require("supermaven-nvim").setup({}) + end, +} diff --git a/nvim/files/lua/plugins/svelte-check.lua b/nvim/files/lua/plugins/svelte-check.lua new file mode 100644 index 0000000..3710890 --- /dev/null +++ b/nvim/files/lua/plugins/svelte-check.lua @@ -0,0 +1,8 @@ +return { + "nvim-svelte/nvim-svelte-check", + config = function() + require("svelte-check").setup({ + command = "pnpm run check", -- Default command for pnpm + }) + end, +} diff --git a/nvim/files/lua/plugins/telescope.lua b/nvim/files/lua/plugins/telescope.lua new file mode 100644 index 0000000..46ad384 --- /dev/null +++ b/nvim/files/lua/plugins/telescope.lua @@ -0,0 +1,124 @@ +return { -- Fuzzy Finder (files, lsp, etc) + "nvim-telescope/telescope.nvim", + event = "VimEnter", + dependencies = { + "nvim-lua/plenary.nvim", + { -- If encountering errors, see telescope-fzf-native README for installation instructions + "nvim-telescope/telescope-fzf-native.nvim", + + -- `build` is used to run some command when the plugin is installed/updated. + -- This is only run then, not every time Neovim starts up. + build = "make", + + -- `cond` is a condition used to determine whether this plugin should be + -- installed and loaded. + cond = function() + return vim.fn.executable("make") == 1 + end, + }, + { "nvim-telescope/telescope-ui-select.nvim" }, + + -- Useful for getting pretty icons, but requires a Nerd Font. + { "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font }, + }, + config = function() + -- Telescope is a fuzzy finder that comes with a lot of different things that + -- it can fuzzy find! It's more than just a "file finder", it can search + -- many different aspects of Neovim, your workspace, LSP, and more! + -- + -- The easiest way to use Telescope, is to start by doing something like: + -- :Telescope help_tags + -- + -- After running this command, a window will open up and you're able to + -- type in the prompt window. You'll see a list of `help_tags` options and + -- a corresponding preview of the help. + -- + -- Two important keymaps to use while in Telescope are: + -- - Insert mode: + -- - Normal mode: ? + -- + -- This opens a window that shows you all of the keymaps for the current + -- Telescope picker. This is really useful to discover what Telescope can + -- do as well as how to actually do it! + + -- [[ Configure Telescope ]] + -- See `:help telescope` and `:help telescope.setup()` + require("telescope").setup({ + -- You can put your default mappings / updates / etc. in here + -- All the info you're looking for is in `:help telescope.setup()` + -- + -- defaults = { + -- mappings = { + -- i = { [''] = 'to_fuzzy_refine' }, + -- }, + -- }, + defaults = { + file_ignore_patterns = { "node_modules", ".git" }, + }, + pickers = { + find_files = { + hidden = true, + find_command = { + "fd", + "--type", + "f", + "--strip-cwd-prefix", + "--follow", + "--hidden", + "--exclude", + ".git", + }, + }, + }, + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown(), + }, + fzf = { + fuzzy = true, + override_generic_sorter = true, + override_file_sorter = true, + case_mode = "smart_case", + }, + }, + }) + + -- Enable Telescope extensions if they are installed + pcall(require("telescope").load_extension, "fzf") + pcall(require("telescope").load_extension, "ui-select") + + -- See `:help telescope.builtin` + local builtin = require("telescope.builtin") + -- vim.keymap.set("n", "t", ":Telescope", {}) + -- vim.keymap.set("n", "pf", function() + -- builtin.find_files({ + -- file_ignore_patterns = { "node%_modules/.*", ".git/.*" }, + -- }) + -- end, { desc = "Find [F]iles" }) + -- vim.keymap.set("n", "ph", builtin.help_tags, { desc = "Search [H]elp" }) + -- vim.keymap.set("n", "pk", builtin.keymaps, { desc = "Search [K]eymaps" }) + -- vim.keymap.set("n", "ps", builtin.builtin, { desc = "Search [S]elect Telescope" }) + -- vim.keymap.set("n", "ps", function() + -- -- builtin.live_grep() + -- builtin.grep_string({ search = vim.fn.input("Grep > ") }) + -- end, { desc = "[P]roject [S]earch" }) + -- vim.keymap.set("n", "pw", builtin.grep_string, { desc = "[S]earch current [W]ord" }) + -- vim.keymap.set("n", "pg", builtin.live_grep, { desc = "Search by [G]rep" }) + -- vim.keymap.set("n", "pd", builtin.diagnostics, { desc = "Search [D]iagnostics" }) + -- vim.keymap.set("n", "pr", builtin.resume, { desc = "Search [R]esume" }) + -- vim.keymap.set("n", "p.", builtin.oldfiles, { desc = 'Search Recent Files ("." for repeat)' }) + -- vim.keymap.set("n", "", builtin.buffers, { desc = "[ ] Find existing buffers" }) + + -- Slightly advanced example of overriding default behavior and theme + -- vim.keymap.set("n", "/", function() + -- -- You can pass additional configuration to Telescope to change the theme, layout, etc. + -- builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ + -- winblend = 10, + -- previewer = false, + -- })) + -- end, { desc = "[/] Fuzzily search in current buffer" }) + -- + -- vim.keymap.set("n", "ch", builtin.command_history, { desc = "[C]ommand [H]istory" }) + -- vim.keymap.set("n", "cc", builtin.commands, { desc = "[C]ommands" }) + end, +} diff --git a/nvim/files/lua/plugins/treesitter.lua b/nvim/files/lua/plugins/treesitter.lua new file mode 100644 index 0000000..05d909c --- /dev/null +++ b/nvim/files/lua/plugins/treesitter.lua @@ -0,0 +1,39 @@ +return { + -- Highlight, edit, and navigate code + "nvim-treesitter/nvim-treesitter", + lazy = false, + build = ":TSUpdate", + config = function() + require("nvim-treesitter").setup({ + install_dir = vim.fn.stdpath("data") .. "/site", + }) + + -- Install parsers (async, no-op if already installed) + require("nvim-treesitter").install({ + "vimdoc", + "javascript", + "typescript", + "tsx", + "ripple", + "c", + "lua", + "rust", + "jsdoc", + "bash", + "svelte", + "astro", + "vue", + "css", + "scss", + "gdscript", + }) + + -- Enable treesitter highlighting and indentation + vim.api.nvim_create_autocmd("FileType", { + callback = function() + pcall(vim.treesitter.start) + vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" + end, + }) + end, +} diff --git a/nvim/files/lua/plugins/trouble.lua b/nvim/files/lua/plugins/trouble.lua new file mode 100644 index 0000000..7368ba7 --- /dev/null +++ b/nvim/files/lua/plugins/trouble.lua @@ -0,0 +1,37 @@ +return { + "folke/trouble.nvim", + opts = {}, -- for default options, refer to the configuration section for custom setup. + cmd = "Trouble", + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "xX", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "cs", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "cl", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "xL", + "Trouble loclist toggle", + desc = "Location List (Trouble)", + }, + { + "xq", + "Trouble qflist toggle", + desc = "Quickfix List (Trouble)", + }, + }, +} diff --git a/nvim/files/lua/plugins/typescript-tools.lua b/nvim/files/lua/plugins/typescript-tools.lua new file mode 100644 index 0000000..beb45b2 --- /dev/null +++ b/nvim/files/lua/plugins/typescript-tools.lua @@ -0,0 +1,56 @@ +return { + "pmizio/typescript-tools.nvim", + enabled = false, + dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, + opts = {}, + config = function() + require("typescript-tools").setup({ + -- on_attach = function() ... end, + -- handlers = { ... }, + -- ... + settings = { + -- spawn additional tsserver instance to calculate diagnostics on it + separate_diagnostic_server = true, + -- "change"|"insert_leave" determine when the client asks the server about diagnostic + publish_diagnostic_on = "insert_leave", + -- array of strings("fix_all"|"add_missing_imports"|"remove_unused"| + -- "remove_unused_imports"|"organize_imports") -- or string "all" + -- to include all supported code actions + -- specify commands exposed as code_actions + expose_as_code_action = {}, + -- string|nil - specify a custom path to `tsserver.js` file, if this is nil or file under path + -- not exists then standard path resolution strategy is applied + tsserver_path = nil, + -- specify a list of plugins to load by tsserver, e.g., for support `styled-components` + -- (see 💅 `styled-components` support section) + tsserver_plugins = {}, + -- this value is passed to: https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes + -- memory limit in megabytes or "auto"(basically no limit) + tsserver_max_memory = "auto", + -- described below + tsserver_format_options = {}, + tsserver_file_preferences = {}, + -- locale of all tsserver messages, supported locales you can find here: + -- https://github.com/microsoft/TypeScript/blob/3c221fc086be52b19801f6e8d82596d04607ede6/src/compiler/utilitiesPublic.ts#L620 + tsserver_locale = "en", + -- mirror of VSCode's `typescript.suggest.completeFunctionCalls` + complete_function_calls = false, + include_completions_with_insert_text = true, + -- CodeLens + -- WARNING: Experimental feature also in VSCode, because it might hit performance of server. + -- possible values: ("off"|"all"|"implementations_only"|"references_only") + code_lens = "off", + -- by default code lenses are displayed on all referencable values and for some of you it can + -- be too much this option reduce count of them by removing member references from lenses + disable_member_code_lens = true, + -- JSXCloseTag + -- WARNING: it is disabled by default (maybe you configuration or distro already uses nvim-ts-autotag, + -- that maybe have a conflict if enable this feature. ) + jsx_close_tag = { + enable = false, + filetypes = { "javascriptreact", "typescriptreact" }, + }, + }, + }) + end, +} diff --git a/nvim/files/lua/plugins/undotree.lua b/nvim/files/lua/plugins/undotree.lua new file mode 100644 index 0000000..789ae84 --- /dev/null +++ b/nvim/files/lua/plugins/undotree.lua @@ -0,0 +1,7 @@ +return { + "mbbill/undotree", + + config = function() + vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) + end +} diff --git a/nvim/files/lua/plugins/which-key.lua b/nvim/files/lua/plugins/which-key.lua new file mode 100644 index 0000000..a4d0a85 --- /dev/null +++ b/nvim/files/lua/plugins/which-key.lua @@ -0,0 +1,53 @@ +return { + "folke/which-key.nvim", + enabled = false, + event = "VimEnter", -- Sets the loading event to 'VimEnter' + opts = { + -- delay between pressing a key and opening which-key (milliseconds) + -- this setting is independent of vim.o.timeoutlen + delay = 0, + icons = { + -- set icon mappings to true if you have a Nerd Font + mappings = vim.g.have_nerd_font, + -- If you are using a Nerd Font: set icons.keys to an empty table which will use the + -- default which-key.nvim defined Nerd Font icons, otherwise define a string table + keys = vim.g.have_nerd_font and {} or { + Up = " ", + Down = " ", + Left = " ", + Right = " ", + C = " ", + M = " ", + D = " ", + S = " ", + CR = " ", + Esc = " ", + ScrollWheelDown = " ", + ScrollWheelUp = " ", + NL = " ", + BS = " ", + Space = " ", + Tab = " ", + F1 = "", + F2 = "", + F3 = "", + F4 = "", + F5 = "", + F6 = "", + F7 = "", + F8 = "", + F9 = "", + F10 = "", + F11 = "", + F12 = "", + }, + }, + + -- Document existing key chains + spec = { + { "s", group = "[S]earch" }, + { "t", group = "[T]oggle" }, + { "h", group = "Git [H]unk", mode = { "n", "v" } }, + }, + }, +} diff --git a/nvim/files/lua/remap.lua b/nvim/files/lua/remap.lua new file mode 100644 index 0000000..9a0990a --- /dev/null +++ b/nvim/files/lua/remap.lua @@ -0,0 +1,108 @@ +local map = function(keys, func, desc, mode) + mode = mode or "n" + vim.keymap.set(mode, keys, func, { desc = desc }) +end + +-- Project view (mini.files) +map("pv", function() + MiniFiles.open(vim.api.nvim_buf_get_name(0)) +end, "Open file explorer") + +-- Move lines around +map("J", ":m '>+1gv=gv", "Move line down", "v") +map("", ":m '>+1gv=gv", "Move line down", "v") +map("K", ":m '<-2gv=gv", "Move line up", "v") +map("", ":m '<-2gv=gv", "Move line up", "v") + +-- Keep cursor in center throughout operations +map("J", "mzJ`z", "Join lines and keep cursor") +map("", "zz", "Scroll down and center") +map("", "zz", "Scroll up and center") +map("n", "nzzzv", "Next search result and center") +map("N", "Nzzzv", "Previous search result and center") + +-- Clipboard operations +map("p", '"_dP', "Paste without updating register", "x") +map("pc", '"+p', "Paste from system clipboard") +map("y", '"+y', "Yank to system clipboard") +map("y", '"+y', "Yank to system clipboard", "v") +map("Y", '"+Y', "Yank line to system clipboard") +map("", '"+pa', "Paste from system clipboard", "i") + +-- Delete without register +map("d", '"_d', "Delete without updating register") +map("d", '"_d', "Delete without updating register", "v") + +-- Disable Q +map("Q", "", "Disable Q") + +-- Formatting +map("fo", function() + vim.cmd("Format") + vim.notify("Formatted file", vim.log.levels.INFO, { title = "Formatting" }) +end, "Format file") +map("fe", function() + vim.cmd("FormatEnable") + vim.notify("Enabled auto-format", vim.log.levels.INFO, { title = "Formatting" }) +end, "Enable auto-format") +map("fd", function() + vim.cmd("FormatDisable") + vim.notify("Disabled auto-format", vim.log.levels.INFO, { title = "Formatting" }) +end, "Disable auto-format") + +-- Organize Imports +map("oi", function() + vim.lsp.buf.code_action({ + context = { + only = { "source.organizeImports" }, + diagnostics = vim.diagnostic.get(0), + }, + apply = true, + }) +end, "Organize Imports") + +-- map("l", function() +-- local lint = require("lint") +-- lint.try_lint() +-- end, "Lint file") + +map("esf", function() + vim.cmd("EslintFixAll") +end, "Fix ESLint issues") + +-- Window management +map("ws", "s", "Split window horizontally") +map("wv", "v", "Split window vertically") +map("wh", "h", "Move to left window") +map("w", "h", "Move to left window") +map("wj", "j", "Move to bottom window") +map("w", "j", "Move to bottom window") +map("wk", "k", "Move to top window") +map("w", "k", "Move to top window") +map("wl", "l", "Move to right window") +map("w", "l", "Move to right window") +map("wq", "q", "Close window") +map("wf", "f L", "Open file under cursor in new window") + +-- Buffer operations +map("rf", ":e", "Refresh buffer") +map("sf", ":w", "Save file") + +-- Terminal +map("", [[]], "Exit terminal insert mode", "t") + +-- Close quickfix menu after selecting choice +vim.api.nvim_create_autocmd("FileType", { + pattern = { "qf" }, + command = [[nnoremap :cclose]], +}) + +vim.api.nvim_create_user_command("Cppath", function() + local path = vim.fn.expand("%:p") + vim.fn.setreg("+", path) + vim.notify('Copied "' .. path .. '" to the clipboard!') +end, {}) + +-- Kickstart keymaps + +vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" }) diff --git a/nvim/files/lua/set.lua b/nvim/files/lua/set.lua new file mode 100644 index 0000000..82e3b32 --- /dev/null +++ b/nvim/files/lua/set.lua @@ -0,0 +1,97 @@ +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +vim.opt.nu = true +vim.opt.relativenumber = true + +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +vim.opt.shiftwidth = 2 + +vim.opt.expandtab = false + +vim.opt.smartindent = true + +vim.opt.swapfile = false +vim.opt.backup = false +vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" +vim.opt.undofile = true + +vim.opt.hlsearch = false +vim.opt.incsearch = true + +vim.opt.termguicolors = true + +vim.opt.scrolloff = 8 + +vim.opt.updatetime = 50 + +vim.opt.ignorecase = true +vim.opt.smartcase = true + +-- vim.opt.colorcolumn = "80" + +vim.opt.inccommand = "nosplit" + +vim.opt.cursorline = true + +vim.g.have_nerd_font = true + +-- Enable mouse mode, can be useful for resizing splits for example! +vim.o.mouse = "a" + +-- Don't show the mode, since it's already in the status line +vim.o.showmode = false + +-- Enable break indent +vim.o.breakindent = true + +-- Save undo history +vim.o.undofile = true + +-- Keep signcolumn on by default +vim.o.signcolumn = "yes" + +-- Decrease update time +-- vim.o.updatetime = 250 + +-- Decrease mapped sequence wait time +vim.o.timeoutlen = 300 + +-- Configure how new splits should be opened +vim.o.splitright = true +vim.o.splitbelow = true + +-- Sets how neovim will display certain whitespace characters in the editor. +-- See `:help 'list'` +-- and `:help 'listchars'` +-- +-- Notice listchars is set using `vim.opt` instead of `vim.o`. +-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables. +-- See `:help lua-options` +-- and `:help lua-options-guide` +vim.o.list = true +vim.opt.listchars = { tab = "» ", trail = "·", nbsp = "␣" } + +-- Preview substitutions live, as you type! +vim.o.inccommand = "split" + +-- Show which line your cursor is on +vim.o.cursorline = true + +-- Minimal number of screen lines to keep above and below the cursor. +vim.o.scrolloff = 10 + +-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), +-- instead raise a dialog asking if you wish to save the current file(s) +-- See `:help 'confirm'` +vim.o.confirm = true + +-- vim.o.winborder = "rounded" + +-- Highlight text on yank +vim.api.nvim_create_autocmd("TextYankPost", { + callback = function() + vim.highlight.on_yank({ timeout = 100 }) + end, +}) diff --git a/nvim/files/lua/util/color.lua b/nvim/files/lua/util/color.lua new file mode 100644 index 0000000..b7acc01 --- /dev/null +++ b/nvim/files/lua/util/color.lua @@ -0,0 +1,72 @@ +local M = {} + +-- Convert hex color to RGB values +local function hex_to_rgb(hex) + hex = hex:gsub("#", "") + return tonumber("0x" .. hex:sub(1, 2)), tonumber("0x" .. hex:sub(3, 4)), tonumber("0x" .. hex:sub(5, 6)) +end + +-- Convert RGB values to hex color +local function rgb_to_hex(r, g, b) + return string.format("#%02X%02X%02X", r, g, b) +end + +-- Clamp a value between min and max +local function clamp(value, min, max) + return math.min(math.max(value, min), max) +end + +-- Darken a color by a percentage (0-100) +function M.darken(hex, percent) + if not hex or not percent then + return hex + end + + local r, g, b = hex_to_rgb(hex) + local factor = (100 - percent) / 100 + + r = clamp(math.floor(r * factor), 0, 255) + g = clamp(math.floor(g * factor), 0, 255) + b = clamp(math.floor(b * factor), 0, 255) + + return rgb_to_hex(r, g, b) +end + +-- Lighten a color by a percentage (0-100) +function M.lighten(hex, percent) + if not hex or not percent then + return hex + end + + local r, g, b = hex_to_rgb(hex) + local factor = 1 + (percent / 100) + + r = clamp(math.floor(r * factor), 0, 255) + g = clamp(math.floor(g * factor), 0, 255) + b = clamp(math.floor(b * factor), 0, 255) + + return rgb_to_hex(r, g, b) +end + +-- Blend two colors with a given weight (0-1) +function M.blend(color1, color2, weight) + weight = weight or 0.5 + local r1, g1, b1 = hex_to_rgb(color1) + local r2, g2, b2 = hex_to_rgb(color2) + + local r = math.floor(r1 * (1 - weight) + r2 * weight) + local g = math.floor(g1 * (1 - weight) + g2 * weight) + local b = math.floor(b1 * (1 - weight) + b2 * weight) + + return rgb_to_hex(r, g, b) +end + +-- Check if a color is light or dark +function M.is_light(hex) + local r, g, b = hex_to_rgb(hex) + -- Using relative luminance formula + local luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255 + return luminance > 0.5 +end + +return M diff --git a/opencode/config.lua b/opencode/config.lua new file mode 100644 index 0000000..a5a1df0 --- /dev/null +++ b/opencode/config.lua @@ -0,0 +1,6 @@ +return { + target = { + linux = "~/.config/opencode", + default = "~/.config/opencode", + }, +} diff --git a/opencode/files/AGENTS.md b/opencode/files/AGENTS.md new file mode 100644 index 0000000..a70a86c --- /dev/null +++ b/opencode/files/AGENTS.md @@ -0,0 +1,3 @@ +## Git + +- When asked to commit, always check the users previous commits, copy the style diff --git a/opencode/files/opencode.json b/opencode/files/opencode.json new file mode 100644 index 0000000..b2c9d5e --- /dev/null +++ b/opencode/files/opencode.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://opencode.ai/config.json", + "autoupdate": true +} diff --git a/paru/config.lua b/paru/config.lua new file mode 100644 index 0000000..70e2cbb --- /dev/null +++ b/paru/config.lua @@ -0,0 +1,6 @@ +return { + target = { + linux = "~/.config/paru", + default = "~/.config/paru", + }, +} diff --git a/paru/files/paru.conf b/paru/files/paru.conf new file mode 100644 index 0000000..f1122fb --- /dev/null +++ b/paru/files/paru.conf @@ -0,0 +1,2 @@ +[options] +BottomUp diff --git a/yazi/config.lua b/yazi/config.lua new file mode 100644 index 0000000..f71e53d --- /dev/null +++ b/yazi/config.lua @@ -0,0 +1,6 @@ +return { + target = { + linux = "~/.config/yazi", + default = "~/.config/yazi", + }, +} diff --git a/yazi/files/theme.toml b/yazi/files/theme.toml new file mode 100644 index 0000000..9cbf647 --- /dev/null +++ b/yazi/files/theme.toml @@ -0,0 +1,165 @@ +# : Manager [[[ + +[manager] +cwd = { fg = "#f0dfd6" } + +# Tab +tab_active = { fg = "#4f2500", bg = "#ffb782", bold = true } +tab_inactive = { fg = "#ffdcc5", bg = "#301400" } +tab_width = 1 + +# Find +find_keyword = { fg = "#ffb4ab", bold = true, italic = true, underline = true } +find_position = { fg = "#ffb4ab", bold = true, italic = true } + +# Marker +marker_copied = { fg = "#c8ce61", bg = "#c8ce61" } +marker_cut = { fg = "#e3e6af", bg = "#e3e6af" } +marker_marked = { fg = "#ffb4ab", bg = "#ffb4ab" } +marker_selected = { fg = "#c7ca95", bg = "#c7ca95" } + +# Count +count_copied = { fg = "#1b1d00", bg = "#e3e6af" } +count_cut = { fg = "#1b1d00", bg = "#e3e6af" } +count_selected = { fg = "#4f2500", bg = "#c7ca95" } + +# Border +border_symbol = "│" +border_style = { fg = "#ffb782" } + +# : ]]] + + +# : Status [[[ + +[status] +separator_open = "🭁" +separator_close = "🭠" +separator_style = { bg = "#4f2500", fg = "#F4A261" } + +[mode] +# Mode +normal_main = { bg = "#ffb782", fg = "#4f2500", bold = true } +normal_alt = { bg = "#52443b", fg = "#d6c3b7" } + +# Select mode +select_main = { bg = "#e4bfa7", fg = "#422b1a", bold = true } +select_alt = { bg = "#52443b", fg = "#d6c3b7" } + +# Unset mode +unset_main = { bg = "#c7ca95", fg = "#30330b", bold = true } +unset_alt = { bg = "#52443b", fg = "#d6c3b7" } + +# Progress +progress_label = { bold = true } +progress_normal = { fg = "#ffb782", bg = "#413731" } +progress_error = { fg = "#ffb4ab", bg = "#413731" } + +# Permissions +permissions_t = { fg = "#b96b39" } +permissions_w = { fg = "#808442" } +permissions_x = { fg = "#ff2b12" } +permissions_r = { fg = "#b9c03c" } +permissions_s = { fg = "#ff802c" } + +# : ]]] + + +# : Select [[[ + +[select] +border = { fg = "#ffb782" } +active = { fg = "#c7ca95", bold = true } +inactive = {} + +# : ]]] + + +# : Input [[[ + +[input] +border = { fg = "#ffb782" } +value = { fg = "#f0dfd6" } + +# : ]]] + + +# : Completion [[[ + +[completion] +border = { fg = "#ffb782", bg = "#4f2500" } + +# : ]]] + + +# : Tasks [[[ + +[tasks] +border = { fg = "#ffb782" } +title = {} +hovered = { fg = "#e3e6af", underline = true } + +# : ]]] + + +# : Which [[[ + +[which] +cols = 3 +mask = { bg = "#413731" } +cand = { fg = "#ffb782" } +rest = { fg = "#4f2500" } +desc = { fg = "#f0dfd6" } +separator = " ▶ " +separator_style = { fg = "#f0dfd6" } + +# : ]]] + + +# : Help [[[ + +[help] +on = { fg = "#f0dfd6" } +run = { fg = "#f0dfd6" } +footer = { fg = "#422b1a", bg = "#e4bfa7" } + +# : ]]] + + +# : Notify [[[ + +[notify] +title_info = { fg = "#c7ca95" } +title_warn = { fg = "#ffb782" } +title_error = { fg = "#ffb4ab" } + +# : ]]] + + +# : File-specific styles [[[ + +[filetype] + +rules = [ + # Images + { mime = "image/*", fg = "#94e2d5" }, + + # Media + { mime = "{audio,video}/*", fg = "#f9e2af" }, + + # Archives + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", fg = "#f5c2e7" }, + + # Documents + { mime = "application/{pdf,doc,rtf}", fg = "#a6e3a1" }, + + # Special files + { name = "*", is = "orphan", bg = "#93000a" }, + { name = "*", is = "exec", fg = "#ffdad6" }, + + # Fallback + { name = "*", fg = "#f0dfd6" }, + { name = "*/", fg = "#ffb782" }, +] + +# : ]]] diff --git a/yazi/files/yazi.toml b/yazi/files/yazi.toml new file mode 100644 index 0000000..f3a8c10 --- /dev/null +++ b/yazi/files/yazi.toml @@ -0,0 +1,159 @@ +"$schema" = "https://yazi-rs.github.io/schemas/yazi.json" + +[mgr] +ratio = [ 1, 4, 3 ] +sort_by = "alphabetical" +sort_sensitive = false +sort_reverse = false +sort_dir_first = true +sort_translit = false +linemode = "none" +show_hidden = false +show_symlink = true +scrolloff = 5 +mouse_events = [ "click", "scroll" ] +title_format = "Yazi: {cwd}" + +[preview] +wrap = "no" +tab_size = 2 +max_width = 2000 +max_height = 2000 +cache_dir = "" +image_delay = 30 +image_filter = "triangle" +image_quality = 75 +sixel_fraction = 15 +ueberzug_scale = 1 +ueberzug_offset = [ 0, 0, 0, 0 ] + +[opener] +edit = [ + { run = '${EDITOR:-vi} "$@"', desc = "$EDITOR", block = true, for = "unix" }, + { run = 'code %*', orphan = true, desc = "code", for = "windows" }, + { run = 'code -w %*', block = true, desc = "code (block)", for = "windows" }, +] +open = [ + { run = 'xdg-open "$1"', desc = "Open", for = "linux" }, + { run = 'open "$@"', desc = "Open", for = "macos" }, + { run = 'start "" "%1"', orphan = true, desc = "Open", for = "windows" }, + { run = 'termux-open "$1"', desc = "Open", for = "android" }, +] +reveal = [ + { run = 'xdg-open "$(dirname "$1")"', desc = "Reveal", for = "linux" }, + { run = 'open -R "$1"', desc = "Reveal", for = "macos" }, + { run = 'explorer /select,"%1"', orphan = true, desc = "Reveal", for = "windows" }, + { run = 'termux-open "$(dirname "$1")"', desc = "Reveal", for = "android" }, + { run = '''clear; exiftool "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show EXIF", for = "unix" }, +] +extract = [ + { run = 'ya pub extract --list "$@"', desc = "Extract here", for = "unix" }, + { run = 'ya pub extract --list %*', desc = "Extract here", for = "windows" }, +] +play = [ + { run = 'mpv --force-window "$@"', orphan = true, for = "unix" }, + { run = 'mpv --force-window %*', orphan = true, for = "windows" }, + { run = '''mediainfo "$1"; echo "Press enter to exit"; read _''', block = true, desc = "Show media info", for = "unix" }, +] + +[open] +rules = [ + # Folder + { name = "*/", use = [ "edit", "open", "reveal" ] }, + # Text + { mime = "text/*", use = [ "edit", "reveal" ] }, + # Image + { mime = "image/*", use = [ "open", "reveal" ] }, + # Media + { mime = "{audio,video}/*", use = [ "play", "reveal" ] }, + # Archive + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", use = [ "extract", "reveal" ] }, + # JSON + { mime = "application/{json,ndjson}", use = [ "edit", "reveal" ] }, + { mime = "*/javascript", use = [ "edit", "reveal" ] }, + # Empty file + { mime = "inode/empty", use = [ "edit", "reveal" ] }, + # Fallback + { name = "*", use = [ "open", "reveal" ] }, +] + +[tasks] +micro_workers = 10 +macro_workers = 10 +bizarre_retry = 3 +image_alloc = 536870912 # 512MB +image_bound = [ 0, 0 ] +suppress_preload = false + +[plugin] +fetchers = [ + # Mimetype + { id = "mime", name = "*", run = "mime", prio = "high" }, +] +spotters = [ + { name = "*/", run = "folder" }, + # Code + { mime = "text/*", run = "code" }, + { mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" }, + # Image + { mime = "image/{avif,hei?,jxl}", run = "magick" }, + { mime = "image/svg+xml", run = "svg" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # Fallback + { name = "*", run = "file" }, +] +preloaders = [ + # Image + { mime = "image/{avif,hei?,jxl}", run = "magick" }, + { mime = "image/svg+xml", run = "svg" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # PDF + { mime = "application/pdf", run = "pdf" }, + # Font + { mime = "font/*", run = "font" }, + { mime = "application/ms-opentype", run = "font" }, +] +previewers = [ + { name = "*/", run = "folder" }, + # Code + { mime = "text/*", run = "code" }, + { mime = "application/{mbox,javascript,wine-extension-ini}", run = "code" }, + # JSON + { mime = "application/{json,ndjson}", run = "json" }, + # Image + { mime = "image/{avif,hei?,jxl}", run = "magick" }, + { mime = "image/svg+xml", run = "svg" }, + { mime = "image/*", run = "image" }, + # Video + { mime = "video/*", run = "video" }, + # PDF + { mime = "application/pdf", run = "pdf" }, + # Archive + { mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" }, + { mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" }, + { name = "*.{AppImage,appimage}", run = "archive" }, + # Virtual Disk / Disk Image + { mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" }, + { mime = "application/virtualbox-{vhd,vhdx}", run = "archive" }, + { name = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}", run = "archive" }, + # Font + { mime = "font/*", run = "font" }, + { mime = "application/ms-opentype", run = "font" }, + # Empty file + { mime = "inode/empty", run = "empty" }, + # Fallback + { name = "*", run = "file" }, +] + +[input] +cursor_blink = false + +# cd +cd_title = "Change directory:" +cd_origin = "top-center" +cd_offset = [ 0, 2, 50, 3 ] +