commit c08daf3f8592ef7beb831568914b19004a5d6dca Author: p3ta00 Date: Fri Nov 14 01:15:39 2025 -0800 Initial commit: CachyOS shell environment setup Comprehensive shell environment setup for CachyOS/Arch Linux featuring: - Modern CLI tools: eza, bat, fd, ripgrep, fzf, zoxide, dust, duf, procs, btop, sd, delta - Development tools: neovim (NvChad), lazygit, starship, yazi, zellij, navi - Shell: zsh with oh-my-zsh, syntax highlighting, autosuggestions - Terminal: Ghostty configuration - Dracula theme: Consistent theming across all tools - Fonts: JetBrains Mono Nerd Font (all variants) - Configs: starship, zellij, yazi, fastfetch, ghostty - Dotfiles: .zshrc, .bashrc, zsh completions Automated installation script handles all dependencies and configuration. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..89ca5c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +# Backup files +*.bak +*.backup +*.old +*.orig +*~ + +# Compressed archives +*.tar.gz +*.zip +*.7z +*.rar + +# Logs +*.log + +# OS specific +.DS_Store +Thumbs.db + +# Temporary files +*.tmp +*.temp +.cache/ + +# IDE/Editor +.vscode/ +.idea/ +*.swp +*.swo + +# Private/sensitive data +secrets/ +private/ +.env +*.key +*.pem diff --git a/DRACULA_THEME.md b/DRACULA_THEME.md new file mode 100644 index 0000000..665815a --- /dev/null +++ b/DRACULA_THEME.md @@ -0,0 +1,201 @@ +# Dracula Theme Color Reference + +This file contains the official Dracula theme colors for reference when customizing additional tools. + +## Dracula Color Palette + +``` +Background: #282a36 +Current Line: #44475a +Foreground: #f8f8f2 +Comment: #6272a4 +Cyan: #8be9fd +Green: #50fa7b +Orange: #ffb86c +Pink: #ff79c6 +Purple: #bd93f9 +Red: #ff5555 +Yellow: #f1fa8c +``` + +## ANSI Colors (for terminals) + +### Normal Colors +``` +Black: #21222c +Red: #ff5555 +Green: #50fa7b +Yellow: #f1fa8c +Blue: #bd93f9 +Magenta: #ff79c6 +Cyan: #8be9fd +White: #f8f8f2 +``` + +### Bright Colors +``` +Bright Black: #6272a4 +Bright Red: #ff6e6e +Bright Green: #69ff94 +Bright Yellow: #ffffa5 +Bright Blue: #d6acff +Bright Magenta: #ff92df +Bright Cyan: #a4ffff +Bright White: #ffffff +``` + +## Applied Configurations + +### Tools with Dracula Theme Configured: + +1. **Ghostty Terminal** (`~/.config/ghostty/config`) + - Full Dracula palette + - JetBrains Mono Nerd Font + - Dark window theme + +2. **Bat** (via environment variable in `.zshrc`) + - `BAT_THEME="Dracula"` + - Syntax highlighting with Dracula colors + +3. **FZF** (in `.zshrc`) + - Custom Dracula color scheme + - Matching background, foreground, and accent colors + +4. **Git Delta** (git config) + - `delta.syntax-theme "Dracula"` + - Side-by-side diffs with Dracula colors + +5. **Zellij** (via alias in `.zshrc`) + - `zellij options --theme dracula` + - Terminal workspace with Dracula theme + +6. **Starship** (`~/.config/starship.toml`) + - Custom Dracula palette defined + - All prompt elements use Dracula colors + +## Additional Tools to Theme Manually + +If you install additional tools, here's how to apply Dracula: + +### Alacritty +```yaml +# ~/.config/alacritty/alacritty.yml +colors: + primary: + background: '#282a36' + foreground: '#f8f8f2' + cursor: + text: CellBackground + cursor: CellForeground + selection: + text: CellForeground + background: '#44475a' + normal: + black: '#21222c' + red: '#ff5555' + green: '#50fa7b' + yellow: '#f1fa8c' + blue: '#bd93f9' + magenta: '#ff79c6' + cyan: '#8be9fd' + white: '#f8f8f2' + bright: + black: '#6272a4' + red: '#ff6e6e' + green: '#69ff94' + yellow: '#ffffa5' + blue: '#d6acff' + magenta: '#ff92df' + cyan: '#a4ffff' + white: '#ffffff' +``` + +### Kitty +```conf +# ~/.config/kitty/dracula.conf +foreground #f8f8f2 +background #282a36 +selection_foreground #ffffff +selection_background #44475a + +# black +color0 #21222c +color8 #6272a4 + +# red +color1 #ff5555 +color9 #ff6e6e + +# green +color2 #50fa7b +color10 #69ff94 + +# yellow +color3 #f1fa8c +color11 #ffffa5 + +# blue +color4 #bd93f9 +color12 #d6acff + +# magenta +color5 #ff79c6 +color13 #ff92df + +# cyan +color6 #8be9fd +color14 #a4ffff + +# white +color7 #f8f8f2 +color15 #ffffff +``` + +### Tmux (if you decide to use it) +```conf +# ~/.tmux.conf - Dracula theme +set -g status-style 'bg=#282a36 fg=#f8f8f2' +set -g pane-border-style 'fg=#6272a4' +set -g pane-active-border-style 'fg=#bd93f9' +set -g window-status-current-style 'fg=#282a36 bg=#bd93f9' +set -g message-style 'bg=#44475a fg=#f8f8f2' +``` + +### Vim/Neovim (in addition to NvChad) +```vim +" Add to init.vim or init.lua +colorscheme dracula +``` + +For Lua: +```lua +-- init.lua +vim.cmd [[colorscheme dracula]] +``` + +## Official Dracula Resources + +- **Website**: https://draculatheme.com/ +- **GitHub**: https://github.com/dracula +- **Color Spec**: https://spec.draculatheme.com/ + +## Custom Dracula Configurations + +You can find Dracula themes for almost any application at: +https://draculatheme.com/ + +Popular applications with Dracula themes: +- VS Code +- Sublime Text +- Vim +- Emacs +- Obsidian +- Discord +- Slack +- Firefox +- Chrome +- And many more! + +--- + +**Keep your environment consistently beautiful with Dracula! 🧛** diff --git a/README.md b/README.md new file mode 100644 index 0000000..153be53 --- /dev/null +++ b/README.md @@ -0,0 +1,332 @@ +# CachyOS Shell Environment Setup + +A comprehensive shell environment setup script for CachyOS (or any Arch-based distro) featuring modern CLI tools, Dracula theming, and a beautiful terminal experience. + +## Features + +### Modern CLI Tools +- **eza** - Modern replacement for `ls` with git integration and icons +- **bat** - Better `cat` with syntax highlighting (Dracula theme) +- **fd** - Faster and more user-friendly alternative to `find` +- **ripgrep (rg)** - Ultra-fast text search tool +- **fzf** - Command-line fuzzy finder (Dracula theme) +- **zoxide** - Smarter `cd` command with frecency +- **dust** - Intuitive `du` replacement +- **duf** - User-friendly `df` alternative +- **procs** - Modern `ps` replacement +- **btop** - Beautiful system monitor +- **sd** - Intuitive `sed` alternative +- **delta** - Syntax-highlighting git diff viewer +- **atuin** - Magical shell history with search and sync +- **tealdeer** - Fast tldr client for quick command examples +- **hyperfine** - Command-line benchmarking tool +- **tokei** - Code statistics tool + +### Development Tools +- **neovim** - Modern vim-based text editor +- **NvChad** - Blazing fast Neovim config +- **lazygit** - Simple terminal UI for git +- **starship** - Fast, customizable prompt (Dracula theme) +- **yazi** - Blazing fast terminal file manager +- **zellij** - Terminal workspace with layouts (Dracula theme) +- **navi** - Interactive cheatsheet tool + +### Shell Environment +- **zsh** - Powerful shell with Oh-My-Zsh +- **oh-my-zsh** - Framework for managing zsh configuration +- **zsh-syntax-highlighting** - Fish-like syntax highlighting +- **zsh-autosuggestions** - Fish-like autosuggestions +- **Ghostty** - Fast, native terminal emulator (Dracula theme) + +### Theming +All tools are configured with **Dracula theme** for a consistent, beautiful dark theme experience. + +## Directory Structure + +``` +cachyos-setup/ +├── install.sh # Main installation script +├── README.md # This file +├── dotfiles/ # Shell configuration files +│ ├── .zshrc # Main zsh configuration +│ ├── .zshenv # Zsh environment variables +│ ├── .bashrc # Bash configuration (fallback) +│ ├── .bash_logout # Bash logout script +│ ├── .profile # Profile configuration +│ └── .zsh/ # Zsh completions +├── config/ # Application configurations +│ ├── starship.toml # Starship prompt config +│ ├── zellij/ # Zellij workspace config +│ ├── yazi/ # Yazi file manager config +│ ├── fastfetch/ # Fastfetch system info config +│ └── htop/ # Htop config +└── fonts/ # JetBrains Mono Nerd Font +``` + +## Installation + +### Prerequisites +- A fresh CachyOS installation (or Arch-based distro) +- Internet connection +- sudo privileges + +### Quick Install + +1. Copy this entire `cachyos-setup` directory to your new machine +2. Open a terminal and navigate to the directory: + ```bash + cd cachyos-setup + ``` +3. Run the installation script: + ```bash + ./install.sh + ``` +4. Follow the prompts and let the script do its magic! + +### What the Script Does + +The installation script will: +1. ✅ Detect your package manager (pacman or apt) +2. ✅ Update system packages +3. ✅ Install core system packages +4. ✅ Install Rust and Cargo +5. ✅ Install all Cargo-based tools +6. ✅ Set up Oh-My-Zsh with plugins +7. ✅ Install JetBrains Mono Nerd Font +8. ✅ Set up Neovim with NvChad +9. ✅ Install Ghostty terminal +10. ✅ Install lazygit and btop +11. ✅ Copy all dotfiles and configs (with backup) +12. ✅ Configure Ghostty with Dracula theme +13. ✅ Set up bat, delta, and atuin +14. ✅ Change default shell to zsh + +**Note:** The script will automatically backup your existing configurations to `~/.config_backup_/` + +## Post-Installation + +After the installation completes: + +1. **Logout and login** (or reboot) to apply the shell changes +2. **Open Ghostty terminal** to experience your new setup +3. **Run `nvim`** for the first time to complete NvChad plugin installation +4. **Enjoy your new environment!** + +## Key Features & Usage + +### Enhanced Shell Commands + +The new `.zshrc` includes many convenient aliases: + +#### File Operations +```bash +ls # eza with icons and colors +ll # eza long format +la # eza show all files +lt # eza tree view +cat # bat with syntax highlighting +``` + +#### Navigation +```bash +cd # Uses zoxide (learns your habits) +.. # Go up one directory +... # Go up two directories +mkcd # Create directory and cd into it +``` + +#### System Monitoring +```bash +top # Opens btop +du # Uses dust +df # Uses duf +ps # Uses procs +``` + +#### Git +```bash +lg # Opens lazygit +gs # git status +ga # git add +gc # git commit +gd # git diff (with delta) +``` + +#### Utilities +```bash +help # Uses tldr for quick examples +zconfig # Edit .zshrc +nconfig # Edit nvim config +sconfig # Edit starship config +zj # Start zellij with dracula theme +``` + +### Atuin Shell History + +Press `Ctrl+R` to search through your shell history with atuin's powerful interface. + +### FZF Fuzzy Finding + +- `Ctrl+T` - Search for files +- `Ctrl+R` - Search command history (atuin) +- `Alt+C` - Change directory with fuzzy search + +### Starship Prompt + +The starship prompt shows: +- Current directory +- Git branch and status +- Programming language versions (Python, Node, Rust, Go, etc.) +- Docker context +- Custom git remote icons (GitHub, GitLab, etc.) + +### Zellij Terminal Workspace + +Start zellij with Dracula theme: +```bash +zj +``` + +Key bindings: +- `Ctrl+O` - Open zellij commands +- `Ctrl+T` - New tab +- `Ctrl+P` - New pane +- `Ctrl+N` - Switch panes + +## Customization + +### Change Themes + +All configurations support Dracula theme by default, but you can customize: + +- **Starship**: Edit `~/.config/starship.toml` +- **Ghostty**: Edit `~/.config/ghostty/config` +- **Zellij**: Edit `~/.config/zellij/config.kdl` +- **Bat**: Change `BAT_THEME` in `.zshrc` +- **FZF**: Modify `FZF_DEFAULT_OPTS` in `.zshrc` + +### Add More Tools + +To add more Rust-based tools: +```bash +cargo install +``` + +## Troubleshooting + +### Fonts not showing correctly +```bash +fc-cache -f ~/.local/share/fonts +``` + +### Zsh not default shell +```bash +chsh -s $(which zsh) +``` + +### Cargo tools not in PATH +Add to `.zshrc`: +```bash +export PATH="$HOME/.cargo/bin:$PATH" +``` + +### NvChad plugins not loading +```bash +nvim +# Wait for installation to complete +# Press Enter when prompted +``` + +## Included Configurations + +### .zshrc Features +- Oh-My-Zsh with plugins +- Starship prompt +- Zoxide integration +- Dracula theme for fzf, bat +- Atuin history search +- Modern CLI tool aliases +- Helpful functions (extract, mkcd) +- Git aliases +- Custom completions support + +### Starship Configuration +- Minimalist design +- Git integration with custom icons +- Language detection (Python, Node, Rust, Go, etc.) +- Custom git remote symbols +- Dracula color scheme + +### Ghostty Configuration +- Dracula color scheme +- JetBrains Mono Nerd Font +- Custom padding +- Shell integration +- No close confirmation + +## Package List + +### System Packages (pacman) +``` +zsh git curl wget base-devel fzf ripgrep bat fd xclip htop +ruby rubygems python python-pip fontconfig unzip neovim go +``` + +### Cargo Tools +``` +starship zoxide yazi-fm yazi-cli zellij navi eza bat fd-find +dust duf procs bottom sd tealdeer git-delta atuin hyperfine tokei +``` + +### Additional Tools +- lazygit +- btop +- ghostty (via AUR) + +## Backup Information + +The install script automatically backs up: +- All existing dotfiles in your home directory +- All existing configs in `~/.config/` + +Backups are stored in: `~/.config_backup_/` + +## Manual Installation Steps + +If you prefer to install components individually: + +1. **Install Rust**: + ```bash + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + ``` + +2. **Install Oh-My-Zsh**: + ```bash + sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + ``` + +3. **Install a tool via cargo**: + ```bash + cargo install + ``` + +4. **Copy configs**: + ```bash + cp dotfiles/.zshrc ~/ + cp -r config/* ~/.config/ + ``` + +## Credits + +- **Dracula Theme**: https://draculatheme.com/ +- **NvChad**: https://nvchad.com/ +- **Starship**: https://starship.rs/ +- **Oh-My-Zsh**: https://ohmyz.sh/ + +## License + +Free to use and modify for personal use. + +--- + +**Enjoy your beautiful new shell environment! 🚀** diff --git a/config/fastfetch/config.jsonc b/config/fastfetch/config.jsonc new file mode 100644 index 0000000..ee1297f --- /dev/null +++ b/config/fastfetch/config.jsonc @@ -0,0 +1,121 @@ +{ + "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", + "logo": { + "height": 19, + "width": 50, + "padding": { + "top": 2, + "left": 3 + } + }, + "modules": [ + "break", + { + "type": "custom", + "format": "┌────────────────────── Hardware ──────────────────────┐", + "outputColor": "red" + }, + { + "type": "title", + "key": " PC", + "keyColor": "green" + }, + { + "type": "cpu", + "key": "│ ├󰍛CPU", + "showPeCoreCount": true, + "format": "{1}", + "keyColor": "green" + }, + { + "type": "gpu", + "key": "│ ├󰍛 GPU", + "keyColor": "green" + }, + { + "type": "memory", + "key": "└ └󰍛 Memory", + "keyColor": "green" + }, + { + "type": "custom", + "format": "└──────────────────────────────────────────────────────┘", + "outputColor": "red" + }, + "break", + { + "type": "custom", + "format": "┌────────────────────── Software ──────────────────────┐", + "outputColor": "red" + }, + { + "type": "os", + "key": " OS", + "keyColor": "yellow" + }, + { + "type": "kernel", + "key": "│ ├ Kernel", + "keyColor": "yellow" + }, + { + "type": "packages", + "key": "│ ├󰏖 Packages", + "keyColor": "yellow" + }, + { + "type": "shell", + "key": "│ ├ Shell", + "keyColor": "yellow" + }, + { + "type": "command", + "key": "│ ├ OS Age", + "keyColor": "yellow", + "text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days" + }, + { + "type": "uptime", + "key": "└ └ Uptime", + "keyColor": "yellow" + }, + "break", + { + "type": "de", + "key": " DE", + "keyColor": "blue" + }, + { + "type": "lm", + "key": "│ ├ LM", + "keyColor": "blue" + }, + { + "type": "wm", + "key": "│ ├ WM", + "keyColor": "blue" + }, + { + "type": "gpu", + "key": "│ ├󰍛 GPU Driver", + "format": "{3}", + "keyColor": "blue" + }, + { + "type": "wmtheme", + "key": "└ └󰉼 Theme", + "keyColor": "blue" + }, + + { + "type": "custom", + "format": "└────────────────────────────────────────────────────┘", + "outputColor": "red" + }, + { + "type": "custom", + "format": " \u001b[90m \u001b[31m \u001b[32m \u001b[33m \u001b[34m \u001b[35m \u001b[36m \u001b[37m " + }, + "break" + ] +} diff --git a/config/fastfetch/majin.png b/config/fastfetch/majin.png new file mode 100644 index 0000000..d1989ea Binary files /dev/null and b/config/fastfetch/majin.png differ diff --git a/config/ghostty/config b/config/ghostty/config new file mode 100644 index 0000000..8b85e74 --- /dev/null +++ b/config/ghostty/config @@ -0,0 +1,19 @@ +# Ghostty Configuration - Dracula Theme + +# Font +font-family = "JetBrainsMono Nerd Font" +font-size = 12 + +theme = dracula +background-opacity = 0.3 +# Window +window-padding-x = 10 +window-padding-y = 10 +window-theme = dark +gtk-titlebar = false +# Shell +shell-integration = zsh + +# Misc +confirm-close-surface = false +keybind = shift+enter=text:\x1b\r diff --git a/config/starship.toml b/config/starship.toml new file mode 100644 index 0000000..955b8b7 --- /dev/null +++ b/config/starship.toml @@ -0,0 +1,218 @@ +command_timeout = 3600 + +"$schema" = 'https://starship.rs/config-schema.json' + +add_newline = false + +format = """ + ➜\ +$directory\ +${custom.giturl}\ +$git_branch\ +$git_state\ +$git_status\ +$line_break\ +$character +""" +right_format = """$python$nodejs$rust$golang$java$php$c$kotlin$haskell$docker_context""" +palette = "catppuccin_mocha" + +[palettes.catppuccin_mocha] +rosewater = "#f5e0dc" +flamingo = "#f2cdcd" +pink = "#f5c2e7" +mauve = "#cba6f7" +red = "#f38ba8" +maroon = "#eba0ac" +peach = "#fab387" +yellow = "#f9e2af" +green = "#a6e3a1" +teal = "#94e2d5" +sky = "#89dceb" +sapphire = "#74c7ec" +blue = "#89b4fa" +lavender = "#b4befe" +text = "#cdd6f4" +subtext1 = "#bac2de" +subtext0 = "#a6adc8" +overlay2 = "#9399b2" +overlay1 = "#7f849c" +overlay0 = "#6c7086" +surface2 = "#585b70" +surface1 = "#45475a" +surface0 = "#313244" +base = "#1e1e2e" +mantle = "#181825" +crust = "#11111b" + +# [palettes.custom] +# rosewater = "#f5e0dc" +# flamingo = "#eb6f92" +# pink = "#f5c2e7" +# orange = "#cba6f7" +# color_red = '#cc241d' +# red = "#f38ba8" +# maroon = "#eba0ac" +# peach = "#fab387" +# yellow = "#f9e2af" +# green = "#a6e3a1" +# teal = "#94e2d5" +# sky = "#89dceb" +# sapphire = "#74c7ec" +# blue = "#89b4fa" +# lavender = "#b4befe" +# foam = "#9ccfd8" +# pine = "#31748f" +# gold = "#f6c177" +# rose = "#ebbcba" +# text = "#cdd6f4" +# subtext1 = "#bac2de" +# subtext0 = "#a6adc8" +# overlay2 = "#9399b2" +# overlay1 = "#7f849c" +# overlay0 = "#6c7086" +# surface2 = "#585b70" +# surface1 = "#45475a" +# surface0 = "#313244" +# base = "#1e1e2e" +# mantle = "#181825" +# crust = "#11111b" + +[os.symbols] +Windows = "󰍲" +Ubuntu = "󰕈" +SUSE = "" +Raspbian = "󰐿" +Mint = "󰣭" +Macos = " " +Manjaro = "" +Linux = "󰌽" +Gentoo = "󰣨" +Fedora = "󰣛" +Alpine = "" +Amazon = "" +Android = "" +Arch = "󰣇" +Artix = "󰣇" +CentOS = "" +Debian = "󰣚" +Redhat = "󱄛" +RedHatEnterprise = "󱄛" + +[username] +#show_always = true +#style_user = "bg:surface0 fg:text" +#style_root = "bg:surface0 fg:text" +#format = '[ $user ]($style)' + +[directory] +style = "sapphire" +format = "[ $path ]($style)" +#truncation_length = 4 +#truncation_symbol = "…/" + +[directory.substitutions] +"Documents" = "󰈙 " +"Downloads" = " " +"Music" = "󰝚 " +"Pictures" = " " +"Developer" = "󰲋 " + +[os] +disabled = true +#style = "bg:surface0 fg:text" + +[custom.giturl] +# disabled = true +description = "Display symbol for remote Git server" +command = """ +GIT_REMOTE=$(command git ls-remote --get-url 2> /dev/null) +if [[ "$GIT_REMOTE" =~ "github" ]]; then + GIT_REMOTE_SYMBOL=" " +elif [[ "$GIT_REMOTE" =~ "gitlab" ]]; then + GIT_REMOTE_SYMBOL=" " +elif [[ "$GIT_REMOTE" =~ "bitbucket" ]]; then + GIT_REMOTE_SYMBOL=" " +elif [[ "$GIT_REMOTE" =~ "git" ]]; then + GIT_REMOTE_SYMBOL=" " +else + GIT_REMOTE_SYMBOL=" " +fi +echo "$GIT_REMOTE_SYMBOL " +""" +when = 'git rev-parse --is-inside-work-tree 2> /dev/null' +format = "at $output" + +[git_branch] +symbol = "[](black) " +# format = ' [$symbol$branch(:$remote_branch)]($style)[]' +style = "fg:lavender bg:black" +format = ' on [$symbol$branch]($style)[](black)' + +[git_status] +format = '[ $symbol($version) ]($style)' + +[nodejs] +symbol = "" +format = '[ $symbol($version) ]($style)' + +[c] +symbol = " " +format = '[ $symbol($version) ]($style)' + +[rust] +symbol = "" +format = '[ $symbol($version) ]($style)' + +[golang] +symbol = "" +format = '[ $symbol($version) ]($style)' +detect_files = ["go.mod"] + +[php] +symbol = "" +format = '[ $symbol($version) ]($style)' + +[java] +symbol = " " +format = '[ $symbol($version) ]($style)' + +[kotlin] +symbol = "" + +format = '[ $symbol($version) ]($style)' + +[haskell] +symbol = "" + +format = '[ $symbol($version) ]($style)' + +[python] +symbol = "" + +format = '[ $symbol($version) ]($style)' + + +[docker_context] +symbol = "" +format = '[ $symbol($version) ]($style)' + +[time] +disabled = true +time_format = "%R" +style = "bg:peach" +format = '[[  $time ](fg:mantle bg:foam)]($style)' + +[line_break] +disabled = true + +[character] +disabled = false +success_symbol = '[𝘹](bold fg:green)' +error_symbol = '[𝘹](bold fg:red)' +vimcmd_symbol = '[](bold fg:creen)' +vimcmd_replace_one_symbol = '[](bold fg:purple)' +vimcmd_replace_symbol = '[](bold fg:purple)' +vimcmd_visual_symbol = '[](bold fg:lavender)' + + diff --git a/config/yazi/flavors/dracula.yazi b/config/yazi/flavors/dracula.yazi new file mode 160000 index 0000000..99b60fd --- /dev/null +++ b/config/yazi/flavors/dracula.yazi @@ -0,0 +1 @@ +Subproject commit 99b60fd76df4cce2778c7e6c611bfd733cf73866 diff --git a/config/zellij/config.kdl b/config/zellij/config.kdl new file mode 100644 index 0000000..8828f24 --- /dev/null +++ b/config/zellij/config.kdl @@ -0,0 +1,519 @@ +// +// THIS FILE WAS AUTOGENERATED BY ZELLIJ, THE PREVIOUS FILE AT THIS LOCATION WAS COPIED TO: /home/p3ta/.config/zellij/config.kdl.bak +// + +keybinds clear-defaults=true { + normal { + bind "Alt left" { MoveFocusOrTab "left"; } + bind "Alt down" { MoveFocus "down"; } + bind "Alt up" { MoveFocus "up"; } + bind "Alt right" { MoveFocusOrTab "right"; } + bind "Alt +" { Resize "Increase"; } + bind "Alt -" { Resize "Decrease"; } + bind "Alt =" { Resize "Increase"; } + bind "Alt [" { PreviousSwapLayout; } + bind "Alt ]" { NextSwapLayout; } + bind "Ctrl a" { SwitchToMode "tmux"; } + bind "Alt f" { ToggleFloatingPanes; } + bind "Alt h" { MoveFocusOrTab "left"; } + bind "Alt j" { MoveFocus "down"; } + bind "Alt k" { MoveFocus "up"; } + bind "Alt l" { MoveFocusOrTab "right"; } + bind "Alt n" { NewPane; } + } + locked { + bind "Ctrl g" { SwitchToMode "normal"; } + } + pane { + bind "left" { MoveFocus "left"; } + bind "down" { MoveFocus "down"; } + bind "up" { MoveFocus "up"; } + bind "right" { MoveFocus "right"; } + bind "c" { SwitchToMode "renamepane"; PaneNameInput 0; } + bind "d" { NewPane "down"; SwitchToMode "normal"; } + bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } + bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; } + bind "h" { MoveFocus "left"; } + bind "j" { MoveFocus "down"; } + bind "k" { MoveFocus "up"; } + bind "l" { MoveFocus "right"; } + bind "n" { NewPane; SwitchToMode "normal"; } + bind "p" { SwitchFocus; } + bind "Ctrl p" { SwitchToMode "normal"; } + bind "r" { NewPane "right"; SwitchToMode "normal"; } + bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } + bind "z" { TogglePaneFrames; SwitchToMode "normal"; } + } + tab { + bind "left" { GoToPreviousTab; } + bind "down" { GoToNextTab; } + bind "up" { GoToPreviousTab; } + bind "right" { GoToNextTab; } + bind "[" { BreakPaneLeft; SwitchToMode "normal"; } + bind "]" { BreakPaneRight; SwitchToMode "normal"; } + bind "b" { BreakPane; SwitchToMode "normal"; } + bind "h" { GoToPreviousTab; } + bind "j" { GoToNextTab; } + bind "k" { GoToPreviousTab; } + bind "l" { GoToNextTab; } + bind "n" { NewTab; SwitchToMode "normal"; } + bind "r" { SwitchToMode "renametab"; TabNameInput 0; } + bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } + bind "Ctrl t" { SwitchToMode "normal"; } + bind "x" { CloseTab; SwitchToMode "normal"; } + bind "tab" { ToggleTab; } + } + resize { + bind "left" { Resize "Increase left"; } + bind "down" { Resize "Increase down"; } + bind "up" { Resize "Increase up"; } + bind "right" { Resize "Increase right"; } + bind "+" { Resize "Increase"; } + bind "-" { Resize "Decrease"; } + bind "=" { Resize "Increase"; } + bind "H" { Resize "Decrease left"; } + bind "J" { Resize "Decrease down"; } + bind "K" { Resize "Decrease up"; } + bind "L" { Resize "Decrease right"; } + bind "h" { Resize "Increase left"; } + bind "j" { Resize "Increase down"; } + bind "k" { Resize "Increase up"; } + bind "l" { Resize "Increase right"; } + bind "Ctrl r" { SwitchToMode "normal"; } + } + move { + bind "left" { MovePane "left"; } + bind "down" { MovePane "down"; } + bind "up" { MovePane "up"; } + bind "right" { MovePane "right"; } + bind "h" { MovePane "left"; } + bind "j" { MovePane "down"; } + bind "k" { MovePane "up"; } + bind "l" { MovePane "right"; } + bind "n" { MovePane; } + bind "p" { MovePaneBackwards; } + bind "Ctrl y" { SwitchToMode "normal"; } + bind "tab" { MovePane; } + } + scroll { + bind "e" { EditScrollback; SwitchToMode "normal"; } + bind "q" { SwitchToMode "normal"; } + bind "s" { SwitchToMode "entersearch"; SearchInput 0; } + bind "enter" { Copy; SwitchToMode "normal"; } + } + search { + bind "c" { SearchToggleOption "CaseSensitivity"; } + bind "n" { Search "down"; } + bind "o" { SearchToggleOption "WholeWord"; } + bind "p" { Search "up"; } + bind "w" { SearchToggleOption "Wrap"; } + } + session { + bind "c" { + LaunchOrFocusPlugin "configuration" { + floating true + move_to_focused_tab true + } + SwitchToMode "normal" + } + bind "Ctrl o" { SwitchToMode "normal"; } + bind "p" { + LaunchOrFocusPlugin "plugin-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "normal" + } + bind "w" { + LaunchOrFocusPlugin "session-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "normal" + } + } + shared_except "locked" { + bind "Ctrl g" { SwitchToMode "locked"; } + } + shared_except "normal" "locked" "entersearch" "renametab" "renamepane" "prompt" { + bind "esc" { SwitchToMode "normal"; } + } + shared_except "normal" "locked" "scroll" "entersearch" "search" "session" "prompt" { + bind "enter" { SwitchToMode "normal"; } + } + shared_among "pane" "tmux" { + bind "x" { CloseFocus; SwitchToMode "normal"; } + } + shared_among "tab" "tmux" { + bind "1" { GoToTab 1; SwitchToMode "normal"; } + bind "2" { GoToTab 2; SwitchToMode "normal"; } + bind "3" { GoToTab 3; SwitchToMode "normal"; } + bind "4" { GoToTab 4; SwitchToMode "normal"; } + bind "5" { GoToTab 5; SwitchToMode "normal"; } + bind "6" { GoToTab 6; SwitchToMode "normal"; } + bind "7" { GoToTab 7; SwitchToMode "normal"; } + bind "8" { GoToTab 8; SwitchToMode "normal"; } + bind "9" { GoToTab 9; SwitchToMode "normal"; } + } + shared_among "scroll" "search" { + bind "PageDown" { PageScrollDown; } + bind "PageUp" { PageScrollUp; } + bind "left" { PageScrollUp; } + bind "down" { ScrollDown; } + bind "up" { ScrollUp; } + bind "right" { PageScrollDown; } + bind "Ctrl b" { PageScrollUp; } + bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } + bind "d" { HalfPageScrollDown; } + bind "Ctrl f" { PageScrollDown; } + bind "h" { PageScrollUp; } + bind "j" { ScrollDown; } + bind "k" { ScrollUp; } + bind "l" { PageScrollDown; } + bind "u" { HalfPageScrollUp; } + } + entersearch { + bind "Ctrl c" { SwitchToMode "scroll"; } + bind "esc" { SwitchToMode "scroll"; } + bind "enter" { SwitchToMode "search"; } + } + renametab { + bind "esc" { UndoRenameTab; SwitchToMode "tab"; } + } + shared_among "renametab" "renamepane" { + bind "Ctrl c" { SwitchToMode "normal"; } + } + renamepane { + bind "esc" { UndoRenamePane; SwitchToMode "pane"; } + } + shared_among "session" "tmux" { + bind "d" { Detach; } + } + tmux { + bind "left" { MoveFocus "left"; SwitchToMode "normal"; } + bind "down" { MoveFocus "down"; SwitchToMode "normal"; } + bind "up" { MoveFocus "up"; SwitchToMode "normal"; } + bind "right" { MoveFocus "right"; SwitchToMode "normal"; } + bind "space" { NextSwapLayout; SwitchToMode "normal"; } + bind "!" { ToggleFloatingPanes; SwitchToMode "normal"; } + bind "&" { CloseTab; SwitchToMode "normal"; } + bind "," { SwitchToMode "renametab"; } + bind "0" { GoToTab 1; SwitchToMode "normal"; } + bind ";" { FocusNextPane; SwitchToMode "normal"; } + bind "N" { GoToNextTab; SwitchToMode "normal"; } + bind "P" { SwitchToMode "pane"; } + bind "Q" { Quit; } + bind "[" { SwitchToMode "scroll"; } + bind "a" { Write 1; SwitchToMode "normal"; } + bind "Ctrl a" { Write 1; SwitchToMode "normal"; } + bind "c" { NewTab; SwitchToMode "normal"; } + bind "h" { MoveFocus "left"; SwitchToMode "normal"; } + bind "j" { MoveFocus "down"; SwitchToMode "normal"; } + bind "k" { MoveFocus "up"; SwitchToMode "normal"; } + bind "l" { MoveFocus "right"; SwitchToMode "normal"; } + bind "m" { NewPane "down"; SwitchToMode "normal"; } + bind "n" { NewPane "right"; SwitchToMode "normal"; } + bind "o" { SwitchFocus; SwitchToMode "normal"; } + bind "p" { GoToPreviousTab; SwitchToMode "normal"; } + bind "r" { SwitchToMode "resize"; } + bind "s" { SwitchToMode "session"; } + bind "t" { SwitchToMode "tab"; } + bind "w" { SwitchToMode "tab"; } + bind "y" { SwitchToMode "move"; } + bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } + bind "{" { MoveFocus "left"; SwitchToMode "normal"; } + bind "}" { MoveFocus "right"; SwitchToMode "normal"; } + } +} + +// Plugin aliases - can be used to change the implementation of Zellij +// changing these requires a restart to take effect +plugins { + about location="zellij:about" + compact-bar location="zellij:compact-bar" + configuration location="zellij:configuration" + filepicker location="zellij:strider" { + cwd "/" + } + plugin-manager location="zellij:plugin-manager" + session-manager location="zellij:session-manager" + status-bar location="zellij:status-bar" + strider location="zellij:strider" + tab-bar location="zellij:tab-bar" + welcome-screen location="zellij:session-manager" { + welcome_screen true + } +} + +// Plugins to load in the background when a new session starts +// eg. "file:/path/to/my-plugin.wasm" +// eg. "https://example.com/my-plugin.wasm" +load_plugins { +} +ui { + pane_frames { + rounded_corners true + } +} +web_client { + font "monospace" +} + +// Use a simplified UI without special fonts (arrow glyphs) +// Options: +// - true +// - false (Default) +// +simplified_ui false + +// Choose the theme that is specified in the themes section. +// Default: default +// +theme "tokyo-night" + +// Choose the base input mode of zellij. +// Default: normal +// +default_mode "normal" + +// Choose the path to the default shell that zellij will use for opening new panes +// Default: $SHELL +// +// default_shell "fish" + +// Choose the path to override cwd that zellij will use for opening new panes +// +// default_cwd "/tmp" + +// The name of the default layout to load on startup +// Default: "default" +// +default_layout "default" + +// The folder in which Zellij will look for layouts +// (Requires restart) +// +// layout_dir "/tmp" + +// The folder in which Zellij will look for themes +// (Requires restart) +// +// theme_dir "/tmp" + +// Toggle enabling the mouse mode. +// On certain configurations, or terminals this could +// potentially interfere with copying text. +// Options: +// - true (default) +// - false +// +mouse_mode true + +// Toggle having pane frames around the panes +// Options: +// - true (default, enabled) +// - false +// +pane_frames true + +// When attaching to an existing session with other users, +// should the session be mirrored (true) +// or should each user have their own cursor (false) +// (Requires restart) +// Default: false +// +mirror_session false + +// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP +// eg. when terminal window with an active zellij session is closed +// (Requires restart) +// Options: +// - detach (Default) +// - quit +// +on_force_close "detach" + +// Configure the scroll back buffer size +// This is the number of lines zellij stores for each pane in the scroll back +// buffer. Excess number of lines are discarded in a FIFO fashion. +// (Requires restart) +// Valid values: positive integers +// Default value: 10000 +// +scroll_buffer_size 10000 + +// Provide a command to execute when copying text. The text will be piped to +// the stdin of the program to perform the copy. This can be used with +// terminal emulators which do not support the OSC 52 ANSI control sequence +// that will be used by default if this option is not set. +// Examples: +// +// copy_command "xclip -selection clipboard" // x11 +// copy_command "wl-copy" // wayland +// copy_command "pbcopy" // osx +// +// copy_command "pbcopy" + +// Choose the destination for copied text +// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. +// Does not apply when using copy_command. +// Options: +// - system (default) +// - primary +// +// copy_clipboard "primary" + +// Enable automatic copying (and clearing) of selection when releasing mouse +// Default: true +// +copy_on_select true + +// Path to the default editor to use to edit pane scrollbuffer +// Default: $EDITOR or $VISUAL +// scrollback_editor "/usr/bin/vim" + +// A fixed name to always give the Zellij session. +// Consider also setting `attach_to_session true,` +// otherwise this will error if such a session exists. +// Default: +// +// session_name "My singleton session" + +// When `session_name` is provided, attaches to that session +// if it is already running or creates it otherwise. +// Default: false +// +// attach_to_session true + +// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible +// Options: +// - true (default) +// - false +// +auto_layout true + +// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected +// Options: +// - true (default) +// - false +// +session_serialization true + +// Whether pane viewports are serialized along with the session, default is false +// Options: +// - true +// - false (default) +// +serialize_pane_viewport false + +// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0 +// defaults to the scrollback size. If this number is higher than the scrollback size, it will +// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true. +// +scrollback_lines_to_serialize 10000 + +// Enable or disable the rendering of styled and colored underlines (undercurl). +// May need to be disabled for certain unsupported terminals +// (Requires restart) +// Default: true +// +styled_underlines true + +// How often in seconds sessions are serialized +// +// serialization_interval 10000 + +// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know +// metadata info on this session) +// (Requires restart) +// Default: false +// +disable_session_metadata false + +// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it) +// (Requires restart) +// Default: true (if the host terminal supports it) +// +support_kitty_keyboard_protocol true +// Whether to make sure a local web server is running when a new Zellij session starts. +// This web server will allow creating new sessions and attaching to existing ones that have +// opted in to being shared in the browser. +// When enabled, navigate to http://127.0.0.1:8082 +// (Requires restart) +// +// Note: a local web server can still be manually started from within a Zellij session or from the CLI. +// If this is not desired, one can use a version of Zellij compiled without +// `web_server_capability` +// +// Possible values: +// - true +// - false +// Default: false +// +web_server false +// Whether to allow sessions started in the terminal to be shared through a local web server, assuming one is +// running (see the `web_server` option for more details). +// (Requires restart) +// +// Note: This is an administrative separation and not intended as a security measure. +// +// Possible values: +// - "on" (allow web sharing through the local web server if it +// is online) +// - "off" (do not allow web sharing unless sessions explicitly opt-in to it) +// - "disabled" (do not allow web sharing and do not permit sessions started in the terminal to opt-in to it) +// Default: "off" +// +web_sharing "off" +// A path to a certificate file to be used when setting up the web client to serve the +// connection over HTTPs +// +// web_server_cert "/path/to/cert.pem" +// A path to a key file to be used when setting up the web client to serve the +// connection over HTTPs +// +// web_server_key "/path/to/key.pem" +/// Whether to enforce https connections to the web server when it is bound to localhost +/// (127.0.0.0/8) +/// +/// Note: https is ALWAYS enforced when bound to non-local interfaces +/// +/// Default: false +// +enforce_https_for_localhost false + +// Whether to stack panes when resizing beyond a certain size +// Default: true +// +stacked_resize true + +// Whether to show tips on startup +// Default: true +// +show_startup_tips false + +// Whether to show release notes on first version run +// Default: true +// +show_release_notes true + +// Whether to enable mouse hover effects and pane grouping functionality +// default is true +advanced_mouse_actions true + +// The ip address the web server should listen on when it starts +// Default: "127.0.0.1" +// (Requires restart) +web_server_ip "127.0.0.1" + +// The port the web server should listen on when it starts +// Default: 8082 +// (Requires restart) +web_server_port 8082 + +// A command to run (will be wrapped with sh -c and provided the RESURRECT_COMMAND env variable) +// after Zellij attempts to discover a command inside a pane when resurrecting sessions, the STDOUT +// of this command will be used instead of the discovered RESURRECT_COMMAND +// can be useful for removing wrappers around commands +// Note: be sure to escape backslashes and similar characters properly +// post_command_discovery_hook "echo $RESURRECT_COMMAND | sed " diff --git a/config/zellij/get-tun0-ip.sh b/config/zellij/get-tun0-ip.sh new file mode 100644 index 0000000..da38407 --- /dev/null +++ b/config/zellij/get-tun0-ip.sh @@ -0,0 +1,2 @@ +#!/bin/bash +ip -o -4 addr show dev tun0 2>/dev/null | awk '{print $4}' | cut -d/ -f1 || echo 'down' diff --git a/config/zellij/layouts/default.kdl b/config/zellij/layouts/default.kdl new file mode 100644 index 0000000..bba154f --- /dev/null +++ b/config/zellij/layouts/default.kdl @@ -0,0 +1,59 @@ +layout { + default_tab_template { + children + pane size=1 borderless=true { + plugin location="file:/home/p3ta/.config/zellij/plugins/zjstatus.wasm" { + format_left "{mode} #[fg=#7aa2f7,bold] {session} #[fg=#565f89]│ #[fg=#7dcfff] {command_pwd}" + format_center "{tabs}" + format_right "#[fg=#7aa2f7]tun0: {command_ip} #[fg=#565f89]│ #[fg=#bb9af7] {datetime}" + + // Mode indicators with hints + mode_normal "#[bg=#9ece6a,fg=#1a1b26,bold] NORMAL " + mode_locked "#[bg=#f7768e,fg=#1a1b26,bold] CMD #[bg=#1a1b26,fg=#a9b1d6] c:tab n:→ m:↓ x:close z:zoom R:resize w:float hjkl:nav p/N:tab r:rename [:scroll d:detach" + mode_pane "#[bg=#7aa2f7,fg=#1a1b26,bold] PANE #[bg=#1a1b26,fg=#a9b1d6] hjkl:navigate Esc/q:exit" + mode_tab "#[bg=#bb9af7,fg=#1a1b26,bold] TAB #[bg=#1a1b26,fg=#a9b1d6] n:new x:close r:rename hl:navigate Esc/q:exit" + mode_scroll "#[bg=#7dcfff,fg=#1a1b26,bold] SCROLL #[bg=#1a1b26,fg=#a9b1d6] jk/↑↓:line du:half Ctrl-f/b:page g/G:top/bot Esc/q:exit" + mode_enter_search "#[bg=#9ece6a,fg=#1a1b26,bold] SEARCH #[bg=#1a1b26,fg=#a9b1d6] type to search, Enter:start Esc:cancel" + mode_search "#[bg=#9ece6a,fg=#1a1b26,bold] SEARCH #[bg=#1a1b26,fg=#a9b1d6] n:next p:prev c:case w:wrap Esc/q:exit" + mode_resize "#[bg=#e0af68,fg=#1a1b26,bold] RESIZE #[bg=#1a1b26,fg=#a9b1d6] hjkl/←↓↑→:resize Esc/q:exit" + mode_rename_tab "#[bg=#bb9af7,fg=#1a1b26,bold] RENAME TAB #[bg=#1a1b26,fg=#a9b1d6] type name, Enter:confirm Esc:cancel" + mode_rename_pane "#[bg=#bb9af7,fg=#1a1b26,bold] RENAME PANE #[bg=#1a1b26,fg=#a9b1d6] type name, Enter:confirm Esc:cancel" + mode_move "#[bg=#7dcfff,fg=#1a1b26,bold] MOVE #[bg=#1a1b26,fg=#a9b1d6] hjkl:move pane Esc/q:exit" + mode_session "#[bg=#bb9af7,fg=#1a1b26,bold] SESSION #[bg=#1a1b26,fg=#a9b1d6] d:detach Esc/q:exit" + mode_prompt "#[bg=#7aa2f7,fg=#1a1b26,bold] PROMPT " + + // Tab styling + tab_normal "#[fg=#a9b1d6] {index}: {name} " + tab_normal_fullscreen "#[fg=#a9b1d6] {index}: {name} " + tab_normal_sync "#[fg=#a9b1d6] {index}: {name} " + tab_active "#[fg=#1a1b26,bg=#7aa2f7,bold] {index}: {name} " + tab_active_fullscreen "#[fg=#1a1b26,bg=#7aa2f7,bold] {index}: {name} " + tab_active_sync "#[fg=#1a1b26,bg=#7aa2f7,bold] {index}: {name} " + tab_separator "#[fg=#565f89]│" + + // Current working directory + command_pwd_command "pwd | sed 's|^'$HOME'|~|' | awk -F'/' '{if (length($0) > 32) {if (NF>4) print $1\"/\"$2\"/…/\"$(NF-1)\"/\"$NF; else print $0} else print $0}'" + command_pwd_interval "2" + command_pwd_format "{stdout}" + command_pwd_rendermode "dynamic" + + // tun0 IP address + command_ip_command "/home/p3ta/.config/zellij/scripts/get-tun0-ip.sh" + command_ip_interval "5" + command_ip_format "{stdout}" + command_ip_rendermode "dynamic" + + // Date and time + datetime "{format}" + datetime_format "%H:%M" + datetime_timezone "America/Los_Angeles" + + hide_frame_for_single_pane "false" + } + } + } + + tab name="main" focus=true { + pane + } +} diff --git a/config/zellij/plugins/zjstatus.wasm b/config/zellij/plugins/zjstatus.wasm new file mode 100644 index 0000000..c4919a3 Binary files /dev/null and b/config/zellij/plugins/zjstatus.wasm differ diff --git a/config/zellij/scripts/get-tun0-ip.sh b/config/zellij/scripts/get-tun0-ip.sh new file mode 100644 index 0000000..da38407 --- /dev/null +++ b/config/zellij/scripts/get-tun0-ip.sh @@ -0,0 +1,2 @@ +#!/bin/bash +ip -o -4 addr show dev tun0 2>/dev/null | awk '{print $4}' | cut -d/ -f1 || echo 'down' diff --git a/config/zellij/themes.kdl b/config/zellij/themes.kdl new file mode 100644 index 0000000..ff3149a --- /dev/null +++ b/config/zellij/themes.kdl @@ -0,0 +1,15 @@ +themes { + tokyo-night { + fg "#c0caf5" + bg "#1a1b26" + black "#15161e" + red "#f7768e" + green "#9ece6a" + yellow "#e0af68" + blue "#7aa2f7" + magenta "#bb9af7" + cyan "#7dcfff" + white "#a9b1d6" + } +} + diff --git a/config/zellij/working.kdl b/config/zellij/working.kdl new file mode 100644 index 0000000..8828f24 --- /dev/null +++ b/config/zellij/working.kdl @@ -0,0 +1,519 @@ +// +// THIS FILE WAS AUTOGENERATED BY ZELLIJ, THE PREVIOUS FILE AT THIS LOCATION WAS COPIED TO: /home/p3ta/.config/zellij/config.kdl.bak +// + +keybinds clear-defaults=true { + normal { + bind "Alt left" { MoveFocusOrTab "left"; } + bind "Alt down" { MoveFocus "down"; } + bind "Alt up" { MoveFocus "up"; } + bind "Alt right" { MoveFocusOrTab "right"; } + bind "Alt +" { Resize "Increase"; } + bind "Alt -" { Resize "Decrease"; } + bind "Alt =" { Resize "Increase"; } + bind "Alt [" { PreviousSwapLayout; } + bind "Alt ]" { NextSwapLayout; } + bind "Ctrl a" { SwitchToMode "tmux"; } + bind "Alt f" { ToggleFloatingPanes; } + bind "Alt h" { MoveFocusOrTab "left"; } + bind "Alt j" { MoveFocus "down"; } + bind "Alt k" { MoveFocus "up"; } + bind "Alt l" { MoveFocusOrTab "right"; } + bind "Alt n" { NewPane; } + } + locked { + bind "Ctrl g" { SwitchToMode "normal"; } + } + pane { + bind "left" { MoveFocus "left"; } + bind "down" { MoveFocus "down"; } + bind "up" { MoveFocus "up"; } + bind "right" { MoveFocus "right"; } + bind "c" { SwitchToMode "renamepane"; PaneNameInput 0; } + bind "d" { NewPane "down"; SwitchToMode "normal"; } + bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "normal"; } + bind "f" { ToggleFocusFullscreen; SwitchToMode "normal"; } + bind "h" { MoveFocus "left"; } + bind "j" { MoveFocus "down"; } + bind "k" { MoveFocus "up"; } + bind "l" { MoveFocus "right"; } + bind "n" { NewPane; SwitchToMode "normal"; } + bind "p" { SwitchFocus; } + bind "Ctrl p" { SwitchToMode "normal"; } + bind "r" { NewPane "right"; SwitchToMode "normal"; } + bind "w" { ToggleFloatingPanes; SwitchToMode "normal"; } + bind "z" { TogglePaneFrames; SwitchToMode "normal"; } + } + tab { + bind "left" { GoToPreviousTab; } + bind "down" { GoToNextTab; } + bind "up" { GoToPreviousTab; } + bind "right" { GoToNextTab; } + bind "[" { BreakPaneLeft; SwitchToMode "normal"; } + bind "]" { BreakPaneRight; SwitchToMode "normal"; } + bind "b" { BreakPane; SwitchToMode "normal"; } + bind "h" { GoToPreviousTab; } + bind "j" { GoToNextTab; } + bind "k" { GoToPreviousTab; } + bind "l" { GoToNextTab; } + bind "n" { NewTab; SwitchToMode "normal"; } + bind "r" { SwitchToMode "renametab"; TabNameInput 0; } + bind "s" { ToggleActiveSyncTab; SwitchToMode "normal"; } + bind "Ctrl t" { SwitchToMode "normal"; } + bind "x" { CloseTab; SwitchToMode "normal"; } + bind "tab" { ToggleTab; } + } + resize { + bind "left" { Resize "Increase left"; } + bind "down" { Resize "Increase down"; } + bind "up" { Resize "Increase up"; } + bind "right" { Resize "Increase right"; } + bind "+" { Resize "Increase"; } + bind "-" { Resize "Decrease"; } + bind "=" { Resize "Increase"; } + bind "H" { Resize "Decrease left"; } + bind "J" { Resize "Decrease down"; } + bind "K" { Resize "Decrease up"; } + bind "L" { Resize "Decrease right"; } + bind "h" { Resize "Increase left"; } + bind "j" { Resize "Increase down"; } + bind "k" { Resize "Increase up"; } + bind "l" { Resize "Increase right"; } + bind "Ctrl r" { SwitchToMode "normal"; } + } + move { + bind "left" { MovePane "left"; } + bind "down" { MovePane "down"; } + bind "up" { MovePane "up"; } + bind "right" { MovePane "right"; } + bind "h" { MovePane "left"; } + bind "j" { MovePane "down"; } + bind "k" { MovePane "up"; } + bind "l" { MovePane "right"; } + bind "n" { MovePane; } + bind "p" { MovePaneBackwards; } + bind "Ctrl y" { SwitchToMode "normal"; } + bind "tab" { MovePane; } + } + scroll { + bind "e" { EditScrollback; SwitchToMode "normal"; } + bind "q" { SwitchToMode "normal"; } + bind "s" { SwitchToMode "entersearch"; SearchInput 0; } + bind "enter" { Copy; SwitchToMode "normal"; } + } + search { + bind "c" { SearchToggleOption "CaseSensitivity"; } + bind "n" { Search "down"; } + bind "o" { SearchToggleOption "WholeWord"; } + bind "p" { Search "up"; } + bind "w" { SearchToggleOption "Wrap"; } + } + session { + bind "c" { + LaunchOrFocusPlugin "configuration" { + floating true + move_to_focused_tab true + } + SwitchToMode "normal" + } + bind "Ctrl o" { SwitchToMode "normal"; } + bind "p" { + LaunchOrFocusPlugin "plugin-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "normal" + } + bind "w" { + LaunchOrFocusPlugin "session-manager" { + floating true + move_to_focused_tab true + } + SwitchToMode "normal" + } + } + shared_except "locked" { + bind "Ctrl g" { SwitchToMode "locked"; } + } + shared_except "normal" "locked" "entersearch" "renametab" "renamepane" "prompt" { + bind "esc" { SwitchToMode "normal"; } + } + shared_except "normal" "locked" "scroll" "entersearch" "search" "session" "prompt" { + bind "enter" { SwitchToMode "normal"; } + } + shared_among "pane" "tmux" { + bind "x" { CloseFocus; SwitchToMode "normal"; } + } + shared_among "tab" "tmux" { + bind "1" { GoToTab 1; SwitchToMode "normal"; } + bind "2" { GoToTab 2; SwitchToMode "normal"; } + bind "3" { GoToTab 3; SwitchToMode "normal"; } + bind "4" { GoToTab 4; SwitchToMode "normal"; } + bind "5" { GoToTab 5; SwitchToMode "normal"; } + bind "6" { GoToTab 6; SwitchToMode "normal"; } + bind "7" { GoToTab 7; SwitchToMode "normal"; } + bind "8" { GoToTab 8; SwitchToMode "normal"; } + bind "9" { GoToTab 9; SwitchToMode "normal"; } + } + shared_among "scroll" "search" { + bind "PageDown" { PageScrollDown; } + bind "PageUp" { PageScrollUp; } + bind "left" { PageScrollUp; } + bind "down" { ScrollDown; } + bind "up" { ScrollUp; } + bind "right" { PageScrollDown; } + bind "Ctrl b" { PageScrollUp; } + bind "Ctrl c" { ScrollToBottom; SwitchToMode "normal"; } + bind "d" { HalfPageScrollDown; } + bind "Ctrl f" { PageScrollDown; } + bind "h" { PageScrollUp; } + bind "j" { ScrollDown; } + bind "k" { ScrollUp; } + bind "l" { PageScrollDown; } + bind "u" { HalfPageScrollUp; } + } + entersearch { + bind "Ctrl c" { SwitchToMode "scroll"; } + bind "esc" { SwitchToMode "scroll"; } + bind "enter" { SwitchToMode "search"; } + } + renametab { + bind "esc" { UndoRenameTab; SwitchToMode "tab"; } + } + shared_among "renametab" "renamepane" { + bind "Ctrl c" { SwitchToMode "normal"; } + } + renamepane { + bind "esc" { UndoRenamePane; SwitchToMode "pane"; } + } + shared_among "session" "tmux" { + bind "d" { Detach; } + } + tmux { + bind "left" { MoveFocus "left"; SwitchToMode "normal"; } + bind "down" { MoveFocus "down"; SwitchToMode "normal"; } + bind "up" { MoveFocus "up"; SwitchToMode "normal"; } + bind "right" { MoveFocus "right"; SwitchToMode "normal"; } + bind "space" { NextSwapLayout; SwitchToMode "normal"; } + bind "!" { ToggleFloatingPanes; SwitchToMode "normal"; } + bind "&" { CloseTab; SwitchToMode "normal"; } + bind "," { SwitchToMode "renametab"; } + bind "0" { GoToTab 1; SwitchToMode "normal"; } + bind ";" { FocusNextPane; SwitchToMode "normal"; } + bind "N" { GoToNextTab; SwitchToMode "normal"; } + bind "P" { SwitchToMode "pane"; } + bind "Q" { Quit; } + bind "[" { SwitchToMode "scroll"; } + bind "a" { Write 1; SwitchToMode "normal"; } + bind "Ctrl a" { Write 1; SwitchToMode "normal"; } + bind "c" { NewTab; SwitchToMode "normal"; } + bind "h" { MoveFocus "left"; SwitchToMode "normal"; } + bind "j" { MoveFocus "down"; SwitchToMode "normal"; } + bind "k" { MoveFocus "up"; SwitchToMode "normal"; } + bind "l" { MoveFocus "right"; SwitchToMode "normal"; } + bind "m" { NewPane "down"; SwitchToMode "normal"; } + bind "n" { NewPane "right"; SwitchToMode "normal"; } + bind "o" { SwitchFocus; SwitchToMode "normal"; } + bind "p" { GoToPreviousTab; SwitchToMode "normal"; } + bind "r" { SwitchToMode "resize"; } + bind "s" { SwitchToMode "session"; } + bind "t" { SwitchToMode "tab"; } + bind "w" { SwitchToMode "tab"; } + bind "y" { SwitchToMode "move"; } + bind "z" { ToggleFocusFullscreen; SwitchToMode "normal"; } + bind "{" { MoveFocus "left"; SwitchToMode "normal"; } + bind "}" { MoveFocus "right"; SwitchToMode "normal"; } + } +} + +// Plugin aliases - can be used to change the implementation of Zellij +// changing these requires a restart to take effect +plugins { + about location="zellij:about" + compact-bar location="zellij:compact-bar" + configuration location="zellij:configuration" + filepicker location="zellij:strider" { + cwd "/" + } + plugin-manager location="zellij:plugin-manager" + session-manager location="zellij:session-manager" + status-bar location="zellij:status-bar" + strider location="zellij:strider" + tab-bar location="zellij:tab-bar" + welcome-screen location="zellij:session-manager" { + welcome_screen true + } +} + +// Plugins to load in the background when a new session starts +// eg. "file:/path/to/my-plugin.wasm" +// eg. "https://example.com/my-plugin.wasm" +load_plugins { +} +ui { + pane_frames { + rounded_corners true + } +} +web_client { + font "monospace" +} + +// Use a simplified UI without special fonts (arrow glyphs) +// Options: +// - true +// - false (Default) +// +simplified_ui false + +// Choose the theme that is specified in the themes section. +// Default: default +// +theme "tokyo-night" + +// Choose the base input mode of zellij. +// Default: normal +// +default_mode "normal" + +// Choose the path to the default shell that zellij will use for opening new panes +// Default: $SHELL +// +// default_shell "fish" + +// Choose the path to override cwd that zellij will use for opening new panes +// +// default_cwd "/tmp" + +// The name of the default layout to load on startup +// Default: "default" +// +default_layout "default" + +// The folder in which Zellij will look for layouts +// (Requires restart) +// +// layout_dir "/tmp" + +// The folder in which Zellij will look for themes +// (Requires restart) +// +// theme_dir "/tmp" + +// Toggle enabling the mouse mode. +// On certain configurations, or terminals this could +// potentially interfere with copying text. +// Options: +// - true (default) +// - false +// +mouse_mode true + +// Toggle having pane frames around the panes +// Options: +// - true (default, enabled) +// - false +// +pane_frames true + +// When attaching to an existing session with other users, +// should the session be mirrored (true) +// or should each user have their own cursor (false) +// (Requires restart) +// Default: false +// +mirror_session false + +// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP +// eg. when terminal window with an active zellij session is closed +// (Requires restart) +// Options: +// - detach (Default) +// - quit +// +on_force_close "detach" + +// Configure the scroll back buffer size +// This is the number of lines zellij stores for each pane in the scroll back +// buffer. Excess number of lines are discarded in a FIFO fashion. +// (Requires restart) +// Valid values: positive integers +// Default value: 10000 +// +scroll_buffer_size 10000 + +// Provide a command to execute when copying text. The text will be piped to +// the stdin of the program to perform the copy. This can be used with +// terminal emulators which do not support the OSC 52 ANSI control sequence +// that will be used by default if this option is not set. +// Examples: +// +// copy_command "xclip -selection clipboard" // x11 +// copy_command "wl-copy" // wayland +// copy_command "pbcopy" // osx +// +// copy_command "pbcopy" + +// Choose the destination for copied text +// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. +// Does not apply when using copy_command. +// Options: +// - system (default) +// - primary +// +// copy_clipboard "primary" + +// Enable automatic copying (and clearing) of selection when releasing mouse +// Default: true +// +copy_on_select true + +// Path to the default editor to use to edit pane scrollbuffer +// Default: $EDITOR or $VISUAL +// scrollback_editor "/usr/bin/vim" + +// A fixed name to always give the Zellij session. +// Consider also setting `attach_to_session true,` +// otherwise this will error if such a session exists. +// Default: +// +// session_name "My singleton session" + +// When `session_name` is provided, attaches to that session +// if it is already running or creates it otherwise. +// Default: false +// +// attach_to_session true + +// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible +// Options: +// - true (default) +// - false +// +auto_layout true + +// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected +// Options: +// - true (default) +// - false +// +session_serialization true + +// Whether pane viewports are serialized along with the session, default is false +// Options: +// - true +// - false (default) +// +serialize_pane_viewport false + +// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0 +// defaults to the scrollback size. If this number is higher than the scrollback size, it will +// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true. +// +scrollback_lines_to_serialize 10000 + +// Enable or disable the rendering of styled and colored underlines (undercurl). +// May need to be disabled for certain unsupported terminals +// (Requires restart) +// Default: true +// +styled_underlines true + +// How often in seconds sessions are serialized +// +// serialization_interval 10000 + +// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know +// metadata info on this session) +// (Requires restart) +// Default: false +// +disable_session_metadata false + +// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it) +// (Requires restart) +// Default: true (if the host terminal supports it) +// +support_kitty_keyboard_protocol true +// Whether to make sure a local web server is running when a new Zellij session starts. +// This web server will allow creating new sessions and attaching to existing ones that have +// opted in to being shared in the browser. +// When enabled, navigate to http://127.0.0.1:8082 +// (Requires restart) +// +// Note: a local web server can still be manually started from within a Zellij session or from the CLI. +// If this is not desired, one can use a version of Zellij compiled without +// `web_server_capability` +// +// Possible values: +// - true +// - false +// Default: false +// +web_server false +// Whether to allow sessions started in the terminal to be shared through a local web server, assuming one is +// running (see the `web_server` option for more details). +// (Requires restart) +// +// Note: This is an administrative separation and not intended as a security measure. +// +// Possible values: +// - "on" (allow web sharing through the local web server if it +// is online) +// - "off" (do not allow web sharing unless sessions explicitly opt-in to it) +// - "disabled" (do not allow web sharing and do not permit sessions started in the terminal to opt-in to it) +// Default: "off" +// +web_sharing "off" +// A path to a certificate file to be used when setting up the web client to serve the +// connection over HTTPs +// +// web_server_cert "/path/to/cert.pem" +// A path to a key file to be used when setting up the web client to serve the +// connection over HTTPs +// +// web_server_key "/path/to/key.pem" +/// Whether to enforce https connections to the web server when it is bound to localhost +/// (127.0.0.0/8) +/// +/// Note: https is ALWAYS enforced when bound to non-local interfaces +/// +/// Default: false +// +enforce_https_for_localhost false + +// Whether to stack panes when resizing beyond a certain size +// Default: true +// +stacked_resize true + +// Whether to show tips on startup +// Default: true +// +show_startup_tips false + +// Whether to show release notes on first version run +// Default: true +// +show_release_notes true + +// Whether to enable mouse hover effects and pane grouping functionality +// default is true +advanced_mouse_actions true + +// The ip address the web server should listen on when it starts +// Default: "127.0.0.1" +// (Requires restart) +web_server_ip "127.0.0.1" + +// The port the web server should listen on when it starts +// Default: 8082 +// (Requires restart) +web_server_port 8082 + +// A command to run (will be wrapped with sh -c and provided the RESURRECT_COMMAND env variable) +// after Zellij attempts to discover a command inside a pane when resurrecting sessions, the STDOUT +// of this command will be used instead of the discovered RESURRECT_COMMAND +// can be useful for removing wrappers around commands +// Note: be sure to escape backslashes and similar characters properly +// post_command_discovery_hook "echo $RESURRECT_COMMAND | sed " diff --git a/dotfiles/.bash_logout b/dotfiles/.bash_logout new file mode 100644 index 0000000..de4f5f7 --- /dev/null +++ b/dotfiles/.bash_logout @@ -0,0 +1,7 @@ +# ~/.bash_logout: executed by bash(1) when login shell exits. + +# when leaving the console clear the screen to increase privacy + +if [ "$SHLVL" = 1 ]; then + [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q +fi diff --git a/dotfiles/.bashrc b/dotfiles/.bashrc new file mode 100644 index 0000000..132ee49 --- /dev/null +++ b/dotfiles/.bashrc @@ -0,0 +1,157 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color|*-256color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +# The following block is surrounded by two delimiters. +# These delimiters must not be modified. Thanks. +# START KALI CONFIG VARIABLES +PROMPT_ALTERNATIVE=twoline +NEWLINE_BEFORE_PROMPT=yes +# STOP KALI CONFIG VARIABLES + +if [ "$color_prompt" = yes ]; then + # override default virtualenv indicator in prompt + VIRTUAL_ENV_DISABLE_PROMPT=1 + + prompt_color='\[\033[;32m\]' + info_color='\[\033[1;34m\]' + prompt_symbol=㉿ + if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user + prompt_color='\[\033[;94m\]' + info_color='\[\033[1;31m\]' + # Skull emoji for root terminal + #prompt_symbol=💀 + fi + case "$PROMPT_ALTERNATIVE" in + twoline) + PS1=$prompt_color'┌──${debian_chroot:+($debian_chroot)──}${VIRTUAL_ENV:+(\[\033[0;1m\]$(basename $VIRTUAL_ENV)'$prompt_color')}('$info_color'\u'$prompt_symbol'\h'$prompt_color')-[\[\033[0;1m\]\w'$prompt_color']\n'$prompt_color'└─'$info_color'\$\[\033[0m\] ';; + oneline) + PS1='${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV)) }${debian_chroot:+($debian_chroot)}'$info_color'\u@\h\[\033[00m\]:'$prompt_color'\[\033[01m\]\w\[\033[00m\]\$ ';; + backtrack) + PS1='${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV)) }${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ';; + esac + unset prompt_color + unset info_color + unset prompt_symbol +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +[ "$NEWLINE_BEFORE_PROMPT" = yes ] && PROMPT_COMMAND="PROMPT_COMMAND=echo" + +# enable color support of ls, less and man, and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + export LS_COLORS="$LS_COLORS:ow=30;44:" # fix ls color for folders with 777 permissions + + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' + alias diff='diff --color=auto' + alias ip='ip --color=auto' + + export LESS_TERMCAP_mb=$'\E[1;31m' # begin blink + export LESS_TERMCAP_md=$'\E[1;36m' # begin bold + export LESS_TERMCAP_me=$'\E[0m' # reset bold/blink + export LESS_TERMCAP_so=$'\E[01;33m' # begin reverse video + export LESS_TERMCAP_se=$'\E[0m' # reset reverse video + export LESS_TERMCAP_us=$'\E[1;32m' # begin underline + export LESS_TERMCAP_ue=$'\E[0m' # reset underline +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +alias ll='ls -l' +alias la='ls -A' +alias l='ls -CF' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi +. "$HOME/.cargo/env" diff --git a/dotfiles/.profile b/dotfiles/.profile new file mode 100644 index 0000000..128c4cf --- /dev/null +++ b/dotfiles/.profile @@ -0,0 +1,28 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" +fi +. "$HOME/.cargo/env" diff --git a/dotfiles/.zsh/completions/_uwu b/dotfiles/.zsh/completions/_uwu new file mode 100644 index 0000000..6c90d05 --- /dev/null +++ b/dotfiles/.zsh/completions/_uwu @@ -0,0 +1,132 @@ +#compdef uwu-loot uwu-list uwu-pwned uwu-target uwu-export uwu-navi uwu-parse + +# Zsh completion for uwu-* CTF tools + +_uwu-loot() { + _arguments \ + '1:machine:' \ + '2:username:' \ + '(-d --domain)'{-d,--domain}'[Domain name]:domain:' \ + '(-p --password)'{-p,--password}'[Password]:password:' \ + '(-H --hash)'{-H,--hash}'[Hash value]:hash:' \ + '(-t --hash-type)'{-t,--hash-type}'[Hash type]:type:(NTLM MD5 SHA256 SHA1 SHA512)' \ + '(-n --notes)'{-n,--notes}'[Notes]:notes:' \ + '(-h --help)'{-h,--help}'[Show help]' +} + +_uwu-list() { + _arguments \ + '1:machine (optional):' \ + '(-s --selected)'{-s,--selected}'[Show only pwned and target]' \ + '(-h --help)'{-h,--help}'[Show help]' +} + +_uwu-pwned() { + local -a subcmds + subcmds=( + 'clear:Clear pwned status' + 'delete:Delete credential' + ) + + _arguments \ + '1:id or subcommand:->idorcmd' \ + '2:id (for subcommands):' \ + '(-h --help)'{-h,--help}'[Show help]' \ + && return 0 + + case $state in + idorcmd) + _alternative \ + 'subcmds:subcommand:compadd -a subcmds' \ + 'ids:credential id:' + ;; + esac +} + +_uwu-target() { + local -a subcmds + subcmds=( + 'clear:Clear target status' + ) + + _arguments \ + '1:id or subcommand:->idorcmd' \ + '2:id (for subcommands):' \ + '(-h --help)'{-h,--help}'[Show help]' \ + && return 0 + + case $state in + idorcmd) + _alternative \ + 'subcmds:subcommand:compadd -a subcmds' \ + 'ids:credential id:' + ;; + esac +} + +_uwu-export() { + _arguments \ + '--show[Show variables without exporting]' \ + '(-h --help)'{-h,--help}'[Show help]' +} + +_uwu-navi() { + local -a subcmds + subcmds=( + 'show:Show currently selected credentials' + 'list:Show currently selected credentials' + 'load:Load and display credentials' + 'env:Output export commands for eval' + 'export:Output export commands for eval' + ) + + _arguments \ + '1:subcommand:compadd -a subcmds' \ + '(-h --help)'{-h,--help}'[Show help]' +} + +_uwu-parse() { + local -a parsers + parsers=( + 'auto:Auto-detect parser type' + 'secretsdump:impacket-secretsdump output' + 'nxc:NetExec/CrackMapExec output' + 'cme:CrackMapExec output' + 'responder:Responder captured hashes' + 'hashcat:Hashcat potfile or --show' + 'john:John the Ripper output' + 'kerbrute:Kerbrute valid users' + ) + + _arguments \ + '1:file:_files' \ + '(-m --machine)'{-m,--machine}'[Target machine]:machine:' \ + '(-d --domain)'{-d,--domain}'[Domain name]:domain:' \ + '(-t --type)'{-t,--type}'[Parser type]:type:compadd -a parsers' \ + '(-h --help)'{-h,--help}'[Show help]' +} + +# Main completion dispatcher +case "$service" in + uwu-loot) + _uwu-loot "$@" + ;; + uwu-list) + _uwu-list "$@" + ;; + uwu-pwned) + _uwu-pwned "$@" + ;; + uwu-target) + _uwu-target "$@" + ;; + uwu-export) + _uwu-export "$@" + ;; + uwu-navi) + _uwu-navi "$@" + ;; + uwu-parse) + _uwu-parse "$@" + ;; +esac diff --git a/dotfiles/.zshenv b/dotfiles/.zshenv new file mode 100644 index 0000000..c2f3182 --- /dev/null +++ b/dotfiles/.zshenv @@ -0,0 +1 @@ +. "$HOME/.cargo/env" diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc new file mode 100644 index 0000000..ccca6be --- /dev/null +++ b/dotfiles/.zshrc @@ -0,0 +1,164 @@ +# ═══════════════════════════════════════════════════════════════════ +# ZSH CONFIGURATION +# ═══════════════════════════════════════════════════════════════════ + +# ─────────────────────────────────────────────────────────────────── +# OH-MY-ZSH SETTINGS +# ─────────────────────────────────────────────────────────────────── +export ZSH="$HOME/.oh-my-zsh" + +# Plugins +plugins=( + git + zsh-syntax-highlighting + zsh-autosuggestions +) + +source $ZSH/oh-my-zsh.sh + +# ─────────────────────────────────────────────────────────────────── +# TERMINAL & EDITOR +# ─────────────────────────────────────────────────────────────────── +export TERM=xterm-256color +export EDITOR="nvim" + +# ─────────────────────────────────────────────────────────────────── +# PATH CONFIGURATION +# ─────────────────────────────────────────────────────────────────── +export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/.cargo/bin:$PATH" +export PATH="$HOME/go/bin:$PATH" + +# ─────────────────────────────────────────────────────────────────── +# PROMPT & THEME +# ─────────────────────────────────────────────────────────────────── +export STARSHIP_CONFIG=~/.config/starship.toml +eval "$(starship init zsh)" + +# ─────────────────────────────────────────────────────────────────── +# MODERN CLI TOOLS +# ─────────────────────────────────────────────────────────────────── + +# Zoxide (better cd) +eval "$(zoxide init zsh --cmd cd)" + +# Bat - use Dracula theme +export BAT_THEME="Dracula" + +# FZF - Dracula theme +export FZF_DEFAULT_OPTS="--color=fg:#f8f8f2,bg:#282a36,hl:#bd93f9 --color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4" +export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git' + +# Eza colors +export EZA_COLORS="da=1;34:gm=1;34" + +# Delta (git diff) +export DELTA_FEATURES="+side-by-side" + +# Atuin +if [ -f "$HOME/.atuin/bin/env" ]; then + . "$HOME/.atuin/bin/env" +fi + +export ATUIN_NOBIND="true" +eval "$(atuin init zsh)" +bindkey '^r' _atuin_search_widget + +# ─────────────────────────────────────────────────────────────────── +# ALIASES - FILE OPERATIONS +# ─────────────────────────────────────────────────────────────────── + +# Navigation +alias home='cd ~' +alias ..='cd ..' +alias ...='cd ../..' + +# File listing (eza) +alias ls='eza --icons --group-directories-first' +alias ll='eza --icons --group-directories-first -l' +alias la='eza --icons --group-directories-first -la' +alias lt='eza --icons --group-directories-first --tree' +alias l='eza --icons --group-directories-first -F' + +# File viewing +alias cat='bat --style=plain --paging=never' +alias catp='bat --style=full' + +# Better replacements +alias du='dust' +alias df='duf' +alias ps='procs' +alias top='btop' + +# ─────────────────────────────────────────────────────────────────── +# ALIASES - GIT +# ─────────────────────────────────────────────────────────────────── +alias lg='lazygit' +alias gs='git status' +alias ga='git add' +alias gc='git commit' +alias gp='git push' +alias gl='git pull' +alias gd='git diff' + +# ─────────────────────────────────────────────────────────────────── +# ALIASES - UTILITIES +# ─────────────────────────────────────────────────────────────────── + +# Configuration +alias zsource='source ~/.zshrc' +alias zconfig='nvim ~/.zshrc' +alias nconfig='nvim ~/.config/nvim' +alias sconfig='nvim ~/.config/starship.toml' + +# Zellij +alias zj='zellij options --theme dracula' +alias zellij-clean='zellij list-sessions --no-formatting | cut -d" " -f1 | xargs -I {} zellij delete-session {} --force' + +# Quick commands +alias h='history' +alias help='tldr' +alias ports='netstat -tulanp' + +# ─────────────────────────────────────────────────────────────────── +# FUNCTIONS +# ─────────────────────────────────────────────────────────────────── + +# Quick directory navigation +mkcd() { + mkdir -p "$1" && cd "$1" +} + +# Extract any archive +extract() { + if [ -f $1 ]; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar e $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted" ;; + esac + else + echo "'$1' is not a valid file" + fi +} + +# ─────────────────────────────────────────────────────────────────── +# COMPLETIONS +# ─────────────────────────────────────────────────────────────────── +fpath=(~/.zsh/completions $fpath) +autoload -Uz compinit +compinit + + +# Exegol alias +alias exegol='sudo -E /home/p3ta/.local/bin/exegol' +xhost +si:localuser:root >/dev/null 2>&1 diff --git a/fonts/JetBrainsMonoNLNerdFont-Bold.ttf b/fonts/JetBrainsMonoNLNerdFont-Bold.ttf new file mode 100644 index 0000000..41365a8 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-Bold.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-BoldItalic.ttf b/fonts/JetBrainsMonoNLNerdFont-BoldItalic.ttf new file mode 100644 index 0000000..ede5867 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-BoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-ExtraBold.ttf b/fonts/JetBrainsMonoNLNerdFont-ExtraBold.ttf new file mode 100644 index 0000000..7430b4f Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-ExtraBold.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-ExtraBoldItalic.ttf b/fonts/JetBrainsMonoNLNerdFont-ExtraBoldItalic.ttf new file mode 100644 index 0000000..53020b9 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-ExtraBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-ExtraLight.ttf b/fonts/JetBrainsMonoNLNerdFont-ExtraLight.ttf new file mode 100644 index 0000000..cc99cdf Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-ExtraLight.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-ExtraLightItalic.ttf b/fonts/JetBrainsMonoNLNerdFont-ExtraLightItalic.ttf new file mode 100644 index 0000000..10bcdaa Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-ExtraLightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-Italic.ttf b/fonts/JetBrainsMonoNLNerdFont-Italic.ttf new file mode 100644 index 0000000..d3857d6 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-Italic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-Light.ttf b/fonts/JetBrainsMonoNLNerdFont-Light.ttf new file mode 100644 index 0000000..56d5f65 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-Light.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-LightItalic.ttf b/fonts/JetBrainsMonoNLNerdFont-LightItalic.ttf new file mode 100644 index 0000000..bcb382c Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-LightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-Medium.ttf b/fonts/JetBrainsMonoNLNerdFont-Medium.ttf new file mode 100644 index 0000000..ee8c06c Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-Medium.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-MediumItalic.ttf b/fonts/JetBrainsMonoNLNerdFont-MediumItalic.ttf new file mode 100644 index 0000000..f836007 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-MediumItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-Regular.ttf b/fonts/JetBrainsMonoNLNerdFont-Regular.ttf new file mode 100644 index 0000000..8e9ac86 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-Regular.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-SemiBold.ttf b/fonts/JetBrainsMonoNLNerdFont-SemiBold.ttf new file mode 100644 index 0000000..8c33920 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-SemiBold.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-SemiBoldItalic.ttf b/fonts/JetBrainsMonoNLNerdFont-SemiBoldItalic.ttf new file mode 100644 index 0000000..dcd0a9a Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-SemiBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-Thin.ttf b/fonts/JetBrainsMonoNLNerdFont-Thin.ttf new file mode 100644 index 0000000..5a288f4 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-Thin.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFont-ThinItalic.ttf b/fonts/JetBrainsMonoNLNerdFont-ThinItalic.ttf new file mode 100644 index 0000000..8410608 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFont-ThinItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-Bold.ttf b/fonts/JetBrainsMonoNLNerdFontMono-Bold.ttf new file mode 100644 index 0000000..2515d7b Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-Bold.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-BoldItalic.ttf b/fonts/JetBrainsMonoNLNerdFontMono-BoldItalic.ttf new file mode 100644 index 0000000..1ed2ee9 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-BoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-ExtraBold.ttf b/fonts/JetBrainsMonoNLNerdFontMono-ExtraBold.ttf new file mode 100644 index 0000000..fbac445 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-ExtraBold.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-ExtraBoldItalic.ttf b/fonts/JetBrainsMonoNLNerdFontMono-ExtraBoldItalic.ttf new file mode 100644 index 0000000..37ef9fe Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-ExtraBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-ExtraLight.ttf b/fonts/JetBrainsMonoNLNerdFontMono-ExtraLight.ttf new file mode 100644 index 0000000..ff486a9 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-ExtraLight.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-ExtraLightItalic.ttf b/fonts/JetBrainsMonoNLNerdFontMono-ExtraLightItalic.ttf new file mode 100644 index 0000000..4b18f9f Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-ExtraLightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-Italic.ttf b/fonts/JetBrainsMonoNLNerdFontMono-Italic.ttf new file mode 100644 index 0000000..c9156a0 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-Italic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-Light.ttf b/fonts/JetBrainsMonoNLNerdFontMono-Light.ttf new file mode 100644 index 0000000..3ccfbd5 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-Light.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-LightItalic.ttf b/fonts/JetBrainsMonoNLNerdFontMono-LightItalic.ttf new file mode 100644 index 0000000..ec1af2b Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-LightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-Medium.ttf b/fonts/JetBrainsMonoNLNerdFontMono-Medium.ttf new file mode 100644 index 0000000..c44d7fe Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-Medium.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-MediumItalic.ttf b/fonts/JetBrainsMonoNLNerdFontMono-MediumItalic.ttf new file mode 100644 index 0000000..8c3d9ae Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-MediumItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-Regular.ttf b/fonts/JetBrainsMonoNLNerdFontMono-Regular.ttf new file mode 100644 index 0000000..bde439e Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-Regular.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-SemiBold.ttf b/fonts/JetBrainsMonoNLNerdFontMono-SemiBold.ttf new file mode 100644 index 0000000..7e65ea9 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-SemiBold.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-SemiBoldItalic.ttf b/fonts/JetBrainsMonoNLNerdFontMono-SemiBoldItalic.ttf new file mode 100644 index 0000000..b83d3a0 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-SemiBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-Thin.ttf b/fonts/JetBrainsMonoNLNerdFontMono-Thin.ttf new file mode 100644 index 0000000..9a65eff Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-Thin.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontMono-ThinItalic.ttf b/fonts/JetBrainsMonoNLNerdFontMono-ThinItalic.ttf new file mode 100644 index 0000000..fd2853d Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontMono-ThinItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-Bold.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-Bold.ttf new file mode 100644 index 0000000..953eefc Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-Bold.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-BoldItalic.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-BoldItalic.ttf new file mode 100644 index 0000000..26f77ff Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-BoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-ExtraBold.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-ExtraBold.ttf new file mode 100644 index 0000000..2de09ec Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-ExtraBold.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-ExtraBoldItalic.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-ExtraBoldItalic.ttf new file mode 100644 index 0000000..876ab42 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-ExtraBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-ExtraLight.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-ExtraLight.ttf new file mode 100644 index 0000000..da2ab8f Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-ExtraLight.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-ExtraLightItalic.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-ExtraLightItalic.ttf new file mode 100644 index 0000000..b812b7d Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-ExtraLightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-Italic.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-Italic.ttf new file mode 100644 index 0000000..d64e92f Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-Italic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-Light.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-Light.ttf new file mode 100644 index 0000000..eecc759 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-Light.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-LightItalic.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-LightItalic.ttf new file mode 100644 index 0000000..cee40b6 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-LightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-Medium.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-Medium.ttf new file mode 100644 index 0000000..7dc9cd8 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-Medium.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-MediumItalic.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-MediumItalic.ttf new file mode 100644 index 0000000..337396e Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-MediumItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-Regular.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-Regular.ttf new file mode 100644 index 0000000..c661453 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-Regular.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-SemiBold.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-SemiBold.ttf new file mode 100644 index 0000000..dd4f78d Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-SemiBold.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-SemiBoldItalic.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-SemiBoldItalic.ttf new file mode 100644 index 0000000..e0fb5e9 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-SemiBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-Thin.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-Thin.ttf new file mode 100644 index 0000000..4423c1c Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-Thin.ttf differ diff --git a/fonts/JetBrainsMonoNLNerdFontPropo-ThinItalic.ttf b/fonts/JetBrainsMonoNLNerdFontPropo-ThinItalic.ttf new file mode 100644 index 0000000..5c7e784 Binary files /dev/null and b/fonts/JetBrainsMonoNLNerdFontPropo-ThinItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-Bold.ttf b/fonts/JetBrainsMonoNerdFont-Bold.ttf new file mode 100644 index 0000000..de2d3b3 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-Bold.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-BoldItalic.ttf b/fonts/JetBrainsMonoNerdFont-BoldItalic.ttf new file mode 100644 index 0000000..35bf0cb Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-BoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-ExtraBold.ttf b/fonts/JetBrainsMonoNerdFont-ExtraBold.ttf new file mode 100644 index 0000000..0917928 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-ExtraBold.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-ExtraBoldItalic.ttf b/fonts/JetBrainsMonoNerdFont-ExtraBoldItalic.ttf new file mode 100644 index 0000000..eaec97c Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-ExtraBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-ExtraLight.ttf b/fonts/JetBrainsMonoNerdFont-ExtraLight.ttf new file mode 100644 index 0000000..5bc7d30 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-ExtraLight.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-ExtraLightItalic.ttf b/fonts/JetBrainsMonoNerdFont-ExtraLightItalic.ttf new file mode 100644 index 0000000..75f3496 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-ExtraLightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-Italic.ttf b/fonts/JetBrainsMonoNerdFont-Italic.ttf new file mode 100644 index 0000000..d867a9c Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-Italic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-Light.ttf b/fonts/JetBrainsMonoNerdFont-Light.ttf new file mode 100644 index 0000000..55e0842 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-Light.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-LightItalic.ttf b/fonts/JetBrainsMonoNerdFont-LightItalic.ttf new file mode 100644 index 0000000..3eb731d Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-LightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-Medium.ttf b/fonts/JetBrainsMonoNerdFont-Medium.ttf new file mode 100644 index 0000000..79a4b1f Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-Medium.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-MediumItalic.ttf b/fonts/JetBrainsMonoNerdFont-MediumItalic.ttf new file mode 100644 index 0000000..3c3a637 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-MediumItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-Regular.ttf b/fonts/JetBrainsMonoNerdFont-Regular.ttf new file mode 100644 index 0000000..235a07a Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-Regular.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-SemiBold.ttf b/fonts/JetBrainsMonoNerdFont-SemiBold.ttf new file mode 100644 index 0000000..c95fbbc Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-SemiBold.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-SemiBoldItalic.ttf b/fonts/JetBrainsMonoNerdFont-SemiBoldItalic.ttf new file mode 100644 index 0000000..ad38aaf Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-SemiBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-Thin.ttf b/fonts/JetBrainsMonoNerdFont-Thin.ttf new file mode 100644 index 0000000..1ec349b Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-Thin.ttf differ diff --git a/fonts/JetBrainsMonoNerdFont-ThinItalic.ttf b/fonts/JetBrainsMonoNerdFont-ThinItalic.ttf new file mode 100644 index 0000000..efc4ae0 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFont-ThinItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-Bold.ttf b/fonts/JetBrainsMonoNerdFontMono-Bold.ttf new file mode 100644 index 0000000..a03c26b Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-Bold.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-BoldItalic.ttf b/fonts/JetBrainsMonoNerdFontMono-BoldItalic.ttf new file mode 100644 index 0000000..2b3c9eb Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-BoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-ExtraBold.ttf b/fonts/JetBrainsMonoNerdFontMono-ExtraBold.ttf new file mode 100644 index 0000000..5649d15 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-ExtraBold.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-ExtraBoldItalic.ttf b/fonts/JetBrainsMonoNerdFontMono-ExtraBoldItalic.ttf new file mode 100644 index 0000000..ef84f9c Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-ExtraBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-ExtraLight.ttf b/fonts/JetBrainsMonoNerdFontMono-ExtraLight.ttf new file mode 100644 index 0000000..6a01f36 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-ExtraLight.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-ExtraLightItalic.ttf b/fonts/JetBrainsMonoNerdFontMono-ExtraLightItalic.ttf new file mode 100644 index 0000000..e72d48b Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-ExtraLightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-Italic.ttf b/fonts/JetBrainsMonoNerdFontMono-Italic.ttf new file mode 100644 index 0000000..a715148 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-Italic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-Light.ttf b/fonts/JetBrainsMonoNerdFontMono-Light.ttf new file mode 100644 index 0000000..7e76224 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-Light.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-LightItalic.ttf b/fonts/JetBrainsMonoNerdFontMono-LightItalic.ttf new file mode 100644 index 0000000..d065630 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-LightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-Medium.ttf b/fonts/JetBrainsMonoNerdFontMono-Medium.ttf new file mode 100644 index 0000000..254a920 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-Medium.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-MediumItalic.ttf b/fonts/JetBrainsMonoNerdFontMono-MediumItalic.ttf new file mode 100644 index 0000000..f002d98 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-MediumItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-Regular.ttf b/fonts/JetBrainsMonoNerdFontMono-Regular.ttf new file mode 100644 index 0000000..f693474 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-Regular.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-SemiBold.ttf b/fonts/JetBrainsMonoNerdFontMono-SemiBold.ttf new file mode 100644 index 0000000..3959e9f Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-SemiBold.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-SemiBoldItalic.ttf b/fonts/JetBrainsMonoNerdFontMono-SemiBoldItalic.ttf new file mode 100644 index 0000000..5e1a548 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-SemiBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-Thin.ttf b/fonts/JetBrainsMonoNerdFontMono-Thin.ttf new file mode 100644 index 0000000..12994fe Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-Thin.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontMono-ThinItalic.ttf b/fonts/JetBrainsMonoNerdFontMono-ThinItalic.ttf new file mode 100644 index 0000000..164114c Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontMono-ThinItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-Bold.ttf b/fonts/JetBrainsMonoNerdFontPropo-Bold.ttf new file mode 100644 index 0000000..a39883a Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-Bold.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-BoldItalic.ttf b/fonts/JetBrainsMonoNerdFontPropo-BoldItalic.ttf new file mode 100644 index 0000000..cad2d51 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-BoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-ExtraBold.ttf b/fonts/JetBrainsMonoNerdFontPropo-ExtraBold.ttf new file mode 100644 index 0000000..b75d53e Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-ExtraBold.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-ExtraBoldItalic.ttf b/fonts/JetBrainsMonoNerdFontPropo-ExtraBoldItalic.ttf new file mode 100644 index 0000000..1c5b0ef Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-ExtraBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-ExtraLight.ttf b/fonts/JetBrainsMonoNerdFontPropo-ExtraLight.ttf new file mode 100644 index 0000000..7b9b79b Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-ExtraLight.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-ExtraLightItalic.ttf b/fonts/JetBrainsMonoNerdFontPropo-ExtraLightItalic.ttf new file mode 100644 index 0000000..bf291f0 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-ExtraLightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-Italic.ttf b/fonts/JetBrainsMonoNerdFontPropo-Italic.ttf new file mode 100644 index 0000000..e4eea34 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-Italic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-Light.ttf b/fonts/JetBrainsMonoNerdFontPropo-Light.ttf new file mode 100644 index 0000000..5e026db Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-Light.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-LightItalic.ttf b/fonts/JetBrainsMonoNerdFontPropo-LightItalic.ttf new file mode 100644 index 0000000..24004a1 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-LightItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-Medium.ttf b/fonts/JetBrainsMonoNerdFontPropo-Medium.ttf new file mode 100644 index 0000000..ff3ddac Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-Medium.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-MediumItalic.ttf b/fonts/JetBrainsMonoNerdFontPropo-MediumItalic.ttf new file mode 100644 index 0000000..706b2d0 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-MediumItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-Regular.ttf b/fonts/JetBrainsMonoNerdFontPropo-Regular.ttf new file mode 100644 index 0000000..8011ada Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-Regular.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-SemiBold.ttf b/fonts/JetBrainsMonoNerdFontPropo-SemiBold.ttf new file mode 100644 index 0000000..243dc09 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-SemiBold.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-SemiBoldItalic.ttf b/fonts/JetBrainsMonoNerdFontPropo-SemiBoldItalic.ttf new file mode 100644 index 0000000..e36cfcf Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-SemiBoldItalic.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-Thin.ttf b/fonts/JetBrainsMonoNerdFontPropo-Thin.ttf new file mode 100644 index 0000000..f563ce9 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-Thin.ttf differ diff --git a/fonts/JetBrainsMonoNerdFontPropo-ThinItalic.ttf b/fonts/JetBrainsMonoNerdFontPropo-ThinItalic.ttf new file mode 100644 index 0000000..52065a7 Binary files /dev/null and b/fonts/JetBrainsMonoNerdFontPropo-ThinItalic.ttf differ diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..8d30b13 --- /dev/null +++ b/install.sh @@ -0,0 +1,583 @@ +#!/usr/bin/env bash + +# ═══════════════════════════════════════════════════════════════════ +# CachyOS Shell Environment Setup Script +# ═══════════════════════════════════════════════════════════════════ + +set -e + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +BLUE='\033[0;34m' +PURPLE='\033[0;35m' +CYAN='\033[0;36m' +NC='\033[0m' # No Color + +# Get the directory where this script is located +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +# ─────────────────────────────────────────────────────────────────── +# Helper Functions +# ─────────────────────────────────────────────────────────────────── + +print_header() { + echo -e "\n${PURPLE}═══════════════════════════════════════════════════════════════════${NC}" + echo -e "${PURPLE} $1${NC}" + echo -e "${PURPLE}═══════════════════════════════════════════════════════════════════${NC}\n" +} + +print_info() { + echo -e "${BLUE}[INFO]${NC} $1" +} + +print_success() { + echo -e "${GREEN}[✓]${NC} $1" +} + +print_warning() { + echo -e "${YELLOW}[WARNING]${NC} $1" +} + +print_error() { + echo -e "${RED}[ERROR]${NC} $1" +} + +command_exists() { + command -v "$1" >/dev/null 2>&1 +} + +# Detect package manager +detect_package_manager() { + if command_exists pacman; then + PKG_MANAGER="pacman" + PKG_INSTALL="sudo pacman -S --noconfirm" + PKG_UPDATE="sudo pacman -Syu --noconfirm" + elif command_exists apt; then + PKG_MANAGER="apt" + PKG_INSTALL="sudo apt install -y" + PKG_UPDATE="sudo apt update && sudo apt upgrade -y" + else + print_error "No supported package manager found (pacman or apt)" + exit 1 + fi + print_info "Detected package manager: $PKG_MANAGER" +} + +# ─────────────────────────────────────────────────────────────────── +# System Packages Installation +# ─────────────────────────────────────────────────────────────────── + +install_system_packages() { + print_header "Installing System Packages" + + print_info "Updating system packages..." + $PKG_UPDATE + + if [ "$PKG_MANAGER" = "pacman" ]; then + PACKAGES=( + zsh + git + curl + wget + base-devel + fzf + ripgrep + bat + fd + xclip + htop + ruby + rubygems + python + python-pip + fontconfig + unzip + neovim + go + ttf-jetbrains-mono-nerd + zellij + ) + else # apt + PACKAGES=( + zsh + git + curl + wget + build-essential + fzf + ripgrep + bat + fd-find + xclip + htop + ruby + ruby-rubygems + python3 + python3-pip + fontconfig + unzip + neovim + golang + ) + fi + + print_info "Installing packages: ${PACKAGES[*]}" + $PKG_INSTALL "${PACKAGES[@]}" + + print_success "System packages installed" +} + +# ─────────────────────────────────────────────────────────────────── +# Rust & Cargo Setup +# ─────────────────────────────────────────────────────────────────── + +install_rust() { + print_header "Installing Rust & Cargo" + + if command_exists rustc && command_exists cargo; then + print_success "Rust already installed" + else + print_info "Installing Rust via rustup..." + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + source "$HOME/.cargo/env" + print_success "Rust installed" + fi +} + +# ─────────────────────────────────────────────────────────────────── +# Cargo Tools Installation +# ─────────────────────────────────────────────────────────────────── + +install_cargo_tools() { + print_header "Installing Cargo Tools" + + # Make sure cargo is in PATH + export PATH="$HOME/.cargo/bin:$PATH" + + CARGO_TOOLS=( + "starship" # Prompt + "zoxide" # Better cd + "yazi-fm" # File manager + "yazi-cli" # Yazi CLI + "navi" # Cheatsheet + "eza" # Better ls + "bat" # Better cat (if not from system) + "fd-find" # Better find + "dust" # Better du + "duf" # Better df + "procs" # Better ps + "bottom" # Better top + "sd" # Better sed + "tealdeer" # Fast tldr + "git-delta" # Better git diff + "atuin" # Shell history + "hyperfine" # Benchmarking + "tokei" # Code stats + ) + + for tool in "${CARGO_TOOLS[@]}"; do + BINARY_NAME=$(echo "$tool" | cut -d'-' -f1) + if command_exists "$BINARY_NAME"; then + print_success "$tool already installed" + else + print_info "Installing $tool..." + cargo install "$tool" || print_warning "Failed to install $tool" + fi + done + + print_success "Cargo tools installed" +} + +# ─────────────────────────────────────────────────────────────────── +# Oh-My-Zsh Installation +# ─────────────────────────────────────────────────────────────────── + +install_oh_my_zsh() { + print_header "Installing Oh-My-Zsh" + + if [ -d "$HOME/.oh-my-zsh" ]; then + print_success "Oh-My-Zsh already installed" + else + print_info "Installing Oh-My-Zsh..." + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended + print_success "Oh-My-Zsh installed" + fi + + # Install zsh plugins + print_info "Installing zsh plugins..." + + # zsh-syntax-highlighting + if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]; then + git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ + "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" + print_success "zsh-syntax-highlighting installed" + fi + + # zsh-autosuggestions + if [ ! -d "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" ]; then + git clone https://github.com/zsh-users/zsh-autosuggestions.git \ + "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions" + print_success "zsh-autosuggestions installed" + fi +} + +# ─────────────────────────────────────────────────────────────────── +# Fonts Installation +# ─────────────────────────────────────────────────────────────────── + +install_fonts() { + print_header "Installing Fonts" + + FONTS_DIR="$HOME/.local/share/fonts" + mkdir -p "$FONTS_DIR" + + if [ -d "$SCRIPT_DIR/fonts" ]; then + print_info "Copying JetBrains Mono Nerd Font..." + cp -r "$SCRIPT_DIR/fonts/"*.ttf "$FONTS_DIR/" 2>/dev/null || true + + print_info "Updating font cache..." + fc-cache -f "$FONTS_DIR" + + print_success "Fonts installed" + else + print_warning "Fonts directory not found, skipping..." + fi +} + +# ─────────────────────────────────────────────────────────────────── +# Neovim Setup +# ─────────────────────────────────────────────────────────────────── + +install_neovim_config() { + print_header "Setting up Neovim with NvChad" + + # Backup existing nvim config + if [ -d "$HOME/.config/nvim" ]; then + print_warning "Backing up existing nvim config..." + mv "$HOME/.config/nvim" "$HOME/.config/nvim.backup.$(date +%Y%m%d_%H%M%S)" + fi + + print_info "Cloning NvChad starter config..." + git clone https://github.com/NvChad/starter "$HOME/.config/nvim" + + print_success "NvChad installed (run 'nvim' to complete setup)" +} + +# ─────────────────────────────────────────────────────────────────── +# Ghostty Terminal Installation +# ─────────────────────────────────────────────────────────────────── + +install_ghostty() { + print_header "Installing Ghostty Terminal" + + if command_exists ghostty; then + print_success "Ghostty already installed" + return + fi + + print_info "Installing Ghostty..." + + if [ "$PKG_MANAGER" = "pacman" ]; then + # Try to install from AUR using yay or paru + if command_exists yay; then + yay -S --noconfirm ghostty || print_warning "Failed to install ghostty via yay" + elif command_exists paru; then + paru -S --noconfirm ghostty || print_warning "Failed to install ghostty via paru" + else + print_warning "No AUR helper found. Please install ghostty manually" + print_info "Visit: https://ghostty.org" + fi + else + print_warning "Ghostty not available in apt. Please install manually" + print_info "Visit: https://ghostty.org" + fi +} + +# ─────────────────────────────────────────────────────────────────── +# Lazygit Installation +# ─────────────────────────────────────────────────────────────────── + +install_lazygit() { + print_header "Installing Lazygit" + + if command_exists lazygit; then + print_success "Lazygit already installed" + return + fi + + print_info "Installing lazygit..." + + if [ "$PKG_MANAGER" = "pacman" ]; then + sudo pacman -S --noconfirm lazygit + else + LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') + curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" + tar xf lazygit.tar.gz lazygit + sudo install lazygit /usr/local/bin + rm lazygit lazygit.tar.gz + fi + + print_success "Lazygit installed" +} + +# ─────────────────────────────────────────────────────────────────── +# Btop Installation +# ─────────────────────────────────────────────────────────────────── + +install_btop() { + print_header "Installing Btop" + + if command_exists btop; then + print_success "Btop already installed" + return + fi + + print_info "Installing btop..." + + if [ "$PKG_MANAGER" = "pacman" ]; then + sudo pacman -S --noconfirm btop + else + sudo apt install -y btop || print_warning "Failed to install btop from apt" + fi + + print_success "Btop installed" +} + +# ─────────────────────────────────────────────────────────────────── +# Configuration Files +# ─────────────────────────────────────────────────────────────────── + +install_dotfiles() { + print_header "Installing Configuration Files" + + # Backup existing configs + BACKUP_DIR="$HOME/.config_backup_$(date +%Y%m%d_%H%M%S)" + mkdir -p "$BACKUP_DIR" + + # Backup home dotfiles + for file in .zshrc .zshenv .bashrc .bash_logout .profile; do + if [ -f "$HOME/$file" ]; then + print_info "Backing up $file..." + cp "$HOME/$file" "$BACKUP_DIR/" + fi + done + + # Install dotfiles from script directory + if [ -d "$SCRIPT_DIR/dotfiles" ]; then + print_info "Installing dotfiles..." + + cp "$SCRIPT_DIR/dotfiles/.zshrc" "$HOME/" + cp "$SCRIPT_DIR/dotfiles/.zshenv" "$HOME/" + cp "$SCRIPT_DIR/dotfiles/.bashrc" "$HOME/" + cp "$SCRIPT_DIR/dotfiles/.bash_logout" "$HOME/" + cp "$SCRIPT_DIR/dotfiles/.profile" "$HOME/" + + # Copy .zsh directory if it exists + if [ -d "$SCRIPT_DIR/dotfiles/.zsh" ]; then + cp -r "$SCRIPT_DIR/dotfiles/.zsh" "$HOME/" + fi + + print_success "Dotfiles installed" + fi + + # Install config directory files + if [ -d "$SCRIPT_DIR/config" ]; then + print_info "Installing config files..." + + mkdir -p "$HOME/.config" + + # Copy each config directory/file + for item in "$SCRIPT_DIR/config/"*; do + if [ -e "$item" ]; then + basename_item=$(basename "$item") + if [ -e "$HOME/.config/$basename_item" ]; then + print_info "Backing up existing $basename_item..." + cp -r "$HOME/.config/$basename_item" "$BACKUP_DIR/" + fi + cp -r "$item" "$HOME/.config/" + print_success "Installed $basename_item" + fi + done + fi + + print_info "Backup location: $BACKUP_DIR" +} + +# ─────────────────────────────────────────────────────────────────── +# Ghostty Configuration +# ─────────────────────────────────────────────────────────────────── + +create_ghostty_config() { + print_header "Creating Ghostty Configuration" + + mkdir -p "$HOME/.config/ghostty" + + # Skip if config already exists (likely installed from config folder) + if [ -f "$HOME/.config/ghostty/config" ]; then + print_success "Ghostty config already exists, skipping..." + return + fi + + cat > "$HOME/.config/ghostty/config" << 'EOF' +# Ghostty Configuration - Dracula Theme + +# Font +font-family = "JetBrainsMono Nerd Font" +font-size = 12 + +# Theme - Dracula +background = 282a36 +foreground = f8f8f2 + +# Cursor +cursor-color = f8f8f2 + +# Selection +selection-background = 44475a +selection-foreground = f8f8f2 + +# Normal colors +palette = 0=#21222c +palette = 1=#ff5555 +palette = 2=#50fa7b +palette = 3=#f1fa8c +palette = 4=#bd93f9 +palette = 5=#ff79c6 +palette = 6=#8be9fd +palette = 7=#f8f8f2 + +# Bright colors +palette = 8=#6272a4 +palette = 9=#ff6e6e +palette = 10=#69ff94 +palette = 11=#ffffa5 +palette = 12=#d6acff +palette = 13=#ff92df +palette = 14=#a4ffff +palette = 15=#ffffff + +# Window +window-padding-x = 10 +window-padding-y = 10 +window-theme = dark + +# Shell +shell-integration = zsh + +# Misc +confirm-close-surface = false +EOF + + print_success "Ghostty config created" +} + +# ─────────────────────────────────────────────────────────────────── +# Additional Tool Configurations +# ─────────────────────────────────────────────────────────────────── + +setup_additional_configs() { + print_header "Setting up Additional Tool Configurations" + + # Bat theme + print_info "Setting up bat themes..." + mkdir -p "$(bat --config-dir)/themes" + cd "$(bat --config-dir)/themes" + curl -O https://raw.githubusercontent.com/dracula/sublime/master/Dracula.tmTheme 2>/dev/null || true + bat cache --build + cd - > /dev/null + + # Git delta config + print_info "Configuring git delta..." + git config --global core.pager "delta" + git config --global interactive.diffFilter "delta --color-only" + git config --global delta.navigate true + git config --global delta.side-by-side true + git config --global delta.line-numbers true + git config --global delta.syntax-theme "Dracula" + + # Atuin initialization + if command_exists atuin; then + print_info "Initializing atuin..." + atuin import auto || true + fi + + print_success "Additional configurations complete" +} + +# ─────────────────────────────────────────────────────────────────── +# Change Default Shell +# ─────────────────────────────────────────────────────────────────── + +change_shell() { + print_header "Changing Default Shell to Zsh" + + if [ "$SHELL" = "$(which zsh)" ]; then + print_success "Default shell is already zsh" + else + print_info "Changing default shell to zsh..." + chsh -s "$(which zsh)" + print_success "Default shell changed to zsh (logout and login to apply)" + fi +} + +# ─────────────────────────────────────────────────────────────────── +# Main Installation Flow +# ─────────────────────────────────────────────────────────────────── + +main() { + clear + print_header "CachyOS Shell Environment Setup" + + print_info "This script will install and configure:" + echo " • Modern CLI tools (eza, bat, fd, rg, fzf, etc.)" + echo " • Zsh with Oh-My-Zsh and plugins" + echo " • Starship prompt (Dracula theme)" + echo " • Neovim with NvChad" + echo " • Ghostty terminal (Dracula theme)" + echo " • Development tools (lazygit, btop, delta, atuin, etc.)" + echo " • All dotfiles and configurations" + echo "" + + read -p "Continue with installation? (y/N): " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + print_warning "Installation cancelled" + exit 0 + fi + + # Detect system + detect_package_manager + + # Run installations + install_system_packages + install_rust + install_cargo_tools + install_oh_my_zsh + install_fonts + install_neovim_config + install_ghostty + install_lazygit + install_btop + install_dotfiles + create_ghostty_config + setup_additional_configs + change_shell + + # Final message + print_header "Installation Complete!" + + echo -e "${GREEN}Your shell environment has been configured!${NC}\n" + echo "Next steps:" + echo " 1. Logout and login (or reboot) to apply shell changes" + echo " 2. Open Ghostty terminal" + echo " 3. Run 'nvim' to complete NvChad setup" + echo " 4. Enjoy your new shell environment!" + echo "" + echo "Backup location: $BACKUP_DIR" + echo "" +} + +# Run main function +main "$@"