commit 7a2f92fd98f6393abe2ce3e0eb149ec6ac409ae6 Author: Benno Lorenz Date: Tue Mar 24 19:07:42 2026 +0100 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..2e03807 --- /dev/null +++ b/README.md @@ -0,0 +1,132 @@ +# SaugOS + +A dev-focused NixOS configuration for older laptops, distilled from [ZaneyOS](https://gitlab.com/Zaney/zaneyos). Uses the **Niri** scrolling tiling Wayland compositor with Catppuccin Mocha theming, Waybar, and a curated set of development tools. + +## What's Included + +- **Niri** window manager with full keybindings, window rules, and waybar integration +- **Neovim** (via nvf) with LSP, Treesitter, Telescope — full IDE setup +- **VS Code**, **Ghostty**, **Kitty**, **Tmux** +- **Zsh** with Powerlevel10k, Oh-My-Zsh, syntax highlighting +- **Yazi** file manager, **lazygit**, **bat**, **eza**, **fzf**, **zoxide** +- **Stylix** system-wide theming (Catppuccin Mocha, JetBrains Mono) +- **TLP** + **thermald** for laptop power management +- **Docker** for containerized development +- **Rofi** launcher, **swaync** notifications, **wlogout** +- No gaming packages, no NVIDIA drivers, lightweight kernel + +## Requirements + +- A NixOS installation (25.11+) with flakes enabled +- x86_64 system with Intel or AMD integrated graphics (or a VM) +- The repo must live at `~/zaneyos/SaugOS` (or update `modules/core/nh.nix`) + +## Installation + +### 1. Clone into position + +```bash +cd ~/zaneyos # parent repo +cd SaugOS +``` + +### 2. Configure your host + +Copy the default host template for your machine: + +```bash +cp -r hosts/default hosts/ +``` + +Edit `hosts//variables.nix` to set your preferences: + +- `gitUsername` / `gitEmail` — your identity +- `terminal` — default terminal (`ghostty`, `kitty`, `alacritty`, `wezterm`) +- `browser` — default browser +- `keyboardLayout` — keyboard layout (`us`, `de`, etc.) +- `clock24h` — 24-hour clock format +- `stylixImage` — wallpaper/theme source image +- Toggle `tmuxEnable`, `vscodeEnable`, `ghosttyEnable`, etc. + +### 3. Generate hardware config + +```bash +sudo nixos-generate-config --show-hardware-config > hosts//hardware.nix +``` + +### 4. Update flake.nix + +Edit `flake.nix` and set the `host` and `profile` variables: + +```nix +host = ""; +profile = "intel"; # or "amd" or "vm" +``` + +### 5. Build and switch + +```bash +# Stage files so the flake can see them +git add -A + +# Build the system +sudo nixos-rebuild switch --flake .# +``` + +Where `` is `intel`, `amd`, or `vm`. + +### After first boot + +The included CLI tool `saugcli` handles ongoing management: + +```bash +saugcli rebuild # Rebuild and switch +saugcli rebuild-boot # Rebuild for next boot +saugcli update # Update flake inputs + rebuild +saugcli cleanup # Remove old generations +saugcli diag # Generate hardware report +saugcli trim # SSD TRIM +saugcli update-host # Auto-detect and set host/profile in flake.nix +saugcli add-host # Add a new host from the default template +``` + +Options for `rebuild`/`update`: +- `--dry` / `-n` — preview without applying +- `--ask` / `-a` — confirmation prompts +- `--cores N` — limit CPU cores (useful on low-resource machines) +- `--verbose` / `-v` — detailed output + +## Profiles + +| Profile | GPU | Use Case | +|---------|-----|----------| +| `intel` | Intel integrated | Most older laptops | +| `amd` | AMD integrated | AMD-based laptops | +| `vm` | VirtIO/VMware | Virtual machines | + +## Key Files + +| File | Purpose | +|------|---------| +| `flake.nix` | Inputs, outputs, host/profile selection | +| `hosts//variables.nix` | Per-machine settings (control panel) | +| `hosts//hardware.nix` | Hardware scan output | +| `hosts//host-packages.nix` | Machine-specific packages | +| `modules/core/packages.nix` | System-wide packages | +| `modules/home/niri/binds.nix` | Keybindings | +| `modules/home/scripts/saugcli.nix` | CLI management tool | + +## Default Keybindings (Niri) + +| Key | Action | +|-----|--------| +| `Super + Return` | Open terminal | +| `Super + D` | Rofi app launcher | +| `Super + Q` | Close window | +| `Super + 1-9` | Switch workspace | +| `Super + Shift + 1-9` | Move window to workspace | +| `Super + H/J/K/L` | Focus left/down/up/right | +| `Super + Shift + H/L` | Move column left/right | +| `Super + F` | Maximize column | +| `Super + Shift + F` | Fullscreen | +| `Super + Print` | Screenshot (region) | diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6d8861b --- /dev/null +++ b/flake.lock @@ -0,0 +1,652 @@ +{ + "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1755819240, + "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1765809053, + "narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1760703920, + "narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "d646af9b7d14bff08824538164af99d0c521b185", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1764873433, + "narHash": "sha256-1XPewtGMi+9wN9Ispoluxunw/RwozuTRVuuQOmxzt+A=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "f7ffd917ac0d253dbd6a3bf3da06888f57c69f92", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1751685974, + "narHash": "sha256-NKw96t+BgHIYzHUjkTK95FqYRVKB8DHpVhefWSz/kTw=", + "ref": "refs/heads/main", + "rev": "549f2762aebeff29a2e5ece7a7dc0f955281a1d1", + "revCount": 92, + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + }, + "original": { + "type": "git", + "url": "https://git.lix.systems/lix-project/flake-compat.git" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nvf", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767609335, + "narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "250481aafeb741edfe23d29195671c19b36b6dca", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "host": "gitlab.gnome.org", + "lastModified": 1767737596, + "narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "ef02db02bf0ff342734d525b5767814770d85b49", + "type": "gitlab" + }, + "original": { + "host": "gitlab.gnome.org", + "owner": "GNOME", + "ref": "gnome-49", + "repo": "gnome-shell", + "type": "gitlab" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774274588, + "narHash": "sha256-dnHvv5EMUgTzGZmA+3diYjQU2O6BEpGLEOgJ1Qe9LaY=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "cf9686ba26f5ef788226843bc31fda4cf72e373b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.11", + "repo": "home-manager", + "type": "github" + } + }, + "mnw": { + "locked": { + "lastModified": 1770419553, + "narHash": "sha256-b1XqsH7AtVf2dXmq2iyRr2NC1yG7skY7Z6N2MpWHlK4=", + "owner": "Gerg-L", + "repo": "mnw", + "rev": "2aaffa8030d0b262176146adbb6b0e6374ce2957", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "mnw", + "type": "github" + } + }, + "ndg": { + "inputs": { + "nixpkgs": [ + "nvf", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768214250, + "narHash": "sha256-hnBZDQWUxJV3KbtvyGW5BKLO/fAwydrxm5WHCWMQTbw=", + "owner": "feel-co", + "repo": "ndg", + "rev": "a6bd3c1ce2668d096e4fdaaa03ad7f03ba1fbca8", + "type": "github" + }, + "original": { + "owner": "feel-co", + "ref": "refs/tags/v2.6.0", + "repo": "ndg", + "type": "github" + } + }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1774283383, + "narHash": "sha256-3aCfmL8hOcdIl783LTnK+lHcjMGCnc+2zQ98xUyefCU=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "8a583029606cf072cc01c7e2f4298cc75a7ada28", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1773130184, + "narHash": "sha256-3bwx4WqCB06yfQIGB+OgIckOkEDyKxiTD5pOo4Xz2rI=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "b07bde3ee82dd73115e6b949e4f3f63695da35ea", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, + "nix-flatpak": { + "locked": { + "lastModified": 1767983141, + "narHash": "sha256-7ZCulYUD9RmJIDULTRkGLSW1faMpDlPKcbWJLYHoXcs=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "440818969ac2cbd77bfe025e884d0aa528991374", + "type": "github" + }, + "original": { + "owner": "gmodena", + "ref": "latest", + "repo": "nix-flatpak", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1774244481, + "narHash": "sha256-4XfMXU0DjN83o6HWZoKG9PegCvKvIhNUnRUI19vzTcQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "4590696c8693fea477850fe379a01544293ca4e2", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1774244481, + "narHash": "sha256-4XfMXU0DjN83o6HWZoKG9PegCvKvIhNUnRUI19vzTcQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4590696c8693fea477850fe379a01544293ca4e2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1774106199, + "narHash": "sha256-US5Tda2sKmjrg2lNHQL3jRQ6p96cgfWh3J1QBliQ8Ws=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "6c9a78c09ff4d6c21d0319114873508a6ec01655", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1771008912, + "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "a82ccc39b39b621151d6732718e3e250109076fa", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1767799921, + "narHash": "sha256-r4GVX+FToWVE2My8VVZH4V0pTIpnu2ZE8/Z4uxGEMBE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d351d0653aeb7877273920cd3e823994e7579b0b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nur": { + "inputs": { + "flake-parts": [ + "stylix", + "flake-parts" + ], + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767886815, + "narHash": "sha256-pB2BBv6X9cVGydEV/9Y8+uGCvuYJAlsprs1v1QHjccA=", + "owner": "nix-community", + "repo": "NUR", + "rev": "4ff84374d77ff62e2e13a46c33bfeb73590f9fef", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, + "nvf": { + "inputs": { + "flake-compat": "flake-compat", + "flake-parts": "flake-parts", + "mnw": "mnw", + "ndg": "ndg", + "nixpkgs": "nixpkgs_2", + "systems": "systems" + }, + "locked": { + "lastModified": 1774370747, + "narHash": "sha256-yjVgtiGCf0/nH8bp8tPhZrkGAQ575QImTLyndA7GYTA=", + "owner": "notashelf", + "repo": "nvf", + "rev": "795711598394281a0a7a912765c18d8a8611a85f", + "type": "github" + }, + "original": { + "owner": "notashelf", + "repo": "nvf", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "niri": "niri", + "nix-flatpak": "nix-flatpak", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", + "nvf": "nvf", + "stylix": "stylix", + "zen-browser": "zen-browser" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-parts": "flake-parts_2", + "gnome-shell": "gnome-shell", + "nixpkgs": "nixpkgs_3", + "nur": "nur", + "systems": "systems_2", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1774194089, + "narHash": "sha256-SCczWhr8y8aaXVHG+gOGcRahNb0BU1Z5zYZuv9W/nA8=", + "owner": "danth", + "repo": "stylix", + "rev": "7c34241d80ea64dd2039bb3a786fb66b4c6261d9", + "type": "github" + }, + "original": { + "owner": "danth", + "ref": "release-25.11", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1767817087, + "narHash": "sha256-eGE8OYoK6HzhJt/7bOiNV2cx01IdIrHL7gXgjkHRdNo=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "bd99656235aab343e3d597bf196df9bc67429507", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1767489635, + "narHash": "sha256-e6nnFnWXKBCJjCv4QG4bbcouJ6y3yeT70V9MofL32lU=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "3c32729ccae99be44fe8a125d20be06f8d7d8184", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1767488740, + "narHash": "sha256-wVOj0qyil8m+ouSsVZcNjl5ZR+1GdOOAooAatQXHbuU=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "11abb0b282ad3786a2aae088d3a01c60916f2e40", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" + } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1773622265, + "narHash": "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "a879e5e0896a326adc79c474bf457b8b99011027", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "zen-browser": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1773722260, + "narHash": "sha256-U8MsSiqqYZHR3oKE+cCZ2AJt3b4LcXs+oQuNLipaO78=", + "owner": "youwen5", + "repo": "zen-browser-flake", + "rev": "0e6e43342fb3e9a3439fafa777d8cdf98e4ffc49", + "type": "github" + }, + "original": { + "owner": "youwen5", + "repo": "zen-browser-flake", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3ac8b95 --- /dev/null +++ b/flake.nix @@ -0,0 +1,63 @@ +{ + description = "SaugOS - Dev-focused NixOS for older laptops"; + + inputs = { + home-manager = { + url = "github:nix-community/home-manager/release-25.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + nvf.url = "github:notashelf/nvf"; + stylix.url = "github:danth/stylix/release-25.11"; + nix-flatpak.url = "github:gmodena/nix-flatpak?ref=latest"; + + niri = { + url = "github:sodiboo/niri-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + zen-browser = { + url = "github:youwen5/zen-browser-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { + nixpkgs, + home-manager, + nix-flatpak, + niri, + ... + }@inputs: + let + system = "x86_64-linux"; + host = "default"; + profile = "intel"; + username = "benno"; + + mkNixosConfig = gpuProfile: nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs username host profile; + pkgs-unstable = import inputs.nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }; + modules = [ + { nixpkgs.hostPlatform = system; } + ./profiles/${gpuProfile} + nix-flatpak.nixosModules.nix-flatpak + niri.nixosModules.niri + ]; + }; + in + { + nixosConfigurations = { + amd = mkNixosConfig "amd"; + intel = mkNixosConfig "intel"; + vm = mkNixosConfig "vm"; + }; + }; +} \ No newline at end of file diff --git a/hosts/default/default.nix b/hosts/default/default.nix new file mode 100644 index 0000000..1ef7d77 --- /dev/null +++ b/hosts/default/default.nix @@ -0,0 +1,6 @@ +{ ... }: { + imports = [ + ./hardware.nix + ./host-packages.nix + ]; +} diff --git a/hosts/default/hardware.nix b/hosts/default/hardware.nix new file mode 100644 index 0000000..0445925 --- /dev/null +++ b/hosts/default/hardware.nix @@ -0,0 +1,35 @@ +# Do not modify this file! It was generated by 'nixos-generate-config' +# Replace with actual hardware scan output for the target laptop. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/CHANGEME"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/CHANGEME"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + networking.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/default/host-packages.nix b/hosts/default/host-packages.nix new file mode 100644 index 0000000..4770675 --- /dev/null +++ b/hosts/default/host-packages.nix @@ -0,0 +1,29 @@ +{ + pkgs, + pkgs-unstable, + inputs, + ... +}: { + environment.systemPackages = with pkgs; [ + # Communication + pkgs-unstable.signal-desktop + element-desktop + + # Browser + inputs.zen-browser.packages."x86_64-linux".default + + # Screen locking (niri) + swaylock + swayidle + + # Dev tools + nodejs + python3 + gnumake + gcc + + # Security + gnupg + kdePackages.kleopatra + ]; +} diff --git a/hosts/default/variables.nix b/hosts/default/variables.nix new file mode 100644 index 0000000..de539a8 --- /dev/null +++ b/hosts/default/variables.nix @@ -0,0 +1,57 @@ +{ + # Git Configuration + gitUsername = "Benno Lorenz"; + gitEmail = "benno@benno-lorenz.com"; + + # Desktop Environment — Niri (scrolling tiling WM) + desktopEnvironment = "niri"; + + # Display Manager + # `tui` for text login, `sddm` for graphical GUI + displayManager = "sddm"; + + # Bundled application toggles + tmuxEnable = true; + alacrittyEnable = false; + weztermEnable = false; + ghosttyEnable = true; + vscodeEnable = true; + helixEnable = false; + doomEmacsEnable = false; + + # Monitor settings (adjust per-machine) + extraMonitorSettings = " + "; + + # Waybar settings + clock24h = true; + + # Default browser (must be installed separately in host-packages.nix) + browser = "zen"; + + # Default terminal emulator + terminal = "ghostty"; + + # Keyboard layout + keyboardLayout = "de"; + keyboardVariant = ""; + consoleKeyMap = "de"; + + # NFS support + enableNFS = false; + + # Printing support + printEnable = false; + + # Thunar GUI file manager (Yazi is default) + thunarEnable = true; + + # Stylix theme image — sets the system color palette + stylixImage = ../../wallpapers/Amagi.jpeg; + + # Waybar style + waybarChoice = ../../modules/home/waybar/waybar-curved.nix; + + # Network host ID (needed for zfs, otherwise leave as-is) + hostId = "5ab03f50"; +} diff --git a/modules/core/boot.nix b/modules/core/boot.nix new file mode 100644 index 0000000..f59afce --- /dev/null +++ b/modules/core/boot.nix @@ -0,0 +1,20 @@ +{ pkgs, pkgs-unstable, config, ... }: + +{ + boot = { + # Use standard LTS kernel — lighter for older laptops than zen + kernelPackages = pkgs.linuxPackages_latest; + loader.systemd-boot.enable = true; + loader.efi.canTouchEfiVariables = true; + # Appimage Support + binfmt.registrations.appimage = { + wrapInterpreterInShell = false; + interpreter = "${pkgs.appimage-run}/bin/appimage-run"; + recognitionType = "magic"; + offset = 0; + mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff''; + magicOrExtension = ''\x7fELF....AI\x02''; + }; + plymouth.enable = true; + }; +} diff --git a/modules/core/default.nix b/modules/core/default.nix new file mode 100644 index 0000000..10f6362 --- /dev/null +++ b/modules/core/default.nix @@ -0,0 +1,34 @@ +{ + inputs, + host, + ... +}: +let + vars = import ../../hosts/${host}/variables.nix; +in +{ + imports = [ + ./boot.nix + ./flatpak.nix + ./fonts.nix + ./hardware.nix + ./network.nix + ./nfs.nix + ./nh.nix + ./packages.nix + ./printing.nix + (if vars.displayManager == "tui" then ./greetd.nix else ./sddm.nix) + ./security.nix + ./services.nix + ./stylix.nix + ./syncthing.nix + ./system.nix + ./thunar.nix + ./user.nix + ./virtualisation.nix + ./wayland.nix + ./xserver.nix + (if vars.desktopEnvironment == "niri" then ./swaylock.nix else null) + inputs.stylix.nixosModules.stylix + ]; +} diff --git a/modules/core/flatpak.nix b/modules/core/flatpak.nix new file mode 100644 index 0000000..c842238 --- /dev/null +++ b/modules/core/flatpak.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: { + xdg.portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + }; + services = { + flatpak = { + enable = true; + packages = [ ]; + update.onActivation = true; + }; + }; +} diff --git a/modules/core/fonts.nix b/modules/core/fonts.nix new file mode 100644 index 0000000..6ef1561 --- /dev/null +++ b/modules/core/fonts.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: +{ + fonts = { + packages = with pkgs; [ + dejavu_fonts + fira-code + fira-code-symbols + font-awesome + ibm-plex + inter + jetbrains-mono + material-icons + maple-mono.NF + nerd-fonts.im-writing + nerd-fonts.blex-mono + noto-fonts + noto-fonts-color-emoji + noto-fonts-cjk-sans + powerline-fonts + roboto + roboto-mono + symbola + terminus_font + ]; + }; +} diff --git a/modules/core/greetd.nix b/modules/core/greetd.nix new file mode 100644 index 0000000..d942ea1 --- /dev/null +++ b/modules/core/greetd.nix @@ -0,0 +1,12 @@ +{ pkgs, username, ... }: { + services.greetd = { + enable = true; + vt = 3; + settings = { + default_session = { + user = username; + command = "${pkgs.tuigreet}/bin/tuigreet --time --cmd niri-session"; + }; + }; + }; +} diff --git a/modules/core/hardware.nix b/modules/core/hardware.nix new file mode 100644 index 0000000..39ac955 --- /dev/null +++ b/modules/core/hardware.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + hardware = { + graphics.enable = true; + enableRedistributableFirmware = true; + bluetooth.enable = true; + bluetooth.powerOnBoot = true; + }; + local.hardware-clock.enable = false; +} diff --git a/modules/core/network.nix b/modules/core/network.nix new file mode 100644 index 0000000..92436aa --- /dev/null +++ b/modules/core/network.nix @@ -0,0 +1,37 @@ +{ + pkgs, + host, + options, + ... +}: let + inherit (import ../../hosts/${host}/variables.nix) hostId; +in { + assertions = [ + { + assertion = builtins.match "^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$" host != null; + message = "Invalid hostname '${host}'."; + } + ]; + + networking = { + hostName = "${host}"; + hostId = hostId; + networkmanager.enable = true; + timeServers = options.networking.timeServers.default ++ ["pool.ntp.org"]; + nameservers = ["1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one"]; + firewall = { + enable = true; + allowedTCPPorts = [ 22 80 443 8080 ]; + }; + }; + + services.resolved = { + enable = true; + dnssec = "true"; + domains = ["~."]; + fallbackDns = ["1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one"]; + dnsovertls = "true"; + }; + + environment.systemPackages = with pkgs; [networkmanagerapplet]; +} diff --git a/modules/core/nfs.nix b/modules/core/nfs.nix new file mode 100644 index 0000000..7999158 --- /dev/null +++ b/modules/core/nfs.nix @@ -0,0 +1,10 @@ +{ host, ... }: +let + inherit (import ../../hosts/${host}/variables.nix) enableNFS; +in +{ + services = { + rpcbind.enable = enableNFS; + nfs.server.enable = enableNFS; + }; +} diff --git a/modules/core/nh.nix b/modules/core/nh.nix new file mode 100644 index 0000000..c92de85 --- /dev/null +++ b/modules/core/nh.nix @@ -0,0 +1,15 @@ +{ pkgs, username, ... }: { + programs.nh = { + enable = true; + clean = { + enable = true; + extraArgs = "--keep-since 7d --keep 5"; + }; + flake = "/home/${username}/zaneyos/SaugOS"; + }; + + environment.systemPackages = with pkgs; [ + nix-output-monitor + nvd + ]; +} diff --git a/modules/core/packages.nix b/modules/core/packages.nix new file mode 100644 index 0000000..7a71a99 --- /dev/null +++ b/modules/core/packages.nix @@ -0,0 +1,60 @@ +{ + pkgs, + inputs, + ... +}: +{ + programs = { + neovim = { + enable = true; + defaultEditor = true; + }; + firefox.enable = false; + dconf.enable = true; + seahorse.enable = true; + fuse.userAllowOther = true; + mtr.enable = true; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + }; + + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + appimage-run + brightnessctl + cliphist + docker-compose + duf + dysk + eza + ffmpeg + file-roller + gedit + greetd.tuigreet + htop + eog + inxi + killall + libnotify + lm_sensors + lshw + mesa-demos + ncdu + nixfmt-rfc-style + pavucontrol + pciutils + pkg-config + playerctl + ripgrep + socat + unrar + unzip + usbutils + uwsm + waypaper + wget + ]; +} diff --git a/modules/core/printing.nix b/modules/core/printing.nix new file mode 100644 index 0000000..df30828 --- /dev/null +++ b/modules/core/printing.nix @@ -0,0 +1,18 @@ +{ host, ... }: +let + inherit (import ../../hosts/${host}/variables.nix) printEnable; +in +{ + services = { + printing = { + enable = printEnable; + drivers = [ ]; + }; + avahi = { + enable = printEnable; + nssmdns4 = true; + openFirewall = true; + }; + ipp-usb.enable = printEnable; + }; +} diff --git a/modules/core/sddm.nix b/modules/core/sddm.nix new file mode 100644 index 0000000..d9196e2 --- /dev/null +++ b/modules/core/sddm.nix @@ -0,0 +1,44 @@ +{ + pkgs, + config, + lib, + ... +}: let + foreground = config.stylix.base16Scheme.base00; + textColor = config.stylix.base16Scheme.base05; + sddm-astronaut = pkgs.sddm-astronaut.override { + embeddedTheme = "pixel_sakura"; + themeConfig = { + FormPosition = "left"; + Blur = "4.0"; + Background = "${toString config.stylix.image}"; + HeaderTextColor = "#${textColor}"; + DateTextColor = "#${textColor}"; + TimeTextColor = "#${textColor}"; + LoginFieldTextColor = "#${textColor}"; + PasswordFieldTextColor = "#${textColor}"; + UserIconColor = "#${textColor}"; + PasswordIconColor = "#${textColor}"; + WarningColor = "#${textColor}"; + LoginButtonBackgroundColor = "#${config.stylix.base16Scheme.base01}"; + SystemButtonsIconsColor = "#${textColor}"; + SessionButtonTextColor = "#${textColor}"; + VirtualKeyboardButtonTextColor = "#${textColor}"; + DropdownBackgroundColor = "#${config.stylix.base16Scheme.base01}"; + HighlightBackgroundColor = "#${textColor}"; + FormBackgroundColor = "#${config.stylix.base16Scheme.base01}"; + }; + }; +in { + services.displayManager = { + sddm = { + package = pkgs.kdePackages.sddm; + extraPackages = [sddm-astronaut]; + enable = true; + wayland.enable = false; + theme = "sddm-astronaut-theme"; + }; + }; + + environment.systemPackages = [sddm-astronaut]; +} diff --git a/modules/core/security.nix b/modules/core/security.nix new file mode 100644 index 0000000..a722cb7 --- /dev/null +++ b/modules/core/security.nix @@ -0,0 +1,50 @@ +{ pkgs, username, ... }: { + security = { + rtkit.enable = true; + polkit = { + enable = true; + extraConfig = '' + polkit.addRule(function(action, subject) { + if ( subject.isInGroup("users") && ( + action.id == "org.freedesktop.login1.reboot" || + action.id == "org.freedesktop.login1.reboot-multiple-sessions" || + action.id == "org.freedesktop.login1.power-off" || + action.id == "org.freedesktop.login1.power-off-multiple-sessions" + )) + { return polkit.Result.YES; } + }) + ''; + }; + + pam.services = { + login.enableGnomeKeyring = true; + login.enableKwallet = true; + }; + + pam.services.hyprlock = { + text = '' + auth sufficient pam_unix.so try_first_pass nullok + auth required pam_deny.so + ''; + }; + + pam.services.swaylock = { + text = '' + auth sufficient pam_unix.so try_first_pass nullok + auth required pam_deny.so + ''; + }; + + sudo.extraRules = [ + { + users = [ "${username}" ]; + commands = [ + { + command = "ALL"; + options = [ "NOPASSWD" ]; + } + ]; + } + ]; + }; +} diff --git a/modules/core/services.nix b/modules/core/services.nix new file mode 100644 index 0000000..865a8e4 --- /dev/null +++ b/modules/core/services.nix @@ -0,0 +1,49 @@ +{ profile, ... }: { + services = { + libinput.enable = true; + fstrim.enable = true; + gvfs.enable = true; + openssh = { + enable = true; + settings = { + PermitRootLogin = "no"; + PasswordAuthentication = true; + KbdInteractiveAuthentication = true; + }; + ports = [ 22 ]; + }; + blueman.enable = true; + tumbler.enable = true; + gnome.gnome-keyring.enable = true; + tailscale.enable = true; + + smartd = { + enable = + if profile == "vm" + then false + else true; + autodetect = true; + }; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + # TLP for laptop power management + tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + START_CHARGE_THRESH_BAT0 = 40; + STOP_CHARGE_THRESH_BAT0 = 80; + }; + }; + thermald.enable = true; + }; +} diff --git a/modules/core/stylix.nix b/modules/core/stylix.nix new file mode 100644 index 0000000..5d873c8 --- /dev/null +++ b/modules/core/stylix.nix @@ -0,0 +1,55 @@ +{ pkgs, host, ... }: +let + inherit (import ../../hosts/${host}/variables.nix) stylixImage; +in +{ + stylix = { + enable = true; + image = stylixImage; + base16Scheme = { + base00 = "24273a"; # base + base01 = "1e2030"; # mantle + base02 = "363a4f"; # surface0 + base03 = "494d64"; # surface1 + base04 = "5b6078"; # surface2 + base05 = "cad3f5"; # text + base06 = "f4dbd6"; # rosewater + base07 = "b7bdf8"; # lavender + base08 = "ed8796"; # red + base09 = "f5a97f"; # peach + base0A = "eed49f"; # yellow + base0B = "a6da95"; # green + base0C = "8bd5ca"; # teal + base0D = "8aadf4"; # blue + base0E = "c6a0f6"; # mauve + base0F = "f0c6c6"; # flamingo + }; + polarity = "dark"; + opacity.terminal = 1.0; + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + }; + fonts = { + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrains Mono"; + }; + sansSerif = { + package = pkgs.montserrat; + name = "Montserrat"; + }; + serif = { + package = pkgs.montserrat; + name = "Montserrat"; + }; + sizes = { + applications = 12; + terminal = 15; + desktop = 11; + popups = 12; + }; + }; + }; +} diff --git a/modules/core/swaylock.nix b/modules/core/swaylock.nix new file mode 100644 index 0000000..098c57f --- /dev/null +++ b/modules/core/swaylock.nix @@ -0,0 +1,13 @@ +{ config, pkgs, host, ... }: +let + vars = import ../../../hosts/${host}/variables.nix; +in +{ + services.udev.extraRules = ""; + + environment.etc."swaylock/config".text = '' + color=${config.lib.stylix.colors.base00} + ''; + + environment.systemPackages = [ pkgs.swaylock ]; +} diff --git a/modules/core/syncthing.nix b/modules/core/syncthing.nix new file mode 100644 index 0000000..b214716 --- /dev/null +++ b/modules/core/syncthing.nix @@ -0,0 +1,8 @@ +{ username, ... }: { + services.syncthing = { + enable = false; + user = "${username}"; + dataDir = "/home/${username}"; + configDir = "/home/${username}/.config/syncthing"; + }; +} diff --git a/modules/core/system.nix b/modules/core/system.nix new file mode 100644 index 0000000..e1b501a --- /dev/null +++ b/modules/core/system.nix @@ -0,0 +1,40 @@ +{ host, profile, ... }: +let + inherit (import ../../hosts/${host}/variables.nix) consoleKeyMap; +in +{ + nix = { + settings = { + download-buffer-size = 200000000; + auto-optimise-store = true; + experimental-features = [ + "nix-command" + "flakes" + ]; + substituters = [ "https://niri.cachix.org" ]; + trusted-public-keys = [ "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z+BN0JISU3WYj9E84=" ]; + }; + }; + time.timeZone = "Europe/Berlin"; + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + environment.variables = { + NIXOS_OZONE_WL = "1"; + SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS = "0"; + SAUGOS_VERSION = "1.0"; + SAUGOS = "true"; + }; + console.keyMap = "${consoleKeyMap}"; + + system.stateVersion = "23.11"; +} diff --git a/modules/core/thunar.nix b/modules/core/thunar.nix new file mode 100644 index 0000000..d2051cd --- /dev/null +++ b/modules/core/thunar.nix @@ -0,0 +1,18 @@ +{ host, pkgs, ... }: +let + inherit (import ../../hosts/${host}/variables.nix) thunarEnable; +in +{ + programs = { + thunar = { + enable = thunarEnable; + plugins = with pkgs.xfce; [ + thunar-archive-plugin + thunar-volman + ]; + }; + }; + environment.systemPackages = with pkgs; [ + ffmpegthumbnailer + ]; +} diff --git a/modules/core/user.nix b/modules/core/user.nix new file mode 100644 index 0000000..726f3c9 --- /dev/null +++ b/modules/core/user.nix @@ -0,0 +1,45 @@ +{ pkgs +, inputs +, username +, host +, profile +, pkgs-unstable +, ... +}: +let + inherit (import ../../hosts/${host}/variables.nix) gitUsername; +in +{ + imports = [ inputs.home-manager.nixosModules.home-manager ]; + home-manager = { + useUserPackages = true; + useGlobalPkgs = false; + backupFileExtension = "backup"; + extraSpecialArgs = { inherit inputs username host profile pkgs-unstable; }; + users.${username} = { + imports = [ + ./../home + ]; + home = { + username = "${username}"; + homeDirectory = "/home/${username}"; + stateVersion = "23.11"; + }; + }; + }; + users.mutableUsers = true; + users.users.${username} = { + isNormalUser = true; + description = "${gitUsername}"; + extraGroups = [ + "docker" + "libvirtd" + "lp" + "networkmanager" + "wheel" + ]; + shell = pkgs.zsh; + ignoreShellProgramCheck = true; + }; + nix.settings.allowed-users = [ "${username}" ]; +} diff --git a/modules/core/virtualisation.nix b/modules/core/virtualisation.nix new file mode 100644 index 0000000..cf59b49 --- /dev/null +++ b/modules/core/virtualisation.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: { + # Docker for container-based dev workflows + virtualisation = { + docker.enable = true; + podman.enable = false; + libvirtd.enable = false; + }; + + environment.systemPackages = with pkgs; [ + lazydocker + docker-client + ]; +} diff --git a/modules/core/wayland.nix b/modules/core/wayland.nix new file mode 100644 index 0000000..4cfa04c --- /dev/null +++ b/modules/core/wayland.nix @@ -0,0 +1,32 @@ +{ host, pkgs, inputs, ... }: +let + vars = import ../../hosts/${host}/variables.nix; + desktopEnvironment = vars.desktopEnvironment or "niri"; +in +{ + programs.niri = { + enable = desktopEnvironment == "niri"; + package = inputs.niri.packages.${pkgs.system}.niri-stable; + }; + + environment.systemPackages = with pkgs; [ + xwayland + xdg-utils + ]; + + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + ] ++ (if desktopEnvironment == "niri" then [ + xdg-desktop-portal-gnome + ] else []); + + config = if desktopEnvironment == "niri" then { + common.default = "*"; + niri.default = [ "gnome" "gtk" ]; + } else {}; + }; + + security.polkit.enable = true; +} diff --git a/modules/core/xserver.nix b/modules/core/xserver.nix new file mode 100644 index 0000000..2462ca7 --- /dev/null +++ b/modules/core/xserver.nix @@ -0,0 +1,16 @@ +{ host, ... }: +let + vars = import ../../hosts/${host}/variables.nix; + keyboardLayout = vars.keyboardLayout or "us"; + keyboardVariant = vars.keyboardVariant or ""; + enableXServer = vars.displayManager == "sddm"; +in +{ + services.xserver = { + enable = enableXServer; + xkb = { + layout = "${keyboardLayout}"; + variant = "${keyboardVariant}"; + }; + }; +} diff --git a/modules/drivers/amd-drivers.nix b/modules/drivers/amd-drivers.nix new file mode 100644 index 0000000..056f02a --- /dev/null +++ b/modules/drivers/amd-drivers.nix @@ -0,0 +1,15 @@ +{ lib, pkgs, config, ... }: +with lib; +let + cfg = config.drivers.amdgpu; +in +{ + options.drivers.amdgpu = { + enable = mkEnableOption "Enable AMD Drivers"; + }; + + config = mkIf cfg.enable { + systemd.tmpfiles.rules = [ "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" ]; + services.xserver.videoDrivers = [ "amdgpu" ]; + }; +} diff --git a/modules/drivers/default.nix b/modules/drivers/default.nix new file mode 100644 index 0000000..0755402 --- /dev/null +++ b/modules/drivers/default.nix @@ -0,0 +1,9 @@ +{ ... }: +{ + imports = [ + ./amd-drivers.nix + ./intel-drivers.nix + ./local-hardware-clock.nix + ./vm-guest-services.nix + ]; +} diff --git a/modules/drivers/intel-drivers.nix b/modules/drivers/intel-drivers.nix new file mode 100644 index 0000000..1db0075 --- /dev/null +++ b/modules/drivers/intel-drivers.nix @@ -0,0 +1,20 @@ +{ lib, pkgs, config, ... }: +with lib; let + cfg = config.drivers.intel; +in +{ + options.drivers.intel = { + enable = mkEnableOption "Enable Intel Graphics Drivers"; + }; + + config = mkIf cfg.enable { + hardware.graphics = { + extraPackages = with pkgs; [ + intel-media-driver + intel-vaapi-driver + libva-vdpau-driver + libvdpau-va-gl + ]; + }; + }; +} diff --git a/modules/drivers/local-hardware-clock.nix b/modules/drivers/local-hardware-clock.nix new file mode 100644 index 0000000..96443fa --- /dev/null +++ b/modules/drivers/local-hardware-clock.nix @@ -0,0 +1,12 @@ +{ lib, pkgs, config, ... }: +with lib; +let + cfg = config.local.hardware-clock; +in +{ + options.local.hardware-clock = { + enable = mkEnableOption "Change Hardware Clock To Local Time"; + }; + + config = mkIf cfg.enable { time.hardwareClockInLocalTime = true; }; +} diff --git a/modules/drivers/vm-guest-services.nix b/modules/drivers/vm-guest-services.nix new file mode 100644 index 0000000..463b8a0 --- /dev/null +++ b/modules/drivers/vm-guest-services.nix @@ -0,0 +1,16 @@ +{ lib, pkgs, config, ... }: +with lib; +let + cfg = config.vm.guest-services; +in +{ + options.vm.guest-services = { + enable = mkEnableOption "Enable Virtual Machine Guest Services"; + }; + + config = mkIf cfg.enable { + services.qemuGuest.enable = true; + services.spice-vdagentd.enable = true; + services.spice-webdavd.enable = false; + }; +} diff --git a/modules/home/alacritty.nix b/modules/home/alacritty.nix new file mode 100644 index 0000000..b8a8f4c --- /dev/null +++ b/modules/home/alacritty.nix @@ -0,0 +1,30 @@ +{ lib, ... }: { + programs.alacritty = + let + font_family = lib.mkForce "Maple Mono NF"; + in + { + enable = true; + settings = { + font = { + normal = { + family = font_family; + style = "Regular"; + }; + bold = { + family = font_family; + style = "Bold"; + }; + italic = { + family = font_family; + style = "Italic"; + }; + bold_italic = { + family = font_family; + style = "Bold Italic"; + }; + size = 15; + }; + }; + }; +} diff --git a/modules/home/bash.nix b/modules/home/bash.nix new file mode 100644 index 0000000..98bb0a3 --- /dev/null +++ b/modules/home/bash.nix @@ -0,0 +1,22 @@ +{ profile, ... }: { + programs.bash = { + enable = false; + enableCompletion = true; + initExtra = '' + fastfetch + if [ -f $HOME/.bashrc-personal ]; then + source $HOME/.bashrc-personal + fi + ''; + shellAliases = { + sv = "sudo nvim"; + fr = "nh os switch --hostname ${profile}"; + fu = "nh os switch --hostname ${profile} --update"; + + ncg = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot"; + v = "nvim"; + cat = "bat"; + ".." = "cd .."; + }; + }; +} diff --git a/modules/home/bashrc-personal.nix b/modules/home/bashrc-personal.nix new file mode 100644 index 0000000..386597b --- /dev/null +++ b/modules/home/bashrc-personal.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: { + home.packages = with pkgs; [ bash ]; + + home.file."./.bashrc-personal".text = '' + + # This file allows you to define your own aliases, functions, etc + # below are just some examples of what you can use this file for + + #!/usr/bin/env bash + # Set defaults + # + #export EDITOR="nvim" + #export VISUAL="nvim" + + #alias c="clear" + #eval "$(zoxide init bash)" + #eval "$(oh-my-posh init bash --config $HOME/.config/powerlevel10k_rainbow.omp.json)" + + ''; +} diff --git a/modules/home/bat.nix b/modules/home/bat.nix new file mode 100644 index 0000000..d63242a --- /dev/null +++ b/modules/home/bat.nix @@ -0,0 +1,26 @@ +{ pkgs +, lib +, ... +}: { + programs.bat = { + enable = true; + config = { + pager = "less -FR"; + # other styles available and cane be combined + # style = "numbers,changes,headers,rule,grid"; + style = "full"; + # Bat has other thems as well + # ansi,Catppuccin,base16,base16-256,GitHub,Nord,etc + theme = lib.mkForce "Dracula"; + }; + extraPackages = with pkgs.bat-extras; [ + batman + batpipe + batgrep + ]; + }; + home.sessionVariables = { + MANPAGER = "sh -c 'col -bx | bat -l man -p'"; + MANROFFOPT = "-c"; + }; +} diff --git a/modules/home/bottom.nix b/modules/home/bottom.nix new file mode 100644 index 0000000..3b24f84 --- /dev/null +++ b/modules/home/bottom.nix @@ -0,0 +1,35 @@ +{ ... }: { + programs.bottom = { + enable = true; + settings = { + enable_gpu = true; + theme = "nord"; + flags.group_processes = true; + row = [ + { + ratio = 2; + child = [ + { type = "cpu"; } + { type = "temp"; } + ]; + } + { + ratio = 2; + child = [ + { type = "network"; } + ]; + } + { + ratio = 3; + child = [ + { + type = "proc"; + ratio = 1; + default = true; + } + ]; + } + ]; + }; + }; +} diff --git a/modules/home/btop.nix b/modules/home/btop.nix new file mode 100644 index 0000000..079bfb3 --- /dev/null +++ b/modules/home/btop.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: { + programs.btop = { + enable = true; + settings = { + vim_keys = true; + rounded_corners = true; + proc_tree = true; + show_gpu_info = "on"; + show_uptime = true; + show_coretemp = true; + cpu_sensor = "auto"; + show_disks = true; + only_physical = true; + io_mode = true; + io_graph_combined = false; + }; + }; +} diff --git a/modules/home/default.nix b/modules/home/default.nix new file mode 100644 index 0000000..d00c86b --- /dev/null +++ b/modules/home/default.nix @@ -0,0 +1,62 @@ +{ host, ... }: +let + inherit (import ../../hosts/${host}/variables.nix) + alacrittyEnable + desktopEnvironment + ghosttyEnable + tmuxEnable + waybarChoice + weztermEnable + vscodeEnable + helixEnable + doomEmacsEnable + ; +in +{ + imports = [ + ./bash.nix + ./bashrc-personal.nix + ./bat.nix + ./btop.nix + ./bottom.nix + ./eza.nix + ./fastfetch + ./fzf.nix + ./gh.nix + ./git.nix + ./gtk.nix + ./htop.nix + ./kitty.nix + ./lazygit.nix + ./nvf.nix + ./rofi + ./qt.nix + ./scripts + ./stylix.nix + ./swappy.nix + ./swaync.nix + ./tealdeer.nix + waybarChoice + ./wlogout + ./xdg.nix + ./yazi + ./zoxide.nix + ./zsh + ] + ++ (if desktopEnvironment == "niri" then [ ./niri ] else [ ]) + ++ (if helixEnable then [ ./evil-helix.nix ] else [ ]) + ++ (if vscodeEnable then [ ./vscode.nix ] else [ ]) + ++ ( + if doomEmacsEnable then + [ + ./editors/doom-emacs-install.nix + ./editors/doom-emacs.nix + ] + else + [ ] + ) + ++ (if weztermEnable then [ ./wezterm.nix ] else [ ]) + ++ (if ghosttyEnable then [ ./ghostty.nix ] else [ ]) + ++ (if tmuxEnable then [ ./tmux.nix ] else [ ]) + ++ (if alacrittyEnable then [ ./alacritty.nix ] else [ ]); +} diff --git a/modules/home/editors/doom-emacs-install.nix b/modules/home/editors/doom-emacs-install.nix new file mode 100644 index 0000000..dc45b0f --- /dev/null +++ b/modules/home/editors/doom-emacs-install.nix @@ -0,0 +1,78 @@ +{ pkgs, ... }: + +let + doom-icon = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/jeetelongname/doom-banners/master/splashes/doom/doom-emacs-color2.svg"; + sha256 = "1xxi5ra1z8njsqaqiaq96wyn1sc967l42kvjzbji1zrjj8za6bgq"; + }; +in +{ + # 1. Create a script to install Doom Emacs + home.packages = [ + (pkgs.writeShellScriptBin "get-doom" '' + #!/usr/bin/env bash + set -e + + # --- Icons --- + ICON_CHECK="✔" + ICON_INFO="ℹ" + ICON_ROCKET="🚀" + + # --- Helper Functions --- + print_status() { + echo + echo "--- $ICON_INFO $1 ---" + } + + print_success() { + echo "--- $ICON_CHECK $1 ---" + } + + print_banner() { + echo "===============================" + echo " Doom Emacs Installer $ICON_ROCKET" + echo "===============================" + } + + # --- Main Script --- + print_banner + EMACSDIR="$HOME/.emacs.d" + + if [ -d "$EMACSDIR" ]; then + print_success "Doom Emacs is already installed." + exit 0 + fi + + print_status "Cloning Doom Emacs..." + git clone --depth 1 https://github.com/doomemacs/doomemacs "$EMACSDIR" + print_success "Doom Emacs cloned." + + print_status "Running Doom install..." + "$EMACSDIR/bin/doom" install + print_success "Doom install complete." + + print_status "Running doom sync..." + "$EMACSDIR/bin/doom" sync + print_success "Doom sync complete." + + echo + print_success "All done! Doom Emacs is ready to use." + '') + ]; + + # 2. Add the bin directory to the PATH + home.sessionPath = [ + "$HOME/.emacs.d/bin" + ]; + + # 3. Create a desktop file + xdg.desktopEntries.doom-emacs = { + name = "Doom Emacs"; + comment = "A configuration framework for GNU Emacs"; + exec = "emacs"; + icon = doom-icon; + terminal = false; + type = "Application"; + categories = [ "Development" "TextEditor" ]; + }; +} diff --git a/modules/home/editors/doom-emacs.nix b/modules/home/editors/doom-emacs.nix new file mode 100644 index 0000000..ca1f248 --- /dev/null +++ b/modules/home/editors/doom-emacs.nix @@ -0,0 +1,162 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + emacs-pgtk + git + lazygit + ripgrep + libtool + cmake + pkg-config + # Spell checking + hunspell + hunspellDicts.en_US + hunspellDicts.en_AU + hunspellDicts.es_ES + # LSP servers + clang-tools # C/C++ LSP + nil # Nix LSP + ]; + + home.file.".doom.d/init.el".text = '' + ;;; init.el -*- lexical-binding: t; -*- + + (doom! + :completion + (company +auto) + (vertico +icons) + + :ui + doom + doom-dashboard + doom-quit + hl-todo + modeline + nav-flash + ophints + (popup +defaults) + (ligatures +extra) + tabs + treemacs + vi-tilde-fringe + window-select + + :editor + (evil +everywhere) + file-templates + fold + multiple-cursors + snippets + word-wrap + + :emacs + (dired +icons) + electric + (ibuffer +icons) + (undo +tree) + vc + + :term + vterm + + :checkers + (syntax +flymake) + (spell +flyspell) + grammar + + :tools + (eval +overlay) + (lookup +docsets) + lsp + (magit +forge) + pdf + tree-sitter + + :lang + bash + (c +lsp) + css + docker + html + (json +lsp) + markdown + (nix +tree-sitter +lsp) + toml + yaml + + :config + (default +bindings +smartparens)) + ''; + + home.file.".doom.d/config.el".text = '' + ;;; config.el -*- lexical-binding: t; -*- + + (setq doom-theme 'doom-one) + (setq display-line-numbers-type 'relative) + (setq nerd-icons-font-family "JetBrainsMono Nerd Font") + + ;; Git configuration + (after! magit + ;; Set default git editor to emacsclient + (setq with-editor-emacsclient-executable "emacsclient") + ;; Show word-granularity differences within diff hunks + (setq magit-diff-refine-hunk t) + ;; Auto-refresh magit buffers + (setq magit-refresh-status-buffer t)) + + ;; Lazygit integration + (defun my/lazygit () + "Open lazygit in a terminal." + (interactive) + (if (fboundp 'vterm) + (let ((default-directory (magit-toplevel))) + (vterm "*lazygit*") + (vterm-send-string "lazygit") + (vterm-send-return)) + (async-shell-command "lazygit" "*lazygit*"))) + + ;; LSP configuration + (after! lsp-mode + (setq lsp-signature-auto-activate t + lsp-signature-render-documentation t + lsp-completion-provider :company-capf + lsp-idle-delay 0.1)) + + ;; Nix LSP (nil) configuration + (with-eval-after-load 'lsp-nix-nil + (setq lsp-nix-nil-auto-eval-inputs t)) + + ;; Company completion settings + (after! company + (setq company-idle-delay 0.2 + company-minimum-prefix-length 1 + company-tooltip-align-annotations t + company-require-match 'never)) + + ;; Spell checking configuration + (after! ispell + (setq ispell-program-name "hunspell") + (setq ispell-local-dictionary "en_US") + (setq ispell-local-dictionary-alist + '(("en_US" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US") nil utf-8)))) + + ;; Git keybindings + (map! :leader + (:prefix-map ("g" . "git") + :desc "Magit status" "g" #'magit-status + :desc "Magit dispatch" "d" #'magit-dispatch + :desc "Magit file dispatch" "f" #'magit-file-dispatch + :desc "Magit blame" "b" #'magit-blame-addition + :desc "Git time machine" "t" #'git-timemachine-toggle + :desc "Lazygit" "l" #'my/lazygit + :desc "Git stage file" "s" #'magit-stage-file + :desc "Git unstage file" "u" #'magit-unstage-file)) + ''; + + home.file.".doom.d/packages.el".text = '' + ;;; packages.el -*- lexical-binding: t; -*- + + ;; Git-related packages + (package! git-timemachine) + ''; +} diff --git a/modules/home/evil-helix.nix b/modules/home/evil-helix.nix new file mode 100644 index 0000000..911cca7 --- /dev/null +++ b/modules/home/evil-helix.nix @@ -0,0 +1,89 @@ +{ pkgs, ... }: +let + enableEvilHelix = true; # Set to true to enable the configuration +in +{ + home.packages = with pkgs; ( + if enableEvilHelix + then [ + evil-helix + cmake-language-server + jsonnet-language-server + luaformatter + lua-language-server + marksman + taplo + nil + jq-lsp + vscode-langservers-extracted + bash-language-server + awk-language-server + vscode-extensions.llvm-vs-code-extensions.vscode-clangd + clang-tools + docker-compose-language-service + docker-compose + docker-language-server + typescript-language-server + ] + else [ ] + ); + + home.file.".config/helix/languages.toml".text = + if enableEvilHelix + then '' + [language-server.nil] + command = "nil" + + [language-server.lua] + command = "lua-language-server" + + [language-server.json] + command = "vscode-json-languageserver" + + [language-server.markdown] + command = "marksman" + '' + else ""; + + home.file.".config/helix/config.toml".text = + if enableEvilHelix + then '' + theme = "catppuccin_mocha" + #theme = "ao" + + [editor] + evil = true + end-of-line-diagnostics = "hint" + auto-pairs = true + mouse = true + middle-click-paste = true + shell = ["zsh", "-c"] + line-number = "absolute" + auto-completion = true + path-completion = true + auto-info = true + color-modes = true + popup-border = "all" + clipboard-provider = "wayland" + indent-heuristic = "hybrid" + + [editor.statusline] + left = ["mode", "spinner"] + center = ["file-absolute-path", "total-line-numbers", "read-only-indicator", "file-modification-indicator"] + right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"] + separator = "│" + mode.normal = "NORMAL" + mode.insert = "INSERT" + mode.select = "SELECT" + + [editor.lsp] + enable = true + display-messages = true + display-progress-messages = true + + [editor.inline-diagnostics] + cursor-line = "hint" + other-lines = "hint" + '' + else ""; +} diff --git a/modules/home/eza.nix b/modules/home/eza.nix new file mode 100644 index 0000000..63de65a --- /dev/null +++ b/modules/home/eza.nix @@ -0,0 +1,30 @@ +# Eza is a ls replacement +{ + programs.eza = { + enable = true; + icons = "auto"; + enableBashIntegration = true; + enableZshIntegration = true; + enableFishIntegration = true; + git = true; + + extraOptions = [ + "--group-directories-first" + "--no-quotes" + "--header" # Show header row + "--git-ignore" + "--icons=always" + # "--time-style=long-iso" # ISO 8601 extended format for time + "--classify" # append indicator (/, *, =, @, |) + "--hyperlink" # make paths clickable in some terminals + ]; + }; + # Aliases to make `ls`, `ll`, `la` use eza + home.shellAliases = { + ls = "eza"; + lt = "eza --tree --level=2"; + ll = "eza -lh --no-user --long"; + la = "eza -lah "; + tree = "eza --tree "; + }; +} diff --git a/modules/home/face.jpg b/modules/home/face.jpg new file mode 100644 index 0000000..9a5cb7e Binary files /dev/null and b/modules/home/face.jpg differ diff --git a/modules/home/fastfetch/default.nix b/modules/home/fastfetch/default.nix new file mode 100644 index 0000000..5a059a0 --- /dev/null +++ b/modules/home/fastfetch/default.nix @@ -0,0 +1,136 @@ +{ + programs.fastfetch = { + enable = true; + + settings = { + display = { + color = { + keys = "35"; + output = "95"; + }; + separator = " ➜ "; + }; + + logo = { + source = ./nixos.png; + type = "kitty-direct"; + height = 10; + width = 20; + padding = { + top = 2; + left = 2; + }; + }; + + modules = [ + "break" + { + type = "os"; + key = "OS"; + keyColor = "31"; + } + { + type = "command"; + key = " ├ SaugOS "; + keyColor = "31"; + text = "echo v$" + "{SAUGOS_VERSION}"; + } + { + type = "kernel"; + key = " ├  "; + keyColor = "31"; + } + { + type = "packages"; + key = " ├ 󰏖 "; + keyColor = "31"; + } + { + type = "shell"; + key = " └  "; + keyColor = "31"; + } + "break" + { + type = "wm"; + key = "WM "; + keyColor = "32"; + } + { + type = "wmtheme"; + key = " ├ 󰉼 "; + keyColor = "32"; + } + { + type = "icons"; + key = " ├ 󰀻 "; + keyColor = "32"; + } + { + type = "cursor"; + key = " ├  "; + keyColor = "32"; + } + { + type = "terminal"; + key = " ├  "; + keyColor = "32"; + } + { + type = "terminalfont"; + key = " └  "; + keyColor = "32"; + } + "break" + { + type = "host"; + format = "{5} {1} Type {2}"; + key = "PC "; + keyColor = "33"; + } + { + type = "cpu"; + format = "{1} ({3}) @ {7} GHz"; + key = " ├  "; + keyColor = "33"; + } + { + type = "gpu"; + format = "{1} {2} @ {12} GHz"; + key = " ├ 󰢮 "; + keyColor = "33"; + } + { + type = "memory"; + key = " ├  "; + keyColor = "33"; + } + { + type = "disk"; + key = " ├ 󰋊 "; + keyColor = "33"; + } + { + type = "monitor"; + key = " ├  "; + keyColor = "33"; + } + { + type = "player"; + key = " ├ 󰥠 "; + keyColor = "33"; + } + { + type = "media"; + key = " └ 󰝚 "; + keyColor = "33"; + } + "break" + { + type = "uptime"; + key = " Uptime "; + } + ]; + }; + }; +} diff --git a/modules/home/fastfetch/nixos.png b/modules/home/fastfetch/nixos.png new file mode 100644 index 0000000..571410a Binary files /dev/null and b/modules/home/fastfetch/nixos.png differ diff --git a/modules/home/fzf.nix b/modules/home/fzf.nix new file mode 100644 index 0000000..0100ad8 --- /dev/null +++ b/modules/home/fzf.nix @@ -0,0 +1,37 @@ +# Fzf is a general-purpose command-line fuzzy finder. +{ config +, lib +, ... +}: +let + accent = "#" + config.lib.stylix.colors.base0D; + foreground = "#" + config.lib.stylix.colors.base05; + muted = "#" + config.lib.stylix.colors.base03; +in +{ + programs.fzf = { + enable = true; + enableZshIntegration = true; + colors = lib.mkForce { + "fg+" = accent; + "bg+" = "-1"; + "fg" = foreground; + "bg" = "-1"; + "prompt" = muted; + "pointer" = accent; + }; + defaultOptions = [ + "--margin=1" + "--layout=reverse" + "--border=none" + "--info='hidden'" + "--header=''" + "--prompt='/ '" + "-i" + "--no-bold" + "--bind='enter:execute(nvim {})'" + "--preview='bat --style=numbers --color=always --line-range :500 {}'" + "--preview-window=right:60%:wrap" + ]; + }; +} diff --git a/modules/home/gh.nix b/modules/home/gh.nix new file mode 100644 index 0000000..0df8cc3 --- /dev/null +++ b/modules/home/gh.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + programs = { + gh.enable = true; + }; +} diff --git a/modules/home/ghostty.nix b/modules/home/ghostty.nix new file mode 100644 index 0000000..be09725 --- /dev/null +++ b/modules/home/ghostty.nix @@ -0,0 +1,100 @@ +{ pkgs, ... }: +let + # A recent issue 7/7/2025 w/ghostty causes it to hang or respond slowly + # This is a workaround until a fix is released + myGhostty = pkgs.ghostty.overrideAttrs (_: { + preBuild = '' + shopt -s globstar + sed -i 's/^const xev = @import("xev");$/const xev = @import("xev").Epoll;/' **/*.zig + shopt -u globstar + ''; + }); +in +{ + programs.ghostty = { + enable = true; + package = myGhostty; # to fix a but in current builds of ghostty + #package = pkgs.ghostty; + }; + home.file."./.config/ghostty/config".text = '' + + #theme = Aura + theme = Dracula + #theme = Aardvark Blue + #theme = GruvboxDarkHard + adjust-cell-height = 10% + window-theme = dark + window-height = 32 + window-width = 110 + background-opacity = 0.95 + background-blur-radius = 60 + selection-background = #2d3f76 + selection-foreground = #c8d3f5 + cursor-style = bar + mouse-hide-while-typing = true + + # keybindings + # Copy/Paste + keybind = ctrl+shift+c=copy_to_clipboard + keybind = ctrl+shift+v=paste_from_clipboard + + keybind = alt+s>r=reload_config + keybind = alt+s>x=close_surface + + keybind = alt+s>n=new_window + + # tabs + keybind = alt+s>c=new_tab + keybind = alt+s>shift+l=next_tab + keybind = alt+s>shift+h=previous_tab + keybind = alt+s>comma=move_tab:-1 + keybind = alt+s>period=move_tab:1 + + # quick tab switch + keybind = alt+s>1=goto_tab:1 + keybind = alt+s>2=goto_tab:2 + keybind = alt+s>3=goto_tab:3 + keybind = alt+s>4=goto_tab:4 + keybind = alt+s>5=goto_tab:5 + keybind = alt+s>6=goto_tab:6 + keybind = alt+s>7=goto_tab:7 + keybind = alt+s>8=goto_tab:8 + keybind = alt+s>9=goto_tab:9 + + # split + keybind = alt+s>\=new_split:right + keybind = alt+s>-=new_split:down + + keybind = alt+s>j=goto_split:bottom + keybind = alt+s>k=goto_split:top + keybind = alt+s>h=goto_split:left + keybind = alt+s>l=goto_split:right + + keybind = alt+s>z=toggle_split_zoom + + keybind = alt+s>e=equalize_splits + + # other + #copy-on-select = clipboard + + font-size = 12 + #font-family = JetBrainsMono Nerd Font Mono + #font-family-bold = JetBrainsMono NFM Bold + #font-family-bold-italic = JetBrainsMono NFM Bold Italic + #font-family-italic = JetBrainsMono NFM Italic + + font-family = BerkeleyMono Nerd Font + #font-family = Iosevka Nerd Font + # font-family = SFMono Nerd Font + + title = "GhosTTY" + + wait-after-command = false + shell-integration = detect + window-save-state = always + gtk-single-instance = true + unfocused-split-opacity = 0.5 + quick-terminal-position = center + shell-integration-features = cursor,sudo + ''; +} diff --git a/modules/home/git.nix b/modules/home/git.nix new file mode 100644 index 0000000..3985641 --- /dev/null +++ b/modules/home/git.nix @@ -0,0 +1,31 @@ +{ host, ... }: +let + inherit (import ../../hosts/${host}/variables.nix) gitUsername gitEmail; +in +{ + programs.git = { + enable = true; + settings = { + user = { + name = gitUsername; + email = gitEmail; + }; + push.default = "simple"; + credential.helper = "cache --timeout=7200"; + init.defaultBranch = "main"; + log.decorate = "full"; + log.date = "iso"; + merge.conflictStyle = "diff3"; + alias = { + br = "branch --sort=-committerdate"; + co = "checkout"; + df = "diff"; + com = "commit -a"; + gs = "stash"; + gp = "pull"; + lg = "log --graph --pretty=format:'%Cred%h%Creset - %C(yellow)%d%Creset %s %C(green)(%cr)%C(bold blue) <%an>%Creset' --abbrev-commit"; + st = "status"; + }; + }; + }; +} diff --git a/modules/home/gtk.nix b/modules/home/gtk.nix new file mode 100644 index 0000000..f433efa --- /dev/null +++ b/modules/home/gtk.nix @@ -0,0 +1,16 @@ +{ pkgs, ... }: + +{ + gtk = { + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + }; +} diff --git a/modules/home/htop.nix b/modules/home/htop.nix new file mode 100644 index 0000000..263697b --- /dev/null +++ b/modules/home/htop.nix @@ -0,0 +1,42 @@ +{ config, ... }: { + programs.htop = { + enable = true; + settings = + { + color_scheme = 6; + cpu_count_from_one = 0; + delay = 15; + fields = with config.lib.htop.fields; [ + PID + USER + PRIORITY + NICE + M_SIZE + M_RESIDENT + M_SHARE + STATE + PERCENT_CPU + PERCENT_MEM + TIME + COMM + ]; + highlight_base_name = 1; + highlight_megabytes = 1; + highlight_threads = 1; + } + // (with config.lib.htop; + leftMeters [ + (bar "AllCPUs2") + (bar "Memory") + (bar "Swap") + (text "Zram") + ]) + // (with config.lib.htop; + rightMeters [ + (text "Tasks") + (text "LoadAverage") + (text "Uptime") + (text "Systemd") + ]); + }; +} diff --git a/modules/home/kitty.nix b/modules/home/kitty.nix new file mode 100644 index 0000000..69a4490 --- /dev/null +++ b/modules/home/kitty.nix @@ -0,0 +1,75 @@ +{ pkgs, ... }: { + programs.kitty = { + enable = true; + package = pkgs.kitty; + settings = { + font_size = 12; + wheel_scroll_min_lines = 1; + window_padding_width = 4; + confirm_os_window_close = 0; + scrollback_lines = 10000; + enable_audio_bell = false; + mouse_hide_wait = 60; + cursor_trail = 1; + tab_fade = 1; + active_tab_font_style = "bold"; + inactive_tab_font_style = "bold"; + tab_bar_edge = "top"; + tab_bar_margin_width = 0; + tab_bar_style = "powerline"; + #tab_bar_style = "fade"; + enabled_layouts = "splits"; + }; + extraConfig = '' + + # Clipboard + map ctrl+shift+v paste_from_selection + map shift+insert paste_from_selection + + # Scrolling + map ctrl+shift+up scroll_line_up + map ctrl+shift+down scroll_line_down + map ctrl+shift+k scroll_line_up + map ctrl+shift+j scroll_line_down + map ctrl+shift+page_up scroll_page_up + map ctrl+shift+page_down scroll_page_down + map ctrl+shift+home scroll_home + map ctrl+shift+end scroll_end + map ctrl+shift+h show_scrollback + + # Window management + map alt+n new_window_with_cwd #open in current dir + #map alt+n new_os_window #opens term in $HOME + map alt+w close_window + map ctrl+shift+enter launch --location=hsplit + map ctrl+shift+s launch --location=vsplit + map ctrl+shift+] next_window + map ctrl+shift+[ previous_window + map ctrl+shift+f move_window_forward + map ctrl+shift+b move_window_backward + map ctrl+shift+` move_window_to_top + map ctrl+shift+1 first_window + map ctrl+shift+2 second_window + map ctrl+shift+3 third_window + map ctrl+shift+4 fourth_window + map ctrl+shift+5 fifth_window + map ctrl+shift+6 sixth_window + map ctrl+shift+7 seventh_window + map ctrl+shift+8 eighth_window + map ctrl+shift+9 ninth_window # Tab management + map ctrl+shift+0 tenth_window + map ctrl+shift+right next_tab + map ctrl+shift+left previous_tab + map ctrl+shift+t new_tab + map ctrl+shift+q close_tab + map ctrl+shift+l next_layout + map ctrl+shift+. move_tab_forward + map ctrl+shift+, move_tab_backward + + # Miscellaneous + map ctrl+shift+up increase_font_size + map ctrl+shift+down decrease_font_size + map ctrl+shift+backspace restore_font_size + ''; + }; +} diff --git a/modules/home/lazygit.nix b/modules/home/lazygit.nix new file mode 100644 index 0000000..298c74d --- /dev/null +++ b/modules/home/lazygit.nix @@ -0,0 +1,32 @@ +# Lazygit is a simple terminal UI for git commands. +{ config, lib, ... }: +let + accent = "#${config.lib.stylix.colors.base0D}"; + muted = "#${config.lib.stylix.colors.base03}"; +in +{ + programs.lazygit = { + enable = true; + settings = lib.mkForce { + disableStartupPopups = true; + notARepository = "skip"; + promptToReturnFromSubprocess = false; + update.method = "never"; + git = { + commit.signOff = true; + parseEmoji = true; + }; + gui = { + theme = { + activeBorderColor = [ accent "bold" ]; + inactiveBorderColor = [ muted ]; + }; + showListFooter = false; + showRandomTip = false; + showCommandLog = false; + showBottomLine = false; + nerdFontsVersion = "3"; + }; + }; + }; +} diff --git a/modules/home/niri/binds.nix b/modules/home/niri/binds.nix new file mode 100644 index 0000000..6d33ea9 --- /dev/null +++ b/modules/home/niri/binds.nix @@ -0,0 +1,193 @@ +{ + host, + config, + lib, + ... +}: let + inherit (import ../../../hosts/${host}/variables.nix) browser terminal; +in { + programs.niri.settings = { + binds = with config.lib.niri.actions; { + # Terminal & application launcher + "Mod+Return".action.spawn = "${terminal}"; + "Mod+D".action.spawn = "fuzzel"; + "Mod+R".action.spawn = "rofi-launcher"; + + # Window management + "Mod+Q".action = close-window; + "Mod+F".action = fullscreen-window; + "Mod+Shift+F".action = maximize-column; + "Mod+Shift+Space".action = toggle-window-floating; + "Mod+Space".action = switch-focus-between-floating-and-tiling; + + # Session control + "Mod+Shift+E".action.quit = {skip-confirmation = false;}; + "Mod+Shift+Q".action.quit = {skip-confirmation = true;}; + "Mod+L" = { + action.spawn = ["swaylock"]; + allow-when-locked = true; + }; + + # Focus windows + "Mod+Left".action = focus-column-left; + "Mod+Right".action = focus-column-right; + "Mod+Up".action = focus-window-up; + "Mod+Down".action = focus-window-down; + "Mod+Home".action = focus-column-first; + "Mod+End".action = focus-column-last; + + # Focus monitors + "Mod+Shift+Left".action = focus-monitor-left; + "Mod+Shift+Right".action = focus-monitor-right; + "Mod+Shift+Up".action = focus-monitor-up; + "Mod+Shift+Down".action = focus-monitor-down; + + # Move windows within workspace + "Mod+Ctrl+Left".action = move-column-left; + "Mod+Ctrl+Right".action = move-column-right; + "Mod+Ctrl+Up".action = move-window-up; + "Mod+Ctrl+Down".action = move-window-down; + "Mod+Ctrl+W".action = toggle-column-tabbed-display; + "Mod+Ctrl+Home".action = move-column-to-first; + "Mod+Ctrl+End".action = move-column-to-last; + + # Move windows to monitors + "Mod+Shift+Ctrl+Left".action = move-column-to-monitor-left; + "Mod+Shift+Ctrl+Right".action = move-column-to-monitor-right; + "Mod+Shift+Ctrl+Up".action = move-column-to-monitor-up; + "Mod+Shift+Ctrl+Down".action = move-column-to-monitor-down; + + # Workspaces + "Mod+1".action = {focus-workspace = 1;}; + "Mod+2".action = {focus-workspace = 2;}; + "Mod+3".action = {focus-workspace = 3;}; + "Mod+4".action = {focus-workspace = 4;}; + "Mod+5".action = {focus-workspace = 5;}; + "Mod+6".action = {focus-workspace = 6;}; + "Mod+7".action = {focus-workspace = 7;}; + "Mod+8".action = {focus-workspace = 8;}; + "Mod+9".action = {focus-workspace = 9;}; + + "Mod+Page_Down".action = focus-workspace-down; + "Mod+Page_Up".action = focus-workspace-up; + + "Mod+Shift+1".action = {move-window-to-workspace = 1;}; + "Mod+Shift+2".action = {move-window-to-workspace = 2;}; + "Mod+Shift+3".action = {move-window-to-workspace = 3;}; + "Mod+Shift+4".action = {move-window-to-workspace = 4;}; + "Mod+Shift+5".action = {move-window-to-workspace = 5;}; + "Mod+Shift+6".action = {move-window-to-workspace = 6;}; + "Mod+Shift+7".action = {move-window-to-workspace = 7;}; + "Mod+Shift+8".action = {move-window-to-workspace = 8;}; + "Mod+Shift+9".action = {move-window-to-workspace = 9;}; + + "Mod+Shift+Page_Down".action = move-window-to-workspace-down; + "Mod+Shift+Page_Up".action = move-window-to-workspace-up; + + "Mod+Ctrl+1".action = {move-column-to-workspace = 1;}; + "Mod+Ctrl+2".action = {move-column-to-workspace = 2;}; + "Mod+Ctrl+3".action = {move-column-to-workspace = 3;}; + "Mod+Ctrl+4".action = {move-column-to-workspace = 4;}; + "Mod+Ctrl+5".action = {move-column-to-workspace = 5;}; + "Mod+Ctrl+6".action = {move-column-to-workspace = 6;}; + "Mod+Ctrl+7".action = {move-column-to-workspace = 7;}; + "Mod+Ctrl+8".action = {move-column-to-workspace = 8;}; + "Mod+Ctrl+9".action = {move-column-to-workspace = 9;}; + + "Mod+Ctrl+Page_Down".action = move-column-to-workspace-down; + "Mod+Ctrl+Page_Up".action = move-column-to-workspace-up; + + # Layout & Sizing + "Mod+Plus".action = {set-column-width = "+10%";}; + "Mod+Shift+Plus".action = {set-column-width = "+10";}; + "Mod+odiaeresis".action = {set-column-width = "-10%";}; + "Mod+Shift+odiaeresis".action = {set-column-width = "-10";}; + + "Mod+Ctrl+Plus".action = {set-window-height = "+10%";}; + "Mod+Ctrl+Shift+Plus".action = {set-window-height = "+10";}; + "Mod+Ctrl+odiaeresis".action = {set-window-height = "-10%";}; + "Mod+Ctrl+Shift+odiaeresis".action = {set-window-height = "-10";}; + + "Mod+Shift+R".action = reset-window-height; + "Mod+comma".action = switch-preset-column-width; + "Mod+period".action = switch-preset-window-height; + "Mod+M".action = maximize-column; + "Mod+C".action = center-column; + + # Overview mode + "Mod+Tab".action = toggle-overview; + "Mod+numbersign".action = show-hotkey-overlay; + + # Screenshots + "Print".action.screenshot = {}; + "Ctrl+Print".action.screenshot-screen = {}; + "Alt+Print".action.screenshot-window = {}; + + # Media keys + "XF86AudioRaiseVolume" = { + action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"]; + allow-when-locked = true; + }; + "XF86AudioLowerVolume" = { + action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"]; + allow-when-locked = true; + }; + "XF86AudioMute" = { + action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"]; + allow-when-locked = true; + }; + "XF86AudioMicMute" = { + action.spawn = ["wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"]; + allow-when-locked = true; + }; + + # Brightness + "XF86MonBrightnessUp" = { + action.spawn = ["brightnessctl" "set" "10%+"]; + allow-when-locked = true; + }; + "XF86MonBrightnessDown" = { + action.spawn = ["brightnessctl" "set" "10%-"]; + allow-when-locked = true; + }; + + # Scroll bindings + "Mod+WheelScrollDown" = { + action = focus-workspace-down; + cooldown-ms = 150; + }; + "Mod+WheelScrollUp" = { + action = focus-workspace-up; + cooldown-ms = 150; + }; + "Mod+WheelScrollRight".action = focus-column-right; + "Mod+WheelScrollLeft".action = focus-column-left; + "Mod+TouchpadScrollDown" = { + action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"]; + cooldown-ms = 150; + }; + "Mod+TouchpadScrollUp" = { + action.spawn = ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"]; + cooldown-ms = 150; + }; + + # Custom applications + "Mod+W".action.spawn = "${browser}"; + "Mod+E".action.spawn = "thunar"; + "Mod+Ctrl+Escape".action.spawn = "btop"; + + # Advanced + "Mod+H".action = consume-window-into-column; + "Mod+K".action = expel-window-from-column; + "Mod+Ctrl+H".action = consume-or-expel-window-left; + "Mod+Ctrl+L".action = consume-or-expel-window-right; + "Mod+Shift+T".action = do-screen-transition; + "Mod+O".action = toggle-window-rule-opacity; + "Mod+Shift+Ctrl+T".action = toggle-debug-tint; + "Mod+Escape" = { + action = toggle-keyboard-shortcuts-inhibit; + allow-inhibiting = false; + }; + }; + }; +} diff --git a/modules/home/niri/default.nix b/modules/home/niri/default.nix new file mode 100644 index 0000000..0adeb6c --- /dev/null +++ b/modules/home/niri/default.nix @@ -0,0 +1,8 @@ +{ host, ... }: +{ + imports = [ + ./niri.nix + ./binds.nix + ./windowrules.nix + ]; +} diff --git a/modules/home/niri/niri.nix b/modules/home/niri/niri.nix new file mode 100644 index 0000000..942fc18 --- /dev/null +++ b/modules/home/niri/niri.nix @@ -0,0 +1,117 @@ +{ host, config, pkgs, inputs, ... }: +let + vars = import ../../../hosts/${host}/variables.nix; + extraMonitorSettings = vars.extraMonitorSettings; + keyboardLayout = vars.keyboardLayout or "us"; + keyboardVariant = vars.keyboardVariant or ""; + stylixImage = vars.stylixImage; +in +{ + home.packages = with pkgs; [ + swww + grim + slurp + wl-clipboard + swappy + xwayland-satellite + ]; + + home.file = { + "Pictures/Wallpapers" = { + source = ../../../wallpapers; + recursive = true; + }; + ".face.icon".source = ../face.jpg; + ".config/face.jpg".source = ../face.jpg; + }; + + programs.niri = { + settings = { + input = { + keyboard = { + xkb = { + layout = "${keyboardLayout}"; + variant = "${keyboardVariant}"; + options = "grp:alt_caps_toggle,caps:super"; + }; + repeat-delay = 300; + repeat-rate = 50; + }; + + touchpad = { + tap = true; + natural-scroll = true; + dwt = true; + scroll-factor = 0.8; + }; + + mouse = { + accel-speed = 0.0; + }; + }; + + layout = { + gaps = 8; + center-focused-column = "never"; + + border = { + enable = true; + width = 2; + active = { + color = "#${config.lib.stylix.colors.base08}"; + }; + inactive = { + color = "#${config.lib.stylix.colors.base01}"; + }; + }; + + focus-ring = { + enable = false; + }; + }; + + spawn-at-startup = [ + { command = [ "xwayland-satellite" ":1" ]; } + { command = [ "swww-daemon" ]; } + { command = [ "waybar" ]; } + { command = [ "swaync" ]; } + { command = [ "swww" "img" "${stylixImage}" ]; } + { command = [ "swayidle" "-w" "before-sleep" "swaylock" ]; } + ]; + + prefer-no-csd = true; + + screenshot-path = "~/Pictures/Screenshots/Screenshot-%Y-%m-%d-%H-%M-%S.png"; + + environment = { + DISPLAY = ":1"; + NIXOS_OZONE_WL = "1"; + MOZ_ENABLE_WAYLAND = "1"; + MOZ_WEBRENDER = "1"; + XDG_SESSION_TYPE = "wayland"; + WLR_NO_HARDWARE_CURSORS = "1"; + QT_QPA_PLATFORM = "wayland"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + GDK_BACKEND = "wayland,x11"; + CLUTTER_BACKEND = "wayland"; + }; + }; + }; + + systemd.user.targets.niri-shutdown = { + Unit = { + Description = "Shutdown running niri user services"; + DefaultDependencies = "no"; + StopWhenUnneeded = true; + + Conflicts = [ + "graphical-session.target" + "graphical-session-pre.target" + ]; + After = [ + "graphical-session.target" + "graphical-session-pre.target" + ]; + }; + }; +} diff --git a/modules/home/niri/windowrules.nix b/modules/home/niri/windowrules.nix new file mode 100644 index 0000000..3317c45 --- /dev/null +++ b/modules/home/niri/windowrules.nix @@ -0,0 +1,55 @@ +{ ... }: +{ + programs.niri.settings = { + window-rules = [ + { + matches = [ + { app-id = "^org.kde.polkit-kde-authentication-agent-1$"; } + ]; + open-floating = true; + } + { + matches = [ + { app-id = "^pavucontrol$"; } + ]; + open-floating = true; + } + { + matches = [ + { app-id = "^blueman-manager$"; } + ]; + open-floating = true; + } + { + matches = [ + { app-id = "^nm-connection-editor$"; } + ]; + open-floating = true; + } + { + matches = [ + { title = "^Picture-in-Picture$"; } + ]; + open-floating = true; + } + { + matches = [ + { app-id = "^thunar$"; title = "^File Operation Progress$"; } + ]; + open-floating = true; + } + { + matches = [ + { app-id = "^firefox$"; title = "^Picture-in-Picture$"; } + ]; + open-floating = true; + } + { + matches = [ + { app-id = "^rofi$"; } + ]; + open-floating = true; + } + ]; + }; +} diff --git a/modules/home/nvf.nix b/modules/home/nvf.nix new file mode 100644 index 0000000..1f735a8 --- /dev/null +++ b/modules/home/nvf.nix @@ -0,0 +1,268 @@ +{ inputs +, config +, ... +}: { + imports = [ inputs.nvf.homeManagerModules.default ]; + + programs.nvf = { + enable = true; + + settings.vim = { + lsp.enable = true; + vimAlias = true; + viAlias = true; + withNodeJs = true; + lineNumberMode = "relNumber"; + enableLuaLoader = true; + preventJunkFiles = true; + options = { + tabstop = 4; + shiftwidth = 2; + wrap = false; + }; + + clipboard = { + enable = true; + registers = "unnamedplus"; + providers = { + wl-copy.enable = true; + xsel.enable = true; + }; + }; + + maps = { + normal = { + "e" = { + action = "Neotree toggle"; + silent = false; + }; + }; + }; + + diagnostics = { + enable = true; + config = { + virtual_lines.enable = true; + underline = true; + }; + }; + + keymaps = [ + { + key = "jk"; + mode = [ "i" ]; + action = ""; + desc = "Exit insert mode"; + } + { + key = "nh"; + mode = [ "n" ]; + action = ":nohl"; + desc = "Clear search highlights"; + } + { + key = "ff"; + mode = [ "n" ]; + action = "Telescope find_files"; + desc = "Search files by name"; + } + { + key = "lg"; + mode = [ "n" ]; + action = "Telescope live_grep"; + desc = "Search files by contents"; + } + { + key = "fe"; + mode = [ "n" ]; + action = "Neotree toggle"; + desc = "File browser toggle"; + } + { + key = ""; + mode = [ "i" ]; + action = ""; + desc = "Move left in insert mode"; + } + { + key = ""; + mode = [ "i" ]; + action = ""; + desc = "Move down in insert mode"; + } + { + key = ""; + mode = [ "i" ]; + action = ""; + desc = "Move up in insert mode"; + } + { + key = ""; + mode = [ "i" ]; + action = ""; + desc = "Move right in insert mode"; + } + ]; + + telescope.enable = true; + + spellcheck = { + enable = true; + languages = [ "en" ]; + programmingWordlist.enable = true; + }; + + lsp = { + formatOnSave = true; + lspkind.enable = false; + lightbulb.enable = false; + lspsaga.enable = false; + trouble.enable = true; + lspSignature.enable = true; + otter-nvim.enable = false; + nvim-docs-view.enable = false; + }; + + languages = { + enableFormat = true; + enableTreesitter = true; + enableExtraDiagnostics = true; + nix.enable = true; + clang.enable = true; + zig.enable = true; + python.enable = true; + markdown.enable = true; + ts = { + enable = true; + lsp.enable = true; + format.type = ["prettierd"]; + extensions.ts-error-translator.enable = true; + }; + html.enable = true; + lua.enable = true; + css = { + enable = true; + format.type = ["prettierd"]; + }; + typst.enable = true; + rust = { + enable = true; + extensions.crates-nvim.enable = true; + }; + }; + visuals = { + nvim-web-devicons.enable = true; + nvim-cursorline.enable = true; + cinnamon-nvim.enable = true; + fidget-nvim.enable = true; + highlight-undo.enable = true; + indent-blankline.enable = true; + rainbow-delimiters.enable = true; + }; + + statusline.lualine = { + enable = true; + theme = "base16"; + }; + + autopairs.nvim-autopairs.enable = true; + autocomplete.nvim-cmp.enable = true; + snippets.luasnip.enable = true; + tabline.nvimBufferline.enable = true; + treesitter.context.enable = false; + binds = { + whichKey.enable = true; + cheatsheet.enable = true; + }; + git = { + enable = true; + gitsigns.enable = true; + gitsigns.codeActions.enable = false; + }; + projects.project-nvim.enable = true; + dashboard.dashboard-nvim.enable = true; + filetree.neo-tree.enable = true; + notify = { + nvim-notify.enable = true; + nvim-notify.setupOpts.background_colour = "#${config.lib.stylix.colors.base01}"; + }; + utility = { + preview.markdownPreview.enable = true; + ccc.enable = false; + vim-wakatime.enable = false; + icon-picker.enable = true; + surround.enable = true; + diffview-nvim.enable = true; + motion = { + hop.enable = true; + leap.enable = true; + precognition.enable = false; + }; + images = { + image-nvim.enable = false; + }; + }; + ui = { + borders.enable = true; + noice.enable = true; + colorizer.enable = true; + illuminate.enable = true; + breadcrumbs = { + enable = false; + navbuddy.enable = false; + }; + smartcolumn = { + enable = true; + }; + fastaction.enable = true; + }; + + session = { + nvim-session-manager.enable = false; + }; + comments = { + comment-nvim.enable = true; + }; + + luaConfigPost = '' + -- Nix LSP (nil) configuration for auto-eval-inputs + local lspconfig = require('lspconfig') + lspconfig.nil_ls.setup({ + settings = { + ['nil'] = { + nix = { + auto_eval_inputs = true, + }, + }, + }, + }) + + -- Auto-update programming wordlist on first startup + vim.api.nvim_create_autocmd("VimEnter", { + callback = function() + -- Check if dirtytalk dict file exists + local dict_path = vim.fn.stdpath('data') .. '/site/spell/programming.utf-8.add' + if vim.fn.filereadable(dict_path) == 0 then + -- Only run if file doesn't exist to avoid repeated downloads + vim.schedule(function() + vim.cmd('DirtytalkUpdate') + end) + end + end, + }) + ''; + }; + }; + + home.activation = { + dirtytalkUpdate = '' + # Create the spell directory if it doesn't exist + mkdir -p "$HOME/.local/share/nvim/site/spell" + + # Try to run DirtytalkUpdate in headless mode with better error handling + if ! ${config.programs.nvf.finalPackage}/bin/nvim --headless -c "DirtytalkUpdate" -c "qa!" 2>/dev/null; then + echo "Note: DirtytalkUpdate will run automatically on first Neovim startup" + fi + ''; + }; +} diff --git a/modules/home/qt.nix b/modules/home/qt.nix new file mode 100644 index 0000000..b8df345 --- /dev/null +++ b/modules/home/qt.nix @@ -0,0 +1,6 @@ +{ lib, ... }: { + qt = { + enable = true; + platformTheme.name = lib.mkForce "qtct"; + }; +} diff --git a/modules/home/rofi/config-long.nix b/modules/home/rofi/config-long.nix new file mode 100644 index 0000000..e8e9773 --- /dev/null +++ b/modules/home/rofi/config-long.nix @@ -0,0 +1,49 @@ +{ ... }: { + home.file.".config/rofi/config-long.rasi".text = '' + @import "~/.config/rofi/config.rasi" + window { + width: 750px; + border-radius: 20px; + } + mainbox { + orientation: vertical; + children: [ "inputbar", "listbox" ]; + } + inputbar { + padding: 75px 40px; + background-color: transparent; + background-image: url("~/Pictures/Wallpapers/Rainnight.jpg", width); + text-color: @foreground; + children: [ "textbox-prompt-colon", "entry" ]; + } + textbox-prompt-colon { + padding: 12px 20px; + border-radius: 100%; + background-color: @bg-alt; + text-color: @foreground; + } + entry { + expand: true; + padding: 12px 16px; + border-radius: 100%; + background-color: @bg-alt; + text-color: @foreground; + } + button { + padding: 12px; + border-radius: 100%; + } + element { + spacing: 10px; + padding: 12px; + border-radius: 100%; + } + textbox { + padding: 12px; + border-radius: 100%; + } + error-message { + border-radius: 0px; + } + ''; +} diff --git a/modules/home/rofi/default.nix b/modules/home/rofi/default.nix new file mode 100644 index 0000000..1b6ae5f --- /dev/null +++ b/modules/home/rofi/default.nix @@ -0,0 +1,6 @@ +{ ... }: { + imports = [ + ./config-long.nix + ./rofi.nix + ]; +} diff --git a/modules/home/rofi/rofi.nix b/modules/home/rofi/rofi.nix new file mode 100644 index 0000000..71deb21 --- /dev/null +++ b/modules/home/rofi/rofi.nix @@ -0,0 +1,208 @@ +{ pkgs +, config +, ... +}: { + programs = { + rofi = { + enable = true; + package = pkgs.rofi; + extraConfig = { + modi = "drun,filebrowser,run"; + show-icons = true; + icon-theme = "Papirus"; + font = "JetBrainsMono Nerd Font Mono 12"; + drun-display-format = "{icon} {name}"; + display-drun = " Apps"; + display-run = " Run"; + display-filebrowser = " File"; + }; + theme = + let + inherit (config.lib.formats.rasi) mkLiteral; + in + { + "*" = { + bg = mkLiteral "#${config.stylix.base16Scheme.base00}"; + bg-alt = mkLiteral "#${config.stylix.base16Scheme.base09}"; + foreground = mkLiteral "#${config.stylix.base16Scheme.base01}"; + selected = mkLiteral "#${config.stylix.base16Scheme.base08}"; + active = mkLiteral "#${config.stylix.base16Scheme.base0B}"; + text-selected = mkLiteral "#${config.stylix.base16Scheme.base00}"; + text-color = mkLiteral "#${config.stylix.base16Scheme.base05}"; + border-color = mkLiteral "#${config.stylix.base16Scheme.base0F}"; + urgent = mkLiteral "#${config.stylix.base16Scheme.base0E}"; + }; + "window" = { + transparency = "real"; + width = mkLiteral "1000px"; + location = mkLiteral "center"; + anchor = mkLiteral "center"; + fullscreen = false; + x-offset = mkLiteral "0px"; + y-offset = mkLiteral "0px"; + cursor = "default"; + enabled = true; + border-radius = mkLiteral "15px"; + background-color = mkLiteral "@bg"; + }; + "mainbox" = { + enabled = true; + spacing = mkLiteral "0px"; + orientation = mkLiteral "horizontal"; + children = map mkLiteral [ + "imagebox" + "listbox" + ]; + background-color = mkLiteral "transparent"; + }; + "imagebox" = { + padding = mkLiteral "20px"; + background-color = mkLiteral "transparent"; + background-image = mkLiteral ''url("~/Pictures/Wallpapers/Rainnight.jpg", height)''; + orientation = mkLiteral "vertical"; + children = map mkLiteral [ + "inputbar" + "dummy" + "mode-switcher" + ]; + }; + "listbox" = { + spacing = mkLiteral "20px"; + padding = mkLiteral "20px"; + background-color = mkLiteral "transparent"; + orientation = mkLiteral "vertical"; + children = map mkLiteral [ + "message" + "listview" + ]; + }; + "dummy" = { + background-color = mkLiteral "transparent"; + }; + "inputbar" = { + enabled = true; + spacing = mkLiteral "10px"; + padding = mkLiteral "10px"; + border-radius = mkLiteral "10px"; + background-color = mkLiteral "@bg-alt"; + text-color = mkLiteral "@foreground"; + children = map mkLiteral [ + "textbox-prompt-colon" + "entry" + ]; + }; + "textbox-prompt-colon" = { + enabled = true; + expand = false; + str = ""; + background-color = mkLiteral "inherit"; + text-color = mkLiteral "inherit"; + }; + "entry" = { + enabled = true; + background-color = mkLiteral "inherit"; + text-color = mkLiteral "inherit"; + cursor = mkLiteral "text"; + placeholder = "Search"; + placeholder-color = mkLiteral "inherit"; + }; + "mode-switcher" = { + enabled = true; + spacing = mkLiteral "20px"; + background-color = mkLiteral "transparent"; + text-color = mkLiteral "@foreground"; + }; + "button" = { + padding = mkLiteral "15px"; + border-radius = mkLiteral "10px"; + background-color = mkLiteral "@bg-alt"; + text-color = mkLiteral "inherit"; + cursor = mkLiteral "pointer"; + }; + "button selected" = { + background-color = mkLiteral "@selected"; + text-color = mkLiteral "@foreground"; + }; + "listview" = { + enabled = true; + columns = 1; + lines = 8; + cycle = true; + dynamic = true; + scrollbar = false; + layout = mkLiteral "vertical"; + reverse = false; + fixed-height = true; + fixed-columns = true; + spacing = mkLiteral "10px"; + background-color = mkLiteral "transparent"; + text-color = mkLiteral "@foreground"; + cursor = "default"; + }; + "element" = { + enabled = true; + spacing = mkLiteral "15px"; + padding = mkLiteral "8px"; + border-radius = mkLiteral "10px"; + background-color = mkLiteral "transparent"; + text-color = mkLiteral "@text-color"; + cursor = mkLiteral "pointer"; + }; + "element normal.normal" = { + background-color = mkLiteral "inherit"; + text-color = mkLiteral "@text-color"; + }; + "element normal.urgent" = { + background-color = mkLiteral "@urgent"; + text-color = mkLiteral "@text-color"; + }; + "element normal.active" = { + background-color = mkLiteral "inherit"; + text-color = mkLiteral "@text-color"; + }; + "element selected.normal" = { + background-color = mkLiteral "@selected"; + text-color = mkLiteral "@foreground"; + }; + "element selected.urgent" = { + background-color = mkLiteral "@urgent"; + text-color = mkLiteral "@text-selected"; + }; + "element selected.active" = { + background-color = mkLiteral "@urgent"; + text-color = mkLiteral "@text-selected"; + }; + "element-icon" = { + background-color = mkLiteral "transparent"; + text-color = mkLiteral "inherit"; + size = mkLiteral "36px"; + cursor = mkLiteral "inherit"; + }; + "element-text" = { + background-color = mkLiteral "transparent"; + text-color = mkLiteral "inherit"; + cursor = mkLiteral "inherit"; + vertical-align = mkLiteral "0.5"; + horizontal-align = mkLiteral "0.0"; + }; + "message" = { + background-color = mkLiteral "transparent"; + }; + "textbox" = { + padding = mkLiteral "15px"; + border-radius = mkLiteral "10px"; + background-color = mkLiteral "@bg-alt"; + text-color = mkLiteral "@foreground"; + vertical-align = mkLiteral "0.5"; + horizontal-align = mkLiteral "0.0"; + }; + "error-message" = { + padding = mkLiteral "15px"; + border-radius = mkLiteral "20px"; + background-color = mkLiteral "@bg"; + text-color = mkLiteral "@foreground"; + }; + }; + }; + }; +} diff --git a/modules/home/scripts/default.nix b/modules/home/scripts/default.nix new file mode 100644 index 0000000..2feffc2 --- /dev/null +++ b/modules/home/scripts/default.nix @@ -0,0 +1,26 @@ +{ pkgs +, username +, profile +, ... +}: { + home.packages = [ + (import ./hm-find.nix { inherit pkgs; }) + (import ./note.nix { inherit pkgs; }) + (import ./note-from-clipboard.nix { inherit pkgs; }) + (import ./rofi-launcher.nix { inherit pkgs; }) + (import ./screenshootin.nix { inherit pkgs; }) + (import ./squirtle.nix { inherit pkgs; }) + (import ./task-waybar.nix { inherit pkgs; }) + (import ./wallsetter.nix { + inherit pkgs; + inherit username; + }) + (import ./web-search.nix { inherit pkgs; }) + (import ./saugcli.nix { + inherit pkgs profile; + backupFiles = [ + ".config/mimeapps.list.backup" + ]; + }) + ]; +} diff --git a/modules/home/scripts/hm-find.nix b/modules/home/scripts/hm-find.nix new file mode 100644 index 0000000..77771d5 --- /dev/null +++ b/modules/home/scripts/hm-find.nix @@ -0,0 +1,60 @@ +{ pkgs }: +pkgs.writeShellScriptBin "hm-find" '' + #!/usr/bin/env bash + + # Script Metadata + #=============================================== + # This script searches recent journalctl entries for Home Manager errors + # It identifies backup files that prevent rebuilds and allows removal. + # Author: Don Williams + # Creation Date: May 6th, 2025 + # Revision History: + #----------------------------------------------- + # 0.1 - 5/6/25 - Initial version + # 0.2 - 5/7/25 - Improved messaging, added log directory check + + # Display WARNING message + echo "===============================================" + echo " ⚠️ WARNING ⚠️ " + echo "===============================================" + echo "*** This script is experimental! ***" + echo "It will attempt to find old backup files that are preventing Home Manager from rebuilding." + echo "If conflicting files are found, you will be prompted to remove them." + echo "A log of any deletions will be stored in \$HOME/hm-logs." + echo "===============================================" + + # Define the time range (default: last 30 minutes) + TIME_RANGE="30m" + LOG_DIR="$HOME/hm-logs" + LOG_FILE="$LOG_DIR/hm-cleanup-$(date +'%Y-%m-%d_%H-%M-%S').log" + + # Ensure the log directory exists + if [ ! -d "$LOG_DIR" ]; then + echo "Creating log directory: $LOG_DIR" + mkdir -p "$LOG_DIR" + fi + + # Search journal logs for backup conflicts and extract file paths + FILES=$(journalctl --since "-$TIME_RANGE" -xe | grep hm-activate | awk -F "'|'" '/would be clobbered by backing up/ {print $2}') + + # Check if any files were found + if [ -z "$FILES" ]; then + echo "No conflicting backup files found in the last $TIME_RANGE." + exit 0 + fi + + # Display found backup files + echo "🚨 The following backup files are preventing Home Manager from rebuilding:" + echo "$FILES" | tr ' ' '\n' + + # Ask for user confirmation before deletion + read -p "❓ Do you want to remove these files? (y/N): " confirm + + if [[ "$confirm" == "y" || "$confirm" == "Y" ]]; then + echo "🗑️ Deleting files..." | tee -a "$LOG_FILE" + echo "$FILES" | xargs rm -v | tee -a "$LOG_FILE" + echo "✅ Cleanup completed at $(date)" | tee -a "$LOG_FILE" + else + echo "⛔ No files were removed." | tee -a "$LOG_FILE" + fi +'' diff --git a/modules/home/scripts/note-from-clipboard.nix b/modules/home/scripts/note-from-clipboard.nix new file mode 100644 index 0000000..3c4546e --- /dev/null +++ b/modules/home/scripts/note-from-clipboard.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: +pkgs.writeShellScriptBin "note-from-clipboard" '' + #!/usr/bin/env bash + + # Check clipboard content type + clipboard_type=$(${pkgs.wl-clipboard}/bin/wl-paste --list-types | head -n 1) + + if [[ "$clipboard_type" == "text/plain"* ]]; then + # It's text, let's create a note + ${pkgs.wl-clipboard}/bin/wl-paste | note + if [ $? -eq 0 ]; then + ${pkgs.libnotify}/bin/notify-send -t 3000 "📝 Note Created" "Clipboard content added as a new note." + else + ${pkgs.libnotify}/bin/notify-send -t 5000 -u critical "❌ Note Creation Failed" "There was an error creating the note." + fi + else + # It's not text, so we do nothing and notify the user + ${pkgs.libnotify}/bin/notify-send -t 4000 -u low "📋 Note Skipped" "Clipboard does not contain text." + fi +'' diff --git a/modules/home/scripts/note.nix b/modules/home/scripts/note.nix new file mode 100644 index 0000000..3554cb1 --- /dev/null +++ b/modules/home/scripts/note.nix @@ -0,0 +1,244 @@ +{ pkgs, ... }: +pkgs.writeShellScriptBin "note" '' + + # Colors for nice output + RED='\033[0;31m' + GREEN='\033[0;32m' + YELLOW='\033[0;33m' + BLUE='\033[0;34m' + MAGENTA='\033[0;35m' + CYAN='\033[0;36m' + WHITE='\033[1;37m' + GRAY='\033[0;37m' + BOLD='\033[1m' + NC='\033[0m' # No Color + + # XDG-compliant notes directory and file + NOTES_DIR="$HOME/.local/share/notes" + NOTES_FILE="$NOTES_DIR/notes.txt" + + # Create notes directory if it doesn't exist + mkdir -p "$NOTES_DIR" + + # Function to display usage + show_usage() { + echo -e "''${BOLD}''${BLUE}📝 Note Manager''${NC}" + echo -e "''${GRAY}Usage:''${NC}" + echo -e " ''${CYAN}note''${NC} ''${YELLOW}''${NC} - Add a new note" + echo -e " ''${CYAN}note''${NC} - Display all notes" + echo -e " ''${CYAN}note del''${NC} ''${YELLOW}''${NC} - Delete note by number" + echo -e " ''${CYAN}note clear''${NC} - Clear all notes" + echo -e " ''${CYAN}echo 'text' | note''${NC} - Add note from stdin" + echo -e " ''${CYAN}cat file | note''${NC} - Add file contents as note" + echo "" + echo -e "''${GRAY}Examples:''${NC}" + echo -e " ''${GREEN}note call plumber tomorrow''${NC}" + echo -e " ''${GREEN}cat todo.txt | note''${NC}" + echo -e " ''${GREEN}note del 3''${NC}" + } + + # Function to add a note + add_note() { + local note_text="$1" + local timestamp=$(date '+%Y-%m-%d %H:%M:%S') + local date_only=$(date '+%Y-%m-%d') + + # Create notes file if it doesn't exist + touch "$NOTES_FILE" + + # Get next note number + local note_num=1 + if [ -f "$NOTES_FILE" ] && [ -s "$NOTES_FILE" ]; then + note_num=$(grep -E "^#[0-9]+" "$NOTES_FILE" | sed 's/^#\([0-9]*\).*/\1/' | sort -n | tail -1) + note_num=$((note_num + 1)) + fi + + # Add the note with proper formatting + { + echo "#$note_num [$timestamp]" + echo "$note_text" + echo "" + } >> "$NOTES_FILE" + + echo -e "''${GREEN}✓''${NC} Note #$note_num added ''${GRAY}($date_only)''${NC}" + } + + # Function to display all notes + display_notes() { + if [ ! -f "$NOTES_FILE" ] || [ ! -s "$NOTES_FILE" ]; then + echo -e "''${YELLOW}📝 No notes found''${NC}" + echo -e "''${GRAY}Use ''${CYAN}note ''${GRAY} to add your first note''${NC}" + return + fi + + echo -e "''${BOLD}''${BLUE}📝 Your Notes''${NC}" + echo -e "''${GRAY}📁 $NOTES_FILE''${NC}" + echo -e "''${GRAY}$(printf '%.0s─' {1..50})''${NC}" + + local in_note=false + local note_content="" + + while IFS= read -r line; do + # Check if line starts with # followed by numbers and space and [ + if echo "$line" | grep -q "^#[0-9][0-9]* \["; then + # Print previous note content if exists + if [ "$in_note" = true ] && [ -n "$note_content" ]; then + echo -e "$note_content" + echo "" + fi + + # Extract note number and timestamp + local num=$(echo "$line" | sed 's/^#\([0-9]*\) \[.*/\1/') + local timestamp=$(echo "$line" | sed 's/^#[0-9]* \[\(.*\)\]/\1/') + local date_part=$(echo "$timestamp" | cut -d' ' -f1) + local time_part=$(echo "$timestamp" | cut -d' ' -f2) + + echo -e "''${BOLD}''${CYAN}#$num''${NC} ''${GRAY}[$date_part ''${YELLOW}$time_part''${GRAY}]''${NC}" + in_note=true + note_content="" + elif [ -n "$line" ] && [ "$in_note" = true ]; then + # Accumulate note content + if [ -z "$note_content" ]; then + note_content="''${WHITE}$line''${NC}" + else + note_content="$note_content\n''${WHITE}$line''${NC}" + fi + elif [ -z "$line" ] && [ "$in_note" = true ]; then + # End of current note + if [ -n "$note_content" ]; then + echo -e "$note_content" + echo "" + fi + in_note=false + note_content="" + fi + done < "$NOTES_FILE" + + # Print last note if file doesn't end with empty line + if [ "$in_note" = true ] && [ -n "$note_content" ]; then + echo -e "$note_content" + echo "" + fi + + local total_notes=$(grep -c "^#[0-9]" "$NOTES_FILE") + echo -e "''${GRAY}$(printf '%.0s─' {1..50})''${NC}" + echo -e "''${GRAY}Total: ''${BOLD}$total_notes''${NC} ''${GRAY}notes''${NC}" + } + + # Function to delete a note + delete_note() { + local note_num="$1" + + if [ ! -f "$NOTES_FILE" ] || [ ! -s "$NOTES_FILE" ]; then + echo -e "''${RED}✗''${NC} No notes found" + return 1 + fi + + if ! echo "$note_num" | grep -q "^[0-9][0-9]*$"; then + echo -e "''${RED}✗''${NC} Invalid note number: $note_num" + return 1 + fi + + # Check if note exists + if ! grep -q "^#$note_num " "$NOTES_FILE"; then + echo -e "''${RED}✗''${NC} Note #$note_num not found" + return 1 + fi + + # Create temporary file without the specified note + local temp_file=$(mktemp) + local skip_lines=false + + while IFS= read -r line; do + if echo "$line" | grep -q "^#[0-9][0-9]* "; then + local current_num=$(echo "$line" | sed 's/^#\([0-9]*\) .*/\1/') + if [ "$current_num" = "$note_num" ]; then + skip_lines=true + continue + else + skip_lines=false + fi + fi + + if [ "$skip_lines" = false ]; then + echo "$line" >> "$temp_file" + elif [ -z "$line" ]; then + # Stop skipping when we hit an empty line (end of note) + skip_lines=false + fi + done < "$NOTES_FILE" + + mv "$temp_file" "$NOTES_FILE" + echo -e "''${GREEN}✓''${NC} Note #$note_num deleted" + } + + # Function to clear all notes + clear_notes() { + if [ ! -f "$NOTES_FILE" ] || [ ! -s "$NOTES_FILE" ]; then + echo -e "''${YELLOW}📝 No notes to clear''${NC}" + return + fi + + local total_notes=$(grep -c "^#[0-9]" "$NOTES_FILE") + echo -e "''${YELLOW}⚠''${NC} This will delete all $total_notes notes. Are you sure? ''${GRAY}[y/N]''${NC}" + read -r confirmation + + if echo "$confirmation" | grep -qi "^y"; then + > "$NOTES_FILE" + echo -e "''${GREEN}✓''${NC} All notes cleared" + else + echo -e "''${BLUE}ℹ''${NC} Operation cancelled" + fi + } + + # Main script logic + main() { + # Check if input is being piped + if [ ! -t 0 ]; then + # Read from stdin (pipe) + local piped_content="" + while IFS= read -r line; do + if [ -z "$piped_content" ]; then + piped_content="$line" + else + piped_content="$piped_content"$'\n'"$line" + fi + done + + if [ -n "$piped_content" ]; then + add_note "$piped_content" + else + echo -e "''${RED}✗''${NC} No input received from pipe" + exit 1 + fi + return + fi + + # Handle command line arguments + case "$1" in + "") + display_notes + ;; + "del") + if [ -z "$2" ]; then + echo -e "''${RED}✗''${NC} Please specify note number to delete" + echo -e "''${GRAY}Usage: ''${CYAN}note del ''${NC}" + exit 1 + fi + delete_note "$2" + ;; + "clear") + clear_notes + ;; + "help"|"--help"|"-h") + show_usage + ;; + *) + # Everything else is treated as note content + add_note "$*" + ;; + esac + } + + main "$@" +'' diff --git a/modules/home/scripts/rofi-launcher.nix b/modules/home/scripts/rofi-launcher.nix new file mode 100644 index 0000000..014802d --- /dev/null +++ b/modules/home/scripts/rofi-launcher.nix @@ -0,0 +1,8 @@ +{ pkgs }: +pkgs.writeShellScriptBin "rofi-launcher" '' + # check if rofi is already running + if pidof rofi > /dev/null; then + pkill rofi + fi + rofi -show drun +'' diff --git a/modules/home/scripts/saugcli.nix b/modules/home/scripts/saugcli.nix new file mode 100644 index 0000000..75a022b --- /dev/null +++ b/modules/home/scripts/saugcli.nix @@ -0,0 +1,438 @@ +{ pkgs +, profile +, backupFiles ? [ ".config/mimeapps.list.backup" ] +, ... +}: +let + backupFilesString = pkgs.lib.strings.concatStringsSep " " backupFiles; +in + +pkgs.writeShellScriptBin "saugcli" '' + #!${pkgs.bash}/bin/bash + set -euo pipefail + + # --- Configuration --- + PROJECT="zaneyos/SaugOS" + PROFILE="${profile}" + BACKUP_FILES_STR="${backupFilesString}" + VERSION="1.0.0" + FLAKE_NIX_PATH="$HOME/$PROJECT/flake.nix" + + read -r -a BACKUP_FILES <<< "$BACKUP_FILES_STR" + + # --- Helper Functions --- + verify_hostname() { + local current_hostname + local flake_hostname + + current_hostname="$(hostname)" + + if [ -f "$FLAKE_NIX_PATH" ]; then + flake_hostname=$(${pkgs.gnugrep}/bin/grep -E '^[[:space:]]*host[[:space:]]*=' "$FLAKE_NIX_PATH" | ${pkgs.gnused}/bin/sed 's/.*=[[:space:]]*"\([^"]*\)".*/\1/') + + if [ -z "$flake_hostname" ]; then + echo "Error: Could not find 'host' variable in $FLAKE_NIX_PATH" >&2 + exit 1 + fi + + if [ "$current_hostname" != "$flake_hostname" ]; then + echo "Error: Hostname mismatch!" >&2 + echo " Current hostname: '$current_hostname'" >&2 + echo " Flake.nix host: '$flake_hostname'" >&2 + echo "" >&2 + echo "Hint: Run 'saugcli update-host' to automatically update flake.nix" >&2 + echo " or manually edit $FLAKE_NIX_PATH" >&2 + exit 1 + fi + else + echo "Error: Flake.nix not found at $FLAKE_NIX_PATH" >&2 + exit 1 + fi + + local folder="$HOME/$PROJECT/hosts/$current_hostname" + if [ ! -d "$folder" ]; then + echo "Error: Matching host not found in $PROJECT, Missing folder: $folder" >&2 + exit 1 + fi + } + + print_help() { + echo "SaugOS CLI Utility -- version $VERSION" + echo "" + echo "Usage: saugcli [command] [options]" + echo "" + echo "Commands:" + echo " cleanup - Clean up old system generations." + echo " diag - Create a system diagnostic report (~diag.txt)." + echo " list-gens - List user and system generations." + echo " rebuild - Rebuild the NixOS system configuration." + echo " rebuild-boot - Rebuild and set as boot default (activates on next restart)." + echo " trim - Trim filesystems to improve SSD performance." + echo " update - Update the flake and rebuild the system." + echo " update-host - Auto set host and profile in flake.nix." + echo " (Opt: saugcli update-host [hostname] [profile])" + echo " add-host - Add a new host configuration." + echo " del-host - Delete a host configuration." + echo "" + echo "Options for rebuild, rebuild-boot, and update commands:" + echo " --dry, -n - Show what would be done without doing it" + echo " --ask, -a - Ask for confirmation before proceeding" + echo " --cores N - Limit build to N cores (useful for low-resource machines)" + echo " --verbose, -v - Show verbose output" + echo " --no-nom - Don't use nix-output-monitor" + echo "" + echo " help - Show this help message." + } + + handle_backups() { + if [ ''${#BACKUP_FILES[@]} -eq 0 ]; then + return + fi + + for file_path in "''${BACKUP_FILES[@]}"; do + full_path="$HOME/$file_path" + if [ -f "$full_path" ]; then + echo "Removing stale backup file: $full_path" + rm "$full_path" + fi + done + } + + detect_gpu_profile() { + local detected_profile="" + local has_intel=false + local has_amd=false + local has_vm=false + + if ${pkgs.pciutils}/bin/lspci &> /dev/null; then + if ${pkgs.pciutils}/bin/lspci | ${pkgs.gnugrep}/bin/grep -qi 'vga\|3d'; then + while read -r line; do + if echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'amd'; then + has_amd=true + elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'intel'; then + has_intel=true + elif echo "$line" | ${pkgs.gnugrep}/bin/grep -qi 'virtio\|vmware'; then + has_vm=true + fi + done < <(${pkgs.pciutils}/bin/lspci | ${pkgs.gnugrep}/bin/grep -i 'vga\|3d') + + if "$has_vm"; then + detected_profile="vm" + elif "$has_amd"; then + detected_profile="amd" + elif "$has_intel"; then + detected_profile="intel" + fi + fi + else + echo "Warning: lspci command not found. Cannot auto-detect GPU profile." >&2 + fi + echo "$detected_profile" + } + + parse_nh_args() { + local args_string="" + local options_selected=() + shift + + while [[ $# -gt 0 ]]; do + case $1 in + --dry|-n) + args_string="$args_string --dry" + options_selected+=("dry run mode (showing what would be done)") + shift + ;; + --ask|-a) + args_string="$args_string --ask" + options_selected+=("confirmation prompts enabled") + shift + ;; + --cores) + if [[ -n $2 && $2 =~ ^[0-9]+$ ]]; then + args_string="$args_string -- --cores $2" + options_selected+=("limited to $2 CPU cores") + shift 2 + else + echo "Error: --cores requires a numeric argument" >&2 + exit 1 + fi + ;; + --verbose|-v) + args_string="$args_string --verbose" + options_selected+=("verbose output enabled") + shift + ;; + --no-nom) + args_string="$args_string --no-nom" + options_selected+=("nix-output-monitor disabled") + shift + ;; + --) + shift + args_string="$args_string -- $*" + options_selected+=("additional arguments: $*") + break + ;; + -*) + echo "Warning: Unknown flag '$1' - passing through to nh" >&2 + args_string="$args_string $1" + options_selected+=("unknown flag '$1' passed through") + shift + ;; + *) + echo "Error: Unexpected argument '$1'" >&2 + exit 1 + ;; + esac + done + + if [[ ''${#options_selected[@]} -gt 0 ]]; then + echo "Options selected:" >&2 + for option in "''${options_selected[@]}"; do + echo " ✓ $option" >&2 + done + echo >&2 + fi + + echo "$args_string" + } + + # --- Main Logic --- + if [ "$#" -eq 0 ]; then + echo "Error: No command provided." >&2 + print_help + exit 1 + fi + + case "$1" in + cleanup) + echo "Warning! This will remove old generations of your system." + read -p "How many generations to keep (default: all)? " keep_count + + if [ -z "$keep_count" ]; then + read -p "This will remove all but the current generation. Continue (y/N)? " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + ${pkgs.nh}/bin/nh clean all -v + else + echo "Cleanup cancelled." + fi + else + read -p "This will keep the last $keep_count generations. Continue (y/N)? " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + ${pkgs.nh}/bin/nh clean all -k "$keep_count" -v + else + echo "Cleanup cancelled." + fi + fi + + LOG_DIR="$HOME/saugcli-cleanup-logs" + mkdir -p "$LOG_DIR" + LOG_FILE="$LOG_DIR/saugcli-cleanup-$(${pkgs.coreutils}/bin/date +%Y-%m-%d_%H-%M-%S).log" + echo "Cleaning up old log files..." >> "$LOG_FILE" + ${pkgs.findutils}/bin/find "$LOG_DIR" -type f -mtime +3 -name "*.log" -delete >> "$LOG_FILE" 2>&1 + echo "Cleanup process logged to $LOG_FILE" + ;; + diag) + echo "Generating system diagnostic report..." + ${pkgs.inxi}/bin/inxi --full > "$HOME/diag.txt" + echo "Diagnostic report saved to $HOME/diag.txt" + ;; + help) + print_help + ;; + list-gens) + echo "--- User Generations ---" + ${pkgs.nix}/bin/nix-env --list-generations | ${pkgs.coreutils}/bin/cat || echo "Could not list user generations." + echo "" + echo "--- System Generations ---" + ${pkgs.nix}/bin/nix profile history --profile /nix/var/nix/profiles/system | ${pkgs.coreutils}/bin/cat || echo "Could not list system generations." + ;; + rebuild) + verify_hostname + handle_backups + + extra_args=$(parse_nh_args "$@") + + echo "Starting NixOS rebuild for host: $(${pkgs.nettools}/bin/hostname)" + if eval "${pkgs.nh}/bin/nh os switch --hostname '$PROFILE' $extra_args"; then + echo "Rebuild finished successfully" + else + echo "Rebuild Failed" >&2 + exit 1 + fi + ;; + rebuild-boot) + verify_hostname + handle_backups + + extra_args=$(parse_nh_args "$@") + + echo "Starting NixOS rebuild (boot) for host: $(${pkgs.nettools}/bin/hostname)" + echo "Note: Configuration will be activated on next reboot" + if eval "${pkgs.nh}/bin/nh os boot --hostname '$PROFILE' $extra_args"; then + echo "Rebuild-boot finished successfully" + echo "New configuration set as boot default - restart to activate" + else + echo "Rebuild-boot Failed" >&2 + exit 1 + fi + ;; + trim) + echo "Running 'sudo fstrim -v /' may take a few minutes and impact system performance." + read -p "Enter (y/Y) to run now or enter to exit (y/N): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Running fstrim..." + sudo ${pkgs.util-linux}/bin/fstrim -v / + echo "fstrim complete." + else + echo "Trim operation cancelled." + fi + ;; + update) + verify_hostname + handle_backups + + extra_args=$(parse_nh_args "$@") + + echo "Updating flake and rebuilding system for host: $(${pkgs.nettools}/bin/hostname)" + if eval "${pkgs.nh}/bin/nh os switch --hostname '$PROFILE' --update $extra_args"; then + echo "Update and rebuild finished successfully" + else + echo "Update and rebuild Failed" >&2 + exit 1 + fi + ;; + update-host) + target_hostname="" + target_profile="" + + if [ "$#" -eq 3 ]; then + target_hostname="$2" + target_profile="$3" + elif [ "$#" -eq 1 ]; then + echo "Attempting to auto-detect hostname and GPU profile..." + target_hostname=$(${pkgs.nettools}/bin/hostname) + target_profile=$(detect_gpu_profile) + + if [ -z "$target_profile" ]; then + echo "Error: Could not auto-detect a specific GPU profile. Please provide it manually." >&2 + echo "Usage: saugcli update-host [hostname] [profile]" >&2 + exit 1 + fi + echo "Auto-detected Hostname: $target_hostname" + echo "Auto-detected Profile: $target_profile" + else + echo "Error: Invalid number of arguments for 'update-host'." >&2 + echo "Usage: saugcli update-host [hostname] [profile]" >&2 + exit 1 + fi + + echo "Updating $FLAKE_NIX_PATH..." + + if ${pkgs.gnused}/bin/sed -i "s/^[[:space:]]*host[[:space:]]*=[[:space:]]*\".*\"/ host = \"$target_hostname\"/" "$FLAKE_NIX_PATH"; then + echo "Successfully updated host to: $target_hostname" + else + echo "Error: Failed to update host in $FLAKE_NIX_PATH" >&2 + exit 1 + fi + + if ${pkgs.gnused}/bin/sed -i "s/^[[:space:]]*profile[[:space:]]*=[[:space:]]*\".*\"/ profile = \"$target_profile\"/" "$FLAKE_NIX_PATH"; then + echo "Successfully updated profile to: $target_profile" + else + echo "Error: Failed to update profile in $FLAKE_NIX_PATH" >&2 + exit 1 + fi + + echo "Flake.nix updated successfully!" + ;; + add-host) + hostname="" + profile_arg="" + + if [ "$#" -ge 2 ]; then + hostname="$2" + fi + if [ "$#" -eq 3 ]; then + profile_arg="$3" + fi + + if [ -z "$hostname" ]; then + read -p "Enter the new hostname: " hostname + fi + + if [ -d "$HOME/$PROJECT/hosts/$hostname" ]; then + echo "Error: Host '$hostname' already exists." >&2 + exit 1 + fi + + echo "Copying default host configuration..." + ${pkgs.coreutils}/bin/cp -r "$HOME/$PROJECT/hosts/default" "$HOME/$PROJECT/hosts/$hostname" + + detected_profile="" + if [[ -n "$profile_arg" && "$profile_arg" =~ ^(intel|amd|vm)$ ]]; then + detected_profile="$profile_arg" + else + echo "Detecting GPU profile..." + detected_profile=$(detect_gpu_profile) + echo "Detected GPU profile: $detected_profile" + read -p "Is this correct? (y/n) " -n 1 -r + echo + if [[ $REPLY =~ ^[Nn]$ ]]; then + read -p "Enter the correct profile (intel, amd, vm): " new_profile + while [[ ! "$new_profile" =~ ^(intel|amd|vm)$ ]]; do + echo "Invalid profile. Please enter one of the following: intel, amd, vm" + read -p "Enter the correct profile: " new_profile + done + detected_profile=$new_profile + fi + fi + + echo "Setting profile to '$detected_profile'..." + ${pkgs.gnused}/bin/sed -i "s/profile = .*/profile = \"$detected_profile\";/" "$HOME/$PROJECT/hosts/$hostname/default.nix" + + read -p "Generate new hardware.nix? (y/n) " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Generating hardware.nix..." + sudo nixos-generate-config --show-hardware-config > "$HOME/$PROJECT/hosts/$hostname/hardware.nix" + echo "hardware.nix generated." + fi + + echo "Adding new host to git..." + ${pkgs.git}/bin/git -C "$HOME/$PROJECT" add . + echo "hostname: $hostname added" + ;; + del-host) + hostname="" + if [ "$#" -eq 2 ]; then + hostname="$2" + else + read -p "Enter the hostname to delete: " hostname + fi + + if [ ! -d "$HOME/$PROJECT/hosts/$hostname" ]; then + echo "Error: Host '$hostname' does not exist." >&2 + exit 1 + fi + + read -p "Are you sure you want to delete the host '$hostname'? (y/N) " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + echo "Deleting host '$hostname'..." + ${pkgs.coreutils}/bin/rm -rf "$HOME/$PROJECT/hosts/$hostname" + ${pkgs.git}/bin/git -C "$HOME/$PROJECT" add . + echo "hostname: $hostname removed" + else + echo "Deletion cancelled." + fi + ;; + *) + echo "Error: Invalid command '$1'" >&2 + print_help + exit 1 + ;; + esac +'' diff --git a/modules/home/scripts/screenshootin.nix b/modules/home/scripts/screenshootin.nix new file mode 100644 index 0000000..15042b4 --- /dev/null +++ b/modules/home/scripts/screenshootin.nix @@ -0,0 +1,5 @@ +{ pkgs }: + +pkgs.writeShellScriptBin "screenshootin" '' + grim -g "$(slurp)" - | swappy -f - +'' diff --git a/modules/home/scripts/squirtle.nix b/modules/home/scripts/squirtle.nix new file mode 100644 index 0000000..c1aeb93 --- /dev/null +++ b/modules/home/scripts/squirtle.nix @@ -0,0 +1,23 @@ +{ pkgs }: + +pkgs.writeShellScriptBin "squirtle" '' + echo " +  ████████ ██████ +  ██████████████ ██████████ +  ████████████████████ ██████████████ +  ████████████████████████ ██████████████ + ██████████████████████████████████████████ + ████████████████████████████████████████ + ██████████████████████████████████████ +  ██████████████████████████████████ +  ████████████████████████████████ +  ██████████████████████████████ +  ██████████████████████████ +  ██████████████████████ +  ██████████████████████ +  ██████████████████████ +  ████ ████████████ +  ██████████ +  ██████  + " +'' diff --git a/modules/home/scripts/task-waybar.nix b/modules/home/scripts/task-waybar.nix new file mode 100644 index 0000000..9ba29d1 --- /dev/null +++ b/modules/home/scripts/task-waybar.nix @@ -0,0 +1,6 @@ +{ pkgs }: + +pkgs.writeShellScriptBin "task-waybar" '' + sleep 0.1 + ${pkgs.swaynotificationcenter}/bin/swaync-client -t & +'' diff --git a/modules/home/scripts/wallsetter.nix b/modules/home/scripts/wallsetter.nix new file mode 100644 index 0000000..6f391a6 --- /dev/null +++ b/modules/home/scripts/wallsetter.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: + +pkgs.writeShellScriptBin "wallsetter" '' + + TIMEOUT=720 + + for pid in $(pidof -o %PPID -x wallsetter); do + kill $pid + done + + if ! [ -d ~/Pictures/Wallpapers ]; then notify-send -t 5000 "~/Pictures/Wallpapers does not exist" && exit 1; fi + if [ $(ls -1 ~/Pictures/Wallpapers | wc -l) -lt 1 ]; then notify-send -t 9000 "The wallpaper folder is expected to have more than 1 image. Exiting Wallsetter." && exit 1; fi + + while true; do + while [ "$WALLPAPER" == "$PREVIOUS" ]; do + WALLPAPER=$(find ~/Pictures/Wallpapers -name '*' | awk '!/.git/' | tail -n +2 | shuf -n 1) + done + + PREVIOUS=$WALLPAPER + + ${pkgs.swww}/bin/swww img "$WALLPAPER" --transition-type random --transition-step 1 --transition-fps 60 + sleep $TIMEOUT + done +'' diff --git a/modules/home/scripts/web-search.nix b/modules/home/scripts/web-search.nix new file mode 100644 index 0000000..0a28e6b --- /dev/null +++ b/modules/home/scripts/web-search.nix @@ -0,0 +1,47 @@ +{ pkgs }: +pkgs.writeShellScriptBin "web-search" '' + # check if rofi is already running + if pidof rofi > /dev/null; then + pkill rofi + fi + + declare -A URLS + + URLS=( + ["🌎 Search"]="https://search.brave.com/search?q=" + ["❄️ Unstable Packages"]="https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=" + ["🎞️ YouTube"]="https://www.youtube.com/results?search_query=" + ["🦥 Arch Wiki"]="https://wiki.archlinux.org/title/" + ["🐃 Gentoo Wiki"]="https://wiki.gentoo.org/index.php?title=" + ) + + # List for rofi + gen_list() { + for i in "''${!URLS[@]}" + do + echo "$i" + done + } + + main() { + # Pass the list to rofi + platform=$( (gen_list) | ${pkgs.rofi}/bin/rofi -dmenu -config ~/.config/rofi/config-long.rasi ) + + if [[ -n "$platform" ]]; then + query=$( (echo ) | ${pkgs.rofi}/bin/rofi -dmenu -config ~/.config/rofi/config-long.rasi ) + + if [[ -n "$query" ]]; then + url=''${URLS[$platform]}$query + xdg-open "$url" + else + exit + fi + else + exit + fi + } + + main + + exit 0 +'' diff --git a/modules/home/stylix.nix b/modules/home/stylix.nix new file mode 100644 index 0000000..25d1567 --- /dev/null +++ b/modules/home/stylix.nix @@ -0,0 +1,14 @@ +_: { + stylix.targets = { + waybar.enable = false; + rofi.enable = false; + hyprland.enable = false; + hyprlock.enable = true; + swaylock.enable = true; + ghostty.enable = true; + qt = { + enable = true; + platform = "qtct"; + }; + }; +} diff --git a/modules/home/swappy.nix b/modules/home/swappy.nix new file mode 100644 index 0000000..b3b62a3 --- /dev/null +++ b/modules/home/swappy.nix @@ -0,0 +1,16 @@ +{ username, ... }: { + home.file = { + ".config/swappy/config".text = '' + [Default] + save_dir=/home/${username}/Pictures/Screenshots + save_filename_format=swappy-%Y%m%d-%H%M%S.png + show_panel=false + line_size=5 + text_size=20 + text_font=Ubuntu + paint_mode=brush + early_exit=true + fill_shape=false + ''; + }; +} diff --git a/modules/home/swaync.nix b/modules/home/swaync.nix new file mode 100644 index 0000000..2662402 --- /dev/null +++ b/modules/home/swaync.nix @@ -0,0 +1,311 @@ +{ config, ... }: { + services.swaync = { + enable = true; + settings = { + positionX = "right"; + positionY = "top"; + layer = "overlay"; + control-center-margin-top = 10; + control-center-margin-bottom = 10; + control-center-margin-right = 10; + control-center-margin-left = 10; + notification-icon-size = 64; + notification-body-image-height = 100; + notification-body-image-width = 200; + timeout = 10; + timeout-low = 5; + timeout-critical = 0; + fit-to-screen = false; + control-center-width = 500; + control-center-height = 1025; + notification-window-width = 500; + keyboard-shortcuts = true; + image-visibility = "when-available"; + transition-time = 200; + hide-on-clear = false; + hide-on-action = true; + script-fail-notify = true; + widget-config = { + title = { + text = "Notification Center"; + clear-all-button = true; + button-text = "󰆴 Clear All"; + }; + dnd = { + text = "Do Not Disturb"; + }; + label = { + max-lines = 1; + text = "Notification Center"; + }; + mpris = { + image-size = 96; + image-radius = 7; + }; + volume = { + label = "󰕾"; + }; + backlight = { + label = "󰃟"; + }; + }; + widgets = [ + "title" + "mpris" + "volume" + "backlight" + "dnd" + "notifications" + ]; + }; + style = '' + * { + font-family: JetBrainsMono Nerd Font Mono; + font-weight: bold; + } + .control-center .notification-row:focus, + .control-center .notification-row:hover { + opacity: 0.9; + background: #${config.lib.stylix.colors.base00} + } + .notification-row { + outline: none; + margin: 10px; + padding: 0; + } + .notification { + background: transparent; + padding: 0; + margin: 0px; + } + .notification-content { + background: #${config.lib.stylix.colors.base00}; + padding: 10px; + border-radius: 5px; + border: 2px solid #${config.lib.stylix.colors.base0D}; + margin: 0; + } + .notification-default-action { + margin: 0; + padding: 0; + border-radius: 5px; + } + .close-button { + background: #${config.lib.stylix.colors.base08}; + color: #${config.lib.stylix.colors.base00}; + text-shadow: none; + padding: 0; + border-radius: 5px; + margin-top: 5px; + margin-right: 5px; + } + .close-button:hover { + box-shadow: none; + background: #${config.lib.stylix.colors.base0D}; + transition: all .15s ease-in-out; + border: none + } + .notification-action { + border: 2px solid #${config.lib.stylix.colors.base0D}; + border-top: none; + border-radius: 5px; + } + .notification-default-action:hover, + .notification-action:hover { + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base0B} + } + .notification-default-action { + border-radius: 5px; + margin: 0px; + } + .notification-default-action:not(:only-child) { + border-bottom-left-radius: 7px; + border-bottom-right-radius: 7px + } + .notification-action:first-child { + border-bottom-left-radius: 10px; + background: #${config.lib.stylix.colors.base00} + } + .notification-action:last-child { + border-bottom-right-radius: 10px; + background: #${config.lib.stylix.colors.base00} + } + .inline-reply { + margin-top: 8px + } + .inline-reply-entry { + background: #${config.lib.stylix.colors.base00}; + color: #${config.lib.stylix.colors.base05}; + caret-color: #${config.lib.stylix.colors.base05}; + border: 1px solid #${config.lib.stylix.colors.base09}; + border-radius: 5px + } + .inline-reply-button { + margin-left: 4px; + background: #${config.lib.stylix.colors.base00}; + border: 1px solid #${config.lib.stylix.colors.base09}; + border-radius: 5px; + color: #${config.lib.stylix.colors.base05} + } + .inline-reply-button:disabled { + background: initial; + color: #${config.lib.stylix.colors.base03}; + border: 1px solid transparent + } + .inline-reply-button:hover { + background: #${config.lib.stylix.colors.base00} + } + .body-image { + margin-top: 6px; + background-color: #${config.lib.stylix.colors.base05}; + border-radius: 5px + } + .summary { + font-size: 16px; + font-weight: 700; + background: transparent; + color: rgba(158, 206, 106, 1); + text-shadow: none + } + .time { + font-size: 16px; + font-weight: 700; + background: transparent; + color: #${config.lib.stylix.colors.base05}; + text-shadow: none; + margin-right: 18px + } + .body { + font-size: 15px; + font-weight: 400; + background: transparent; + color: #${config.lib.stylix.colors.base05}; + text-shadow: none + } + .control-center { + background: #${config.lib.stylix.colors.base00}; + border: 2px solid #${config.lib.stylix.colors.base0C}; + border-radius: 5px; + } + .control-center-list { + background: transparent + } + .control-center-list-placeholder { + opacity: .5 + } + .floating-notifications { + background: transparent + } + .blank-window { + background: alpha(black, 0) + } + .widget-title { + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base00}; + padding: 5px 10px; + margin: 10px 10px 5px 10px; + font-size: 1.5rem; + border-radius: 5px; + } + .widget-title>button { + font-size: 1rem; + color: #${config.lib.stylix.colors.base05}; + text-shadow: none; + background: #${config.lib.stylix.colors.base00}; + box-shadow: none; + border-radius: 5px; + } + .widget-title>button:hover { + background: #${config.lib.stylix.colors.base08}; + color: #${config.lib.stylix.colors.base00}; + } + .widget-dnd { + background: #${config.lib.stylix.colors.base00}; + padding: 5px 10px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + font-size: large; + color: #${config.lib.stylix.colors.base0B}; + } + .widget-dnd>switch { + border-radius: 5px; + /* border: 1px solid #${config.lib.stylix.colors.base0B}; */ + background: #${config.lib.stylix.colors.base0B}; + } + .widget-dnd>switch:checked { + background: #${config.lib.stylix.colors.base08}; + border: 1px solid #${config.lib.stylix.colors.base08}; + } + .widget-dnd>switch slider { + background: #${config.lib.stylix.colors.base00}; + border-radius: 5px + } + .widget-dnd>switch:checked slider { + background: #${config.lib.stylix.colors.base00}; + border-radius: 5px + } + .widget-label { + margin: 10px 10px 5px 10px; + } + .widget-label>label { + font-size: 1rem; + color: #${config.lib.stylix.colors.base05}; + } + .widget-mpris { + color: #${config.lib.stylix.colors.base05}; + padding: 5px 10px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + } + .widget-mpris > box > button { + border-radius: 5px; + } + .widget-mpris-player { + padding: 5px 10px; + margin: 10px + } + .widget-mpris-title { + font-weight: 700; + font-size: 1.25rem + } + .widget-mpris-subtitle { + font-size: 1.1rem + } + .widget-menubar>box>.menu-button-bar>button { + border: none; + background: transparent + } + .topbar-buttons>button { + border: none; + background: transparent + } + .widget-volume { + background: #${config.lib.stylix.colors.base01}; + padding: 5px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + font-size: x-large; + color: #${config.lib.stylix.colors.base05}; + } + .widget-volume>box>button { + background: #${config.lib.stylix.colors.base0B}; + border: none + } + .per-app-volume { + background-color: #${config.lib.stylix.colors.base00}; + padding: 4px 8px 8px; + margin: 0 8px 8px; + border-radius: 5px; + } + .widget-backlight { + background: #${config.lib.stylix.colors.base01}; + padding: 5px; + margin: 10px 10px 5px 10px; + border-radius: 5px; + font-size: x-large; + color: #${config.lib.stylix.colors.base05} + } + ''; + }; +} diff --git a/modules/home/tealdeer.nix b/modules/home/tealdeer.nix new file mode 100644 index 0000000..1b2c859 --- /dev/null +++ b/modules/home/tealdeer.nix @@ -0,0 +1,10 @@ +{ ... }: { + programs.tealdeer = { + enable = true; + settings = { + display.compact = false; + display.use_pager = true; + updates.auto_update = true; + }; + }; +} diff --git a/modules/home/tmux.nix b/modules/home/tmux.nix new file mode 100644 index 0000000..4d34b60 --- /dev/null +++ b/modules/home/tmux.nix @@ -0,0 +1,118 @@ +# Tmux is a terminal multiplexer that allows you to run multiple terminal sessions in a single window. +{ pkgs, ... }: { + programs.tmux = { + enable = true; + mouse = true; + shell = "${pkgs.zsh}/bin/zsh"; + prefix = "C-a"; + terminal = "kitty"; + keyMode = "vi"; + + extraConfig = '' + set-option -g status-position top + + #set -g default-terminal "screen-256color" + set-option -g history-limit 5000 + unbind % + unbind '"' + + bind-key h select-pane -L + bind-key j select-pane -D + bind-key k select-pane -U + bind-key l select-pane -R + + set -gq allow-passthrough on + bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt + + bind-key -n C-Tab next-window + bind-key -n C-S-Tab previous-window + bind-key -n M-Tab new-window + + + # Start windows and panes index at 1, not 0. + set -g base-index 1 + setw -g pane-base-index 1 + + + bind-key "|" split-window -h -c "#{pane_current_path}" + bind-key "\\" split-window -fh -c "#{pane_current_path}" + + bind-key "-" split-window -v -c "#{pane_current_path}" + bind-key "_" split-window -fv -c "#{pane_current_path}" + + bind -r C-j resize-pane -D 15 + bind -r C-k resize-pane -U 15 + bind -r C-h resize-pane -L 15 + bind -r C-l resize-pane -R 15 + + # 'c' to new window + bind-key c new-window + + # 'n' next window + bind-key n next-window + + # 'p' next previous + bind-key n previous-window + + unbind r + bind r source-file ~/.config/tmux/tmux.conf + + bind -r m resize-pane -Z + + bind-key t clock-mode + bind-key q display-panes + bind-key u refresh-client + bind-key o select-pane -t :.+ + + + ##### Display Popups ##### + + bind C-y display-popup \ + -d "#{pane_current_path}" \ + -w 80% \ + -h 80% \ + -E "lazygit" + bind C-n display-popup -E 'bash -i -c "read -p \"Session name: \" name; tmux new-session -d -s \$name && tmux switch-client -t \$name"' + bind C-j display-popup -E "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t" + #bind C-p display-popup -E "ipython" + #bind C-f display-popup \ + # -w 80% \ + # -h 80% \ + # -E 'rmpc' + bind C-r display-popup \ + -d "#{pane_current_path}" \ + -w 90% \ + -h 90% \ + -E "yazi" + bind C-z display-popup \ + -w 90% \ + -h 90% \ + -E 'nvim ~/ddubsos/flake.nix' + #bind C-g display-popup -E "bash -i ~/.tmux/scripts/chat-popup.sh" + bind C-t display-popup \ + -d "#{pane_current_path}" \ + -w 75% \ + -h 75% \ + -E "zsh" + + ##### Display Menu ##### + + bind d display-menu -T "#[align=centre]Dotfiles" -x C -y C \ + "SaugOS flake.nix" f "display-popup -E 'nvim ~/zaneyos/SaugOS/flake.nix'" \ + "SaugOS packages" p "display-popup -E 'nvim ~/zaneyos/SaugOS/modules/core/packages.nix'" \ + "SaugOS keybinds" k "display-popup -E 'nvim ~/zaneyos/SaugOS/modules/home/niri/binds.nix'" \ + "SaugOS variables" e "display-popup -E 'nvim ~/zaneyos/SaugOS/hosts/default/variables.nix'" \ + "SaugOS windowrules" w "display-popup -E 'nvim ~/zaneyos/SaugOS/modules/home/niri/windowrules.nix'" \ + "Exit" q "" + + + + ''; + + plugins = with pkgs; [ + tmuxPlugins.vim-tmux-navigator + tmuxPlugins.sensible + tmuxPlugins.tokyo-night-tmux + ]; + }; +} diff --git a/modules/home/vscode.nix b/modules/home/vscode.nix new file mode 100644 index 0000000..b0df1ea --- /dev/null +++ b/modules/home/vscode.nix @@ -0,0 +1,57 @@ +{ pkgs, pkgs-unstable, lib, ... }: { + nixpkgs.config.allowUnfree = true; + + programs.vscode = { + enable = true; + package = pkgs-unstable.vscode; + mutableExtensionsDir = true; + + profiles.default = { + enableExtensionUpdateCheck = true; + enableUpdateCheck = true; + + extensions = with pkgs-unstable.vscode-extensions; [ + bbenoist.nix + jeff-hykin.better-nix-syntax + ms-vscode.cpptools-extension-pack + vscodevim.vim # Vim emulation + mads-hartmann.bash-ide-vscode + tamasfe.even-better-toml + zainchen.json + shd101wyy.markdown-preview-enhanced + # Copilot + github.copilot + github.copilot-chat + + + # Programming languages + golang.go + ziglang.vscode-zig + ms-python.python + ms-python.vscode-pylance + # Jupyter notebooks + ms-toolsai.jupyter + ms-toolsai.jupyter-keymap + ms-toolsai.jupyter-renderers + # Icons + catppuccin.catppuccin-vsc-icons + ]; + + userSettings = { + "workbench.sideBar.location" = "right"; + "workbench.iconTheme" = "catppuccin-macchiato"; + "github.copilot.enable" = { + "*" = false; + "plaintext" = false; + "markdown" = false; + "scminput" = false; + }; + "workbench.panel.defaultLocation" = "left"; + "editor.fontFamily" = lib.mkForce "JetBrainsMono Nerd Font, FiraCode Nerd Font, monospace"; + "editor.fontLigatures" = true; + "editor.fontSize" = lib.mkForce 12; + "terminal.integrated.fontFamily" = lib.mkForce "JetBrainsMono Nerd Font, FiraCode Nerd Font, monospace"; + }; + }; + }; +} diff --git a/modules/home/waybar/waybar-curved.nix b/modules/home/waybar/waybar-curved.nix new file mode 100644 index 0000000..23bad93 --- /dev/null +++ b/modules/home/waybar/waybar-curved.nix @@ -0,0 +1,275 @@ +{ pkgs +, lib +, host +, config +, ... +}: +let + betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; + inherit (import ../../../hosts/${host}/variables.nix) clock24h; +in +with lib; { + # Configure & Theme Waybar + programs.waybar = { + enable = true; + package = pkgs.waybar; + settings = [ + { + layer = "top"; + position = "top"; + modules-center = [ "niri/workspaces" ]; + modules-left = [ + "custom/startmenu" + "niri/window" + "pulseaudio" + "cpu" + "memory" + "idle_inhibitor" + ]; + modules-right = [ + "custom/hyprbindings" + "custom/notification" + "custom/exit" + "battery" + "tray" + "clock" + ]; + + "niri/workspaces" = { + format = "{name}"; + format-icons = { + default = " "; + active = " "; + urgent = " "; + }; + }; + "clock" = { + format = + if clock24h == true + then '' {:L%H:%M}'' + else '' {:L%I:%M %p}''; + tooltip = true; + tooltip-format = "{:%A, %d.%B %Y }\n{calendar}"; + }; + "niri/window" = { + max-length = 22; + separate-outputs = false; + rewrite = { + "" = " 🙈 No Windows? "; + }; + }; + "memory" = { + interval = 5; + format = " {}%"; + tooltip = true; + }; + "cpu" = { + interval = 5; + format = " {usage:2}%"; + tooltip = true; + }; + "disk" = { + format = " {free}"; + tooltip = true; + }; + "network" = { + format-icons = [ + "󰤯" + "󰤟" + "󰤢" + "󰤥" + "󰤨" + ]; + format-ethernet = " {bandwidthDownOctets}"; + format-wifi = "{icon} {signalStrength}%"; + format-disconnected = "󰤮"; + tooltip = false; + }; + "tray" = { + spacing = 12; + }; + "pulseaudio" = { + format = "{icon} {volume}% {format_source}"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = " {format_source}"; + format-source = " {volume}%"; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "" + "" + "" + ]; + }; + on-click = "sleep 0.1 && pavucontrol"; + }; + "custom/exit" = { + tooltip = false; + format = ""; + on-click = "sleep 0.1 && wlogout"; + }; + "custom/startmenu" = { + tooltip = false; + format = ""; + # exec = "rofi -show drun"; + on-click = "sleep 0.1 && rofi-launcher"; + }; + "custom/hyprbindings" = { + tooltip = false; + format = "󱕴"; + on-click = "sleep 0.1 && list-keybinds"; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; + }; + tooltip = "true"; + }; + "custom/notification" = { + tooltip = false; + format = "{icon} {}"; + format-icons = { + notification = ""; + none = ""; + dnd-notification = ""; + dnd-none = ""; + inhibited-notification = ""; + inhibited-none = ""; + dnd-inhibited-notification = ""; + dnd-inhibited-none = ""; + }; + return-type = "json"; + exec-if = "which swaync-client"; + exec = "swaync-client -swb"; + on-click = "sleep 0.1 && task-waybar"; + escape = true; + }; + "battery" = { + states = { + warning = 30; + critical = 15; + }; + format = "{icon} {capacity}%"; + format-charging = "󰂄 {capacity}%"; + format-plugged = "󱘖 {capacity}%"; + format-icons = [ + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; + on-click = ""; + tooltip = false; + }; + } + ]; + style = concatStrings [ + '' + * { + font-family: JetBrainsMono Nerd Font Mono; + font-size: 16px; + border-radius: 0px; + border: none; + min-height: 0px; + } + window#waybar { + background: rgba(0,0,0,0); + } + #workspaces { + color: #${config.lib.stylix.colors.base00}; + background: #${config.lib.stylix.colors.base01}; + margin: 4px 4px; + padding: 5px 5px; + border-radius: 16px; + } + #workspaces button { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: #${config.lib.stylix.colors.base00}; + background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); + opacity: 0.5; + transition: ${betterTransition}; + } + #workspaces button.active { + font-weight: bold; + padding: 0px 5px; + margin: 0px 3px; + border-radius: 16px; + color: #${config.lib.stylix.colors.base00}; + background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); + transition: ${betterTransition}; + opacity: 1.0; + min-width: 40px; + } + #workspaces button:hover { + font-weight: bold; + border-radius: 16px; + color: #${config.lib.stylix.colors.base00}; + background: linear-gradient(45deg, #${config.lib.stylix.colors.base08}, #${config.lib.stylix.colors.base0D}); + opacity: 0.8; + transition: ${betterTransition}; + } + tooltip { + background: #${config.lib.stylix.colors.base00}; + border: 1px solid #${config.lib.stylix.colors.base08}; + border-radius: 12px; + } + tooltip label { + color: #${config.lib.stylix.colors.base08}; + } + #window, #pulseaudio, #cpu, #memory, #idle_inhibitor { + font-weight: bold; + margin: 4px 0px; + margin-left: 7px; + padding: 0px 18px; + background: #${config.lib.stylix.colors.base04}; + color: #${config.lib.stylix.colors.base00}; + border-radius: 24px 10px 24px 10px; + } + #custom-startmenu { + color: #${config.lib.stylix.colors.base0B}; + background: #${config.lib.stylix.colors.base02}; + font-size: 28px; + margin: 0px; + padding: 0px 30px 0px 15px; + border-radius: 0px 0px 40px 0px; + } + #custom-hyprbindings, #network, #battery, + #custom-notification, #tray, #custom-exit { + font-weight: bold; + background: #${config.lib.stylix.colors.base0F}; + color: #${config.lib.stylix.colors.base00}; + margin: 4px 0px; + margin-right: 7px; + border-radius: 10px 24px 10px 24px; + padding: 0px 18px; + } + #clock { + font-weight: bold; + color: #0D0E15; + background: linear-gradient(90deg, #${config.lib.stylix.colors.base0E}, #${config.lib.stylix.colors.base0C}); + margin: 0px; + padding: 0px 15px 0px 30px; + border-radius: 0px 0px 0px 40px; + } + '' + ]; + }; +} diff --git a/modules/home/wezterm.nix b/modules/home/wezterm.nix new file mode 100644 index 0000000..d939ca0 --- /dev/null +++ b/modules/home/wezterm.nix @@ -0,0 +1,82 @@ +{ pkgs, ... }: { + programs.wezterm = { + enable = true; + package = pkgs.wezterm; + }; + home.file."./.config/wezterm/wezterm.lua".text = '' + -- Config from Drew @justaguylinux small mods + + local wezterm = require("wezterm") + + local config = wezterm.config_builder() + + config.enable_wayland = false + + -- General appearance and visuals + config.colors = { + tab_bar = { + background = "#00141d", -- col_gray1, your main DWM bar background + + active_tab = { + bg_color = "#80bfff", -- col_gray2 (selected tab in bright blue) + fg_color = "#00141d", -- contrast text on active tab + }, + + inactive_tab = { + bg_color = "#1a1a1a", -- col_gray4 (dark background for inactive tabs) + fg_color = "#FFFFFF", -- col_gray3 (white text on inactive tabs) + }, + + new_tab = { + bg_color = "#1a1a1a", -- same as inactive + fg_color = "#4fc3f7", -- col_barbie (for the "+" button) + }, + }, + } + + config.window_background_opacity = 0.90 + config.color_scheme = "nightfox" + config.font_size = 12 + config.font = wezterm.font("FiraCode", { weight = "Regular", italic = false }) + + config.window_padding = { + left = 10, + right = 10, + top = 10, + bottom = 10, + } + + config.use_fancy_tab_bar = true + config.window_frame = { + -- font = wezterm.font({ family = "FiraCode Nerd Font Mono", weight = "Regular" }), + font = wezterm.font({ family = "JetBrainsMono Nerd Font Mono", weight = "Regular" }), + } + + config.default_cursor_style = "BlinkingUnderline" + config.cursor_blink_rate = 500 + config.term = "xterm-256color" + config.max_fps = 144 + config.animation_fps = 30 + + -- Keybindings using ALT for tabs & splits + config.keys = { + -- Tab management + { key = "t", mods = "ALT", action = wezterm.action.SpawnTab("CurrentPaneDomain") }, + { key = "w", mods = "ALT", action = wezterm.action.CloseCurrentTab({ confirm = false }) }, + { key = "n", mods = "ALT", action = wezterm.action.ActivateTabRelative(1) }, + { key = "p", mods = "ALT", action = wezterm.action.ActivateTabRelative(-1) }, + + -- Pane management + { key = "v", mods = "ALT", action = wezterm.action.SplitVertical({ domain = "CurrentPaneDomain" }) }, + { key = "h", mods = "ALT", action = wezterm.action.SplitHorizontal({ domain = "CurrentPaneDomain" }) }, + { key = "q", mods = "ALT", action = wezterm.action.CloseCurrentPane({ confirm = false }) }, + + -- Pane navigation (move between panes with ALT + Arrows) + { key = "LeftArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Left") }, + { key = "RightArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Right") }, + { key = "UpArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Up") }, + { key = "DownArrow", mods = "ALT", action = wezterm.action.ActivatePaneDirection("Down") }, + } + return config + ''; +} diff --git a/modules/home/wlogout/default.nix b/modules/home/wlogout/default.nix new file mode 100644 index 0000000..e51de04 --- /dev/null +++ b/modules/home/wlogout/default.nix @@ -0,0 +1,107 @@ +{ config, ... }: + +{ + programs.wlogout = { + enable = true; + layout = [ + { + label = "shutdown"; + action = "sleep 1; systemctl poweroff"; + text = "Shutdown"; + keybind = "s"; + } + { + "label" = "reboot"; + "action" = "sleep 1; systemctl reboot"; + "text" = "Reboot"; + "keybind" = "r"; + } + { + "label" = "logout"; + "action" = "sleep 1; hyprctl dispatch exit"; + "text" = "Exit"; + "keybind" = "e"; + } + { + "label" = "suspend"; + "action" = "sleep 1; systemctl suspend"; + "text" = "Suspend"; + "keybind" = "u"; + } + { + "label" = "lock"; + "action" = "sleep 1; hyprlock"; + "text" = "Lock"; + "keybind" = "l"; + } + { + "label" = "hibernate"; + "action" = "sleep 1; systemctl hibernate"; + "text" = "Hibernate"; + "keybind" = "h"; + } + ]; + style = '' + * { + font-family: "JetBrainsMono NF", FontAwesome, sans-serif; + background-image: none; + transition: 20ms; + } + window { + background-color: rgba(12, 12, 12, 0.1); + } + button { + color: #${config.lib.stylix.colors.base05}; + font-size:20px; + background-repeat: no-repeat; + background-position: center; + background-size: 25%; + border-style: solid; + background-color: rgba(12, 12, 12, 0.3); + border: 3px solid #${config.lib.stylix.colors.base05}; + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + } + button:focus, + button:active, + button:hover { + color: #${config.lib.stylix.colors.base0B}; + background-color: rgba(12, 12, 12, 0.5); + border: 3px solid #${config.lib.stylix.colors.base0B}; + } + #logout { + margin: 10px; + border-radius: 20px; + background-image: image(url("icons/logout.png")); + } + #suspend { + margin: 10px; + border-radius: 20px; + background-image: image(url("icons/suspend.png")); + } + #shutdown { + margin: 10px; + border-radius: 20px; + background-image: image(url("icons/shutdown.png")); + } + #reboot { + margin: 10px; + border-radius: 20px; + background-image: image(url("icons/reboot.png")); + } + #lock { + margin: 10px; + border-radius: 20px; + background-image: image(url("icons/lock.png")); + } + #hibernate { + margin: 10px; + border-radius: 20px; + background-image: image(url("icons/hibernate.png")); + } + ''; + }; + home.file.".config/wlogout/icons" = { + source = ./icons; + recursive = true; + }; +} diff --git a/modules/home/wlogout/icons/hibernate.png b/modules/home/wlogout/icons/hibernate.png new file mode 100644 index 0000000..bf2b001 Binary files /dev/null and b/modules/home/wlogout/icons/hibernate.png differ diff --git a/modules/home/wlogout/icons/lock.png b/modules/home/wlogout/icons/lock.png new file mode 100644 index 0000000..da59b10 Binary files /dev/null and b/modules/home/wlogout/icons/lock.png differ diff --git a/modules/home/wlogout/icons/logout.png b/modules/home/wlogout/icons/logout.png new file mode 100644 index 0000000..8a25922 Binary files /dev/null and b/modules/home/wlogout/icons/logout.png differ diff --git a/modules/home/wlogout/icons/reboot.png b/modules/home/wlogout/icons/reboot.png new file mode 100644 index 0000000..e5fd221 Binary files /dev/null and b/modules/home/wlogout/icons/reboot.png differ diff --git a/modules/home/wlogout/icons/shutdown.png b/modules/home/wlogout/icons/shutdown.png new file mode 100644 index 0000000..663ca03 Binary files /dev/null and b/modules/home/wlogout/icons/shutdown.png differ diff --git a/modules/home/wlogout/icons/suspend.png b/modules/home/wlogout/icons/suspend.png new file mode 100644 index 0000000..af099b9 Binary files /dev/null and b/modules/home/wlogout/icons/suspend.png differ diff --git a/modules/home/xdg.nix b/modules/home/xdg.nix new file mode 100644 index 0000000..9433437 --- /dev/null +++ b/modules/home/xdg.nix @@ -0,0 +1,37 @@ +{ pkgs, host, ... }: +let + vars = import ../../hosts/${host}/variables.nix; + browserDesktop = { + "firefox" = "firefox.desktop"; + "brave" = "brave-browser.desktop"; + "google-chrome" = "google-chrome.desktop"; + "google-chrome-stable" = "google-chrome.desktop"; + "chromium" = "chromium-browser.desktop"; + "zen" = "zen.desktop"; + "floorp" = "floorp.desktop"; + "librewolf" = "librewolf.desktop"; + "vivaldi" = "vivaldi-stable.desktop"; + }; + defaultBrowser = browserDesktop.${vars.browser} or "${vars.browser}.desktop"; +in +{ + xdg = { + enable = true; + mime.enable = true; + mimeApps = { + enable = true; + defaultApplications = { + "text/html" = defaultBrowser; + "x-scheme-handler/http" = defaultBrowser; + "x-scheme-handler/https" = defaultBrowser; + "x-scheme-handler/about" = defaultBrowser; + "x-scheme-handler/unknown" = defaultBrowser; + }; + }; + portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + config.common.default = "*"; + }; + }; +} diff --git a/modules/home/yazi/default.nix b/modules/home/yazi/default.nix new file mode 100644 index 0000000..2b758e2 --- /dev/null +++ b/modules/home/yazi/default.nix @@ -0,0 +1,32 @@ +{ pkgs, ... }: +let + settings = import ./yazi.nix; + keymap = import ./keymap.nix; + theme = import ./theme.nix; +in +{ + programs.yazi = { + enable = true; + enableZshIntegration = true; + enableBashIntegration = true; + enableFishIntegration = true; + shellWrapperName = "yy"; + settings = settings; + keymap = keymap; + theme = theme; + plugins = { + lazygit = pkgs.yaziPlugins.lazygit; + full-border = pkgs.yaziPlugins.full-border; + git = pkgs.yaziPlugins.git; + smart-enter = pkgs.yaziPlugins.smart-enter; + }; + + initLua = '' + require("full-border"):setup() + require("git"):setup() + require("smart-enter"):setup { + open_multi = true, + } + ''; + }; +} diff --git a/modules/home/yazi/keymap.nix b/modules/home/yazi/keymap.nix new file mode 100644 index 0000000..d4e4267 --- /dev/null +++ b/modules/home/yazi/keymap.nix @@ -0,0 +1,1201 @@ +{ + mgr = { + keymap = [ + { + on = ""; + run = "escape"; + desc = "Exit visual mode, clear selected, or cancel search"; + } + { + on = ""; + run = "escape"; + desc = "Exit visual mode, clear selected, or cancel search"; + } + { + on = "q"; + run = "quit"; + desc = "Quit the process"; + } + { + on = "Q"; + run = "quit --no-cwd-file"; + desc = "Quit the process without outputting cwd-file"; + } + { + on = ""; + run = "close"; + desc = "Close the current tab, or quit if it's last"; + } + { + on = ""; + run = "suspend"; + desc = "Suspend the process"; + } + { + on = "k"; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = "j"; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ""; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = ""; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ""; + run = "arrow -50%"; + desc = "Move cursor up half page"; + } + { + on = ""; + run = "arrow 50%"; + desc = "Move cursor down half page"; + } + { + on = ""; + run = "arrow -100%"; + desc = "Move cursor up one page"; + } + { + on = ""; + run = "arrow 100%"; + desc = "Move cursor down one page"; + } + { + on = ""; + run = "arrow -50%"; + desc = "Move cursor up half page"; + } + { + on = ""; + run = "arrow 50%"; + desc = "Move cursor down half page"; + } + { + on = ""; + run = "arrow -100%"; + desc = "Move cursor up one page"; + } + { + on = ""; + run = "arrow 100%"; + desc = "Move cursor down one page"; + } + { + on = [ "g" "g" ]; + run = "arrow top"; + desc = "Move cursor to the top"; + } + { + on = "G"; + run = "arrow bot"; + desc = "Move cursor to the bottom"; + } + { + on = "h"; + run = "leave"; + desc = "Go back to the parent directory"; + } + { + on = "l"; + run = "enter"; + desc = "Enter the child directory"; + } + { + on = ""; + run = "leave"; + desc = "Go back to the parent directory"; + } + { + on = ""; + run = "enter"; + desc = "Enter the child directory"; + } + { + on = "H"; + run = "back"; + desc = "Go back to the previous directory"; + } + { + on = "L"; + run = "forward"; + desc = "Go forward to the next directory"; + } + { + on = ""; + run = [ "toggle" "arrow 1" ]; + desc = "Toggle the current selection state"; + } + { + on = ""; + run = "toggle_all --state=on"; + desc = "Select all files"; + } + { + on = ""; + run = "toggle_all"; + desc = "Invert selection of all files"; + } + { + on = "v"; + run = "visual_mode"; + desc = "Enter visual mode (selection mode)"; + } + { + on = "V"; + run = "visual_mode --unset"; + desc = "Enter visual mode (unset mode)"; + } + { + on = "K"; + run = "seek -5"; + desc = "Seek up 5 units in the preview"; + } + { + on = "J"; + run = "seek 5"; + desc = "Seek down 5 units in the preview"; + } + { + on = ""; + run = "spot"; + desc = "Spot hovered file"; + } + { + on = "o"; + run = "open"; + desc = "Open selected files"; + } + { + on = "O"; + run = "open --interactive"; + desc = "Open selected files interactively"; + } + { + on = ""; + run = "open"; + desc = "Open selected files"; + } + { + on = ""; + run = "open --interactive"; + desc = "Open selected files interactively"; + } + { + on = "y"; + run = "yank"; + desc = "Yank selected files (copy)"; + } + { + on = "x"; + run = "yank --cut"; + desc = "Yank selected files (cut)"; + } + { + on = "p"; + run = "paste"; + desc = "Paste yanked files"; + } + { + on = "P"; + run = "paste --force"; + desc = "Paste yanked files (overwrite if the destination exists)"; + } + { + on = "-"; + run = "link"; + desc = "Symlink the absolute path of yanked files"; + } + { + on = "_"; + run = "link --relative"; + desc = "Symlink the relative path of yanked files"; + } + { + on = ""; + run = "hardlink"; + desc = "Hardlink yanked files"; + } + { + on = "Y"; + run = "unyank"; + desc = "Cancel the yank status"; + } + { + on = "X"; + run = "unyank"; + desc = "Cancel the yank status"; + } + { + on = "d"; + run = "remove"; + desc = "Trash selected files"; + } + { + on = "D"; + run = "remove --permanently"; + desc = "Permanently delete selected files"; + } + { + on = "a"; + run = "create"; + desc = "Create a file (ends with / for directories)"; + } + { + on = "r"; + run = "rename --cursor=before_ext"; + desc = "Rename selected file(s)"; + } + { + on = ";"; + run = "shell --interactive"; + desc = "Run a shell command"; + } + { + on = ":"; + run = "shell --block --interactive"; + desc = "Run a shell command (block until finishes)"; + } + { + on = "."; + run = "hidden toggle"; + desc = "Toggle the visibility of hidden files"; + } + { + on = "s"; + run = "search --via=fd"; + desc = "Search files by name via fd"; + } + { + on = "S"; + run = "search --via=rg"; + desc = "Search files by content via ripgrep"; + } + { + on = ""; + run = "escape --search"; + desc = "Cancel the ongoing search"; + } + { + on = "z"; + run = "plugin zoxide"; + desc = "Jump to a directory via zoxide"; + } + { + on = "Z"; + run = "plugin fzf"; + desc = "Jump to a file/directory via fzf"; + } + { + on = [ "m" "s" ]; + run = "linemode size"; + desc = "Linemode: size"; + } + { + on = [ "m" "p" ]; + run = "linemode permissions"; + desc = "Linemode: permissions"; + } + { + on = [ "m" "b" ]; + run = "linemode btime"; + desc = "Linemode: btime"; + } + { + on = [ "m" "m" ]; + run = "linemode mtime"; + desc = "Linemode: mtime"; + } + { + on = [ "m" "o" ]; + run = "linemode owner"; + desc = "Linemode: owner"; + } + { + on = [ "m" "n" ]; + run = "linemode none"; + desc = "Linemode: none"; + } + { + on = [ "c" "c" ]; + run = "copy path"; + desc = "Copy the file path"; + } + { + on = [ "c" "d" ]; + run = "copy dirname"; + desc = "Copy the directory path"; + } + { + on = [ "c" "f" ]; + run = "copy filename"; + desc = "Copy the filename"; + } + { + on = [ "c" "n" ]; + run = "copy name_without_ext"; + desc = "Copy the filename without extension"; + } + { + on = "f"; + run = "filter --smart"; + desc = "Filter files"; + } + { + on = "/"; + run = "find --smart"; + desc = "Find next file"; + } + { + on = "?"; + run = "find --previous --smart"; + desc = "Find previous file"; + } + { + on = "n"; + run = "find_arrow"; + desc = "Goto the next found"; + } + { + on = "N"; + run = "find_arrow --previous"; + desc = "Goto the previous found"; + } + { + on = [ "," "m" ]; + run = [ "sort mtime --reverse=no" "linemode mtime" ]; + desc = "Sort by modified time"; + } + { + on = [ "," "M" ]; + run = [ "sort mtime --reverse" "linemode mtime" ]; + desc = "Sort by modified time (reverse)"; + } + { + on = [ "," "b" ]; + run = [ "sort btime --reverse=no" "linemode btime" ]; + desc = "Sort by birth time"; + } + { + on = [ "," "B" ]; + run = [ "sort btime --reverse" "linemode btime" ]; + desc = "Sort by birth time (reverse)"; + } + { + on = [ "," "e" ]; + run = "sort extension --reverse=no"; + desc = "Sort by extension"; + } + { + on = [ "," "E" ]; + run = "sort extension --reverse"; + desc = "Sort by extension (reverse)"; + } + { + on = [ "," "a" ]; + run = "sort alphabetical --reverse=no"; + desc = "Sort alphabetically"; + } + { + on = [ "," "A" ]; + run = "sort alphabetical --reverse"; + desc = "Sort alphabetically (reverse)"; + } + { + on = [ "," "n" ]; + run = "sort natural --reverse=no"; + desc = "Sort naturally"; + } + { + on = [ "," "N" ]; + run = "sort natural --reverse"; + desc = "Sort naturally (reverse)"; + } + { + on = [ "," "s" ]; + run = [ "sort size --reverse=no" "linemode size" ]; + desc = "Sort by size"; + } + { + on = [ "," "S" ]; + run = [ "sort size --reverse" "linemode size" ]; + desc = "Sort by size (reverse)"; + } + { + on = [ "," "r" ]; + run = "sort random --reverse=no"; + desc = "Sort randomly"; + } + { + on = [ "g" "h" ]; + run = "cd ~"; + desc = "Go home"; + } + { + on = [ "g" "c" ]; + run = "cd ~/.config"; + desc = "Goto ~/.config"; + } + { + on = [ "g" "d" ]; + run = "cd ~/Downloads"; + desc = "Goto ~/Downloads"; + } + { + on = [ "g" "" ]; + run = "cd --interactive"; + desc = "Jump interactively"; + } + { + on = "t"; + run = "tab_create --current"; + desc = "Create a new tab with CWD"; + } + { + on = "1"; + run = "tab_switch 0"; + desc = "Switch to the first tab"; + } + { + on = "2"; + run = "tab_switch 1"; + desc = "Switch to the second tab"; + } + { + on = "3"; + run = "tab_switch 2"; + desc = "Switch to the third tab"; + } + { + on = "4"; + run = "tab_switch 3"; + desc = "Switch to the fourth tab"; + } + { + on = "5"; + run = "tab_switch 4"; + desc = "Switch to the fifth tab"; + } + { + on = "6"; + run = "tab_switch 5"; + desc = "Switch to the sixth tab"; + } + { + on = "7"; + run = "tab_switch 6"; + desc = "Switch to the seventh tab"; + } + { + on = "8"; + run = "tab_switch 7"; + desc = "Switch to the eighth tab"; + } + { + on = "9"; + run = "tab_switch 8"; + desc = "Switch to the ninth tab"; + } + { + on = "["; + run = "tab_switch -1 --relative"; + desc = "Switch to the previous tab"; + } + { + on = "]"; + run = "tab_switch 1 --relative"; + desc = "Switch to the next tab"; + } + { + on = "{"; + run = "tab_swap -1"; + desc = "Swap current tab with previous tab"; + } + { + on = "}"; + run = "tab_swap 1"; + desc = "Swap current tab with next tab"; + } + { + on = "w"; + run = "tasks_show"; + desc = "Show task manager"; + } + { + on = "~"; + run = "help"; + desc = "Open help"; + } + { + on = ""; + run = "help"; + desc = "Open help"; + } + ]; + prepend_keymap = [ + { + on = [ "g" "i" ]; + run = "plugin lazygit"; + desc = "run lazygit"; + } + { + on = "l"; + run = "plugin smart-enter"; + desc = "Enter the child directory, or open the file"; + } + ]; + }; + tasks = { + keymap = [ + { + on = ""; + run = "close"; + desc = "Close task manager"; + } + { + on = ""; + run = "close"; + desc = "Close task manager"; + } + { + on = ""; + run = "close"; + desc = "Close task manager"; + } + { + on = "w"; + run = "close"; + desc = "Close task manager"; + } + { + on = "k"; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = "j"; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ""; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = ""; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ""; + run = "inspect"; + desc = "Inspect the task"; + } + { + on = "x"; + run = "cancel"; + desc = "Cancel the task"; + } + { + on = "~"; + run = "help"; + desc = "Open help"; + } + { + on = ""; + run = "help"; + desc = "Open help"; + } + ]; + }; + spot = { + keymap = [ + { + on = ""; + run = "close"; + desc = "Close the spot"; + } + { + on = ""; + run = "close"; + desc = "Close the spot"; + } + { + on = ""; + run = "close"; + desc = "Close the spot"; + } + { + on = ""; + run = "close"; + desc = "Close the spot"; + } + { + on = "k"; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = "j"; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = "h"; + run = "swipe -1"; + desc = "Swipe to the previous file"; + } + { + on = "l"; + run = "swipe 1"; + desc = "Swipe to the next file"; + } + { + on = ""; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = ""; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ""; + run = "swipe -1"; + desc = "Swipe to the next file"; + } + { + on = ""; + run = "swipe 1"; + desc = "Swipe to the previous file"; + } + { + on = [ "c" "c" ]; + run = "copy cell"; + desc = "Copy selected cell"; + } + { + on = "~"; + run = "help"; + desc = "Open help"; + } + { + on = ""; + run = "help"; + desc = "Open help"; + } + ]; + }; + pick = { + keymap = [ + { + on = ""; + run = "close"; + desc = "Cancel pick"; + } + { + on = ""; + run = "close"; + desc = "Cancel pick"; + } + { + on = ""; + run = "close"; + desc = "Cancel pick"; + } + { + on = ""; + run = "close --submit"; + desc = "Submit the pick"; + } + { + on = "k"; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = "j"; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ""; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = ""; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = "~"; + run = "help"; + desc = "Open help"; + } + { + on = ""; + run = "help"; + desc = "Open help"; + } + ]; + }; + input = { + keymap = [ + { + on = ""; + run = "close"; + desc = "Cancel input"; + } + { + on = ""; + run = "close --submit"; + desc = "Submit input"; + } + { + on = ""; + run = "escape"; + desc = "Go back the normal mode, or cancel input"; + } + { + on = ""; + run = "escape"; + desc = "Go back the normal mode, or cancel input"; + } + { + on = "i"; + run = "insert"; + desc = "Enter insert mode"; + } + { + on = "I"; + run = [ "move first-char" "insert" ]; + desc = "Move to the BOL, and enter insert mode"; + } + { + on = "a"; + run = "insert --append"; + desc = "Enter append mode"; + } + { + on = "A"; + run = [ "move eol" "insert --append" ]; + desc = "Move to the EOL, and enter append mode"; + } + { + on = "v"; + run = "visual"; + desc = "Enter visual mode"; + } + { + on = "r"; + run = "replace"; + desc = "Replace a single character"; + } + { + on = "V"; + run = [ "move bol" "visual" "move eol" ]; + desc = "Select from BOL to EOL"; + } + { + on = ""; + run = [ "move eol" "visual" "move bol" ]; + desc = "Select from EOL to BOL"; + } + { + on = ""; + run = [ "move bol" "visual" "move eol" ]; + desc = "Select from BOL to EOL"; + } + { + on = "h"; + run = "move -1"; + desc = "Move back a character"; + } + { + on = "l"; + run = "move 1"; + desc = "Move forward a character"; + } + { + on = ""; + run = "move -1"; + desc = "Move back a character"; + } + { + on = ""; + run = "move 1"; + desc = "Move forward a character"; + } + { + on = ""; + run = "move -1"; + desc = "Move back a character"; + } + { + on = ""; + run = "move 1"; + desc = "Move forward a character"; + } + { + on = "b"; + run = "backward"; + desc = "Move back to the start of the current or previous word"; + } + { + on = "B"; + run = "backward --far"; + desc = "Move back to the start of the current or previous WORD"; + } + { + on = "w"; + run = "forward"; + desc = "Move forward to the start of the next word"; + } + { + on = "W"; + run = "forward --far"; + desc = "Move forward to the start of the next WORD"; + } + { + on = "e"; + run = "forward --end-of-word"; + desc = "Move forward to the end of the current or next word"; + } + { + on = "E"; + run = "forward --far --end-of-word"; + desc = "Move forward to the end of the current or next WORD"; + } + { + on = ""; + run = "backward"; + desc = "Move back to the start of the current or previous word"; + } + { + on = ""; + run = "forward --end-of-word"; + desc = "Move forward to the end of the current or next word"; + } + { + on = "0"; + run = "move bol"; + desc = "Move to the BOL"; + } + { + on = "$"; + run = "move eol"; + desc = "Move to the EOL"; + } + { + on = "_"; + run = "move first-char"; + desc = "Move to the first non-whitespace character"; + } + { + on = "^"; + run = "move first-char"; + desc = "Move to the first non-whitespace character"; + } + { + on = ""; + run = "move bol"; + desc = "Move to the BOL"; + } + { + on = ""; + run = "move eol"; + desc = "Move to the EOL"; + } + { + on = ""; + run = "move bol"; + desc = "Move to the BOL"; + } + { + on = ""; + run = "move eol"; + desc = "Move to the EOL"; + } + { + on = ""; + run = "backspace"; + desc = "Delete the character before the cursor"; + } + { + on = ""; + run = "backspace --under"; + desc = "Delete the character under the cursor"; + } + { + on = ""; + run = "backspace"; + desc = "Delete the character before the cursor"; + } + { + on = ""; + run = "backspace --under"; + desc = "Delete the character under the cursor"; + } + { + on = ""; + run = "kill bol"; + desc = "Kill backwards to the BOL"; + } + { + on = ""; + run = "kill eol"; + desc = "Kill forwards to the EOL"; + } + { + on = ""; + run = "kill backward"; + desc = "Kill backwards to the start of the current word"; + } + { + on = ""; + run = "kill forward"; + desc = "Kill forwards to the end of the current word"; + } + { + on = "d"; + run = "delete --cut"; + desc = "Cut the selected characters"; + } + { + on = "D"; + run = [ "delete --cut" "move eol" ]; + desc = "Cut until the EOL"; + } + { + on = "c"; + run = "delete --cut --insert"; + desc = "Cut the selected characters, and enter insert mode"; + } + { + on = "C"; + run = [ "delete --cut --insert" "move eol" ]; + desc = "Cut until the EOL, and enter insert mode"; + } + { + on = "x"; + run = [ "delete --cut" "move 1 --in-operating" ]; + desc = "Cut the current character"; + } + { + on = "y"; + run = "yank"; + desc = "Copy the selected characters"; + } + { + on = "p"; + run = "paste"; + desc = "Paste the copied characters after the cursor"; + } + { + on = "P"; + run = "paste --before"; + desc = "Paste the copied characters before the cursor"; + } + { + on = "u"; + run = "undo"; + desc = "Undo the last operation"; + } + { + on = ""; + run = "redo"; + desc = "Redo the last operation"; + } + { + on = "~"; + run = "help"; + desc = "Open help"; + } + { + on = ""; + run = "help"; + desc = "Open help"; + } + ]; + }; + confirm = { + keymap = [ + { + on = ""; + run = "close"; + desc = "Cancel the confirm"; + } + { + on = ""; + run = "close"; + desc = "Cancel the confirm"; + } + { + on = ""; + run = "close"; + desc = "Cancel the confirm"; + } + { + on = ""; + run = "close --submit"; + desc = "Submit the confirm"; + } + { + on = "n"; + run = "close"; + desc = "Cancel the confirm"; + } + { + on = "y"; + run = "close --submit"; + desc = "Submit the confirm"; + } + { + on = "k"; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = "j"; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ""; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = ""; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = "~"; + run = "help"; + desc = "Open help"; + } + { + on = ""; + run = "help"; + desc = "Open help"; + } + ]; + }; + cmp = { + keymap = [ + { + on = ""; + run = "close"; + desc = "Cancel completion"; + } + { + on = ""; + run = "close --submit"; + desc = "Submit the completion"; + } + { + on = ""; + run = [ "close --submit" "close_input --submit" ]; + desc = "Submit the completion and input"; + } + { + on = ""; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = ""; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ""; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = ""; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ""; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = ""; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = "~"; + run = "help"; + desc = "Open help"; + } + { + on = ""; + run = "help"; + desc = "Open help"; + } + ]; + }; + help = { + keymap = [ + { + on = ""; + run = "escape"; + desc = "Clear the filter, or hide the help"; + } + { + on = ""; + run = "escape"; + desc = "Clear the filter, or hide the help"; + } + { + on = ""; + run = "close"; + desc = "Hide the help"; + } + { + on = "k"; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = "j"; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = ""; + run = "arrow -1"; + desc = "Move cursor up"; + } + { + on = ""; + run = "arrow 1"; + desc = "Move cursor down"; + } + { + on = "f"; + run = "filter"; + desc = "Apply a filter for the help items"; + } + ]; + }; +} diff --git a/modules/home/yazi/theme.nix b/modules/home/yazi/theme.nix new file mode 100644 index 0000000..77bee22 --- /dev/null +++ b/modules/home/yazi/theme.nix @@ -0,0 +1,3404 @@ +{ + flavor = { + dark = ""; + light = ""; + }; + mgr = { + marker_marked = { + fg = "lightcyan"; + bg = "lightcyan"; + }; + tab_width = 1; + border_symbol = "│"; + }; + mode = { }; + status = { + overall = { bold = true; }; + sep_left = [ "░▒▓" "▓▒░" ]; + sep_right = [ "░▒▓" "▓▒░" ]; + }; + which = { + cols = 3; + separator = "  "; + }; + confirm = { + border = { fg = "gray"; }; + title = { + fg = "blue"; + bold = true; + }; + content = { }; + list = { }; + btn_yes = { + bg = "green"; + fg = "black"; + bold = true; + }; + btn_no = { + bg = "red"; + fg = "black"; + bold = true; + }; + btn_labels = [ " [Y]es " " (N)o " ]; + }; + spot = { + border = { fg = "blue"; }; + title = { fg = "blue"; }; + tbl_col = { fg = "blue"; }; + tbl_cell = { + fg = "yellow"; + reversed = true; + }; + }; + notify = { + title_info = { fg = "green"; }; + title_warn = { fg = "yellow"; }; + title_error = { fg = "red"; }; + icon_info = ""; + icon_warn = ""; + icon_error = ""; + }; + pick = { }; + input = { }; + cmp = { + active = { reversed = true; }; + inactive = { }; + icon_file = ""; + icon_folder = ""; + icon_command = ""; + }; + tasks = { }; + help = { }; + filetype = { }; + icon = { + globs = [ ]; + dirs = [ + { + name = ".config"; + text = ""; + } + { + name = ".git"; + text = ""; + } + { + name = ".github"; + text = ""; + } + { + name = ".npm"; + text = ""; + } + { + name = "Desktop"; + text = ""; + } + { + name = "Development"; + text = ""; + } + { + name = "Documents"; + text = ""; + } + { + name = "Downloads"; + text = ""; + } + { + name = "Library"; + text = ""; + } + { + name = "Movies"; + text = ""; + } + { + name = "Music"; + text = ""; + } + { + name = "Pictures"; + text = ""; + } + { + name = "Public"; + text = ""; + } + { + name = "Videos"; + text = ""; + } + ]; + files = [ + { + name = ".babelrc"; + text = ""; + fg = "#cbcb41"; + } + { + name = ".bash_profile"; + text = ""; + fg = "#89e051"; + } + { + name = ".bashrc"; + text = ""; + fg = "#89e051"; + } + { + name = ".clang-format"; + text = ""; + fg = "#6d8086"; + } + { + name = ".clang-tidy"; + text = ""; + fg = "#6d8086"; + } + { + name = ".codespellrc"; + text = "󰓆"; + fg = "#35da60"; + } + { + name = ".condarc"; + text = ""; + fg = "#43b02a"; + } + { + name = ".dockerignore"; + text = "󰡨"; + fg = "#458ee6"; + } + { + name = ".ds_store"; + text = ""; + fg = "#41535b"; + } + { + name = ".editorconfig"; + text = ""; + fg = "#fff2f2"; + } + { + name = ".env"; + text = ""; + fg = "#faf743"; + } + { + name = ".eslintignore"; + text = ""; + fg = "#4b32c3"; + } + { + name = ".eslintrc"; + text = ""; + fg = "#4b32c3"; + } + { + name = ".git-blame-ignore-revs"; + text = ""; + fg = "#f54d27"; + } + { + name = ".gitattributes"; + text = ""; + fg = "#f54d27"; + } + { + name = ".gitconfig"; + text = ""; + fg = "#f54d27"; + } + { + name = ".gitignore"; + text = ""; + fg = "#f54d27"; + } + { + name = ".gitlab-ci.yml"; + text = ""; + fg = "#e24329"; + } + { + name = ".gitmodules"; + text = ""; + fg = "#f54d27"; + } + { + name = ".gtkrc-2.0"; + text = ""; + fg = "#ffffff"; + } + { + name = ".gvimrc"; + text = ""; + fg = "#019833"; + } + { + name = ".justfile"; + text = ""; + fg = "#6d8086"; + } + { + name = ".luacheckrc"; + text = ""; + fg = "#00a2ff"; + } + { + name = ".luaurc"; + text = ""; + fg = "#00a2ff"; + } + { + name = ".mailmap"; + text = "󰊢"; + fg = "#f54d27"; + } + { + name = ".nanorc"; + text = ""; + fg = "#440077"; + } + { + name = ".npmignore"; + text = ""; + fg = "#e8274b"; + } + { + name = ".npmrc"; + text = ""; + fg = "#e8274b"; + } + { + name = ".nuxtrc"; + text = "󱄆"; + fg = "#00c58e"; + } + { + name = ".nvmrc"; + text = ""; + fg = "#5fa04e"; + } + { + name = ".pre-commit-config.yaml"; + text = "󰛢"; + fg = "#f8b424"; + } + { + name = ".prettierignore"; + text = ""; + fg = "#4285f4"; + } + { + name = ".prettierrc"; + text = ""; + fg = "#4285f4"; + } + { + name = ".prettierrc.cjs"; + text = ""; + fg = "#4285f4"; + } + { + name = ".prettierrc.js"; + text = ""; + fg = "#4285f4"; + } + { + name = ".prettierrc.json"; + text = ""; + fg = "#4285f4"; + } + { + name = ".prettierrc.json5"; + text = ""; + fg = "#4285f4"; + } + { + name = ".prettierrc.mjs"; + text = ""; + fg = "#4285f4"; + } + { + name = ".prettierrc.toml"; + text = ""; + fg = "#4285f4"; + } + { + name = ".prettierrc.yaml"; + text = ""; + fg = "#4285f4"; + } + { + name = ".prettierrc.yml"; + text = ""; + fg = "#4285f4"; + } + { + name = ".pylintrc"; + text = ""; + fg = "#6d8086"; + } + { + name = ".settings.json"; + text = ""; + fg = "#854cc7"; + } + { + name = ".SRCINFO"; + text = "󰣇"; + fg = "#0f94d2"; + } + { + name = ".vimrc"; + text = ""; + fg = "#019833"; + } + { + name = ".Xauthority"; + text = ""; + fg = "#e54d18"; + } + { + name = ".xinitrc"; + text = ""; + fg = "#e54d18"; + } + { + name = ".Xresources"; + text = ""; + fg = "#e54d18"; + } + { + name = ".xsession"; + text = ""; + fg = "#e54d18"; + } + { + name = ".zprofile"; + text = ""; + fg = "#89e051"; + } + { + name = ".zshenv"; + text = ""; + fg = "#89e051"; + } + { + name = ".zshrc"; + text = ""; + fg = "#89e051"; + } + { + name = "_gvimrc"; + text = ""; + fg = "#019833"; + } + { + name = "_vimrc"; + text = ""; + fg = "#019833"; + } + { + name = "AUTHORS"; + text = ""; + fg = "#a172ff"; + } + { + name = "AUTHORS.txt"; + text = ""; + fg = "#a172ff"; + } + { + name = "brewfile"; + text = ""; + fg = "#701516"; + } + { + name = "bspwmrc"; + text = ""; + fg = "#2f2f2f"; + } + { + name = "build"; + text = ""; + fg = "#89e051"; + } + { + name = "build.gradle"; + text = ""; + fg = "#005f87"; + } + { + name = "build.zig.zon"; + text = ""; + fg = "#f69a1b"; + } + { + name = "bun.lockb"; + text = ""; + fg = "#eadcd1"; + } + { + name = "cantorrc"; + text = ""; + fg = "#1c99f3"; + } + { + name = "checkhealth"; + text = "󰓙"; + fg = "#75b4fb"; + } + { + name = "cmakelists.txt"; + text = ""; + fg = "#dce3eb"; + } + { + name = "code_of_conduct"; + text = ""; + fg = "#e41662"; + } + { + name = "code_of_conduct.md"; + text = ""; + fg = "#e41662"; + } + { + name = "commit_editmsg"; + text = ""; + fg = "#f54d27"; + } + { + name = "commitlint.config.js"; + text = "󰜘"; + fg = "#2b9689"; + } + { + name = "commitlint.config.ts"; + text = "󰜘"; + fg = "#2b9689"; + } + { + name = "compose.yaml"; + text = "󰡨"; + fg = "#458ee6"; + } + { + name = "compose.yml"; + text = "󰡨"; + fg = "#458ee6"; + } + { + name = "config"; + text = ""; + fg = "#6d8086"; + } + { + name = "containerfile"; + text = "󰡨"; + fg = "#458ee6"; + } + { + name = "copying"; + text = ""; + fg = "#cbcb41"; + } + { + name = "copying.lesser"; + text = ""; + fg = "#cbcb41"; + } + { + name = "Directory.Build.props"; + text = ""; + fg = "#00a2ff"; + } + { + name = "Directory.Build.targets"; + text = ""; + fg = "#00a2ff"; + } + { + name = "Directory.Packages.props"; + text = ""; + fg = "#00a2ff"; + } + { + name = "docker-compose.yaml"; + text = "󰡨"; + fg = "#458ee6"; + } + { + name = "docker-compose.yml"; + text = "󰡨"; + fg = "#458ee6"; + } + { + name = "dockerfile"; + text = "󰡨"; + fg = "#458ee6"; + } + { + name = "eslint.config.cjs"; + text = ""; + fg = "#4b32c3"; + } + { + name = "eslint.config.js"; + text = ""; + fg = "#4b32c3"; + } + { + name = "eslint.config.mjs"; + text = ""; + fg = "#4b32c3"; + } + { + name = "eslint.config.ts"; + text = ""; + fg = "#4b32c3"; + } + { + name = "ext_typoscript_setup.txt"; + text = ""; + fg = "#ff8700"; + } + { + name = "favicon.ico"; + text = ""; + fg = "#cbcb41"; + } + { + name = "fp-info-cache"; + text = ""; + fg = "#ffffff"; + } + { + name = "fp-lib-table"; + text = ""; + fg = "#ffffff"; + } + { + name = "FreeCAD.conf"; + text = ""; + fg = "#cb333b"; + } + { + name = "Gemfile"; + text = ""; + fg = "#701516"; + } + { + name = "gnumakefile"; + text = ""; + fg = "#6d8086"; + } + { + name = "go.mod"; + text = ""; + fg = "#519aba"; + } + { + name = "go.sum"; + text = ""; + fg = "#519aba"; + } + { + name = "go.work"; + text = ""; + fg = "#519aba"; + } + { + name = "gradle-wrapper.properties"; + text = ""; + fg = "#005f87"; + } + { + name = "gradle.properties"; + text = ""; + fg = "#005f87"; + } + { + name = "gradlew"; + text = ""; + fg = "#005f87"; + } + { + name = "groovy"; + text = ""; + fg = "#4a687c"; + } + { + name = "gruntfile.babel.js"; + text = ""; + fg = "#e37933"; + } + { + name = "gruntfile.coffee"; + text = ""; + fg = "#e37933"; + } + { + name = "gruntfile.js"; + text = ""; + fg = "#e37933"; + } + { + name = "gruntfile.ts"; + text = ""; + fg = "#e37933"; + } + { + name = "gtkrc"; + text = ""; + fg = "#ffffff"; + } + { + name = "gulpfile.babel.js"; + text = ""; + fg = "#cc3e44"; + } + { + name = "gulpfile.coffee"; + text = ""; + fg = "#cc3e44"; + } + { + name = "gulpfile.js"; + text = ""; + fg = "#cc3e44"; + } + { + name = "gulpfile.ts"; + text = ""; + fg = "#cc3e44"; + } + { + name = "hypridle.conf"; + text = ""; + fg = "#00aaae"; + } + { + name = "hyprland.conf"; + text = ""; + fg = "#00aaae"; + } + { + name = "hyprlock.conf"; + text = ""; + fg = "#00aaae"; + } + { + name = "hyprpaper.conf"; + text = ""; + fg = "#00aaae"; + } + { + name = "i18n.config.js"; + text = "󰗊"; + fg = "#7986cb"; + } + { + name = "i18n.config.ts"; + text = "󰗊"; + fg = "#7986cb"; + } + { + name = "i3blocks.conf"; + text = ""; + fg = "#e8ebee"; + } + { + name = "i3status.conf"; + text = ""; + fg = "#e8ebee"; + } + { + name = "index.theme"; + text = ""; + fg = "#2db96f"; + } + { + name = "ionic.config.json"; + text = ""; + fg = "#4f8ff7"; + } + { + name = "justfile"; + text = ""; + fg = "#6d8086"; + } + { + name = "kalgebrarc"; + text = ""; + fg = "#1c99f3"; + } + { + name = "kdeglobals"; + text = ""; + fg = "#1c99f3"; + } + { + name = "kdenlive-layoutsrc"; + text = ""; + fg = "#83b8f2"; + } + { + name = "kdenliverc"; + text = ""; + fg = "#83b8f2"; + } + { + name = "kritadisplayrc"; + text = ""; + fg = "#f245fb"; + } + { + name = "kritarc"; + text = ""; + fg = "#f245fb"; + } + { + name = "license"; + text = ""; + fg = "#d0bf41"; + } + { + name = "license.md"; + text = ""; + fg = "#d0bf41"; + } + { + name = "lxde-rc.xml"; + text = ""; + fg = "#909090"; + } + { + name = "lxqt.conf"; + text = ""; + fg = "#0192d3"; + } + { + name = "makefile"; + text = ""; + fg = "#6d8086"; + } + { + name = "mix.lock"; + text = ""; + fg = "#a074c4"; + } + { + name = "mpv.conf"; + text = ""; + fg = "#3b1342"; + } + { + name = "node_modules"; + text = ""; + fg = "#e8274b"; + } + { + name = "nuxt.config.cjs"; + text = "󱄆"; + fg = "#00c58e"; + } + { + name = "nuxt.config.js"; + text = "󱄆"; + fg = "#00c58e"; + } + { + name = "nuxt.config.mjs"; + text = "󱄆"; + fg = "#00c58e"; + } + { + name = "nuxt.config.ts"; + text = "󱄆"; + fg = "#00c58e"; + } + { + name = "package-lock.json"; + text = ""; + fg = "#7a0d21"; + } + { + name = "package.json"; + text = ""; + fg = "#e8274b"; + } + { + name = "PKGBUILD"; + text = ""; + fg = "#0f94d2"; + } + { + name = "platformio.ini"; + text = ""; + fg = "#f6822b"; + } + { + name = "pom.xml"; + text = ""; + fg = "#7a0d21"; + } + { + name = "prettier.config.cjs"; + text = ""; + fg = "#4285f4"; + } + { + name = "prettier.config.js"; + text = ""; + fg = "#4285f4"; + } + { + name = "prettier.config.mjs"; + text = ""; + fg = "#4285f4"; + } + { + name = "prettier.config.ts"; + text = ""; + fg = "#4285f4"; + } + { + name = "procfile"; + text = ""; + fg = "#a074c4"; + } + { + name = "PrusaSlicer.ini"; + text = ""; + fg = "#ec6b23"; + } + { + name = "PrusaSlicerGcodeViewer.ini"; + text = ""; + fg = "#ec6b23"; + } + { + name = "py.typed"; + text = ""; + fg = "#ffbc03"; + } + { + name = "QtProject.conf"; + text = ""; + fg = "#40cd52"; + } + { + name = "rakefile"; + text = ""; + fg = "#701516"; + } + { + name = "readme"; + text = "󰂺"; + fg = "#ededed"; + } + { + name = "readme.md"; + text = "󰂺"; + fg = "#ededed"; + } + { + name = "rmd"; + text = ""; + fg = "#519aba"; + } + { + name = "robots.txt"; + text = "󰚩"; + fg = "#5d7096"; + } + { + name = "security"; + text = "󰒃"; + fg = "#bec4c9"; + } + { + name = "security.md"; + text = "󰒃"; + fg = "#bec4c9"; + } + { + name = "settings.gradle"; + text = ""; + fg = "#005f87"; + } + { + name = "svelte.config.js"; + text = ""; + fg = "#ff3e00"; + } + { + name = "sxhkdrc"; + text = ""; + fg = "#2f2f2f"; + } + { + name = "sym-lib-table"; + text = ""; + fg = "#ffffff"; + } + { + name = "tailwind.config.js"; + text = "󱏿"; + fg = "#20c2e3"; + } + { + name = "tailwind.config.mjs"; + text = "󱏿"; + fg = "#20c2e3"; + } + { + name = "tailwind.config.ts"; + text = "󱏿"; + fg = "#20c2e3"; + } + { + name = "tmux.conf"; + text = ""; + fg = "#14ba19"; + } + { + name = "tmux.conf.local"; + text = ""; + fg = "#14ba19"; + } + { + name = "tsconfig.json"; + text = ""; + fg = "#519aba"; + } + { + name = "unlicense"; + text = ""; + fg = "#d0bf41"; + } + { + name = "vagrantfile"; + text = ""; + fg = "#1563ff"; + } + { + name = "vercel.json"; + text = ""; + fg = "#ffffff"; + } + { + name = "vlcrc"; + text = "󰕼"; + fg = "#ee7a00"; + } + { + name = "webpack"; + text = "󰜫"; + fg = "#519aba"; + } + { + name = "weston.ini"; + text = ""; + fg = "#ffbb01"; + } + { + name = "workspace"; + text = ""; + fg = "#89e051"; + } + { + name = "xmobarrc"; + text = ""; + fg = "#fd4d5d"; + } + { + name = "xmobarrc.hs"; + text = ""; + fg = "#fd4d5d"; + } + { + name = "xmonad.hs"; + text = ""; + fg = "#fd4d5d"; + } + { + name = "xorg.conf"; + text = ""; + fg = "#e54d18"; + } + { + name = "xsettingsd.conf"; + text = ""; + fg = "#e54d18"; + } + ]; + exts = [ + { + name = "3gp"; + text = ""; + fg = "#fd971f"; + } + { + name = "3mf"; + text = "󰆧"; + fg = "#888888"; + } + { + name = "7z"; + text = ""; + fg = "#eca517"; + } + { + name = "a"; + text = ""; + fg = "#dcddd6"; + } + { + name = "aac"; + text = ""; + fg = "#00afff"; + } + { + name = "adb"; + text = ""; + fg = "#22ffff"; + } + { + name = "ads"; + text = ""; + fg = "#ffffff"; + } + { + name = "ai"; + text = ""; + fg = "#cbcb41"; + } + { + name = "aif"; + text = ""; + fg = "#00afff"; + } + { + name = "aiff"; + text = ""; + fg = "#00afff"; + } + { + name = "android"; + text = ""; + fg = "#34a853"; + } + { + name = "ape"; + text = ""; + fg = "#00afff"; + } + { + name = "apk"; + text = ""; + fg = "#34a853"; + } + { + name = "apl"; + text = ""; + fg = "#24a148"; + } + { + name = "app"; + text = ""; + fg = "#9f0500"; + } + { + name = "applescript"; + text = ""; + fg = "#6d8085"; + } + { + name = "asc"; + text = "󰦝"; + fg = "#576d7f"; + } + { + name = "asm"; + text = ""; + fg = "#0091bd"; + } + { + name = "ass"; + text = "󰨖"; + fg = "#ffb713"; + } + { + name = "astro"; + text = ""; + fg = "#e23f67"; + } + { + name = "avif"; + text = ""; + fg = "#a074c4"; + } + { + name = "awk"; + text = ""; + fg = "#4d5a5e"; + } + { + name = "azcli"; + text = ""; + fg = "#0078d4"; + } + { + name = "bak"; + text = "󰁯"; + fg = "#6d8086"; + } + { + name = "bash"; + text = ""; + fg = "#89e051"; + } + { + name = "bat"; + text = ""; + fg = "#c1f12e"; + } + { + name = "bazel"; + text = ""; + fg = "#89e051"; + } + { + name = "bib"; + text = "󱉟"; + fg = "#cbcb41"; + } + { + name = "bicep"; + text = ""; + fg = "#519aba"; + } + { + name = "bicepparam"; + text = ""; + fg = "#9f74b3"; + } + { + name = "bin"; + text = ""; + fg = "#9f0500"; + } + { + name = "blade.php"; + text = ""; + fg = "#f05340"; + } + { + name = "blend"; + text = "󰂫"; + fg = "#ea7600"; + } + { + name = "blp"; + text = "󰺾"; + fg = "#5796e2"; + } + { + name = "bmp"; + text = ""; + fg = "#a074c4"; + } + { + name = "bqn"; + text = ""; + fg = "#24a148"; + } + { + name = "brep"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "bz"; + text = ""; + fg = "#eca517"; + } + { + name = "bz2"; + text = ""; + fg = "#eca517"; + } + { + name = "bz3"; + text = ""; + fg = "#eca517"; + } + { + name = "bzl"; + text = ""; + fg = "#89e051"; + } + { + name = "c"; + text = ""; + fg = "#599eff"; + } + { + name = "c++"; + text = ""; + fg = "#f34b7d"; + } + { + name = "cache"; + text = ""; + fg = "#ffffff"; + } + { + name = "cast"; + text = ""; + fg = "#fd971f"; + } + { + name = "cbl"; + text = ""; + fg = "#005ca5"; + } + { + name = "cc"; + text = ""; + fg = "#f34b7d"; + } + { + name = "ccm"; + text = ""; + fg = "#f34b7d"; + } + { + name = "cfg"; + text = ""; + fg = "#6d8086"; + } + { + name = "cjs"; + text = ""; + fg = "#cbcb41"; + } + { + name = "clj"; + text = ""; + fg = "#8dc149"; + } + { + name = "cljc"; + text = ""; + fg = "#8dc149"; + } + { + name = "cljd"; + text = ""; + fg = "#519aba"; + } + { + name = "cljs"; + text = ""; + fg = "#519aba"; + } + { + name = "cmake"; + text = ""; + fg = "#dce3eb"; + } + { + name = "cob"; + text = ""; + fg = "#005ca5"; + } + { + name = "cobol"; + text = ""; + fg = "#005ca5"; + } + { + name = "coffee"; + text = ""; + fg = "#cbcb41"; + } + { + name = "conda"; + text = ""; + fg = "#43b02a"; + } + { + name = "conf"; + text = ""; + fg = "#6d8086"; + } + { + name = "config.ru"; + text = ""; + fg = "#701516"; + } + { + name = "cow"; + text = "󰆚"; + fg = "#965824"; + } + { + name = "cp"; + text = ""; + fg = "#519aba"; + } + { + name = "cpp"; + text = ""; + fg = "#519aba"; + } + { + name = "cppm"; + text = ""; + fg = "#519aba"; + } + { + name = "cpy"; + text = ""; + fg = "#005ca5"; + } + { + name = "cr"; + text = ""; + fg = "#c8c8c8"; + } + { + name = "crdownload"; + text = ""; + fg = "#44cda8"; + } + { + name = "cs"; + text = "󰌛"; + fg = "#596706"; + } + { + name = "csh"; + text = ""; + fg = "#4d5a5e"; + } + { + name = "cshtml"; + text = "󱦗"; + fg = "#512bd4"; + } + { + name = "cson"; + text = ""; + fg = "#cbcb41"; + } + { + name = "csproj"; + text = "󰪮"; + fg = "#512bd4"; + } + { + name = "css"; + text = ""; + fg = "#42a5f5"; + } + { + name = "csv"; + text = ""; + fg = "#89e051"; + } + { + name = "cts"; + text = ""; + fg = "#519aba"; + } + { + name = "cu"; + text = ""; + fg = "#89e051"; + } + { + name = "cue"; + text = "󰲹"; + fg = "#ed95ae"; + } + { + name = "cuh"; + text = ""; + fg = "#a074c4"; + } + { + name = "cxx"; + text = ""; + fg = "#519aba"; + } + { + name = "cxxm"; + text = ""; + fg = "#519aba"; + } + { + name = "d"; + text = ""; + fg = "#b03931"; + } + { + name = "d.ts"; + text = ""; + fg = "#d59855"; + } + { + name = "dart"; + text = ""; + fg = "#03589c"; + } + { + name = "db"; + text = ""; + fg = "#dad8d8"; + } + { + name = "dconf"; + text = ""; + fg = "#ffffff"; + } + { + name = "desktop"; + text = ""; + fg = "#563d7c"; + } + { + name = "diff"; + text = ""; + fg = "#41535b"; + } + { + name = "dll"; + text = ""; + fg = "#4d2c0b"; + } + { + name = "doc"; + text = "󰈬"; + fg = "#185abd"; + } + { + name = "Dockerfile"; + text = "󰡨"; + fg = "#458ee6"; + } + { + name = "docx"; + text = "󰈬"; + fg = "#185abd"; + } + { + name = "dot"; + text = "󱁉"; + fg = "#30638e"; + } + { + name = "download"; + text = ""; + fg = "#44cda8"; + } + { + name = "drl"; + text = ""; + fg = "#ffafaf"; + } + { + name = "dropbox"; + text = ""; + fg = "#0061fe"; + } + { + name = "dump"; + text = ""; + fg = "#dad8d8"; + } + { + name = "dwg"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "dxf"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "ebook"; + text = ""; + fg = "#eab16d"; + } + { + name = "ebuild"; + text = ""; + fg = "#4c416e"; + } + { + name = "edn"; + text = ""; + fg = "#519aba"; + } + { + name = "eex"; + text = ""; + fg = "#a074c4"; + } + { + name = "ejs"; + text = ""; + fg = "#cbcb41"; + } + { + name = "el"; + text = ""; + fg = "#8172be"; + } + { + name = "elc"; + text = ""; + fg = "#8172be"; + } + { + name = "elf"; + text = ""; + fg = "#9f0500"; + } + { + name = "elm"; + text = ""; + fg = "#519aba"; + } + { + name = "eln"; + text = ""; + fg = "#8172be"; + } + { + name = "env"; + text = ""; + fg = "#faf743"; + } + { + name = "eot"; + text = ""; + fg = "#ececec"; + } + { + name = "epp"; + text = ""; + fg = "#ffa61a"; + } + { + name = "epub"; + text = ""; + fg = "#eab16d"; + } + { + name = "erb"; + text = ""; + fg = "#701516"; + } + { + name = "erl"; + text = ""; + fg = "#b83998"; + } + { + name = "ex"; + text = ""; + fg = "#a074c4"; + } + { + name = "exe"; + text = ""; + fg = "#9f0500"; + } + { + name = "exs"; + text = ""; + fg = "#a074c4"; + } + { + name = "f#"; + text = ""; + fg = "#519aba"; + } + { + name = "f3d"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "f90"; + text = "󱈚"; + fg = "#734f96"; + } + { + name = "fbx"; + text = "󰆧"; + fg = "#888888"; + } + { + name = "fcbak"; + text = ""; + fg = "#cb333b"; + } + { + name = "fcmacro"; + text = ""; + fg = "#cb333b"; + } + { + name = "fcmat"; + text = ""; + fg = "#cb333b"; + } + { + name = "fcparam"; + text = ""; + fg = "#cb333b"; + } + { + name = "fcscript"; + text = ""; + fg = "#cb333b"; + } + { + name = "fcstd"; + text = ""; + fg = "#cb333b"; + } + { + name = "fcstd1"; + text = ""; + fg = "#cb333b"; + } + { + name = "fctb"; + text = ""; + fg = "#cb333b"; + } + { + name = "fctl"; + text = ""; + fg = "#cb333b"; + } + { + name = "fdmdownload"; + text = ""; + fg = "#44cda8"; + } + { + name = "fish"; + text = ""; + fg = "#4d5a5e"; + } + { + name = "flac"; + text = ""; + fg = "#0075aa"; + } + { + name = "flc"; + text = ""; + fg = "#ececec"; + } + { + name = "flf"; + text = ""; + fg = "#ececec"; + } + { + name = "fnl"; + text = ""; + fg = "#fff3d7"; + } + { + name = "fodg"; + text = ""; + fg = "#fffb57"; + } + { + name = "fodp"; + text = ""; + fg = "#fe9c45"; + } + { + name = "fods"; + text = ""; + fg = "#78fc4e"; + } + { + name = "fodt"; + text = ""; + fg = "#2dcbfd"; + } + { + name = "fs"; + text = ""; + fg = "#519aba"; + } + { + name = "fsi"; + text = ""; + fg = "#519aba"; + } + { + name = "fsscript"; + text = ""; + fg = "#519aba"; + } + { + name = "fsx"; + text = ""; + fg = "#519aba"; + } + { + name = "gcode"; + text = "󰐫"; + fg = "#1471ad"; + } + { + name = "gd"; + text = ""; + fg = "#6d8086"; + } + { + name = "gemspec"; + text = ""; + fg = "#701516"; + } + { + name = "gif"; + text = ""; + fg = "#a074c4"; + } + { + name = "git"; + text = ""; + fg = "#f14c28"; + } + { + name = "glb"; + text = ""; + fg = "#ffb13b"; + } + { + name = "gleam"; + text = ""; + fg = "#ffaff3"; + } + { + name = "gnumakefile"; + text = ""; + fg = "#6d8086"; + } + { + name = "go"; + text = ""; + fg = "#519aba"; + } + { + name = "godot"; + text = ""; + fg = "#6d8086"; + } + { + name = "gpr"; + text = ""; + fg = "#ff33ff"; + } + { + name = "gql"; + text = ""; + fg = "#e535ab"; + } + { + name = "gradle"; + text = ""; + fg = "#005f87"; + } + { + name = "graphql"; + text = ""; + fg = "#e535ab"; + } + { + name = "gresource"; + text = ""; + fg = "#ffffff"; + } + { + name = "gv"; + text = "󱁉"; + fg = "#30638e"; + } + { + name = "gz"; + text = ""; + fg = "#eca517"; + } + { + name = "h"; + text = ""; + fg = "#a074c4"; + } + { + name = "haml"; + text = ""; + fg = "#eaeae1"; + } + { + name = "hbs"; + text = ""; + fg = "#f0772b"; + } + { + name = "heex"; + text = ""; + fg = "#a074c4"; + } + { + name = "hex"; + text = ""; + fg = "#2e63ff"; + } + { + name = "hh"; + text = ""; + fg = "#a074c4"; + } + { + name = "hpp"; + text = ""; + fg = "#a074c4"; + } + { + name = "hrl"; + text = ""; + fg = "#b83998"; + } + { + name = "hs"; + text = ""; + fg = "#a074c4"; + } + { + name = "htm"; + text = ""; + fg = "#e34c26"; + } + { + name = "html"; + text = ""; + fg = "#e44d26"; + } + { + name = "http"; + text = ""; + fg = "#008ec7"; + } + { + name = "huff"; + text = "󰡘"; + fg = "#4242c7"; + } + { + name = "hurl"; + text = ""; + fg = "#ff0288"; + } + { + name = "hx"; + text = ""; + fg = "#ea8220"; + } + { + name = "hxx"; + text = ""; + fg = "#a074c4"; + } + { + name = "ical"; + text = ""; + fg = "#2b2e83"; + } + { + name = "icalendar"; + text = ""; + fg = "#2b2e83"; + } + { + name = "ico"; + text = ""; + fg = "#cbcb41"; + } + { + name = "ics"; + text = ""; + fg = "#2b2e83"; + } + { + name = "ifb"; + text = ""; + fg = "#2b2e83"; + } + { + name = "ifc"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "ige"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "iges"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "igs"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "image"; + text = ""; + fg = "#d0bec8"; + } + { + name = "img"; + text = ""; + fg = "#d0bec8"; + } + { + name = "import"; + text = ""; + fg = "#ececec"; + } + { + name = "info"; + text = ""; + fg = "#ffffcd"; + } + { + name = "ini"; + text = ""; + fg = "#6d8086"; + } + { + name = "ino"; + text = ""; + fg = "#56b6c2"; + } + { + name = "ipynb"; + text = ""; + fg = "#f57d01"; + } + { + name = "iso"; + text = ""; + fg = "#d0bec8"; + } + { + name = "ixx"; + text = ""; + fg = "#519aba"; + } + { + name = "java"; + text = ""; + fg = "#cc3e44"; + } + { + name = "jl"; + text = ""; + fg = "#a270ba"; + } + { + name = "jpeg"; + text = ""; + fg = "#a074c4"; + } + { + name = "jpg"; + text = ""; + fg = "#a074c4"; + } + { + name = "js"; + text = ""; + fg = "#cbcb41"; + } + { + name = "json"; + text = ""; + fg = "#cbcb41"; + } + { + name = "json5"; + text = ""; + fg = "#cbcb41"; + } + { + name = "jsonc"; + text = ""; + fg = "#cbcb41"; + } + { + name = "jsx"; + text = ""; + fg = "#20c2e3"; + } + { + name = "jwmrc"; + text = ""; + fg = "#0078cd"; + } + { + name = "jxl"; + text = ""; + fg = "#a074c4"; + } + { + name = "kbx"; + text = "󰯄"; + fg = "#737672"; + } + { + name = "kdb"; + text = ""; + fg = "#529b34"; + } + { + name = "kdbx"; + text = ""; + fg = "#529b34"; + } + { + name = "kdenlive"; + text = ""; + fg = "#83b8f2"; + } + { + name = "kdenlivetitle"; + text = ""; + fg = "#83b8f2"; + } + { + name = "kicad_dru"; + text = ""; + fg = "#ffffff"; + } + { + name = "kicad_mod"; + text = ""; + fg = "#ffffff"; + } + { + name = "kicad_pcb"; + text = ""; + fg = "#ffffff"; + } + { + name = "kicad_prl"; + text = ""; + fg = "#ffffff"; + } + { + name = "kicad_pro"; + text = ""; + fg = "#ffffff"; + } + { + name = "kicad_sch"; + text = ""; + fg = "#ffffff"; + } + { + name = "kicad_sym"; + text = ""; + fg = "#ffffff"; + } + { + name = "kicad_wks"; + text = ""; + fg = "#ffffff"; + } + { + name = "ko"; + text = ""; + fg = "#dcddd6"; + } + { + name = "kpp"; + text = ""; + fg = "#f245fb"; + } + { + name = "kra"; + text = ""; + fg = "#f245fb"; + } + { + name = "krz"; + text = ""; + fg = "#f245fb"; + } + { + name = "ksh"; + text = ""; + fg = "#4d5a5e"; + } + { + name = "kt"; + text = ""; + fg = "#7f52ff"; + } + { + name = "kts"; + text = ""; + fg = "#7f52ff"; + } + { + name = "lck"; + text = ""; + fg = "#bbbbbb"; + } + { + name = "leex"; + text = ""; + fg = "#a074c4"; + } + { + name = "less"; + text = ""; + fg = "#563d7c"; + } + { + name = "lff"; + text = ""; + fg = "#ececec"; + } + { + name = "lhs"; + text = ""; + fg = "#a074c4"; + } + { + name = "lib"; + text = ""; + fg = "#4d2c0b"; + } + { + name = "license"; + text = ""; + fg = "#cbcb41"; + } + { + name = "liquid"; + text = ""; + fg = "#95bf47"; + } + { + name = "lock"; + text = ""; + fg = "#bbbbbb"; + } + { + name = "log"; + text = "󰌱"; + fg = "#dddddd"; + } + { + name = "lrc"; + text = "󰨖"; + fg = "#ffb713"; + } + { + name = "lua"; + text = ""; + fg = "#51a0cf"; + } + { + name = "luac"; + text = ""; + fg = "#51a0cf"; + } + { + name = "luau"; + text = ""; + fg = "#00a2ff"; + } + { + name = "m"; + text = ""; + fg = "#599eff"; + } + { + name = "m3u"; + text = "󰲹"; + fg = "#ed95ae"; + } + { + name = "m3u8"; + text = "󰲹"; + fg = "#ed95ae"; + } + { + name = "m4a"; + text = ""; + fg = "#00afff"; + } + { + name = "m4v"; + text = ""; + fg = "#fd971f"; + } + { + name = "magnet"; + text = ""; + fg = "#a51b16"; + } + { + name = "makefile"; + text = ""; + fg = "#6d8086"; + } + { + name = "markdown"; + text = ""; + fg = "#dddddd"; + } + { + name = "material"; + text = ""; + fg = "#b83998"; + } + { + name = "md"; + text = ""; + fg = "#dddddd"; + } + { + name = "md5"; + text = "󰕥"; + fg = "#8c86af"; + } + { + name = "mdx"; + text = ""; + fg = "#519aba"; + } + { + name = "mint"; + text = "󰌪"; + fg = "#87c095"; + } + { + name = "mjs"; + text = ""; + fg = "#f1e05a"; + } + { + name = "mk"; + text = ""; + fg = "#6d8086"; + } + { + name = "mkv"; + text = ""; + fg = "#fd971f"; + } + { + name = "ml"; + text = ""; + fg = "#e37933"; + } + { + name = "mli"; + text = ""; + fg = "#e37933"; + } + { + name = "mm"; + text = ""; + fg = "#519aba"; + } + { + name = "mo"; + text = ""; + fg = "#9772fb"; + } + { + name = "mobi"; + text = ""; + fg = "#eab16d"; + } + { + name = "mojo"; + text = ""; + fg = "#ff4c1f"; + } + { + name = "mov"; + text = ""; + fg = "#fd971f"; + } + { + name = "mp3"; + text = ""; + fg = "#00afff"; + } + { + name = "mp4"; + text = ""; + fg = "#fd971f"; + } + { + name = "mpp"; + text = ""; + fg = "#519aba"; + } + { + name = "msf"; + text = ""; + fg = "#137be1"; + } + { + name = "mts"; + text = ""; + fg = "#519aba"; + } + { + name = "mustache"; + text = ""; + fg = "#e37933"; + } + { + name = "nfo"; + text = ""; + fg = "#ffffcd"; + } + { + name = "nim"; + text = ""; + fg = "#f3d400"; + } + { + name = "nix"; + text = ""; + fg = "#7ebae4"; + } + { + name = "norg"; + text = ""; + fg = "#4878be"; + } + { + name = "nswag"; + text = ""; + fg = "#85ea2d"; + } + { + name = "nu"; + text = ""; + fg = "#3aa675"; + } + { + name = "o"; + text = ""; + fg = "#9f0500"; + } + { + name = "obj"; + text = "󰆧"; + fg = "#888888"; + } + { + name = "odf"; + text = ""; + fg = "#ff5a96"; + } + { + name = "odg"; + text = ""; + fg = "#fffb57"; + } + { + name = "odin"; + text = "󰟢"; + fg = "#3882d2"; + } + { + name = "odp"; + text = ""; + fg = "#fe9c45"; + } + { + name = "ods"; + text = ""; + fg = "#78fc4e"; + } + { + name = "odt"; + text = ""; + fg = "#2dcbfd"; + } + { + name = "oga"; + text = ""; + fg = "#0075aa"; + } + { + name = "ogg"; + text = ""; + fg = "#0075aa"; + } + { + name = "ogv"; + text = ""; + fg = "#fd971f"; + } + { + name = "ogx"; + text = ""; + fg = "#fd971f"; + } + { + name = "opus"; + text = ""; + fg = "#0075aa"; + } + { + name = "org"; + text = ""; + fg = "#77aa99"; + } + { + name = "otf"; + text = ""; + fg = "#ececec"; + } + { + name = "out"; + text = ""; + fg = "#9f0500"; + } + { + name = "part"; + text = ""; + fg = "#44cda8"; + } + { + name = "patch"; + text = ""; + fg = "#41535b"; + } + { + name = "pck"; + text = ""; + fg = "#6d8086"; + } + { + name = "pcm"; + text = ""; + fg = "#0075aa"; + } + { + name = "pdf"; + text = ""; + fg = "#b30b00"; + } + { + name = "php"; + text = ""; + fg = "#a074c4"; + } + { + name = "pl"; + text = ""; + fg = "#519aba"; + } + { + name = "pls"; + text = "󰲹"; + fg = "#ed95ae"; + } + { + name = "ply"; + text = "󰆧"; + fg = "#888888"; + } + { + name = "pm"; + text = ""; + fg = "#519aba"; + } + { + name = "png"; + text = ""; + fg = "#a074c4"; + } + { + name = "po"; + text = ""; + fg = "#2596be"; + } + { + name = "pot"; + text = ""; + fg = "#2596be"; + } + { + name = "pp"; + text = ""; + fg = "#ffa61a"; + } + { + name = "ppt"; + text = "󰈧"; + fg = "#cb4a32"; + } + { + name = "pptx"; + text = "󰈧"; + fg = "#cb4a32"; + } + { + name = "prisma"; + text = ""; + fg = "#5a67d8"; + } + { + name = "pro"; + text = ""; + fg = "#e4b854"; + } + { + name = "ps1"; + text = "󰨊"; + fg = "#4273ca"; + } + { + name = "psb"; + text = ""; + fg = "#519aba"; + } + { + name = "psd"; + text = ""; + fg = "#519aba"; + } + { + name = "psd1"; + text = "󰨊"; + fg = "#6975c4"; + } + { + name = "psm1"; + text = "󰨊"; + fg = "#6975c4"; + } + { + name = "pub"; + text = "󰷖"; + fg = "#e3c58e"; + } + { + name = "pxd"; + text = ""; + fg = "#5aa7e4"; + } + { + name = "pxi"; + text = ""; + fg = "#5aa7e4"; + } + { + name = "py"; + text = ""; + fg = "#ffbc03"; + } + { + name = "pyc"; + text = ""; + fg = "#ffe291"; + } + { + name = "pyd"; + text = ""; + fg = "#ffe291"; + } + { + name = "pyi"; + text = ""; + fg = "#ffbc03"; + } + { + name = "pyo"; + text = ""; + fg = "#ffe291"; + } + { + name = "pyw"; + text = ""; + fg = "#5aa7e4"; + } + { + name = "pyx"; + text = ""; + fg = "#5aa7e4"; + } + { + name = "qm"; + text = ""; + fg = "#2596be"; + } + { + name = "qml"; + text = ""; + fg = "#40cd52"; + } + { + name = "qrc"; + text = ""; + fg = "#40cd52"; + } + { + name = "qss"; + text = ""; + fg = "#40cd52"; + } + { + name = "query"; + text = ""; + fg = "#90a850"; + } + { + name = "r"; + text = "󰟔"; + fg = "#2266ba"; + } + { + name = "R"; + text = "󰟔"; + fg = "#2266ba"; + } + { + name = "rake"; + text = ""; + fg = "#701516"; + } + { + name = "rar"; + text = ""; + fg = "#eca517"; + } + { + name = "razor"; + text = "󱦘"; + fg = "#512bd4"; + } + { + name = "rb"; + text = ""; + fg = "#701516"; + } + { + name = "res"; + text = ""; + fg = "#cc3e44"; + } + { + name = "resi"; + text = ""; + fg = "#f55385"; + } + { + name = "rlib"; + text = ""; + fg = "#dea584"; + } + { + name = "rmd"; + text = ""; + fg = "#519aba"; + } + { + name = "rproj"; + text = "󰗆"; + fg = "#358a5b"; + } + { + name = "rs"; + text = ""; + fg = "#dea584"; + } + { + name = "rss"; + text = ""; + fg = "#fb9d3b"; + } + { + name = "s"; + text = ""; + fg = "#0071c5"; + } + { + name = "sass"; + text = ""; + fg = "#f55385"; + } + { + name = "sbt"; + text = ""; + fg = "#cc3e44"; + } + { + name = "sc"; + text = ""; + fg = "#cc3e44"; + } + { + name = "scad"; + text = ""; + fg = "#f9d72c"; + } + { + name = "scala"; + text = ""; + fg = "#cc3e44"; + } + { + name = "scm"; + text = "󰘧"; + fg = "#eeeeee"; + } + { + name = "scss"; + text = ""; + fg = "#f55385"; + } + { + name = "sh"; + text = ""; + fg = "#4d5a5e"; + } + { + name = "sha1"; + text = "󰕥"; + fg = "#8c86af"; + } + { + name = "sha224"; + text = "󰕥"; + fg = "#8c86af"; + } + { + name = "sha256"; + text = "󰕥"; + fg = "#8c86af"; + } + { + name = "sha384"; + text = "󰕥"; + fg = "#8c86af"; + } + { + name = "sha512"; + text = "󰕥"; + fg = "#8c86af"; + } + { + name = "sig"; + text = "󰘧"; + fg = "#e37933"; + } + { + name = "signature"; + text = "󰘧"; + fg = "#e37933"; + } + { + name = "skp"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "sldasm"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "sldprt"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "slim"; + text = ""; + fg = "#e34c26"; + } + { + name = "sln"; + text = ""; + fg = "#854cc7"; + } + { + name = "slnx"; + text = ""; + fg = "#854cc7"; + } + { + name = "slvs"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "sml"; + text = "󰘧"; + fg = "#e37933"; + } + { + name = "so"; + text = ""; + fg = "#dcddd6"; + } + { + name = "sol"; + text = ""; + fg = "#519aba"; + } + { + name = "spec.js"; + text = ""; + fg = "#cbcb41"; + } + { + name = "spec.jsx"; + text = ""; + fg = "#20c2e3"; + } + { + name = "spec.ts"; + text = ""; + fg = "#519aba"; + } + { + name = "spec.tsx"; + text = ""; + fg = "#1354bf"; + } + { + name = "spx"; + text = ""; + fg = "#0075aa"; + } + { + name = "sql"; + text = ""; + fg = "#dad8d8"; + } + { + name = "sqlite"; + text = ""; + fg = "#dad8d8"; + } + { + name = "sqlite3"; + text = ""; + fg = "#dad8d8"; + } + { + name = "srt"; + text = "󰨖"; + fg = "#ffb713"; + } + { + name = "ssa"; + text = "󰨖"; + fg = "#ffb713"; + } + { + name = "ste"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "step"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "stl"; + text = "󰆧"; + fg = "#888888"; + } + { + name = "stp"; + text = "󰻫"; + fg = "#839463"; + } + { + name = "strings"; + text = ""; + fg = "#2596be"; + } + { + name = "styl"; + text = ""; + fg = "#8dc149"; + } + { + name = "sub"; + text = "󰨖"; + fg = "#ffb713"; + } + { + name = "sublime"; + text = ""; + fg = "#e37933"; + } + { + name = "suo"; + text = ""; + fg = "#854cc7"; + } + { + name = "sv"; + text = "󰍛"; + fg = "#019833"; + } + { + name = "svelte"; + text = ""; + fg = "#ff3e00"; + } + { + name = "svg"; + text = "󰜡"; + fg = "#ffb13b"; + } + { + name = "svh"; + text = "󰍛"; + fg = "#019833"; + } + { + name = "swift"; + text = ""; + fg = "#e37933"; + } + { + name = "t"; + text = ""; + fg = "#519aba"; + } + { + name = "tbc"; + text = "󰛓"; + fg = "#1e5cb3"; + } + { + name = "tcl"; + text = "󰛓"; + fg = "#1e5cb3"; + } + { + name = "templ"; + text = ""; + fg = "#dbbd30"; + } + { + name = "terminal"; + text = ""; + fg = "#31b53e"; + } + { + name = "test.js"; + text = ""; + fg = "#cbcb41"; + } + { + name = "test.jsx"; + text = ""; + fg = "#20c2e3"; + } + { + name = "test.ts"; + text = ""; + fg = "#519aba"; + } + { + name = "test.tsx"; + text = ""; + fg = "#1354bf"; + } + { + name = "tex"; + text = ""; + fg = "#3d6117"; + } + { + name = "tf"; + text = ""; + fg = "#5f43e9"; + } + { + name = "tfvars"; + text = ""; + fg = "#5f43e9"; + } + { + name = "tgz"; + text = ""; + fg = "#eca517"; + } + { + name = "tmux"; + text = ""; + fg = "#14ba19"; + } + { + name = "toml"; + text = ""; + fg = "#9c4221"; + } + { + name = "torrent"; + text = ""; + fg = "#44cda8"; + } + { + name = "tres"; + text = ""; + fg = "#6d8086"; + } + { + name = "ts"; + text = ""; + fg = "#519aba"; + } + { + name = "tscn"; + text = ""; + fg = "#6d8086"; + } + { + name = "tsconfig"; + text = ""; + fg = "#ff8700"; + } + { + name = "tsx"; + text = ""; + fg = "#1354bf"; + } + { + name = "ttf"; + text = ""; + fg = "#ececec"; + } + { + name = "twig"; + text = ""; + fg = "#8dc149"; + } + { + name = "txt"; + text = "󰈙"; + fg = "#89e051"; + } + { + name = "txz"; + text = ""; + fg = "#eca517"; + } + { + name = "typ"; + text = ""; + fg = "#0dbcc0"; + } + { + name = "typoscript"; + text = ""; + fg = "#ff8700"; + } + { + name = "ui"; + text = ""; + fg = "#015bf0"; + } + { + name = "v"; + text = "󰍛"; + fg = "#019833"; + } + { + name = "vala"; + text = ""; + fg = "#7b3db9"; + } + { + name = "vh"; + text = "󰍛"; + fg = "#019833"; + } + { + name = "vhd"; + text = "󰍛"; + fg = "#019833"; + } + { + name = "vhdl"; + text = "󰍛"; + fg = "#019833"; + } + { + name = "vi"; + text = ""; + fg = "#fec60a"; + } + { + name = "vim"; + text = ""; + fg = "#019833"; + } + { + name = "vsh"; + text = ""; + fg = "#5d87bf"; + } + { + name = "vsix"; + text = ""; + fg = "#854cc7"; + } + { + name = "vue"; + text = ""; + fg = "#8dc149"; + } + { + name = "wasm"; + text = ""; + fg = "#5c4cdb"; + } + { + name = "wav"; + text = ""; + fg = "#00afff"; + } + { + name = "webm"; + text = ""; + fg = "#fd971f"; + } + { + name = "webmanifest"; + text = ""; + fg = "#f1e05a"; + } + { + name = "webp"; + text = ""; + fg = "#a074c4"; + } + { + name = "webpack"; + text = "󰜫"; + fg = "#519aba"; + } + { + name = "wma"; + text = ""; + fg = "#00afff"; + } + { + name = "woff"; + text = ""; + fg = "#ececec"; + } + { + name = "woff2"; + text = ""; + fg = "#ececec"; + } + { + name = "wrl"; + text = "󰆧"; + fg = "#888888"; + } + { + name = "wrz"; + text = "󰆧"; + fg = "#888888"; + } + { + name = "wv"; + text = ""; + fg = "#00afff"; + } + { + name = "wvc"; + text = ""; + fg = "#00afff"; + } + { + name = "x"; + text = ""; + fg = "#599eff"; + } + { + name = "xaml"; + text = "󰙳"; + fg = "#512bd4"; + } + { + name = "xcf"; + text = ""; + fg = "#635b46"; + } + { + name = "xcplayground"; + text = ""; + fg = "#e37933"; + } + { + name = "xcstrings"; + text = ""; + fg = "#2596be"; + } + { + name = "xls"; + text = "󰈛"; + fg = "#207245"; + } + { + name = "xlsx"; + text = "󰈛"; + fg = "#207245"; + } + { + name = "xm"; + text = ""; + fg = "#519aba"; + } + { + name = "xml"; + text = "󰗀"; + fg = "#e37933"; + } + { + name = "xpi"; + text = ""; + fg = "#ff1b01"; + } + { + name = "xul"; + text = ""; + fg = "#e37933"; + } + { + name = "xz"; + text = ""; + fg = "#eca517"; + } + { + name = "yaml"; + text = ""; + fg = "#6d8086"; + } + { + name = "yml"; + text = ""; + fg = "#6d8086"; + } + { + name = "zig"; + text = ""; + fg = "#f69a1b"; + } + { + name = "zip"; + text = ""; + fg = "#eca517"; + } + { + name = "zsh"; + text = ""; + fg = "#89e051"; + } + { + name = "zst"; + text = ""; + fg = "#eca517"; + } + { + name = "🔥"; + text = ""; + fg = "#ff4c1f"; + } + ]; + conds = [ + { + "if" = "orphan"; + text = ""; + } + { + "if" = "link"; + text = ""; + } + { + "if" = "block"; + text = ""; + } + { + "if" = "char"; + text = ""; + } + { + "if" = "fifo"; + text = ""; + } + { + "if" = "sock"; + text = ""; + } + { + "if" = "sticky"; + text = ""; + } + { + "if" = "dummy"; + text = ""; + } + { + "if" = "dir"; + text = ""; + } + { + "if" = "exec"; + text = ""; + } + { + "if" = "!dir"; + text = ""; + } + ]; + }; +} diff --git a/modules/home/yazi/yazi.nix b/modules/home/yazi/yazi.nix new file mode 100644 index 0000000..1fe053b --- /dev/null +++ b/modules/home/yazi/yazi.nix @@ -0,0 +1,389 @@ +{ + settings = { + manager = { + ratio = [ 1 4 3 ]; + sort_by = "alphabetical"; + sort_sensitive = false; + sort_reverse = false; + sort_dir_first = true; + sort_translit = false; + linemode = "none"; + show_hidden = false; + show_symlink = true; + scrolloff = 5; + mouse_events = [ "click" "scroll" ]; + title_format = "Yazi: {cwd}"; + }; + preview = { + wrap = "no"; + tab_size = 2; + max_width = 600; + max_height = 900; + cache_dir = ""; + image_delay = 30; + image_filter = "triangle"; + image_quality = 75; + sixel_fraction = 15; + ueberzug_scale = 1; + ueberzug_offset = [ 0 0 0 0 ]; + }; + opener = { + edit = [ + { + run = ''${"EDITOR:-vi"} "$@"''; + desc = "$EDITOR"; + block = true; + for = "unix"; + } + { + run = "code %*"; + orphan = true; + desc = "code"; + for = "windows"; + } + { + run = "code -w %*"; + block = true; + desc = "code (block)"; + for = "windows"; + } + ]; + open = [ + { + run = ''xdg-open "$1"''; + desc = "Open"; + for = "linux"; + } + { + run = ''open "$@"''; + desc = "Open"; + for = "macos"; + } + { + run = ''start "" "%1"''; + orphan = true; + desc = "Open"; + for = "windows"; + } + { + run = ''termux-open "$1"''; + desc = "Open"; + for = "android"; + } + ]; + reveal = [ + { + run = ''xdg-open "$(dirname "$1")"''; + desc = "Reveal"; + for = "linux"; + } + { + run = ''open -R "$1"''; + desc = "Reveal"; + for = "macos"; + } + { + run = ''explorer /select,"%1"''; + orphan = true; + desc = "Reveal"; + for = "windows"; + } + { + run = ''termux-open "$(dirname "$1")"''; + desc = "Reveal"; + for = "android"; + } + { + run = ''exiftool "$1"; echo "Press enter to exit"; read _''; + block = true; + desc = "Show EXIF"; + for = "unix"; + } + ]; + extract = [ + { + run = ''ya pub extract --list "$@"''; + desc = "Extract here"; + for = "unix"; + } + { + run = "ya pub extract --list %*"; + desc = "Extract here"; + for = "windows"; + } + ]; + play = [ + { + run = ''mpv --force-window "$@"''; + orphan = true; + for = "unix"; + } + { + run = "mpv --force-window %*"; + orphan = true; + for = "windows"; + } + { + run = ''mediainfo "$1"; echo "Press enter to exit"; read _''; + block = true; + desc = "Show media info"; + for = "unix"; + } + ]; + }; + open = { + rules = [ + { + name = "*/"; + use = [ "edit" "open" "reveal" ]; + } + { + mime = "text/*"; + use = [ "edit" "reveal" ]; + } + { + mime = "image/*"; + use = [ "open" "reveal" ]; + } + { + mime = "{audio,video}/*"; + use = [ "play" "reveal" ]; + } + { + mime = + "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}"; + use = [ "extract" "reveal" ]; + } + { + mime = "application/{json,ndjson}"; + use = [ "edit" "reveal" ]; + } + { + mime = "*/javascript"; + use = [ "edit" "reveal" ]; + } + { + mime = "inode/empty"; + use = [ "edit" "reveal" ]; + } + { + name = "*"; + use = [ "open" "reveal" ]; + } + ]; + }; + tasks = { + micro_workers = 10; + macro_workers = 10; + bizarre_retry = 3; + image_alloc = 536870912; + image_bound = [ 0 0 ]; + suppress_preload = false; + }; + plugin = { + fetchers = [{ + id = "mime"; + name = "*"; + run = "mime"; + prio = "high"; + }]; + spotters = [ + { + name = "*/"; + run = "folder"; + } + { + mime = "text/*"; + run = "code"; + } + { + mime = "application/{mbox,javascript,wine-extension-ini}"; + run = "code"; + } + { + mime = "image/{avif,hei?,jxl,svg+xml}"; + run = "magick"; + } + { + mime = "image/*"; + run = "image"; + } + { + mime = "video/*"; + run = "video"; + } + { + name = "*"; + run = "file"; + } + ]; + preloaders = [ + { + mime = "image/{avif,hei?,jxl,svg+xml}"; + run = "magick"; + } + { + mime = "image/*"; + run = "image"; + } + { + mime = "video/*"; + run = "video"; + } + { + mime = "application/pdf"; + run = "pdf"; + } + { + mime = "font/*"; + run = "font"; + } + { + mime = "application/ms-opentype"; + run = "font"; + } + ]; + previewers = [ + { + name = "*/"; + run = "folder"; + sync = true; + } + { + mime = "text/*"; + run = "code"; + } + { + mime = "application/{mbox,javascript,wine-extension-ini}"; + run = "code"; + } + { + mime = "application/{json,ndjson}"; + run = "json"; + } + { + mime = "image/{avif,hei?,jxl,svg+xml}"; + run = "magick"; + } + { + mime = "image/*"; + run = "image"; + } + { + mime = "video/*"; + run = "video"; + } + { + mime = "application/pdf"; + run = "pdf"; + } + { + mime = + "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}"; + run = "archive"; + } + { + mime = + "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}"; + run = "archive"; + } + { + name = "*.{AppImage,appimage}"; + run = "archive"; + } + { + mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}"; + run = "archive"; + } + { + mime = "application/virtualbox-{vhd,vhdx}"; + run = "archive"; + } + { + name = "*.{img,fat,ext,ext2,ext3,ext4,squashfs,ntfs,hfs,hfsx}"; + run = "archive"; + } + { + mime = "font/*"; + run = "font"; + } + { + mime = "application/ms-opentype"; + run = "font"; + } + { + mime = "inode/empty"; + run = "empty"; + } + { + name = "*"; + run = "file"; + } + ]; + prepend_fetchers = [ + { + id = "git"; + name = "*"; + run = "git"; + } + { + id = "git"; + name = "*/"; + run = "git"; + } + ]; + }; + input = { + cursor_blink = false; + cd_title = "Change directory:"; + cd_origin = "top-center"; + cd_offset = [ 0 2 50 3 ]; + create_title = [ "Create:" "Create (dir):" ]; + create_origin = "top-center"; + create_offset = [ 0 2 50 3 ]; + rename_title = "Rename:"; + rename_origin = "hovered"; + rename_offset = [ 0 1 50 3 ]; + filter_title = "Filter:"; + filter_origin = "top-center"; + filter_offset = [ 0 2 50 3 ]; + find_title = [ "Find next:" "Find previous:" ]; + find_origin = "top-center"; + find_offset = [ 0 2 50 3 ]; + search_title = "Search via {n}:"; + search_origin = "top-center"; + search_offset = [ 0 2 50 3 ]; + shell_title = [ "Shell:" "Shell (block):" ]; + shell_origin = "top-center"; + shell_offset = [ 0 2 50 3 ]; + }; + confirm = { + trash_title = "Trash {n} selected file{s}?"; + trash_origin = "center"; + trash_offset = [ 0 0 70 20 ]; + delete_title = "Permanently delete {n} selected file{s}?"; + delete_origin = "center"; + delete_offset = [ 0 0 70 20 ]; + overwrite_title = "Overwrite file?"; + overwrite_content = "Will overwrite the following file:"; + overwrite_origin = "center"; + overwrite_offset = [ 0 0 50 15 ]; + quit_title = "Quit?"; + quit_content = + "The following tasks are still running, are you sure you want to quit?"; + quit_origin = "center"; + quit_offset = [ 0 0 50 15 ]; + }; + pick = { + open_title = "Open with:"; + open_origin = "hovered"; + open_offset = [ 0 1 50 7 ]; + }; + which = { + sort_by = "none"; + sort_sensitive = false; + sort_reverse = false; + sort_translit = false; + }; + }; +} diff --git a/modules/home/zoxide.nix b/modules/home/zoxide.nix new file mode 100644 index 0000000..9ab1845 --- /dev/null +++ b/modules/home/zoxide.nix @@ -0,0 +1,13 @@ +_: { + programs = { + zoxide = { + enable = true; + enableZshIntegration = true; + enableBashIntegration = true; + options = [ + "--cmd cd" + ]; + }; + }; +} + diff --git a/modules/home/zsh/default.nix b/modules/home/zsh/default.nix new file mode 100644 index 0000000..f168b43 --- /dev/null +++ b/modules/home/zsh/default.nix @@ -0,0 +1,63 @@ +{ profile +, pkgs +, lib +, ... +}: { + imports = [ + ./zshrc-personal.nix + ]; + + programs.zsh = { + enable = true; + autosuggestion.enable = true; + syntaxHighlighting = { + enable = true; + highlighters = [ "main" "brackets" "pattern" "regexp" "root" "line" ]; + }; + historySubstringSearch.enable = true; + + history = { + ignoreDups = true; + save = 10000; + size = 10000; + }; + + oh-my-zsh = { + enable = true; + }; + + plugins = [ + { + name = "powerlevel10k"; + src = pkgs.zsh-powerlevel10k; + file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme"; + } + { + name = "powerlevel10k-config"; + src = lib.cleanSource ./p10k-config; + file = "p10k.zsh"; + } + ]; + + initContent = '' + bindkey "\eh" backward-word + bindkey "\ej" down-line-or-history + bindkey "\ek" up-line-or-history + bindkey "\el" forward-word + if [ -f $HOME/.zshrc-personal ]; then + source $HOME/.zshrc-personal + fi + ''; + + shellAliases = { + sv = "sudo nvim"; + v = "nvim"; + c = "clear"; + fr = "nh os switch --hostname ${profile}"; + fu = "nh os switch --hostname ${profile} --update"; + ncg = "nix-collect-garbage --delete-old && sudo nix-collect-garbage -d && sudo /run/current-system/bin/switch-to-configuration boot"; + cat = "bat"; + man = "batman"; + }; + }; +} diff --git a/modules/home/zsh/p10k-config/p10k.zsh b/modules/home/zsh/p10k-config/p10k.zsh new file mode 100644 index 0000000..a3958bf --- /dev/null +++ b/modules/home/zsh/p10k-config/p10k.zsh @@ -0,0 +1,1827 @@ +# Generated by Powerlevel10k configuration wizard on 2025-03-18 at 20:56 CDT. +# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh. +# Wizard options: nerdfont-v3 + powerline, small icons, rainbow, unicode, +# angled separators, sharp heads, round tails, 1 line, sparse, many icons, concise, +# transient_prompt, instant_prompt=verbose. +# Type `p10k configure` to generate another config. +# +# Config for Powerlevel10k with powerline prompt style with colorful background. +# Type `p10k configure` to generate your own config based on it. +# +# Tip: Looking for a nice color? Here's a one-liner to print colormap. +# +# for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%6)):#3}:+$'\n'}; done + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh -o extended_glob + + # Unset all configuration options. This allows you to apply configuration changes without + # restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. + unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' + + # Zsh >= 5.1 is required. + [[ $ZSH_VERSION == (5.<1->*|<6->.*) ]] || return + + # The list of segments shown on the left. Fill it with the most important segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + os_icon # os identifier + dir # current directory + vcs # git status + hostname # show hostname when not on local host + # prompt_char # prompt symbol + ) + + # The list of segments shown on the right. Fill it with less important segments. + # Right prompt on the last prompt line (where you are typing your commands) gets + # automatically hidden when the input line reaches it. Right prompt above the + # last prompt line gets hidden if it would overlap with left prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + status # exit code of the last command + command_execution_time # duration of the last command + background_jobs # presence of background jobs + direnv # direnv status (https://direnv.net/) + asdf # asdf version manager (https://github.com/asdf-vm/asdf) + virtualenv # python virtual environment (https://docs.python.org/3/library/venv.html) + anaconda # conda environment (https://conda.io/) + pyenv # python environment (https://github.com/pyenv/pyenv) + goenv # go environment (https://github.com/syndbg/goenv) + nodenv # node.js version from nodenv (https://github.com/nodenv/nodenv) + nvm # node.js version from nvm (https://github.com/nvm-sh/nvm) + nodeenv # node.js environment (https://github.com/ekalinin/nodeenv) + # node_version # node.js version + # go_version # go version (https://golang.org) + # rust_version # rustc version (https://www.rust-lang.org) + # dotnet_version # .NET version (https://dotnet.microsoft.com) + # php_version # php version (https://www.php.net/) + # laravel_version # laravel php framework version (https://laravel.com/) + # java_version # java version (https://www.java.com/) + # package # name@version from package.json (https://docs.npmjs.com/files/package.json) + rbenv # ruby version from rbenv (https://github.com/rbenv/rbenv) + rvm # ruby version from rvm (https://rvm.io) + fvm # flutter version management (https://github.com/leoafarias/fvm) + luaenv # lua version from luaenv (https://github.com/cehoffman/luaenv) + jenv # java version from jenv (https://github.com/jenv/jenv) + plenv # perl version from plenv (https://github.com/tokuhirom/plenv) + perlbrew # perl version from perlbrew (https://github.com/gugod/App-perlbrew) + phpenv # php version from phpenv (https://github.com/phpenv/phpenv) + scalaenv # scala version from scalaenv (https://github.com/scalaenv/scalaenv) + haskell_stack # haskell version from stack (https://haskellstack.org/) + kubecontext # current kubernetes context (https://kubernetes.io/) + terraform # terraform workspace (https://www.terraform.io) + # terraform_version # terraform version (https://www.terraform.io) + aws # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) + aws_eb_env # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) + azure # azure account name (https://docs.microsoft.com/en-us/cli/azure) + gcloud # google cloud cli account and project (https://cloud.google.com/) + google_app_cred # google application credentials (https://cloud.google.com/docs/authentication/production) + toolbox # toolbox name (https://github.com/containers/toolbox) + context # user@hostname + nordvpn # nordvpn connection status, linux only (https://nordvpn.com/) + ranger # ranger shell (https://github.com/ranger/ranger) + nnn # nnn shell (https://github.com/jarun/nnn) + lf # lf shell (https://github.com/gokcehan/lf) + xplr # xplr shell (https://github.com/sayanarijit/xplr) + vim_shell # vim shell indicator (:sh) + midnight_commander # midnight commander shell (https://midnight-commander.org/) + nix_shell # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) + chezmoi_shell # chezmoi shell (https://www.chezmoi.io/) + vi_mode # vi mode (you don't need this if you've enabled prompt_char) + # vpn_ip # virtual private network indicator + # load # CPU load + # disk_usage # disk usage + # ram # free RAM + # swap # used swap + todo # todo items (https://github.com/todotxt/todo.txt-cli) + timewarrior # timewarrior tracking status (https://timewarrior.net/) + taskwarrior # taskwarrior task count (https://taskwarrior.org/) + per_directory_history # Oh My Zsh per-directory-history local/global indicator + # cpu_arch # CPU architecture + # time # current time + # ip # ip address and bandwidth usage for a specified network interface + # public_ip # public IP address + # proxy # system-wide http/https/ftp proxy + # battery # internal battery + # wifi # wifi speed + # example # example user-defined segment (see prompt_example function below) + ) + + # Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you. + typeset -g POWERLEVEL9K_MODE=nerdfont-v3 + # When set to `moderate`, some icons will have an extra space after them. This is meant to avoid + # icon overlap when using non-monospace fonts. When set to `none`, spaces are not added. + typeset -g POWERLEVEL9K_ICON_PADDING=none + + # When set to true, icons appear before content on both sides of the prompt. When set + # to false, icons go after content. If empty or not set, icons go before content in the left + # prompt and after content in the right prompt. + # + # You can also override it for a specific segment: + # + # POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false + # + # Or for a specific segment in specific state: + # + # POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false + typeset -g POWERLEVEL9K_ICON_BEFORE_CONTENT= + + # Add an empty line before each prompt. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true + + # Connect left prompt lines with these symbols. You'll probably want to use the same color + # as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='%242F╭─' + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX='%242F├─' + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='%242F╰─' + # Connect right prompt lines with these symbols. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX='%242F─╮' + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX='%242F─┤' + typeset -g POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX='%242F─╯' + + # Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or + # '─'. The last two make it easier to see the alignment between left and right prompt and to + # separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false + # for more compact prompt if using this option. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR=' ' + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND= + typeset -g POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_GAP_BACKGROUND= + if [[ $POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR != ' ' ]]; then + # The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE + # ornaments defined above. + typeset -g POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND=242 + # Start filler from the edge of the screen if there are no left segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL='%{%}' + # End filler on the edge of the screen if there are no right segments on the first line. + typeset -g POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='%{%}' + fi + + # Separator between same-color segments on the left. + typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR='\uE0B1' + # Separator between same-color segments on the right. + typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR='\uE0B3' + # Separator between different-color segments on the left. + typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR='\uE0B0' + # Separator between different-color segments on the right. + typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR='\uE0B2' + # To remove a separator between two segments, add "_joined" to the second segment name. + # For example: POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(os_icon context_joined) + + # The right end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B0' + # The left end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B2' + # The left end of left prompt. + typeset -g POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL='\uE0B6' + # The right end of right prompt. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL='\uE0B4' + # Left prompt terminator for lines without any segments. + typeset -g POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= + + #################################[ os_icon: os identifier ]################################## + # OS identifier color. + typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=232 + typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=7 + # Custom icon. + # typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='⭐' + + ################################[ prompt_char: prompt symbol ]################################ + # Transparent background. + typeset -g POWERLEVEL9K_PROMPT_CHAR_BACKGROUND= + # Green prompt symbol if the last command succeeded. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=76 + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=196 + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='V' + # Prompt symbol in overwrite vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIOWR_CONTENT_EXPANSION='▶' + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=true + # No line terminator if prompt_char is the last segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL= + # No line introducer if prompt_char is the first segment. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL= + # No surrounding whitespace. + typeset -g POWERLEVEL9K_PROMPT_CHAR_LEFT_{LEFT,RIGHT}_WHITESPACE= + + ##################################[ dir: current directory ]################################## + # Current directory background color. + typeset -g POWERLEVEL9K_DIR_BACKGROUND=4 + # Default current directory foreground color. + typeset -g POWERLEVEL9K_DIR_FOREGROUND=254 + # If directory is too long, shorten some of its segments to the shortest possible unique + # prefix. The shortened directory can be tab-completed to the original. + typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_unique + # Replace removed segment suffixes with this symbol. + typeset -g POWERLEVEL9K_SHORTEN_DELIMITER= + # Color of the shortened directory segments. + typeset -g POWERLEVEL9K_DIR_SHORTENED_FOREGROUND=250 + # Color of the anchor directory segments. Anchor segments are never shortened. The first + # segment is always an anchor. + typeset -g POWERLEVEL9K_DIR_ANCHOR_FOREGROUND=255 + # Display anchor directory segments in bold. + typeset -g POWERLEVEL9K_DIR_ANCHOR_BOLD=true + # Don't shorten directories that contain any of these files. They are anchors. + local anchor_files=( + .bzr + .citc + .git + .hg + .node-version + .python-version + .go-version + .ruby-version + .lua-version + .java-version + .perl-version + .php-version + .tool-versions + .shorten_folder_marker + .svn + .terraform + CVS + Cargo.toml + composer.json + go.mod + package.json + stack.yaml + ) + typeset -g POWERLEVEL9K_SHORTEN_FOLDER_MARKER="(${(j:|:)anchor_files})" + # If set to "first" ("last"), remove everything before the first (last) subdirectory that contains + # files matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is + # /foo/bar/git_repo/nested_git_repo/baz, prompt will display git_repo/nested_git_repo/baz (first) + # or nested_git_repo/baz (last). This assumes that git_repo and nested_git_repo contain markers + # and other directories don't. + # + # Optionally, "first" and "last" can be followed by ":" where is an integer. + # This moves the truncation point to the right (positive offset) or to the left (negative offset) + # relative to the marker. Plain "first" and "last" are equivalent to "first:0" and "last:0" + # respectively. + typeset -g POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER=false + # Don't shorten this many last directory segments. They are anchors. + typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 + # Shorten directory if it's longer than this even if there is space for it. The value can + # be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty, + # directory will be shortened only when prompt doesn't fit or when other parameters demand it + # (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below). + # If set to `0`, directory will always be shortened to its minimum length. + typeset -g POWERLEVEL9K_DIR_MAX_LENGTH=80 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this + # many columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS=40 + # When `dir` segment is on the last prompt line, try to shorten it enough to leave at least + # COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands. + typeset -g POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT=50 + # If set to true, embed a hyperlink into the directory. Useful for quickly + # opening a directory in the file manager simply by clicking the link. + # Can also be handy when the directory is shortened, as it allows you to see + # the full directory that was used in previous commands. + typeset -g POWERLEVEL9K_DIR_HYPERLINK=false + + # Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON + # and POWERLEVEL9K_DIR_CLASSES below. + typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3 + + # The default icon shown next to non-writable and non-existent directories when + # POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3. + # typeset -g POWERLEVEL9K_LOCK_ICON='⭐' + + # POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons and colors for different + # directories. It must be an array with 3 * N elements. Each triplet consists of: + # + # 1. A pattern against which the current directory ($PWD) is matched. Matching is done with + # extended_glob option enabled. + # 2. Directory class for the purpose of styling. + # 3. An empty string. + # + # Triplets are tried in order. The first triplet whose pattern matches $PWD wins. + # + # If POWERLEVEL9K_DIR_SHOW_WRITABLE is set to v3, non-writable and non-existent directories + # acquire class suffix _NOT_WRITABLE and NON_EXISTENT respectively. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=( + # '~/work(|/*)' WORK '' + # '~(|/*)' HOME '' + # '*' DEFAULT '') + # + # Whenever the current directory is ~/work or a subdirectory of ~/work, it gets styled with one + # of the following classes depending on its writability and existence: WORK, WORK_NOT_WRITABLE or + # WORK_NON_EXISTENT. + # + # Simply assigning classes to directories doesn't have any visible effects. It merely gives you an + # option to define custom colors and icons for different directory classes. + # + # # Styling for WORK. + # typeset -g POWERLEVEL9K_DIR_WORK_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_BACKGROUND=4 + # typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=254 + # typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=250 + # typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=255 + # + # # Styling for WORK_NOT_WRITABLE. + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_BACKGROUND=4 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND=254 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_SHORTENED_FOREGROUND=250 + # typeset -g POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_ANCHOR_FOREGROUND=255 + # + # # Styling for WORK_NON_EXISTENT. + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_BACKGROUND=4 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_FOREGROUND=254 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_SHORTENED_FOREGROUND=250 + # typeset -g POWERLEVEL9K_DIR_WORK_NON_EXISTENT_ANCHOR_FOREGROUND=255 + # + # If a styling parameter isn't explicitly defined for some class, it falls back to the classless + # parameter. For example, if POWERLEVEL9K_DIR_WORK_NOT_WRITABLE_FOREGROUND is not set, it falls + # back to POWERLEVEL9K_DIR_FOREGROUND. + # + # typeset -g POWERLEVEL9K_DIR_CLASSES=() + + # Custom prefix. + # typeset -g POWERLEVEL9K_DIR_PREFIX='in ' + + #####################################[ vcs: git status ]###################################### + # Version control background colors. + typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=2 + typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=3 + typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=2 + typeset -g POWERLEVEL9K_VCS_CONFLICTED_BACKGROUND=3 + typeset -g POWERLEVEL9K_VCS_LOADING_BACKGROUND=8 + + # Branch icon. Set this parameter to '\UE0A0 ' for the popular Powerline branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON='\uF126 ' + + # Untracked files icon. It's really a question mark, your font isn't broken. + # Change the value of this parameter to show a different icon. + typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' + + # Formatter for Git status. + # + # Example output: master wip ⇣42⇡42 *42 merge ~42 +42 !42 ?42. + # + # You can edit the function to customize how Git status looks. + # + # VCS_STATUS_* parameters are set by gitstatus plugin. See reference: + # https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh. + function my_git_formatter() { + emulate -L zsh + + if [[ -n $P9K_CONTENT ]]; then + # If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from + # gitstatus plugin). VCS_STATUS_* parameters are not available in this case. + typeset -g my_git_format=$P9K_CONTENT + return + fi + + # Styling for different parts of Git status. + local meta='%7F' # white foreground + local clean='%0F' # black foreground + local modified='%0F' # black foreground + local untracked='%0F' # black foreground + local conflicted='%1F' # red foreground + + local res + + if [[ -n $VCS_STATUS_LOCAL_BRANCH ]]; then + local branch=${(V)VCS_STATUS_LOCAL_BRANCH} + # If local branch name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show local branch name in full without truncation, delete the next line. + (( $#branch > 32 )) && branch[13,-13]="…" # <-- this line + res+="${clean}${(g::)POWERLEVEL9K_VCS_BRANCH_ICON}${branch//\%/%%}" + fi + + if [[ -n $VCS_STATUS_TAG + # Show tag only if not on a branch. + # Tip: To always show tag, delete the next line. + && -z $VCS_STATUS_LOCAL_BRANCH # <-- this line + ]]; then + local tag=${(V)VCS_STATUS_TAG} + # If tag name is at most 32 characters long, show it in full. + # Otherwise show the first 12 … the last 12. + # Tip: To always show tag name in full without truncation, delete the next line. + (( $#tag > 32 )) && tag[13,-13]="…" # <-- this line + res+="${meta}#${clean}${tag//\%/%%}" + fi + + # Display the current Git commit if there is no branch and no tag. + # Tip: To always display the current Git commit, delete the next line. + [[ -z $VCS_STATUS_LOCAL_BRANCH && -z $VCS_STATUS_TAG ]] && # <-- this line + res+="${meta}@${clean}${VCS_STATUS_COMMIT[1,8]}" + + # Show tracking branch name if it differs from local branch. + if [[ -n ${VCS_STATUS_REMOTE_BRANCH:#$VCS_STATUS_LOCAL_BRANCH} ]]; then + res+="${meta}:${clean}${(V)VCS_STATUS_REMOTE_BRANCH//\%/%%}" + fi + + # Display "wip" if the latest commit's summary contains "wip" or "WIP". + if [[ $VCS_STATUS_COMMIT_SUMMARY == (|*[^[:alnum:]])(wip|WIP)(|[^[:alnum:]]*) ]]; then + res+=" ${modified}wip" + fi + + if (( VCS_STATUS_COMMITS_AHEAD || VCS_STATUS_COMMITS_BEHIND )); then + # ⇣42 if behind the remote. + (( VCS_STATUS_COMMITS_BEHIND )) && res+=" ${clean}⇣${VCS_STATUS_COMMITS_BEHIND}" + # ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42. + (( VCS_STATUS_COMMITS_AHEAD && !VCS_STATUS_COMMITS_BEHIND )) && res+=" " + (( VCS_STATUS_COMMITS_AHEAD )) && res+="${clean}⇡${VCS_STATUS_COMMITS_AHEAD}" + elif [[ -n $VCS_STATUS_REMOTE_BRANCH ]]; then + # Tip: Uncomment the next line to display '=' if up to date with the remote. + # res+=" ${clean}=" + fi + + # ⇠42 if behind the push remote. + (( VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" ${clean}⇠${VCS_STATUS_PUSH_COMMITS_BEHIND}" + (( VCS_STATUS_PUSH_COMMITS_AHEAD && !VCS_STATUS_PUSH_COMMITS_BEHIND )) && res+=" " + # ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42. + (( VCS_STATUS_PUSH_COMMITS_AHEAD )) && res+="${clean}⇢${VCS_STATUS_PUSH_COMMITS_AHEAD}" + # *42 if have stashes. + (( VCS_STATUS_STASHES )) && res+=" ${clean}*${VCS_STATUS_STASHES}" + # 'merge' if the repo is in an unusual state. + [[ -n $VCS_STATUS_ACTION ]] && res+=" ${conflicted}${VCS_STATUS_ACTION}" + # ~42 if have merge conflicts. + (( VCS_STATUS_NUM_CONFLICTED )) && res+=" ${conflicted}~${VCS_STATUS_NUM_CONFLICTED}" + # +42 if have staged changes. + (( VCS_STATUS_NUM_STAGED )) && res+=" ${modified}+${VCS_STATUS_NUM_STAGED}" + # !42 if have unstaged changes. + (( VCS_STATUS_NUM_UNSTAGED )) && res+=" ${modified}!${VCS_STATUS_NUM_UNSTAGED}" + # ?42 if have untracked files. It's really a question mark, your font isn't broken. + # See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon. + # Remove the next line if you don't want to see untracked files at all. + (( VCS_STATUS_NUM_UNTRACKED )) && res+=" ${untracked}${(g::)POWERLEVEL9K_VCS_UNTRACKED_ICON}${VCS_STATUS_NUM_UNTRACKED}" + # "─" if the number of unstaged files is unknown. This can happen due to + # POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower + # than the number of files in the Git index, or due to bash.showDirtyState being set to false + # in the repository config. The number of staged and untracked files may also be unknown + # in this case. + (( VCS_STATUS_HAS_UNSTAGED == -1 )) && res+=" ${modified}─" + + typeset -g my_git_format=$res + } + functions -M my_git_formatter 2>/dev/null + + # Don't count the number of unstaged, untracked and conflicted files in Git repositories with + # more than this many files in the index. Negative value means infinity. + # + # If you are working in Git repositories with tens of millions of files and seeing performance + # sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output + # of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's + # config: `git config bash.showDirtyState false`. + typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=-1 + + # Don't show Git status in prompt for repositories whose workdir matches this pattern. + # For example, if set to '~', the Git repository at $HOME/.git will be ignored. + # Multiple patterns can be combined with '|': '~(|/foo)|/bar/baz/*'. + typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~' + + # Disable the default Git status formatting. + typeset -g POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING=true + # Install our own Git status formatter. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${$((my_git_formatter()))+${my_git_format}}' + # Enable counters for staged, unstaged, etc. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=-1 + + # Custom icon. + # typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_VCS_PREFIX='on ' + + # Show status of repositories of these types. You can add svn and/or hg if you are + # using them. If you do, your prompt may become slow even when your current directory + # isn't in an svn or hg repository. + typeset -g POWERLEVEL9K_VCS_BACKENDS=(git) + + ##########################[ status: exit code of the last command ]########################### + # Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and + # style them independently from the regular OK and ERROR state. + typeset -g POWERLEVEL9K_STATUS_EXTENDED_STATES=true + + # Status on success. No content, just an icon. No need to show it if prompt_char is enabled as + # it will signify success by turning green. + typeset -g POWERLEVEL9K_STATUS_OK=true + typeset -g POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION='✔' + typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=2 + typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=0 + + # Status when some part of a pipe command fails but the overall exit status is zero. It may look + # like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_OK_PIPE=true + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION='✔' + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND=2 + typeset -g POWERLEVEL9K_STATUS_OK_PIPE_BACKGROUND=0 + + # Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as + # it will signify error by turning red. + typeset -g POWERLEVEL9K_STATUS_ERROR=true + typeset -g POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION='✘' + typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=3 + typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=1 + + # Status when the last command was terminated by a signal. + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL=true + # Use terse signal names: "INT" instead of "SIGINT(2)". + typeset -g POWERLEVEL9K_STATUS_VERBOSE_SIGNAME=false + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION='✘' + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND=3 + typeset -g POWERLEVEL9K_STATUS_ERROR_SIGNAL_BACKGROUND=1 + + # Status when some part of a pipe command fails and the overall exit status is also non-zero. + # It may look like this: 1|0. + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE=true + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION='✘' + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND=3 + typeset -g POWERLEVEL9K_STATUS_ERROR_PIPE_BACKGROUND=1 + + ###################[ command_execution_time: duration of the last command ]################### + # Execution time color. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=0 + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=3 + # Show duration of the last command if takes at least this many seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 + # Show this many fractional digits. Zero means round to seconds. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Custom icon. + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='took ' + + #######################[ background_jobs: presence of background jobs ]####################### + # Background jobs color. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND=6 + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_BACKGROUND=0 + # Don't show the number of background jobs. + typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE=false + # Custom icon. + # typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ direnv: direnv status (https://direnv.net/) ]######################## + # Direnv color. + typeset -g POWERLEVEL9K_DIRENV_FOREGROUND=3 + typeset -g POWERLEVEL9K_DIRENV_BACKGROUND=0 + # Custom icon. + # typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]############### + # Default asdf color. Only used to display tools for which there is no color override (see below). + # Tip: Override these parameters for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_FOREGROUND and + # POWERLEVEL9K_ASDF_${TOOL}_BACKGROUND. + typeset -g POWERLEVEL9K_ASDF_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_BACKGROUND=7 + + # There are four parameters that can be used to hide asdf tools. Each parameter describes + # conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at + # least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to + # hide a tool, it gets shown. + # + # Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and + # POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands: + # + # asdf local python 3.8.1 + # asdf global python 3.8.1 + # + # After running both commands the current python version is 3.8.1 and its source is "local" as + # it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false, + # it'll hide python version in this case because 3.8.1 is the same as the global version. + # POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't + # contain "local". + + # Hide tool versions that don't come from one of these sources. + # + # Available sources: + # + # - shell `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable" + # - local `asdf current` says "set by /some/not/home/directory/file" + # - global `asdf current` says "set by /home/username/file" + # + # Note: If this parameter is set to (shell local global), it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES. + typeset -g POWERLEVEL9K_ASDF_SOURCES=(shell local global) + + # If set to false, hide tool versions that are the same as global. + # + # Note: The name of this parameter doesn't reflect its meaning at all. + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW. + typeset -g POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW=false + + # If set to false, hide tool versions that are equal to "system". + # + # Note: If this parameter is set to true, it won't hide tools. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM. + typeset -g POWERLEVEL9K_ASDF_SHOW_SYSTEM=true + + # If set to non-empty value, hide tools unless there is a file matching the specified file pattern + # in the current directory, or its parent directory, or its grandparent directory, and so on. + # + # Note: If this parameter is set to empty value, it won't hide tools. + # Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments. + # Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB. + # + # Example: Hide nodejs version when there is no package.json and no *.js files in the current + # directory, in `..`, in `../..` and so on. + # + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json' + typeset -g POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB= + + # Ruby version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUBY_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_RUBY_BACKGROUND=1 + # typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Python version from asdf. + typeset -g POWERLEVEL9K_ASDF_PYTHON_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_PYTHON_BACKGROUND=4 + # typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Go version from asdf. + typeset -g POWERLEVEL9K_ASDF_GOLANG_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_GOLANG_BACKGROUND=4 + # typeset -g POWERLEVEL9K_ASDF_GOLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_GOLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Node.js version from asdf. + typeset -g POWERLEVEL9K_ASDF_NODEJS_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_NODEJS_BACKGROUND=2 + # typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Rust version from asdf. + typeset -g POWERLEVEL9K_ASDF_RUST_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_RUST_BACKGROUND=208 + # typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar' + + # .NET Core version from asdf. + typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_BACKGROUND=5 + # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Flutter version from asdf. + typeset -g POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_FLUTTER_BACKGROUND=4 + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Lua version from asdf. + typeset -g POWERLEVEL9K_ASDF_LUA_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_LUA_BACKGROUND=4 + # typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Java version from asdf. + typeset -g POWERLEVEL9K_ASDF_JAVA_FOREGROUND=1 + typeset -g POWERLEVEL9K_ASDF_JAVA_BACKGROUND=7 + # typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Perl version from asdf. + typeset -g POWERLEVEL9K_ASDF_PERL_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_PERL_BACKGROUND=4 + # typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Erlang version from asdf. + typeset -g POWERLEVEL9K_ASDF_ERLANG_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_ERLANG_BACKGROUND=1 + # typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Elixir version from asdf. + typeset -g POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_ELIXIR_BACKGROUND=5 + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Postgres version from asdf. + typeset -g POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_POSTGRES_BACKGROUND=6 + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar' + + # PHP version from asdf. + typeset -g POWERLEVEL9K_ASDF_PHP_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_PHP_BACKGROUND=5 + # typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Haskell version from asdf. + typeset -g POWERLEVEL9K_ASDF_HASKELL_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_HASKELL_BACKGROUND=3 + # typeset -g POWERLEVEL9K_ASDF_HASKELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_HASKELL_SHOW_ON_UPGLOB='*.foo|*.bar' + + # Julia version from asdf. + typeset -g POWERLEVEL9K_ASDF_JULIA_FOREGROUND=0 + typeset -g POWERLEVEL9K_ASDF_JULIA_BACKGROUND=2 + # typeset -g POWERLEVEL9K_ASDF_JULIA_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_ASDF_JULIA_SHOW_ON_UPGLOB='*.foo|*.bar' + + ##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]########### + # NordVPN connection indicator color. + typeset -g POWERLEVEL9K_NORDVPN_FOREGROUND=7 + typeset -g POWERLEVEL9K_NORDVPN_BACKGROUND=4 + # Hide NordVPN connection indicator when not connected. + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_CONTENT_EXPANSION= + typeset -g POWERLEVEL9K_NORDVPN_{DISCONNECTED,CONNECTING,DISCONNECTING}_VISUAL_IDENTIFIER_EXPANSION= + # Custom icon. + # typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ ranger: ranger shell (https://github.com/ranger/ranger) ]################## + # Ranger shell color. + typeset -g POWERLEVEL9K_RANGER_FOREGROUND=3 + typeset -g POWERLEVEL9K_RANGER_BACKGROUND=0 + # Custom icon. + # typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]####################### + # Nnn shell color. + typeset -g POWERLEVEL9K_NNN_FOREGROUND=0 + typeset -g POWERLEVEL9K_NNN_BACKGROUND=6 + # Custom icon. + # typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################[ lf: lf shell (https://github.com/gokcehan/lf) ]####################### + # lf shell color. + typeset -g POWERLEVEL9K_LF_FOREGROUND=0 + typeset -g POWERLEVEL9K_LF_BACKGROUND=6 + # Custom icon. + # typeset -g POWERLEVEL9K_LF_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################[ xplr: xplr shell (https://github.com/sayanarijit/xplr) ]################## + # xplr shell color. + typeset -g POWERLEVEL9K_XPLR_FOREGROUND=0 + typeset -g POWERLEVEL9K_XPLR_BACKGROUND=6 + # Custom icon. + # typeset -g POWERLEVEL9K_XPLR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########################[ vim_shell: vim shell indicator (:sh) ]########################### + # Vim shell indicator color. + typeset -g POWERLEVEL9K_VIM_SHELL_FOREGROUND=0 + typeset -g POWERLEVEL9K_VIM_SHELL_BACKGROUND=2 + # Custom icon. + # typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]###### + # Midnight Commander shell color. + typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND=3 + typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_BACKGROUND=0 + # Custom icon. + # typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]## + # Nix shell color. + typeset -g POWERLEVEL9K_NIX_SHELL_FOREGROUND=0 + typeset -g POWERLEVEL9K_NIX_SHELL_BACKGROUND=4 + + # Display the icon of nix_shell if PATH contains a subdirectory of /nix/store. + # typeset -g POWERLEVEL9K_NIX_SHELL_INFER_FROM_PATH=false + + # Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line. + # typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################[ chezmoi_shell: chezmoi shell (https://www.chezmoi.io/) ]################## + # chezmoi shell color. + typeset -g POWERLEVEL9K_CHEZMOI_SHELL_FOREGROUND=0 + typeset -g POWERLEVEL9K_CHEZMOI_SHELL_BACKGROUND=4 + # Custom icon. + # typeset -g POWERLEVEL9K_CHEZMOI_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ disk_usage: disk usage ]################################## + # Colors for different levels of disk usage. + typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND=3 + typeset -g POWERLEVEL9K_DISK_USAGE_NORMAL_BACKGROUND=0 + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND=0 + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_BACKGROUND=3 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND=7 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_BACKGROUND=1 + # Thresholds for different levels of disk usage (percentage points). + typeset -g POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL=90 + typeset -g POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL=95 + # If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent. + typeset -g POWERLEVEL9K_DISK_USAGE_ONLY_WARNING=false + # Custom icon. + # typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]########### + # Foreground color. + typeset -g POWERLEVEL9K_VI_MODE_FOREGROUND=0 + # Text and color for normal (a.k.a. command) vi mode. + typeset -g POWERLEVEL9K_VI_COMMAND_MODE_STRING=NORMAL + typeset -g POWERLEVEL9K_VI_MODE_NORMAL_BACKGROUND=2 + # Text and color for visual vi mode. + typeset -g POWERLEVEL9K_VI_VISUAL_MODE_STRING=VISUAL + typeset -g POWERLEVEL9K_VI_MODE_VISUAL_BACKGROUND=4 + # Text and color for overtype (a.k.a. overwrite and replace) vi mode. + typeset -g POWERLEVEL9K_VI_OVERWRITE_MODE_STRING=OVERTYPE + typeset -g POWERLEVEL9K_VI_MODE_OVERWRITE_BACKGROUND=3 + # Text and color for insert vi mode. + typeset -g POWERLEVEL9K_VI_INSERT_MODE_STRING= + typeset -g POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND=8 + + ######################################[ ram: free RAM ]####################################### + # RAM color. + typeset -g POWERLEVEL9K_RAM_FOREGROUND=0 + typeset -g POWERLEVEL9K_RAM_BACKGROUND=3 + # Custom icon. + # typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################################[ swap: used swap ]###################################### + # Swap color. + typeset -g POWERLEVEL9K_SWAP_FOREGROUND=0 + typeset -g POWERLEVEL9K_SWAP_BACKGROUND=3 + # Custom icon. + # typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######################################[ load: CPU load ]###################################### + # Show average CPU load over this many last minutes. Valid values are 1, 5 and 15. + typeset -g POWERLEVEL9K_LOAD_WHICH=5 + # Load color when load is under 50%. + typeset -g POWERLEVEL9K_LOAD_NORMAL_FOREGROUND=0 + typeset -g POWERLEVEL9K_LOAD_NORMAL_BACKGROUND=2 + # Load color when load is between 50% and 70%. + typeset -g POWERLEVEL9K_LOAD_WARNING_FOREGROUND=0 + typeset -g POWERLEVEL9K_LOAD_WARNING_BACKGROUND=3 + # Load color when load is over 70%. + typeset -g POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND=0 + typeset -g POWERLEVEL9K_LOAD_CRITICAL_BACKGROUND=1 + # Custom icon. + # typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################ + # Todo color. + typeset -g POWERLEVEL9K_TODO_FOREGROUND=0 + typeset -g POWERLEVEL9K_TODO_BACKGROUND=8 + # Hide todo when the total number of tasks is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL=true + # Hide todo when the number of tasks after filtering is zero. + typeset -g POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED=false + + # Todo format. The following parameters are available within the expansion. + # + # - P9K_TODO_TOTAL_TASK_COUNT The total number of tasks. + # - P9K_TODO_FILTERED_TASK_COUNT The number of tasks after filtering. + # + # These variables correspond to the last line of the output of `todo.sh -p ls`: + # + # TODO: 24 of 42 tasks shown + # + # Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT. + # + # typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############ + # Timewarrior color. + typeset -g POWERLEVEL9K_TIMEWARRIOR_FOREGROUND=255 + typeset -g POWERLEVEL9K_TIMEWARRIOR_BACKGROUND=8 + + # If the tracked task is longer than 24 characters, truncate and append "…". + # Tip: To always display tasks without truncation, delete the following parameter. + # Tip: To hide task names and display just the icon when time tracking is enabled, set the + # value of the following parameter to "". + typeset -g POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION='${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}' + + # Custom icon. + # typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ taskwarrior: taskwarrior task count (https://taskwarrior.org/) ]############## + # Taskwarrior color. + typeset -g POWERLEVEL9K_TASKWARRIOR_FOREGROUND=0 + typeset -g POWERLEVEL9K_TASKWARRIOR_BACKGROUND=6 + + # Taskwarrior segment format. The following parameters are available within the expansion. + # + # - P9K_TASKWARRIOR_PENDING_COUNT The number of pending tasks: `task +PENDING count`. + # - P9K_TASKWARRIOR_OVERDUE_COUNT The number of overdue tasks: `task +OVERDUE count`. + # + # Zero values are represented as empty parameters. + # + # The default format: + # + # '${P9K_TASKWARRIOR_OVERDUE_COUNT:+"!$P9K_TASKWARRIOR_OVERDUE_COUNT/"}$P9K_TASKWARRIOR_PENDING_COUNT' + # + # typeset -g POWERLEVEL9K_TASKWARRIOR_CONTENT_EXPANSION='$P9K_TASKWARRIOR_PENDING_COUNT' + + # Custom icon. + # typeset -g POWERLEVEL9K_TASKWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ######[ per_directory_history: Oh My Zsh per-directory-history local/global indicator ]####### + # Color when using local/global history. + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_FOREGROUND=0 + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_BACKGROUND=5 + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_FOREGROUND=0 + typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_BACKGROUND=3 + + # Tip: Uncomment the next two lines to hide "local"/"global" text and leave just the icon. + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_CONTENT_EXPANSION='' + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_CONTENT_EXPANSION='' + + # Custom icon. + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_LOCAL_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_PER_DIRECTORY_HISTORY_GLOBAL_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ cpu_arch: CPU architecture ]################################ + # CPU architecture color. + typeset -g POWERLEVEL9K_CPU_ARCH_FOREGROUND=0 + typeset -g POWERLEVEL9K_CPU_ARCH_BACKGROUND=3 + + # Hide the segment when on a specific CPU architecture. + # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_CONTENT_EXPANSION= + # typeset -g POWERLEVEL9K_CPU_ARCH_X86_64_VISUAL_IDENTIFIER_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CPU_ARCH_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##################################[ context: user@hostname ]################################## + # Context color when running with privileges. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND=1 + typeset -g POWERLEVEL9K_CONTEXT_ROOT_BACKGROUND=0 + # Context color in SSH without privileges. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_FOREGROUND=3 + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_BACKGROUND=0 + # Default context color (no privileges, no SSH). + typeset -g POWERLEVEL9K_CONTEXT_FOREGROUND=3 + typeset -g POWERLEVEL9K_CONTEXT_BACKGROUND=0 + + # Context format when running with privileges: user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE='%n@%m' + # Context format when in SSH without privileges: user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_{REMOTE,REMOTE_SUDO}_TEMPLATE='%n@%m' + # Default context format (no privileges, no SSH): user@hostname. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE='%n@%m' + + # Don't show context unless running with privileges or in SSH. + # Tip: Remove the next line to always show context. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION= + + # Custom icon. + # typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_CONTEXT_PREFIX='with ' + + ###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]### + # Python virtual environment color. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=0 + typeset -g POWERLEVEL9K_VIRTUALENV_BACKGROUND=4 + # Don't show Python version next to the virtual environment name. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + # If set to "false", won't show virtualenv if pyenv is already shown. + # If set to "if-different", won't show virtualenv if it's the same as pyenv. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_PYENV=false + # Separate environment name from Python version only with a space. + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ anaconda: conda environment (https://conda.io/) ]###################### + # Anaconda environment color. + typeset -g POWERLEVEL9K_ANACONDA_FOREGROUND=0 + typeset -g POWERLEVEL9K_ANACONDA_BACKGROUND=4 + + # Anaconda segment format. The following parameters are available within the expansion. + # + # - CONDA_PREFIX Absolute path to the active Anaconda/Miniconda environment. + # - CONDA_DEFAULT_ENV Name of the active Anaconda/Miniconda environment. + # - CONDA_PROMPT_MODIFIER Configurable prompt modifier (see below). + # - P9K_ANACONDA_PYTHON_VERSION Current python version (python --version). + # + # CONDA_PROMPT_MODIFIER can be configured with the following command: + # + # conda config --set env_prompt '({default_env}) ' + # + # The last argument is a Python format string that can use the following variables: + # + # - prefix The same as CONDA_PREFIX. + # - default_env The same as CONDA_DEFAULT_ENV. + # - name The last segment of CONDA_PREFIX. + # - stacked_env Comma-separated list of names in the environment stack. The first element is + # always the same as default_env. + # + # Note: '({default_env}) ' is the default value of env_prompt. + # + # The default value of POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION expands to $CONDA_PROMPT_MODIFIER + # without the surrounding parentheses, or to the last path component of CONDA_PREFIX if the former + # is empty. + typeset -g POWERLEVEL9K_ANACONDA_CONTENT_EXPANSION='${${${${CONDA_PROMPT_MODIFIER#\(}% }%\)}:-${CONDA_PREFIX:t}}' + + # Custom icon. + # typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################ + # Pyenv color. + typeset -g POWERLEVEL9K_PYENV_FOREGROUND=0 + typeset -g POWERLEVEL9K_PYENV_BACKGROUND=4 + # Hide python version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PYENV_SOURCES=(shell local global) + # If set to false, hide python version if it's the same as global: + # $(pyenv version-name) == $(pyenv global). + typeset -g POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide python version if it's equal to "system". + typeset -g POWERLEVEL9K_PYENV_SHOW_SYSTEM=true + + # Pyenv segment format. The following parameters are available within the expansion. + # + # - P9K_CONTENT Current pyenv environment (pyenv version-name). + # - P9K_PYENV_PYTHON_VERSION Current python version (python --version). + # + # The default format has the following logic: + # + # 1. Display just "$P9K_CONTENT" if it's equal to "$P9K_PYENV_PYTHON_VERSION" or + # starts with "$P9K_PYENV_PYTHON_VERSION/". + # 2. Otherwise display "$P9K_CONTENT $P9K_PYENV_PYTHON_VERSION". + typeset -g POWERLEVEL9K_PYENV_CONTENT_EXPANSION='${P9K_CONTENT}${${P9K_CONTENT:#$P9K_PYENV_PYTHON_VERSION(|/*)}:+ $P9K_PYENV_PYTHON_VERSION}' + + # Custom icon. + # typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ goenv: go environment (https://github.com/syndbg/goenv) ]################ + # Goenv color. + typeset -g POWERLEVEL9K_GOENV_FOREGROUND=0 + typeset -g POWERLEVEL9K_GOENV_BACKGROUND=4 + # Hide go version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_GOENV_SOURCES=(shell local global) + # If set to false, hide go version if it's the same as global: + # $(goenv version-name) == $(goenv global). + typeset -g POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide go version if it's equal to "system". + typeset -g POWERLEVEL9K_GOENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]########## + # Nodenv color. + typeset -g POWERLEVEL9K_NODENV_FOREGROUND=2 + typeset -g POWERLEVEL9K_NODENV_BACKGROUND=0 + # Hide node version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_NODENV_SOURCES=(shell local global) + # If set to false, hide node version if it's the same as global: + # $(nodenv version-name) == $(nodenv global). + typeset -g POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide node version if it's equal to "system". + typeset -g POWERLEVEL9K_NODENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]############### + # Nvm color. + typeset -g POWERLEVEL9K_NVM_FOREGROUND=0 + typeset -g POWERLEVEL9K_NVM_BACKGROUND=5 + # If set to false, hide node version if it's the same as default: + # $(nvm version current) == $(nvm version default). + typeset -g POWERLEVEL9K_NVM_PROMPT_ALWAYS_SHOW=false + # If set to false, hide node version if it's equal to "system". + typeset -g POWERLEVEL9K_NVM_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############ + # Nodeenv color. + typeset -g POWERLEVEL9K_NODEENV_FOREGROUND=2 + typeset -g POWERLEVEL9K_NODEENV_BACKGROUND=0 + # Don't show Node version next to the environment name. + typeset -g POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION=false + # Separate environment name from Node version only with a space. + typeset -g POWERLEVEL9K_NODEENV_{LEFT,RIGHT}_DELIMITER= + # Custom icon. + # typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##############################[ node_version: node.js version ]############################### + # Node version color. + typeset -g POWERLEVEL9K_NODE_VERSION_FOREGROUND=7 + typeset -g POWERLEVEL9K_NODE_VERSION_BACKGROUND=2 + # Show node version only when in a directory tree containing package.json. + typeset -g POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ go_version: go version (https://golang.org) ]######################## + # Go version color. + typeset -g POWERLEVEL9K_GO_VERSION_FOREGROUND=255 + typeset -g POWERLEVEL9K_GO_VERSION_BACKGROUND=2 + # Show go version only when in a go project subdirectory. + typeset -g POWERLEVEL9K_GO_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #################[ rust_version: rustc version (https://www.rust-lang.org) ]################## + # Rust version color. + typeset -g POWERLEVEL9K_RUST_VERSION_FOREGROUND=0 + typeset -g POWERLEVEL9K_RUST_VERSION_BACKGROUND=208 + # Show rust version only when in a rust project subdirectory. + typeset -g POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################ + # .NET version color. + typeset -g POWERLEVEL9K_DOTNET_VERSION_FOREGROUND=7 + typeset -g POWERLEVEL9K_DOTNET_VERSION_BACKGROUND=5 + # Show .NET version only when in a .NET project subdirectory. + typeset -g POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #####################[ php_version: php version (https://www.php.net/) ]###################### + # PHP version color. + typeset -g POWERLEVEL9K_PHP_VERSION_FOREGROUND=0 + typeset -g POWERLEVEL9K_PHP_VERSION_BACKGROUND=5 + # Show PHP version only when in a PHP project subdirectory. + typeset -g POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ laravel_version: laravel php framework version (https://laravel.com/) ]########### + # Laravel version color. + typeset -g POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND=1 + typeset -g POWERLEVEL9K_LARAVEL_VERSION_BACKGROUND=7 + # Custom icon. + # typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]############## + # Rbenv color. + typeset -g POWERLEVEL9K_RBENV_FOREGROUND=0 + typeset -g POWERLEVEL9K_RBENV_BACKGROUND=1 + # Hide ruby version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_RBENV_SOURCES=(shell local global) + # If set to false, hide ruby version if it's the same as global: + # $(rbenv version-name) == $(rbenv global). + typeset -g POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide ruby version if it's equal to "system". + typeset -g POWERLEVEL9K_RBENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ####################[ java_version: java version (https://www.java.com/) ]#################### + # Java version color. + typeset -g POWERLEVEL9K_JAVA_VERSION_FOREGROUND=1 + typeset -g POWERLEVEL9K_JAVA_VERSION_BACKGROUND=7 + # Show java version only when in a java project subdirectory. + typeset -g POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY=true + # Show brief version. + typeset -g POWERLEVEL9K_JAVA_VERSION_FULL=false + # Custom icon. + # typeset -g POWERLEVEL9K_JAVA_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###[ package: name@version from package.json (https://docs.npmjs.com/files/package.json) ]#### + # Package color. + typeset -g POWERLEVEL9K_PACKAGE_FOREGROUND=0 + typeset -g POWERLEVEL9K_PACKAGE_BACKGROUND=6 + + # Package format. The following parameters are available within the expansion. + # + # - P9K_PACKAGE_NAME The value of `name` field in package.json. + # - P9K_PACKAGE_VERSION The value of `version` field in package.json. + # + # typeset -g POWERLEVEL9K_PACKAGE_CONTENT_EXPANSION='${P9K_PACKAGE_NAME//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}' + + # Custom icon. + # typeset -g POWERLEVEL9K_PACKAGE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######################[ rvm: ruby version from rvm (https://rvm.io) ]######################## + # Rvm color. + typeset -g POWERLEVEL9K_RVM_FOREGROUND=0 + typeset -g POWERLEVEL9K_RVM_BACKGROUND=240 + # Don't show @gemset at the end. + typeset -g POWERLEVEL9K_RVM_SHOW_GEMSET=false + # Don't show ruby- at the front. + typeset -g POWERLEVEL9K_RVM_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############ + # Fvm color. + typeset -g POWERLEVEL9K_FVM_FOREGROUND=0 + typeset -g POWERLEVEL9K_FVM_BACKGROUND=4 + # Custom icon. + # typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]########### + # Lua color. + typeset -g POWERLEVEL9K_LUAENV_FOREGROUND=0 + typeset -g POWERLEVEL9K_LUAENV_BACKGROUND=4 + # Hide lua version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_LUAENV_SOURCES=(shell local global) + # If set to false, hide lua version if it's the same as global: + # $(luaenv version-name) == $(luaenv global). + typeset -g POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide lua version if it's equal to "system". + typeset -g POWERLEVEL9K_LUAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################ + # Java color. + typeset -g POWERLEVEL9K_JENV_FOREGROUND=1 + typeset -g POWERLEVEL9K_JENV_BACKGROUND=7 + # Hide java version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_JENV_SOURCES=(shell local global) + # If set to false, hide java version if it's the same as global: + # $(jenv version-name) == $(jenv global). + typeset -g POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide java version if it's equal to "system". + typeset -g POWERLEVEL9K_JENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############ + # Perl color. + typeset -g POWERLEVEL9K_PLENV_FOREGROUND=0 + typeset -g POWERLEVEL9K_PLENV_BACKGROUND=4 + # Hide perl version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PLENV_SOURCES=(shell local global) + # If set to false, hide perl version if it's the same as global: + # $(plenv version-name) == $(plenv global). + typeset -g POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide perl version if it's equal to "system". + typeset -g POWERLEVEL9K_PLENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ perlbrew: perl version from perlbrew (https://github.com/gugod/App-perlbrew) ]############ + # Perlbrew color. + typeset -g POWERLEVEL9K_PERLBREW_FOREGROUND=67 + # Show perlbrew version only when in a perl project subdirectory. + typeset -g POWERLEVEL9K_PERLBREW_PROJECT_ONLY=true + # Don't show "perl-" at the front. + typeset -g POWERLEVEL9K_PERLBREW_SHOW_PREFIX=false + # Custom icon. + # typeset -g POWERLEVEL9K_PERLBREW_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############ + # PHP color. + typeset -g POWERLEVEL9K_PHPENV_FOREGROUND=0 + typeset -g POWERLEVEL9K_PHPENV_BACKGROUND=5 + # Hide php version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_PHPENV_SOURCES=(shell local global) + # If set to false, hide php version if it's the same as global: + # $(phpenv version-name) == $(phpenv global). + typeset -g POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide PHP version if it's equal to "system". + typeset -g POWERLEVEL9K_PHPENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #######[ scalaenv: scala version from scalaenv (https://github.com/scalaenv/scalaenv) ]####### + # Scala color. + typeset -g POWERLEVEL9K_SCALAENV_FOREGROUND=0 + typeset -g POWERLEVEL9K_SCALAENV_BACKGROUND=1 + # Hide scala version if it doesn't come from one of these sources. + typeset -g POWERLEVEL9K_SCALAENV_SOURCES=(shell local global) + # If set to false, hide scala version if it's the same as global: + # $(scalaenv version-name) == $(scalaenv global). + typeset -g POWERLEVEL9K_SCALAENV_PROMPT_ALWAYS_SHOW=false + # If set to false, hide scala version if it's equal to "system". + typeset -g POWERLEVEL9K_SCALAENV_SHOW_SYSTEM=true + # Custom icon. + # typeset -g POWERLEVEL9K_SCALAENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ haskell_stack: haskell version from stack (https://haskellstack.org/) ]########### + # Haskell color. + typeset -g POWERLEVEL9K_HASKELL_STACK_FOREGROUND=0 + typeset -g POWERLEVEL9K_HASKELL_STACK_BACKGROUND=3 + + # Hide haskell version if it doesn't come from one of these sources. + # + # shell: version is set by STACK_YAML + # local: version is set by stack.yaml up the directory tree + # global: version is set by the implicit global project (~/.stack/global-project/stack.yaml) + typeset -g POWERLEVEL9K_HASKELL_STACK_SOURCES=(shell local) + # If set to false, hide haskell version if it's the same as in the implicit global project. + typeset -g POWERLEVEL9K_HASKELL_STACK_ALWAYS_SHOW=true + # Custom icon. + # typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ terraform: terraform workspace (https://www.terraform.io) ]################# + # Don't show terraform workspace if it's literally "default". + typeset -g POWERLEVEL9K_TERRAFORM_SHOW_DEFAULT=false + # POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current terraform workspace gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current terraform workspace is "project_test", its class is TEST because "project_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=2 + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_BACKGROUND=0 + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=4 + typeset -g POWERLEVEL9K_TERRAFORM_OTHER_BACKGROUND=0 + # typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #############[ terraform_version: terraform version (https://www.terraform.io) ]############## + # Terraform version color. + typeset -g POWERLEVEL9K_TERRAFORM_VERSION_FOREGROUND=4 + typeset -g POWERLEVEL9K_TERRAFORM_VERSION_BACKGROUND=0 + # Custom icon. + # typeset -g POWERLEVEL9K_TERRAFORM_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################[ terraform_version: It shows active terraform version (https://www.terraform.io) ]################# + typeset -g POWERLEVEL9K_TERRAFORM_VERSION_SHOW_ON_COMMAND='terraform|tf' + + #############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]############# + # Show kubecontext only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show kubecontext. + typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc|istioctl|kogito|k9s|helmfile|flux|fluxctl|stern|kubeseal|skaffold|kubent|kubecolor|cmctl|sparkctl' + + # Kubernetes context classes for the purpose of using different colors, icons and expansions with + # different contexts. + # + # POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current kubernetes context gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current kubernetes context is "deathray-testing/default", its class is TEST + # because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=0 + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_BACKGROUND=2 + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND=7 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_BACKGROUND=5 + # typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext + # segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # Within the expansion the following parameters are always available: + # + # - P9K_CONTENT The content that would've been displayed if there was no content + # expansion defined. + # - P9K_KUBECONTEXT_NAME The current context's name. Corresponds to column NAME in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_CLUSTER The current context's cluster. Corresponds to column CLUSTER in the + # output of `kubectl config get-contexts`. + # - P9K_KUBECONTEXT_NAMESPACE The current context's namespace. Corresponds to column NAMESPACE + # in the output of `kubectl config get-contexts`. If there is no + # namespace, the parameter is set to "default". + # - P9K_KUBECONTEXT_USER The current context's user. Corresponds to column AUTHINFO in the + # output of `kubectl config get-contexts`. + # + # If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS), + # the following extra parameters are available: + # + # - P9K_KUBECONTEXT_CLOUD_NAME Either "gke" or "eks". + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT Account/project ID. + # - P9K_KUBECONTEXT_CLOUD_ZONE Availability zone. + # - P9K_KUBECONTEXT_CLOUD_CLUSTER Cluster. + # + # P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example, + # if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=gke + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + # + # If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01": + # + # - P9K_KUBECONTEXT_CLOUD_NAME=eks + # - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012 + # - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1 + # - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01 + typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION= + # Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME. + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}' + # Append the current context's namespace if it's not "default". + POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION+='${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}' + + # Custom prefix. + # typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='at ' + + #[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]# + # Show aws only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show aws. + typeset -g POWERLEVEL9K_AWS_SHOW_ON_COMMAND='aws|awless|cdk|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current AWS profile gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' DEFAULT) + # + # If your current AWS profile is "company_test", its class is TEST + # because "company_test" doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AWS_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_AWS_DEFAULT_FOREGROUND=7 + typeset -g POWERLEVEL9K_AWS_DEFAULT_BACKGROUND=1 + # typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # AWS segment format. The following parameters are available within the expansion. + # + # - P9K_AWS_PROFILE The name of the current AWS profile. + # - P9K_AWS_REGION The region associated with the current AWS profile. + typeset -g POWERLEVEL9K_AWS_CONTENT_EXPANSION='${P9K_AWS_PROFILE//\%/%%}${P9K_AWS_REGION:+ ${P9K_AWS_REGION//\%/%%}}' + + #[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]# + # AWS Elastic Beanstalk environment color. + typeset -g POWERLEVEL9K_AWS_EB_ENV_FOREGROUND=2 + typeset -g POWERLEVEL9K_AWS_EB_ENV_BACKGROUND=0 + # Custom icon. + # typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]########## + # Show azure only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show azure. + typeset -g POWERLEVEL9K_AZURE_SHOW_ON_COMMAND='az|terraform|pulumi|terragrunt' + + # POWERLEVEL9K_AZURE_CLASSES is an array with even number of elements. The first element + # in each pair defines a pattern against which the current azure account name gets matched. + # More specifically, it's P9K_CONTENT prior to the application of context expansion (see below) + # that gets matched. If you unset all POWERLEVEL9K_AZURE_*CONTENT_EXPANSION parameters, + # you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_AZURE_CLASSES defines the account class. Patterns are tried in order. The + # first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD + # '*test*' TEST + # '*' OTHER) + # + # If your current azure account is "company_test", its class is TEST because "company_test" + # doesn't match the pattern '*prod*' but does match '*test*'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_AZURE_TEST_FOREGROUND=2 + # typeset -g POWERLEVEL9K_AZURE_TEST_BACKGROUND=0 + # typeset -g POWERLEVEL9K_AZURE_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_AZURE_TEST_CONTENT_EXPANSION='> ${P9K_CONTENT} <' + typeset -g POWERLEVEL9K_AZURE_CLASSES=( + # '*prod*' PROD # These values are examples that are unlikely + # '*test*' TEST # to match your needs. Customize them as needed. + '*' OTHER) + + # Azure account name color. + typeset -g POWERLEVEL9K_AZURE_OTHER_FOREGROUND=7 + typeset -g POWERLEVEL9K_AZURE_OTHER_BACKGROUND=4 + # Custom icon. + # typeset -g POWERLEVEL9K_AZURE_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]########### + # Show gcloud only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show gcloud. + typeset -g POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND='gcloud|gcs|gsutil' + # Google cloud color. + typeset -g POWERLEVEL9K_GCLOUD_FOREGROUND=7 + typeset -g POWERLEVEL9K_GCLOUD_BACKGROUND=4 + + # Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION and/or + # POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION if the default is too verbose or not informative + # enough. You can use the following parameters in the expansions. Each of them corresponds to the + # output of `gcloud` tool. + # + # Parameter | Source + # -------------------------|-------------------------------------------------------------------- + # P9K_GCLOUD_CONFIGURATION | gcloud config configurations list --format='value(name)' + # P9K_GCLOUD_ACCOUNT | gcloud config get-value account + # P9K_GCLOUD_PROJECT_ID | gcloud config get-value project + # P9K_GCLOUD_PROJECT_NAME | gcloud projects describe $P9K_GCLOUD_PROJECT_ID --format='value(name)' + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced with '%%'. + # + # Obtaining project name requires sending a request to Google servers. This can take a long time + # and even fail. When project name is unknown, P9K_GCLOUD_PROJECT_NAME is not set and gcloud + # prompt segment is in state PARTIAL. When project name gets known, P9K_GCLOUD_PROJECT_NAME gets + # set and gcloud prompt segment transitions to state COMPLETE. + # + # You can customize the format, icon and colors of gcloud segment separately for states PARTIAL + # and COMPLETE. You can also hide gcloud in state PARTIAL by setting + # POWERLEVEL9K_GCLOUD_PARTIAL_VISUAL_IDENTIFIER_EXPANSION and + # POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION to empty. + typeset -g POWERLEVEL9K_GCLOUD_PARTIAL_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_ID//\%/%%}' + typeset -g POWERLEVEL9K_GCLOUD_COMPLETE_CONTENT_EXPANSION='${P9K_GCLOUD_PROJECT_NAME//\%/%%}' + + # Send a request to Google (by means of `gcloud projects describe ...`) to obtain project name + # this often. Negative value disables periodic polling. In this mode project name is retrieved + # only when the current configuration, account or project id changes. + typeset -g POWERLEVEL9K_GCLOUD_REFRESH_PROJECT_NAME_SECONDS=60 + + # Custom icon. + # typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]# + # Show google_app_cred only when the command you are typing invokes one of these tools. + # Tip: Remove the next line to always show google_app_cred. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND='terraform|pulumi|terragrunt' + + # Google application credentials classes for the purpose of using different colors, icons and + # expansions with different credentials. + # + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first + # element in each pair defines a pattern against which the current kubernetes context gets + # matched. More specifically, it's P9K_CONTENT prior to the application of context expansion + # (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION + # parameters, you'll see this value in your prompt. The second element of each pair in + # POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order. + # The first match wins. + # + # For example, given these settings: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD + # '*:*test*:*' TEST + # '*' DEFAULT) + # + # If your current Google application credentials is "service_account deathray-testing x@y.com", + # its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'. + # + # You can define different colors, icons and content expansions for different classes: + # + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐' + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID' + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=( + # '*:*prod*:*' PROD # These values are examples that are unlikely + # '*:*test*:*' TEST # to match your needs. Customize them as needed. + '*' DEFAULT) + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND=7 + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_BACKGROUND=4 + # typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by + # google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference: + # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion. + # + # You can use the following parameters in the expansion. Each of them corresponds to one of the + # fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS. + # + # Parameter | JSON key file field + # ---------------------------------+--------------- + # P9K_GOOGLE_APP_CRED_TYPE | type + # P9K_GOOGLE_APP_CRED_PROJECT_ID | project_id + # P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email + # + # Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurrences of '%' replaced by '%%'. + typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION='${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}' + + ##############[ toolbox: toolbox name (https://github.com/containers/toolbox) ]############### + # Toolbox color. + typeset -g POWERLEVEL9K_TOOLBOX_FOREGROUND=0 + typeset -g POWERLEVEL9K_TOOLBOX_BACKGROUND=3 + # Don't display the name of the toolbox if it matches fedora-toolbox-*. + typeset -g POWERLEVEL9K_TOOLBOX_CONTENT_EXPANSION='${P9K_TOOLBOX_NAME:#fedora-toolbox-*}' + # Custom icon. + # typeset -g POWERLEVEL9K_TOOLBOX_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_TOOLBOX_PREFIX='in ' + + ###############################[ public_ip: public IP address ]############################### + # Public IP color. + typeset -g POWERLEVEL9K_PUBLIC_IP_FOREGROUND=7 + typeset -g POWERLEVEL9K_PUBLIC_IP_BACKGROUND=0 + # Custom icon. + # typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ########################[ vpn_ip: virtual private network indicator ]######################### + # VPN IP color. + typeset -g POWERLEVEL9K_VPN_IP_FOREGROUND=0 + typeset -g POWERLEVEL9K_VPN_IP_BACKGROUND=6 + # When on VPN, show just an icon without the IP address. + # Tip: To display the private IP address when on VPN, remove the next line. + typeset -g POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION= + # Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN + # to see the name of the interface. + typeset -g POWERLEVEL9K_VPN_IP_INTERFACE='(gpd|wg|(.*tun)|tailscale)[0-9]*|(zt.*)' + # If set to true, show one segment per matching network interface. If set to false, show only + # one segment corresponding to the first matching network interface. + # Tip: If you set it to true, you'll probably want to unset POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION. + typeset -g POWERLEVEL9K_VPN_IP_SHOW_ALL=false + # Custom icon. + # typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ###########[ ip: ip address and bandwidth usage for a specified network interface ]########### + # IP color. + typeset -g POWERLEVEL9K_IP_BACKGROUND=4 + typeset -g POWERLEVEL9K_IP_FOREGROUND=0 + # The following parameters are accessible within the expansion: + # + # Parameter | Meaning + # ----------------------+------------------------------------------- + # P9K_IP_IP | IP address + # P9K_IP_INTERFACE | network interface + # P9K_IP_RX_BYTES | total number of bytes received + # P9K_IP_TX_BYTES | total number of bytes sent + # P9K_IP_RX_BYTES_DELTA | number of bytes received since last prompt + # P9K_IP_TX_BYTES_DELTA | number of bytes sent since last prompt + # P9K_IP_RX_RATE | receive rate (since last prompt) + # P9K_IP_TX_RATE | send rate (since last prompt) + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP' + # Show information for the first network interface whose name matches this regular expression. + # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. + typeset -g POWERLEVEL9K_IP_INTERFACE='[ew].*' + # Custom icon. + # typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐' + + #########################[ proxy: system-wide http/https/ftp proxy ]########################## + # Proxy color. + typeset -g POWERLEVEL9K_PROXY_FOREGROUND=4 + typeset -g POWERLEVEL9K_PROXY_BACKGROUND=0 + # Custom icon. + # typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐' + + ################################[ battery: internal battery ]################################# + # Show battery in red when it's below this level and not connected to power supply. + typeset -g POWERLEVEL9K_BATTERY_LOW_THRESHOLD=20 + typeset -g POWERLEVEL9K_BATTERY_LOW_FOREGROUND=1 + # Show battery in green when it's charging or fully charged. + typeset -g POWERLEVEL9K_BATTERY_{CHARGING,CHARGED}_FOREGROUND=2 + # Show battery in yellow when it's discharging. + typeset -g POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND=3 + # Battery pictograms going from low to high level of charge. + typeset -g POWERLEVEL9K_BATTERY_STAGES='\UF008E\UF007A\UF007B\UF007C\UF007D\UF007E\UF007F\UF0080\UF0081\UF0082\UF0079' + # Don't show the remaining time to charge/discharge. + typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false + typeset -g POWERLEVEL9K_BATTERY_BACKGROUND=0 + + #####################################[ wifi: wifi speed ]##################################### + # WiFi color. + typeset -g POWERLEVEL9K_WIFI_FOREGROUND=0 + typeset -g POWERLEVEL9K_WIFI_BACKGROUND=4 + # Custom icon. + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS). + # + # # Wifi colors and icons for different signal strength levels (low to high). + # typeset -g my_wifi_fg=(0 0 0 0 0) # <-- change these values + # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values + # + # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps' + # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}' + # + # The following parameters are accessible within the expansions: + # + # Parameter | Meaning + # ----------------------+--------------- + # P9K_WIFI_SSID | service set identifier, a.k.a. network name + # P9K_WIFI_LINK_AUTH | authentication protocol such as "wpa2-psk" or "none"; empty if unknown + # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second + # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0 + # P9K_WIFI_NOISE | noise in dBm, from -120 to 0 + # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE) + + ####################################[ time: current time ]#################################### + # Current time color. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=0 + typeset -g POWERLEVEL9K_TIME_BACKGROUND=7 + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands as opposed to the default + # behavior where they contain the end times of their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false + # Custom icon. + # typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐' + # Custom prefix. + # typeset -g POWERLEVEL9K_TIME_PREFIX='at ' + + # Example of a user-defined prompt segment. Function prompt_example will be called on every + # prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or + # POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and yellow text on red background + # greeting the user. + # + # Type `p10k help segment` for documentation and a more sophisticated example. + function prompt_example() { + p10k segment -b 1 -f 3 -i '⭐' -t 'hello, %n' + } + + # User-defined prompt segments may optionally provide an instant_prompt_* function. Its job + # is to generate the prompt segment for display in instant prompt. See + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # + # Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function + # and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k + # will replay these calls without actually calling instant_prompt_*. It is imperative that + # instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this + # rule is not observed, the content of instant prompt will be incorrect. + # + # Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If + # instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt. + function instant_prompt_example() { + # Since prompt_example always makes the same `p10k segment` calls, we can call it from + # instant_prompt_example. This will give us the same `example` prompt segment in the instant + # and regular prompts. + prompt_example + } + + # User-defined prompt segments can be customized the same way as built-in segments. + typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=3 + typeset -g POWERLEVEL9K_EXAMPLE_BACKGROUND=1 + # typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐' + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=always + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +# Tell `p10k configure` which file it should overwrite. +typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/modules/home/zsh/zshrc-personal.nix b/modules/home/zsh/zshrc-personal.nix new file mode 100644 index 0000000..545cfd2 --- /dev/null +++ b/modules/home/zsh/zshrc-personal.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: { + home.packages = with pkgs; [ zsh ]; + + home.file."./.zshrc-personal".text = '' + + # This file allows you to define your own aliases, functions, etc + # below are just some examples of what you can use this file for + + #!/usr/bin/env zsh + # Set defaults + # + #export EDITOR="nvim" + #export VISUAL="nvim" + + #alias c="clear" + + + ''; +} + diff --git a/profiles/amd/default.nix b/profiles/amd/default.nix new file mode 100644 index 0000000..7372ebc --- /dev/null +++ b/profiles/amd/default.nix @@ -0,0 +1,10 @@ +{ host, ... }: { + imports = [ + ../../hosts/${host} + ../../modules/drivers + ../../modules/core + ]; + drivers.amdgpu.enable = true; + drivers.intel.enable = false; + vm.guest-services.enable = false; +} diff --git a/profiles/intel/default.nix b/profiles/intel/default.nix new file mode 100644 index 0000000..daf3e50 --- /dev/null +++ b/profiles/intel/default.nix @@ -0,0 +1,10 @@ +{ host, ... }: { + imports = [ + ../../hosts/${host} + ../../modules/drivers + ../../modules/core + ]; + drivers.amdgpu.enable = false; + drivers.intel.enable = true; + vm.guest-services.enable = false; +} diff --git a/profiles/vm/default.nix b/profiles/vm/default.nix new file mode 100644 index 0000000..a257903 --- /dev/null +++ b/profiles/vm/default.nix @@ -0,0 +1,10 @@ +{ host, ... }: { + imports = [ + ../../hosts/${host} + ../../modules/drivers + ../../modules/core + ]; + drivers.amdgpu.enable = false; + drivers.intel.enable = false; + vm.guest-services.enable = true; +} diff --git a/wallpapers/Amagi.jpeg b/wallpapers/Amagi.jpeg new file mode 100644 index 0000000..a9c3ed9 Binary files /dev/null and b/wallpapers/Amagi.jpeg differ diff --git a/wallpapers/Anime-Purple-eyes.png b/wallpapers/Anime-Purple-eyes.png new file mode 100644 index 0000000..1cfd093 Binary files /dev/null and b/wallpapers/Anime-Purple-eyes.png differ diff --git a/wallpapers/AnimeGirlNightSky.jpg b/wallpapers/AnimeGirlNightSky.jpg new file mode 100644 index 0000000..5552326 Binary files /dev/null and b/wallpapers/AnimeGirlNightSky.jpg differ diff --git a/wallpapers/Rainnight.jpg b/wallpapers/Rainnight.jpg new file mode 100644 index 0000000..ffa2dc9 Binary files /dev/null and b/wallpapers/Rainnight.jpg differ diff --git a/wallpapers/beautifulmountainscape.jpg b/wallpapers/beautifulmountainscape.jpg new file mode 100644 index 0000000..f98608c Binary files /dev/null and b/wallpapers/beautifulmountainscape.jpg differ diff --git a/wallpapers/mountainscapedark.jpg b/wallpapers/mountainscapedark.jpg new file mode 100644 index 0000000..c3259d8 Binary files /dev/null and b/wallpapers/mountainscapedark.jpg differ diff --git a/wallpapers/nix-wallpaper-stripes-logo.png b/wallpapers/nix-wallpaper-stripes-logo.png new file mode 100644 index 0000000..b223bfa Binary files /dev/null and b/wallpapers/nix-wallpaper-stripes-logo.png differ diff --git a/wallpapers/zaney-wallpaper.jpg b/wallpapers/zaney-wallpaper.jpg new file mode 100644 index 0000000..b1f40db Binary files /dev/null and b/wallpapers/zaney-wallpaper.jpg differ