diff --git a/README.md b/README.md index e2dc1557..15073e64 100644 --- a/README.md +++ b/README.md @@ -59,8 +59,8 @@ You don't have to go through the pain I've experienced again! Check out my | **Display Manager** | [greetd][greetd] + [tuigreet][tuigreet] | | **Window Manager** | [Niri][Niri] | | **Desktop Shell** | [Noctalia][noctalia] — bar/notifications/launcher/lock screen/control center/power menu/screenshots, one native shell | -| **Terminal Emulators** | [foot][foot], [Kitty][Kitty], [Alacritty][Alacritty], [Ghostty][Ghostty] | -| **Terminal Multiplexer** | [Zellij][Zellij] | +| **Terminal Emulators** | [Kitty][Kitty], [Ghostty][Ghostty] | +| **Terminal Multiplexer** | [tuios][tuios] | | **Shell** | [Nushell][Nushell] + [Starship][Starship] | | **Editors / IDE** | [Zed][Zed] (GUI, primary), VS Code (GUI); [Helix][Helix] (TUI, primary), [Neovim][Neovim] (TUI, backup) | | **Color Scheme** | [catppuccin-nix][catppuccin-nix] | @@ -84,7 +84,7 @@ Wallpapers: https://github.com/ryan4yin/wallpapers ![btop monitoring and system information](./_img/2026-10-01_btop-monitoring-system-info.webp) -![Helix, Zellij, and AI agents](./_img/2026-10-02_helix-zellij-ai-agents.webp) +![Helix and AI agents in a terminal workspace](./_img/2026-10-02_helix-ai-agents.webp) ## Editors / IDE @@ -194,8 +194,6 @@ Other dotfiles that inspired me: [Niri]: https://github.com/YaLTeR/niri [greetd]: https://github.com/kennylevinsen/greetd [Kitty]: https://github.com/kovidgoyal/kitty -[foot]: https://codeberg.org/dnkl/foot -[Alacritty]: https://github.com/alacritty/alacritty [Ghostty]: https://github.com/ghostty-org/ghostty [Nushell]: https://github.com/nushell/nushell [Starship]: https://github.com/starship/starship @@ -204,7 +202,7 @@ Other dotfiles that inspired me: [flypy]: https://flypy.cc/ [Btop]: https://github.com/aristocratos/btop [mpv]: https://github.com/mpv-player/mpv -[Zellij]: https://github.com/zellij-org/zellij +[tuios]: https://github.com/Gaurav-Gosain/tuios [Helix]: https://github.com/helix-editor/helix [Neovim]: https://github.com/neovim/neovim [Zed]: https://zed.dev diff --git a/_img/2026-10-02_helix-zellij-ai-agents.webp b/_img/2026-10-02_helix-ai-agents.webp similarity index 100% rename from _img/2026-10-02_helix-zellij-ai-agents.webp rename to _img/2026-10-02_helix-ai-agents.webp diff --git a/_img/old/2024-01-07_emacs.webp b/_img/old/2024-01-07_emacs.webp deleted file mode 100644 index 6f19d1a9..00000000 Binary files a/_img/old/2024-01-07_emacs.webp and /dev/null differ diff --git a/flake.lock b/flake.lock index 8b1a8052..88b4abea 100644 --- a/flake.lock +++ b/flake.lock @@ -116,6 +116,27 @@ "type": "github" } }, + "devshell": { + "inputs": { + "nixpkgs": [ + "tuios", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1768818222, + "narHash": "sha256-460jc0+CZfyaO8+w8JNtlClB2n4ui1RbHfPTLkpwhU8=", + "owner": "numtide", + "repo": "devshell", + "rev": "255a2b1725a20d060f566e4755dbf571bbbb5f76", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, "disko": { "inputs": { "nixpkgs": [ @@ -200,6 +221,22 @@ "type": "github" } }, + "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1761640442, + "narHash": "sha256-AtrEP6Jmdvrqiv4x2xa5mrtaIp3OEe8uBYCDZDS+hu8=", + "owner": "nix-community", + "repo": "flake-compat", + "rev": "4a56054d8ffc173222d09dad23adf4ba946c8884", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -260,6 +297,42 @@ "type": "github" } }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "tuios", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1787559586, + "narHash": "sha256-onL0VLf9vPllmT0H/OlURIU5r5t5WIEl7t4tVNKT0Nw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9d0d87172c374f89da73c1cfe6d81ae62feac1f1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-root": { + "locked": { + "lastModified": 1723604017, + "narHash": "sha256-rBtQ8gg+Dn4Sx/s+pvjdq3CB2wQNzx9XGFq/JVGCB6k=", + "owner": "srid", + "repo": "flake-root", + "rev": "b759a56851e10cb13f6b8e5698af7b59c44be26e", + "type": "github" + }, + "original": { + "owner": "srid", + "repo": "flake-root", + "type": "github" + } + }, "git-hooks": { "inputs": { "flake-compat": [ @@ -285,6 +358,31 @@ "type": "github" } }, + "git-hooks-nix": { + "inputs": { + "flake-compat": [ + "tuios", + "flake-compat" + ], + "nixpkgs": [ + "tuios", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1787424939, + "narHash": "sha256-O2tBn84NNuHrnqNVxx/XqsXwfYvS1YwBh+7CBnbCYsk=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "809414f0cdadf82cf11b06c2b29ba9b3168b3297", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -518,6 +616,35 @@ "type": "github" } }, + "nix-fast-build": { + "inputs": { + "flake-parts": [ + "tuios", + "flake-parts" + ], + "nixpkgs": [ + "tuios", + "nixpkgs" + ], + "treefmt-nix": [ + "tuios", + "treefmt-nix" + ] + }, + "locked": { + "lastModified": 1787488599, + "narHash": "sha256-oe3nq8sRFRLtRHQgnNqD26ETFfXtQ4tJPgP7RryApRE=", + "owner": "Mic92", + "repo": "nix-fast-build", + "rev": "d5a820b15111cf70b2eb1fef94a4d65ded1a555f", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-fast-build", + "type": "github" + } + }, "nix-gaming": { "inputs": { "flake-compat": "flake-compat_2", @@ -872,6 +999,7 @@ "preservation": "preservation", "pyclipsync": "pyclipsync", "rust-overlay": "rust-overlay", + "tuios": "tuios", "wallpapers": "wallpapers" } }, @@ -962,6 +1090,54 @@ "type": "github" } }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "tuios", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1786901030, + "narHash": "sha256-WSFCsDSE5ffgD2MqzkM2CYjeFiKhRF/dJUN8uedb6YE=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "27b3b12a8e6375f28ebe122f07d230ca5459bbfa", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "tuios": { + "inputs": { + "devshell": "devshell", + "flake-compat": "flake-compat_5", + "flake-parts": "flake-parts_4", + "flake-root": "flake-root", + "git-hooks-nix": "git-hooks-nix", + "nix-fast-build": "nix-fast-build", + "nixpkgs": [ + "nixpkgs" + ], + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1790956816, + "narHash": "sha256-NGYHcUREpbCNfynyid6DMFCxK7cvvbkF2n2UWk0Swyk=", + "owner": "Gaurav-Gosain", + "repo": "tuios", + "rev": "661bd4fb2e451613442d593c09631bb321492e98", + "type": "github" + }, + "original": { + "owner": "Gaurav-Gosain", + "repo": "tuios", + "type": "github" + } + }, "wallpapers": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index d66e6b36..59a386a0 100644 --- a/flake.nix +++ b/flake.nix @@ -55,7 +55,7 @@ # https://github.com/catppuccin/nix # main carries the rust-overlay-style deprecation fix for its vscode - # package (nodejs -> nodejs-slim); v26.05 still emits the eval warning. + # package (nodejs -> nodejs-slim). catppuccin = { url = "github:catppuccin/nix/main"; inputs.nixpkgs.follows = "nixpkgs"; @@ -165,5 +165,12 @@ url = "github:ryan4yin/pyclipsync/v0.1.3"; inputs.nixpkgs.follows = "nixpkgs"; }; + + # terminal window manager / multiplexer; nixpkgs lags behind upstream, + # so track the upstream flake. + tuios = { + url = "github:Gaurav-Gosain/tuios"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; } diff --git a/home/README.md b/home/README.md index 981e53ad..8741d3bb 100644 --- a/home/README.md +++ b/home/README.md @@ -12,7 +12,7 @@ home/ │ │ ├── shells/ # Shell configurations (bash, Nushell) │ │ └── ... │ ├── gui/ # GUI applications and desktop settings -│ │ ├── terminal/ # Terminal emulators (Kitty, Alacritty, etc.) +│ │ ├── terminal/ # Terminal emulators (Ghostty, Kitty, etc.) │ │ └── ... │ ├── tui/ # Terminal/TUI applications │ │ ├── editors/ # Heavy editor/tooling pkgs only (`packages.nix`; core editors live under `core/editors`) diff --git a/home/base/README.md b/home/base/README.md index 0b16775c..3da4769a 100644 --- a/home/base/README.md +++ b/home/base/README.md @@ -20,8 +20,6 @@ systems. - **theme.nix**: Color schemes and theming - **xdg.nix**: XDG base-directory configuration - **yazi.nix**: Terminal file manager configuration - - **zellij/**: Terminal multiplexer (enable + `zj` alias; config and layouts live in - `tui/zellij/`) ### Desktop Environment @@ -30,10 +28,8 @@ systems. - **media.nix**: Media players and utilities - **zed-editor.nix**: Zed editor configuration (primary GUI editor) - **terminal/**: Terminal emulator configurations - - **alacritty/**: Alacritty terminal + - **ghostty.nix**: Ghostty terminal (default) - **kitty.nix**: Kitty terminal - - **foot.nix**: Foot terminal (Linux) - - **ghostty.nix**: Ghostty terminal ### Terminal Interface @@ -49,7 +45,7 @@ systems. - **password-store/**: Password management with pass - **shell/**: Shell environment configurations - **ssh.nix**: SSH configuration and management - - **zellij/**: Terminal workspace management + - **tuios/**: Terminal window manager / multiplexer (config + nushell auto-start) ### System Management diff --git a/home/base/core/btop.nix b/home/base/core/btop.nix index fa162855..d253093a 100644 --- a/home/base/core/btop.nix +++ b/home/base/core/btop.nix @@ -11,10 +11,8 @@ # macOS has no `modules.btop` and takes btop from Home Manager. package = if pkgs.stdenv.hostPlatform.isDarwin then pkgs.btop else null; settings = { - # Use the terminal background so btop is transparent. No visible effect - # inside zellij yet: its panes have been opaque since 0.44 - # (https://github.com/zellij-org/zellij/issues/5175), so this only shows - # when btop runs directly in a translucent terminal. + # Use the terminal background so btop is transparent (shows when btop + # runs in a translucent terminal). theme_background = false; }; }; diff --git a/home/base/core/editors/README.md b/home/base/core/editors/README.md index 4cfab281..d6adc12e 100644 --- a/home/base/core/editors/README.md +++ b/home/base/core/editors/README.md @@ -9,7 +9,7 @@ Shared editor configuration and **usage notes** for terminal-focused editing. interactive and privileged (`sudoedit`) edits alike. - **Neovim** (`neovim/`): Backup editor — classic vim-style workflow and `:help` when needed. -Terminal layout and files: **Zellij** and **Yazi** live under `core/zellij/` and `core/yazi.nix` +Terminal layout and files: **tuios** lives under `tui/tuios/` and **Yazi** under `core/yazi.nix` (not in this folder). ## Docs diff --git a/home/base/core/editors/helix/README.md b/home/base/core/editors/helix/README.md index 5de9652d..bd4c0320 100644 --- a/home/base/core/editors/helix/README.md +++ b/home/base/core/editors/helix/README.md @@ -19,7 +19,7 @@ multi-cursor, surround), and a smaller moving part than a large Neovim plugin st 1. — typable commands (`:` prompt). 1. — `config.toml`, themes, remaps. 1. — install tips, language servers, FAQ. -1. Prefer **Zellij** for shells and panes; use **Helix** for buffers and text. +1. Prefer **tuios** for shells and panes; use **Helix** for buffers and text. 1. On large codebases, navigation is often **by picker** (`Space f`, symbols, workspace search) or **by LSP** (`g` goto mode), complementing motion-based editing. 1. After **git** operations (`checkout`, `merge`, `pull`, `rebase`) or whenever many files changed @@ -38,20 +38,24 @@ Run `:tutor` inside Helix, or `hx --tutor` from the shell ### Terminal related -Zellij shortcuts used often (same idea as in the Neovim notes): +tuios shortcuts used often (leader is `Ctrl + B`; same idea as in the Neovim notes): -| Action | Zellij shortcut | -| ------------------------- | --------------- | -| Floating terminal | `Ctrl + p + w` | -| Horizontal split terminal | `Ctrl + p + d` | -| Vertical split terminal | `Ctrl + p + n` | +| Action | tuios shortcut | +| ----------------- | -------------------------- | +| New pane | `n` (window mode) | +| Floating terminal | `Ctrl + B`, then `Alt + F` | +| Split horizontal | `Ctrl + B`, then `-` | +| Split vertical | `Ctrl + B`, then `\` | +| Command palette | `Ctrl + P` | +| Launcher | `Alt + Space` | +| Detach | `Ctrl + B`, then `d` | In Helix, `|` / `!` and variants pipe or insert shell output on selections (see **Changes**). This flake’s Helix Home Manager module keeps **almost all default keys** but adds several -normal-mode remaps: **`Ctrl+Shift+o`** → jump backward (because Zellij uses **`Ctrl+o`** for -Session), `Space Space` → `:reload-all`, `Space w` / `Space q` → `:w` / `:q`, `Esc` → collapse -selection, and `$` / `0` line jumps (see `home/base/core/editors/helix/default.nix`). +normal-mode remaps: **`Ctrl+Shift+o`** → jump backward (leaving `Ctrl+o` free for the shell), +`Space Space` → `:reload-all`, `Space w` / `Space q` → `:w` / `:q`, `Esc` → collapse selection, and +`$` / `0` line jumps (see `home/base/core/editors/helix/default.nix`). ### Command mode (`:`) @@ -203,12 +207,12 @@ Some bindings need an **LSP** or **tree-sitter** grammar; see notes on the keyma 1. Helix is newer; a stable plugin system is still evolving: 1. Neovim has an integrated terminal (similar in spirit to VS Code’s). - 1. Helix does not ship one; use Zellij / tmux / terminal features instead. + 1. Helix does not ship one; use tuios / tmux / terminal features instead. 1. 1. 1. Helix has no built-in tree panel; pair with **Yazi**, ranger, or Broot and open files from there. 1. A tree view may arrive with plugins later; many users rely on the file picker instead. -1. Global substitution is weaker in Helix; run replacements in another pane (Zellij) or an external +1. Global substitution is weaker in Helix; run replacements in another pane (tuios) or an external tool when needed. 1. 1. Neovim’s `:s` with preview remains strong for interactive refactors; external tools (e.g. @@ -216,7 +220,7 @@ Some bindings need an **LSP** or **tree-sitter** grammar; see notes on the keyma 1. Complexity vs batteries-included tradeoffs: -Using **Helix** (and Neovim when useful) inside **Yazi** and **Zellij** keeps editing, files, and +Using **Helix** (and Neovim when useful) inside **Yazi** and **tuios** keeps editing, files, and panes explicit and scriptable — different from a single IDE window, but very composable. Helix nudges you away from reproducing VS Code/JetBrains inside one process; Neovim remains there diff --git a/home/base/core/editors/helix/default.nix b/home/base/core/editors/helix/default.nix index 4e0dde9a..822cb825 100644 --- a/home/base/core/editors/helix/default.nix +++ b/home/base/core/editors/helix/default.nix @@ -111,7 +111,7 @@ "$" = "goto_line_end"; "0" = "goto_line_start"; - # Ctrl+o opens Zellij Session + # keep Ctrl+o free for the shell; use C-S-o for the jumplist "C-S-o" = "jump_backward"; }; diff --git a/home/base/core/editors/neovim/README.md b/home/base/core/editors/neovim/README.md index c3d9b8eb..38f0208f 100644 --- a/home/base/core/editors/neovim/README.md +++ b/home/base/core/editors/neovim/README.md @@ -10,7 +10,7 @@ pointers for when you reach for Neovim as a backup. 1. For deeper skill, read the official docs: 1. — vim help. 1. — Neovim user manual. -1. Prefer **Zellij** for shells and panes; use **Helix** or **Neovim** for buffers and text. +1. Prefer **tuios** for shells and panes; use **Helix** or **Neovim** for buffers and text. 1. Two powerful navigation modes on large codebases: 1. **By path** — when you know the tree layout. 1. **By content** — when you know what the code says. @@ -23,18 +23,21 @@ Type `:tutor` (or `:Tutor` in Neovim) for the built-in vim tutorial. > For a fuller reference: -Emacs Evil, Neovim, and vim share the motions below. +Neovim and vim share the motions below. ### Terminal related -Zellij shortcuts used often: +tuios shortcuts used often (leader is `Ctrl + B`): -| Action | Zellij shortcut | -| ------------------------- | --------------- | -| Floating terminal | `Ctrl + p + w` | -| Horizontal split terminal | `Ctrl + p + d` | -| Vertical split terminal | `Ctrl + p + n` | -| Run a shell command | `!xxx` | +| Action | tuios shortcut | +| ------------------- | -------------------------- | +| New pane | `n` (window mode) | +| Floating terminal | `Ctrl + B`, then `Alt + F` | +| Split horizontal | `Ctrl + B`, then `-` | +| Split vertical | `Ctrl + B`, then `\` | +| Command palette | `Ctrl + P` | +| Detach | `Ctrl + B`, then `d` | +| Run a shell command | `!xxx` | ### File management diff --git a/home/base/core/zellij/default.nix b/home/base/core/zellij/default.nix deleted file mode 100644 index 8d156e02..00000000 --- a/home/base/core/zellij/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -let - shellAliases = { - "zj" = "zellij"; - }; -in -{ - programs.zellij = { - enable = true; - }; - # only works in bash/zsh, not nushell - home.shellAliases = shellAliases; - programs.nushell.shellAliases = shellAliases; -} diff --git a/home/base/gui/terminal/README.md b/home/base/gui/terminal/README.md index 945f4411..7021a364 100644 --- a/home/base/gui/terminal/README.md +++ b/home/base/gui/terminal/README.md @@ -1,25 +1,19 @@ # Terminal Emulators I used to spend a lot of time on terminal emulators, to make them match my taste, but now I found -that it's not worth it, **Zellij can provide a user-friendly and unified user experience for all +that it's not worth it, **tuios can provide a user-friendly and unified user experience for all terminal emulators! without any pain**! Currently, I only use the most basic features of terminal emulators, such as true color, graphics protocol, etc. Other features such as tabs, scrollback buffer, select/search/copy, etc, are all -provided by zellij! +provided by tuios! My current terminal emulators are: -1. kitty: My main terminal emulator. - 1. to select/copy a large mount of text, We should do some tricks via kitty's `scrollback_pager` - with neovim, it's really painful: -2. foot: A fast, lightweight and minimalistic Wayland terminal emulator. - 1. foot only do the things a terminal emulator should do, no more, no less. - 1. It's really suitable for tiling window manager or zellij users! -3. alacritty: A cross-platform, GPU-accelerated terminal emulator. - 1. alacritty is really fast, I use it as a backup terminal emulator on all my desktops. -4. ghostty: A cross-platform, GPU-accelerated terminal emulator with native platform UI. - 1. ghostty is the newest addition, configured in `ghostty.nix`. +1. ghostty: My default terminal emulator, configured in `ghostty.nix`. Cross-platform, + GPU-accelerated, and supports the Kitty graphics protocol. +2. kitty: My secondary terminal emulator, configured in `kitty.nix`. Also supports the Kitty + graphics protocol. ## 'xterm-kitty': unknown terminal type when `ssh` into a remote host or `sudo xxx` diff --git a/home/base/gui/terminal/alacritty/default.nix b/home/base/gui/terminal/alacritty/default.nix deleted file mode 100644 index b87918da..00000000 --- a/home/base/gui/terminal/alacritty/default.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ - pkgs, - ... -}: -########################################################### -# -# Alacritty Configuration -# -# Useful Hot Keys for macOS: -# 1. Multi-Window: `command + N` -# 2. Increase Font Size: `command + =` | `command + +` -# 3. Decrease Font Size: `command + -` | `command + _` -# 4. Search Text: `command + F` -# 5. And Other common shortcuts such as Copy, Paste, Cursor Move, etc. -# -# Useful Hot Keys for Linux: -# 1. Increase Font Size: `ctrl + shift + =` | `ctrl + shift + +` -# 2. Decrease Font Size: `ctrl + shift + -` | `ctrl + shift + _` -# 3. Search Text: `ctrl + shift + N` -# 4. And Other common shortcuts such as Copy, Paste, Cursor Move, etc. -# -# Note: Alacritty do not have support for Tabs, and any graphic protocol. -# -########################################################### -{ - programs.alacritty = { - enable = true; - # https://alacritty.org/config-alacritty.html - settings = { - window = { - opacity = 0.93; - startup_mode = "Maximized"; # Maximized window - dynamic_title = true; - option_as_alt = "Both"; # Option key acts as Alt on macOS - decorations = "None"; # Show neither borders nor title bar - }; - scrolling = { - history = 10000; - }; - font = { - bold = { - family = "Maple Mono NF CN"; - }; - italic = { - family = "Maple Mono NF CN"; - }; - normal = { - family = "Maple Mono NF CN"; - }; - bold_italic = { - family = "Maple Mono NF CN"; - }; - size = 13; - }; - terminal = { - # Spawn a nushell in login mode via `bash` - shell = { - program = "${pkgs.bash}/bin/bash"; - args = [ - "--login" - "-c" - "nu --login --interactive" - ]; - }; - # Controls the ability to write to the system clipboard with the OSC 52 escape sequence. - # It's used by zellij to copy text to the system clipboard. - osc52 = "CopyPaste"; - }; - }; - }; -} diff --git a/home/base/gui/terminal/foot.nix b/home/base/gui/terminal/foot.nix deleted file mode 100644 index 0a225e32..00000000 --- a/home/base/gui/terminal/foot.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ pkgs, ... }: -{ - programs.foot = { - # foot is designed only for Linux - enable = pkgs.stdenv.hostPlatform.isLinux; - - # foot can also be run in a server mode. In this mode, one process hosts multiple windows. - # All Wayland communication, VT parsing and rendering is done in the server process. - # New windows are opened by running footclient, which remains running until the terminal window is closed. - # - # Advantages to run foot in server mode including reduced memory footprint and startup time. - # The downside is a performance penalty. If one window is very busy with, for example, producing output, - # then other windows will suffer. Also, should the server process crash, all windows will be gone. - server.enable = true; - - # https://man.archlinux.org/man/foot.ini.5 - settings = { - main = { - term = "foot"; # or "xterm-256color" for maximum compatibility - font = "Maple Mono NF CN:size=13"; - dpi-aware = "no"; # scale via window manager instead - resize-keep-grid = "no"; # do not resize the window on font resizing - - # Spawn a nushell in login mode via `bash` - shell = "${pkgs.bash}/bin/bash --login -c 'nu --login --interactive'"; - }; - - colors-dark = { - alpha = 0.93; # background transparency - blur = true; # requires foot >= 1.26 and compositor support (e.g. niri v26.04+) - }; - - csd = { - preferred = "none"; # no title bar / menu button - }; - - mouse = { - hide-when-typing = "yes"; - }; - }; - }; -} diff --git a/home/base/gui/terminal/ghostty.nix b/home/base/gui/terminal/ghostty.nix index ab84d820..010dd869 100644 --- a/home/base/gui/terminal/ghostty.nix +++ b/home/base/gui/terminal/ghostty.nix @@ -6,6 +6,10 @@ # # Ghostty Configuration # +# TUIOS provides tabs, panes, scrollback and copy mode, so ghostty +# only needs a font, transparency and the kitty graphics protocol +# (built in). +# ########################################################### { programs.ghostty = { @@ -25,12 +29,10 @@ # hide title bar/header bar (Linux only; on macOS it would remove the traffic lights too) window-decoration = pkgs.stdenv.hostPlatform.isDarwin; - background-opacity = 0.93; - # only supported on macOS; - background-blur-radius = 10; - scrollback-limit = 20000; + # transparency + background-opacity = 0.85; + background-blur-radius = 10; # macOS only - # https://ghostty.org/docs/config/reference#command # To resolve issues: # 1. https://github.com/ryan4yin/nix-config/issues/26 # 2. https://github.com/ryan4yin/nix-config/issues/8 diff --git a/home/base/gui/terminal/kitty.nix b/home/base/gui/terminal/kitty.nix index 73c59010..a8cd5b37 100644 --- a/home/base/gui/terminal/kitty.nix +++ b/home/base/gui/terminal/kitty.nix @@ -1,5 +1,4 @@ { - lib, pkgs, ... }: @@ -7,10 +6,9 @@ # # Kitty Configuration # -# Useful Hot Keys for Linux(replace `ctrl + shift` with `cmd` on macOS)): -# 1. Increase Font Size: `ctrl + shift + =` | `ctrl + shift + +` -# 2. Decrease Font Size: `ctrl + shift + -` | `ctrl + shift + _` -# 3. And Other common shortcuts such as Copy, Paste, Cursor Move, etc. +# TUIOS provides tabs, panes, scrollback and copy mode, so kitty +# only needs a font, transparency and the kitty graphics protocol +# (built in). # ########################################################### { @@ -18,26 +16,21 @@ enable = true; font = { name = "Maple Mono NF CN"; - # use different font size on macOS - size = 13; - }; - - # consistent with other terminal emulators - keybindings = { - "ctrl+shift+m" = "toggle_maximized"; - "ctrl+shift+f" = "show_scrollback"; # search in the current window + size = 13; # macOS overrides this in home/darwin/terminal.nix }; settings = { - # do not show title bar & window title - hide_window_decorations = "titlebar-and-corners"; + # no title bar / window title ("titlebar-and-corners" is macOS-only) + hide_window_decorations = + if pkgs.stdenv.hostPlatform.isDarwin then "titlebar-and-corners" else "yes"; macos_show_window_title_in = "none"; - background_opacity = "0.93"; - background_blur = 1; # requires kitty >= 0.46.2 and compositor support (e.g. niri v26.04+) + # transparency + background_opacity = "0.85"; + macos_option_as_alt = true; # Option key acts as Alt on macOS enable_audio_bell = false; - tab_bar_edge = "top"; # tab bar on top + # To resolve issues: # 1. https://github.com/ryan4yin/nix-config/issues/26 # 2. https://github.com/ryan4yin/nix-config/issues/8 diff --git a/home/base/tui/shell/default.nix b/home/base/tui/shell/default.nix index 5bb8c8b1..074cec93 100644 --- a/home/base/tui/shell/default.nix +++ b/home/base/tui/shell/default.nix @@ -29,7 +29,6 @@ use custom-completions/ssh/ssh-completions.nu * use custom-completions/tar/tar-completions.nu * use custom-completions/tcpdump/tcpdump-completions.nu * - use custom-completions/zellij/zellij-completions.nu * use custom-completions/zoxide/zoxide-completions.nu * # -*- alias -*- diff --git a/home/base/tui/tuios/config.toml b/home/base/tui/tuios/config.toml new file mode 100644 index 00000000..e8c115a9 --- /dev/null +++ b/home/base/tui/tuios/config.toml @@ -0,0 +1,624 @@ +# TUIOS Configuration File +# This file allows you to customize appearance and keybindings +# +# Configuration location: /home/ryan/.config/tuios/config.toml +# Documentation: https://github.com/Gaurav-Gosain/tuios +# For keybindings documentation, run: tuios keybinds list +# +# tuios watches this file. A save takes effect at once, with no restart. +# tuios does not apply a file that has an error. It keeps the settings that +# are in use and shows the error on screen. + +# ============================================================================ +# APPEARANCE SETTINGS +# ============================================================================ +# Many of these can be changed live from the in-app settings page +# (open it with the leader key followed by ','). +# +# border_style: rounded, normal, thick, double, hidden, block, ascii, +# outer-half-block, inner-half-block +# dockbar_position: bottom, top, hidden +# window_title_position: bottom, top, hidden +# window_button_style: pill, dots (macOS traffic lights) +# window_button_position: right, left. Independent of the style; dots and +# left is the shipped pair, the macOS arrangement +# theme: color theme name (e.g. dracula, nord); empty for terminal colors +# click_to_type: single (a click on a pane starts typing in it), double +# (two clicks do), off (a click only focuses) +# auto_enter_terminal_on_focus: off (Tab keeps cycling windows), +# targeted (numbered select and arrows start typing), +# all (every covered focus command, including Tab) +# [appearance.scrollbar]: style = thin, track; thumb/track = a one-cell glyph +# (track also takes "none"); tint = border, muted, #RRGGBB +# background: off (your terminal shows through), theme (the theme's +# background), or #RRGGBB, for every surface at once +# pane_background, desktop_background, window_chrome_background, +# dock_background, [appearance.sidebar] background: the same +# values for one surface; empty follows background, and a +# colour a program or the chrome chose always wins +# ============================================================================ + +# ============================================================================ +# KEYBINDINGS +# ============================================================================ +# Set an action to [] to unbind it and hand the key back to the shell. +# An empty list and a missing line are not the same thing. A line this file +# does not have gets its default back the next time tuios starts; an action +# set to [] stays empty. +# +# You do not have to edit this by hand. In tuios, open the keybind manager +# (leader then k, or the command palette) and press ctrl+d on a binding to +# remove it, or ctrl+x to take its key off every action. From a shell: +# +# tuios keybinds unbind close_window w # one key off one action +# tuios keybinds free alt+left # off every action +# +# `tuios keybinds doctor` says which binding in each scope is live, what +# clashes with what, and which keys never reach the program in the pane. +# +# [keybindings.global] acts in window mode and terminal mode alike. It binds +# ctrl+p to the command palette and alt+space to the launcher, which costs +# you fish's history-back and readline's set-mark. To move or drop either: +# +# [keybindings.global] +# command_palette = ["ctrl+shift+p"] +# launcher = [] +# +# [keybindings.terminal_mode] binds alt+arrows to move focus between panes. +# In readline, fish and zsh, alt+left and alt+right move the cursor a word +# at a time. If you want those back: +# +# [keybindings.terminal_mode] +# terminal_focus_left = [] +# terminal_focus_right = [] +# +# alt+up and alt+down are unclaimed by the common shells, so they are the +# safer pair to keep. +# +# hold_window_mode binds a key that puts tuios in window-management mode for +# as long as it is physically held, and hands the previous mode back when it +# is let go: +# +# [keybindings.mode_control] +# hold_window_mode = ["leftalt"] +# +# It needs a terminal that speaks the Kitty keyboard protocol (Ghostty, kitty, +# WezTerm, foot, Alacritty; not Terminal.app), because nothing else reports +# that a key was released. Naming a modifier key (leftalt, rightalt, leftctrl, +# leftsuper) asks the terminal for one more thing on top: every keystroke in +# the session then arrives as an escape code. Any ordinary key (f13 to f63, +# scrolllock, a spare letter) avoids that. Unbound by default. +# ============================================================================ + +# ============================================================================ +# DOCK COMPONENTS +# ============================================================================ +# The dock is three ordered lists of component names. Leave [dock] out +# entirely and the bar draws what it always drew; write the lists to +# reorder it, and omit a name to drop that segment. +# +# [dock] +# left = ["mode", "workspaces", "trail", "tape"] +# center = ["windows"] +# right = ["notifications", "copy-help", "cpu", "ram", "clock", "session-controls"] +# +# A cell of your own is a command whose first line of stdout is the text: +# +# [dock.custom.branch] +# command = "git branch --show-current" +# refresh = "event:after-focus-change" # or once, push, or "30s" +# +# and then "custom/branch" in one of the lists above. A component that +# fails is hidden rather than left showing a stale value; +# `tuios list-dock-components` says which and why. +# ============================================================================ + +[appearance] +border_style = 'rounded' +zen_mode = 'disabled' +links = 'all' +hide_window_buttons = false +window_button_style = 'dots' +window_button_position = 'left' +hide_scrollbar = false +scrollback_lines = 10000 +scroll_lines = 3 +kitty_placeholders = 'auto' +auto_enter_terminal_on_focus = 'off' +click_to_type = 'double' +dockbar_position = 'hidden' +preferred_shell = '/run/current-system/sw/bin/nu' +motion = 'full' +modal_dim = 30 +whichkey_position = '' +window_title_position = 'hidden' +hide_clock = false +show_clock = false +show_cpu = false +show_ram = false +theme = 'catppuccin_mocha' +border_focused_color = '' +border_unfocused_color = '' +window_title_format = '' +zoom_max_width = 0 +niri_reverse_scroll = false +niri_scroll_cells = 8 +prefix_repeat_time = 500 +max_fps = 0 +dock_workspace_tab_format = '' +glyphs = 'default' +gap = 0 +master_ratio = 50 +scroll_column_width = 55 +scroll_column_max = 90 +zoom_size = 95 +panel_padding = 2 +clock_format = '15:04:05' +dim_unfocused = 0 +dim_multifocus = false +background = 'off' +pane_background = '' +desktop_background = '' +window_chrome_background = '' +dock_background = '' + +[appearance.scrollbar] +style = 'track' +thumb = '' +track = '' +tint = 'quiet' + +[appearance.selection] +bg = '#45475A' +fg = '' +search_bg = '#8A6D2F' +search_fg = '#F5E7C8' +match_bg = '#E5A93D' +match_fg = '#1C1B19' +cursor_bg = '#39C5CF' +cursor_fg = '#08222B' +flash = true +flash_ms = 420 +flash_style = 'diagonal' +multi_format = 'plain' +copy_entry = 'cursor' +osc52_write = 'focused' + +[appearance.sidebar] +enabled = true +position = 'right' +width = 24 +workspaces = '' +sections = 'sessions:25,terminals,files:25,agents:34' +folder_click = 'navigate' +file_delete = 'trash' +background = '' +agent_rest_fold = '1h' + +[notifications] +duration = 0 +warning_duration = 0 +error_duration = 0 + +[notifications.agent] +sound_mode = '' +command = '' +quiet_hours = '' + +[notifications.agent.states] +[notifications.agent.sounds] +done = '' +needs_input = '' + +[notifications.mail] +[keybindings] +leader_key = 'ctrl+b' + +[keybindings.window_management] +close_window = ['w', 'x'] +copy_selection = ['c'] +focus_sidebar = ['s'] +minimize_window = ['m'] +new_session = ['N'] +new_window = ['n'] +next_session = ['alt+shift+n'] +next_window = ['tab'] +prev_session = ['alt+shift+p'] +prev_window = ['shift+tab'] +rename_window = ['r'] +restore_all = ['M'] +select_window_1 = ['1'] +select_window_2 = ['2'] +select_window_3 = ['3'] +select_window_4 = ['4'] +select_window_5 = ['5'] +select_window_6 = ['6'] +select_window_7 = ['7'] +select_window_8 = ['8'] +select_window_9 = ['9'] +start_screensaver = ['S'] +toggle_zoom = ['z'] + +[keybindings.workspaces] +move_and_follow_1 = ['alt+shift+1'] +move_and_follow_2 = ['alt+shift+2'] +move_and_follow_3 = ['alt+shift+3'] +move_and_follow_4 = ['alt+shift+4'] +move_and_follow_5 = ['alt+shift+5'] +move_and_follow_6 = ['alt+shift+6'] +move_and_follow_7 = ['alt+shift+7'] +move_and_follow_8 = ['alt+shift+8'] +move_and_follow_9 = ['alt+shift+9'] +switch_workspace_1 = ['alt+1'] +switch_workspace_2 = ['alt+2'] +switch_workspace_3 = ['alt+3'] +switch_workspace_4 = ['alt+4'] +switch_workspace_5 = ['alt+5'] +switch_workspace_6 = ['alt+6'] +switch_workspace_7 = ['alt+7'] +switch_workspace_8 = ['alt+8'] +switch_workspace_9 = ['alt+9'] + +[keybindings.layout] +equalize_splits = ['='] +focus_down = ['j'] +focus_up = ['k'] +preselect_down = ['alt+j'] +preselect_left = ['alt+h'] +preselect_right = ['alt+l'] +preselect_up = ['alt+k'] +resize_height_grow = ['}', 'shift+]'] +resize_height_grow_top = [']'] +resize_height_shrink = ['{', 'shift+['] +resize_height_shrink_top = ['['] +resize_master_grow = ['>', 'shift+.'] +resize_master_grow_left = ['.'] +resize_master_shrink = ['<', 'shift+,'] +rotate_split = ['R'] +snap_fullscreen = ['f'] +snap_left = ['h'] +snap_right = ['l'] +split_horizontal = ['-'] +split_vertical = ['|', '\'] +swap_down = ['J', 'ctrl+down'] +swap_left = ['H', 'ctrl+left'] +swap_right = ['L', 'ctrl+right'] +swap_up = ['K', 'ctrl+up'] +toggle_tiling = ['t'] +unsnap = ['u'] + +[keybindings.mode_control] +enter_terminal_mode = ['i', 'enter'] +enter_window_mode = ['esc'] +open_settings = [','] +quit = ['q'] +toggle_help = ['?'] + +[keybindings.system] +toggle_spotlight = ['b'] + +[keybindings.navigation] +[keybindings.restore_minimized] +restore_minimized_1 = ['shift+1', '!'] +restore_minimized_2 = ['shift+2', '@'] +restore_minimized_3 = ['shift+3', '#'] +restore_minimized_4 = ['shift+4', '$'] +restore_minimized_5 = ['shift+5', '%'] +restore_minimized_6 = ['shift+6', '^'] +restore_minimized_7 = ['shift+7', '&'] +restore_minimized_8 = ['shift+8', '*'] +restore_minimized_9 = ['shift+9', '('] + +[keybindings.prefix_mode] +hints = ['F'] +launcher = ['a'] +next_session = [')'] +prefix_close_session = ['X'] +prefix_close_window = ['x'] +prefix_command_palette = ['P'] +prefix_debug = ['D'] +prefix_detach = ['d'] +prefix_equalize_splits = ['='] +prefix_exit_mode = ['esc'] +prefix_explore = ['e'] +prefix_fullscreen = ['z'] +prefix_help = ['?'] +prefix_inbox = ['i'] +prefix_jump_notif = ['j'] +prefix_keybinds = ['k'] +prefix_layout = ['L'] +prefix_mail = ['M'] +prefix_minimize = ['m'] +prefix_new_window = ['c'] +prefix_next_attention = ['o'] +prefix_next_finished = ['O'] +prefix_next_window = ['n', 'tab'] +prefix_prev_window = ['p', 'shift+tab'] +prefix_quit = ['q'] +prefix_rename_window = ['r'] +prefix_review = ['v'] +prefix_rotate_split = ['R'] +prefix_screenshot = ['C'] +prefix_scrollback = ['s'] +prefix_select_0 = ['0'] +prefix_select_1 = ['1'] +prefix_select_2 = ['2'] +prefix_select_3 = ['3'] +prefix_select_4 = ['4'] +prefix_select_5 = ['5'] +prefix_select_6 = ['6'] +prefix_select_7 = ['7'] +prefix_select_8 = ['8'] +prefix_select_9 = ['9'] +prefix_selection = ['['] +prefix_session_switcher = ['S'] +prefix_settings = [','] +prefix_split_horizontal = ['-'] +prefix_split_vertical = ['|', '\'] +prefix_tape = ['T'] +prefix_toggle_sidebar = ['b'] +prefix_toggle_tiling = ['space'] +prefix_window = ['t'] +prefix_workspace = ['w'] +prefix_workspace_switcher = ['W'] +prev_session = ['('] +terminal_focus_down = ['down'] +terminal_focus_left = ['left'] +terminal_focus_right = ['right'] +terminal_focus_up = ['up'] + +[keybindings.window_prefix] +window_prefix_cancel = ['esc'] +window_prefix_close = ['x'] +window_prefix_new = ['n'] +window_prefix_next = ['tab'] +window_prefix_prev = ['shift+tab'] +window_prefix_rename = ['r'] +window_prefix_tiling = ['t'] + +[keybindings.minimize_prefix] +minimize_prefix_cancel = ['esc'] +minimize_prefix_focused = ['m'] +minimize_prefix_restore_1 = ['1'] +minimize_prefix_restore_2 = ['2'] +minimize_prefix_restore_3 = ['3'] +minimize_prefix_restore_4 = ['4'] +minimize_prefix_restore_5 = ['5'] +minimize_prefix_restore_6 = ['6'] +minimize_prefix_restore_7 = ['7'] +minimize_prefix_restore_8 = ['8'] +minimize_prefix_restore_9 = ['9'] +minimize_prefix_restore_all = ['M'] + +[keybindings.workspace_prefix] +workspace_prefix_cancel = ['esc'] +workspace_prefix_move_1 = ['!'] +workspace_prefix_move_2 = ['@'] +workspace_prefix_move_3 = ['#'] +workspace_prefix_move_4 = ['$'] +workspace_prefix_move_5 = ['%'] +workspace_prefix_move_6 = ['^'] +workspace_prefix_move_7 = ['&'] +workspace_prefix_move_8 = ['*'] +workspace_prefix_move_9 = ['('] +workspace_prefix_rename = ['r'] +workspace_prefix_switch_1 = ['1'] +workspace_prefix_switch_2 = ['2'] +workspace_prefix_switch_3 = ['3'] +workspace_prefix_switch_4 = ['4'] +workspace_prefix_switch_5 = ['5'] +workspace_prefix_switch_6 = ['6'] +workspace_prefix_switch_7 = ['7'] +workspace_prefix_switch_8 = ['8'] +workspace_prefix_switch_9 = ['9'] + +[keybindings.debug_prefix] +debug_prefix_animations = ['a'] +debug_prefix_cache = ['c'] +debug_prefix_cancel = ['esc'] +debug_prefix_logs = ['l'] +debug_prefix_showkeys = ['k'] + +[keybindings.tape_prefix] +tape_prefix_cancel = ['esc'] +tape_prefix_manager = ['m'] +tape_prefix_record = ['r'] +tape_prefix_review = ['t'] +tape_prefix_stop = ['s'] + +[keybindings.layout_prefix] +layout_prefix_cancel = ['esc'] +layout_prefix_load = ['l'] +layout_prefix_save = ['s'] +resize_height_50 = ['shift+5'] +resize_height_60 = ['shift+6'] +resize_height_70 = ['shift+7'] +resize_height_80 = ['shift+8'] +resize_height_90 = ['shift+9'] +resize_width_50 = ['5'] +resize_width_60 = ['6'] +resize_width_70 = ['7'] +resize_width_80 = ['8'] +resize_width_90 = ['9'] +snap_corner_1 = ['1'] +snap_corner_2 = ['2'] +snap_corner_3 = ['3'] +snap_corner_4 = ['4'] + +[keybindings.terminal_mode] +terminal_exit_mode = ['alt+esc'] +terminal_focus_down = ['alt+down'] +terminal_focus_left = ['alt+left'] +terminal_focus_right = ['alt+right'] +terminal_focus_up = ['alt+up'] +terminal_next_window = ['alt+n'] +terminal_paste_host = ['ctrl+shift+v', 'super+v', 'shift+super+v'] +terminal_prev_window = ['alt+p'] +terminal_scroll_down = ['shift+down'] +terminal_scroll_up = ['shift+up'] + +[keybindings.global] +command_palette = ['ctrl+p'] +launcher = ['alt+space'] + +[keybindings.script] +script_pause = ['ctrl+p'] + +[keybindings.sidebar] +accent = ['c'] +activate = ['enter'] +agents_filter = ['f'] +agents_sort = ['o'] +collapse = ['h', 'left'] +cursor_down = ['j', 'down'] +cursor_up = ['k', 'up'] +exit = ['esc', 's'] +expand = ['l', 'right'] +first = ['g', 'home'] +help = ['?'] +jump_1 = ['1'] +jump_2 = ['2'] +jump_3 = ['3'] +jump_4 = ['4'] +jump_5 = ['5'] +jump_6 = ['6'] +jump_7 = ['7'] +jump_8 = ['8'] +jump_9 = ['9'] +kill = ['x'] +last = ['G', 'end'] +mail = ['i'] +menu = ['m'] +narrow = ['<'] +new_session = ['n'] +new_window = ['t'] +palette = ['/'] +rename = ['r'] +reorder_down = ['J', 'shift+down'] +reorder_up = ['K', 'shift+up'] +section = ['tab', 'shift+tab'] +widen = ['>'] + +[keybindings.sidebar_files] +file_copy = ['y'] +file_create = ['a'] +file_cut = ['x'] +file_delete = ['d'] +file_delete_forever = ['D'] +file_open = ['enter'] +file_paste = ['p'] +file_rename = ['r'] + +[keybindings.sidebar_agents] +agent_cancel_queued = ['x'] +agent_reply = ['r'] +agent_review = ['v'] +agent_snooze = ['z'] +agent_unread = ['u'] + +[keybindings.inbox] +inbox_close = ['esc', 'q'] +inbox_deny_reason = ['n'] +inbox_detail_down = ['J', 'ctrl+d'] +inbox_detail_up = ['K', 'ctrl+u'] +inbox_dismiss = ['d', 'delete'] +inbox_down = ['j', 'down', 'ctrl+n'] +inbox_filter = ['f'] +inbox_first = ['g', 'home'] +inbox_go = ['enter'] +inbox_last = ['G', 'end'] +inbox_mailbox = ['m'] +inbox_page_down = ['pgdown'] +inbox_page_up = ['pgup'] +inbox_pass_on = ['p'] +inbox_peek = ['space'] +inbox_reply = ['r'] +inbox_resume = ['y'] +inbox_review = ['v'] +inbox_select = ['/'] +inbox_show_snoozed = ['S'] +inbox_snooze = ['z'] +inbox_undo = ['u'] +inbox_up = ['k', 'up', 'ctrl+p'] + +[keybindings.inbox_peek] +peek_approve = ['a'] +peek_approve_always = ['A'] +peek_back = ['esc', 'q', 'space'] +peek_deny = ['d'] +peek_go = ['enter'] +peek_read_again = ['r'] +peek_type = ['tab'] + +[keybindings.mail] +mail_back = ['esc', 'q'] +mail_down = ['j', 'down', 'ctrl+n'] +mail_focus_pane = ['o'] +mail_new = ['n'] +mail_open = ['enter'] +mail_page_down = ['pgdown'] +mail_page_up = ['pgup'] +mail_reply = ['r'] +mail_up = ['k', 'up', 'ctrl+p'] + +[daemon] +log_level = 'off' +agent_detect_seconds = 0 +agent_binaries = [] +respond_from_shell = false +resume_agents = 'ask' + +[startup] +open_default_window = false +tiled = true +start_in_terminal_mode = false +layout = 'bsp' +daemon = true + +[tape] +autorun = 'ask' +auto_review = false + +[debug] +show_key_events = false + +[screenshot] +format = 'png' +directory = '~/Pictures/tuios' +frame = 'window' +background = 'auto' +controls = 'auto' +title_format = '{title}' +font_family = 'JetBrains Mono, monospace' +font_file = '' +cursor = false + +[screensaver] +idle_minutes = 10 +effect = 'random' + +[spotlight] +follow = 'mouse' +radius = 10 +dim = 75 +edge = 'hard' +shake = false + +[hints] +builtins = 'all' +patterns = [] +alphabet = 'asdfghjkl' +dim = 60 + +[dock] +[dock.clock] + +# Command keys (tuios >= 0.8.2). See docs/KEYBINDINGS.md#command-keys +# A centered, floating shell that toggles, like Zellij's floating pane. +[[keybindings.command]] +key = 'prefix+alt+f' +type = 'scratch' +command = 'nu' +description = 'Floating shell' +width = '80%' +height = '80%' diff --git a/home/base/tui/tuios/default.nix b/home/base/tui/tuios/default.nix new file mode 100644 index 00000000..14f5f932 --- /dev/null +++ b/home/base/tui/tuios/default.nix @@ -0,0 +1,32 @@ +{ + config, + pkgs, + tuios, + ... +}: +let + # nixpkgs lags behind upstream; use the flake input. + tuiosPkg = tuios.packages.${pkgs.stdenv.hostPlatform.system}.tuios; + + # tuios watches config.toml and its settings page writes it back, so link the + # checked-in file out-of-store instead of into the store. + configDir = "${config.home.homeDirectory}/nix-config/home/base/tui/tuios"; +in +{ + home.packages = [ tuiosPkg ]; + + xdg.configFile."tuios/config.toml".source = + config.lib.file.mkOutOfStoreSymlink "${configDir}/config.toml"; + + # auto-start tuios in interactive shells, except when already inside tuios. + # Each terminal attaches to its own session (a bare `tuios` would attach to + # the most recent one). tuios starts its daemon on demand, so no systemd unit + # is needed. + programs.nushell.extraConfig = '' + # auto start tuios + if $nu.is-interactive and (not ("TUIOS_SESSION" in $env)) { + let session = if ("KITTY_WINDOW_ID" in $env) { "kitty" } else { "main" } + ^tuios attach $session -c + } + ''; +} diff --git a/home/base/tui/zellij/README.md b/home/base/tui/zellij/README.md deleted file mode 100644 index 629d7edc..00000000 --- a/home/base/tui/zellij/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# Zellij - A workspace lives in your terminal - -Zellij is a terminal workspace with batteries included. At its core, it is a terminal multiplexer -(similar to tmux and screen), but this is merely its infrastructure layer. - -Zellij is very user-friendly and easy to use, with a step-by-step hint system that will help you get -to know the keybindings, which is very like the Neovim or helix. - -> By contrast, tmux's key design is counterintuitive, there is no prompt system, and the plug-in -> performance is rubbish. It's really a pain to use. tmux's initial release was in 2007, it's too -> old, I would recommend any users that do not have a experience with multiplexer to use zellij -> instead of tmux. - -## Why use zellij as the default terminal environment? - -By auto start zellij on shell login, and exit the shell session on zellij exit, we can use zellij as -the default terminal environment. - -By this way, We will only use the most basic features of the terminal -emulator(kitty/alacritty/wezterm/...), while most of the functions of terminal are provided by -zellij. Thus we can easily switch to any terminal emulator without losing any key functions, and do -not need to take care of the differences between different terminal emulators. - -And Zellij can be used not only locally, but also on any remote server, which is very convenient. -Learn once and use everywhere! - -> Yeah, you didn't misread it, zellij is very suitable for not only remotely, but also locally! - -Some features such as search/copy/scrollback in different terminal emulators are implemented in -different ways, and has different user experience. For example, Wezterm's default search function is -very basic, and it's not easy to use. Kitty's scrollback search/copy is really tricky to use. As for -some Editor such as Neovim, its integrated terminal is really useful, but zellij is more powerful -and useful than it, and more stable! Zellij overcomes these problems, and provides a unified user -experience for all terminal emulators! - -Terminal emulators should only be responsible for displaying characters. - -## Passthrough mode(Lock Mode) - -`Ctrl + g` lock the outer zellij interface, and all keys will be sent to the focused pane. - -It's extremely useful when you want to: - -1. Use zellij locally for daily work, and use a remote zellij via ssh to do some work on the remote - server. -1. To avoid the key conflicts between zellij and the program running in the terminal, such as vim, - tmux, etc. diff --git a/home/base/tui/zellij/config.kdl b/home/base/tui/zellij/config.kdl deleted file mode 100644 index 4a2c0c57..00000000 --- a/home/base/tui/zellij/config.kdl +++ /dev/null @@ -1,422 +0,0 @@ -// Generating a new Example config via: -// zellij setup --dump-config - - -// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true" -keybinds clear-defaults=true { - normal { - // uncomment this and adjust key if using copy_on_select=false - // bind "Alt c" { Copy; } - } - locked { - bind "Ctrl g" { SwitchToMode "Normal"; } - } - resize { - bind "Ctrl n" { SwitchToMode "Normal"; } - bind "h" "Left" { Resize "Increase Left"; } - bind "j" "Down" { Resize "Increase Down"; } - bind "k" "Up" { Resize "Increase Up"; } - bind "l" "Right" { Resize "Increase Right"; } - bind "H" { Resize "Decrease Left"; } - bind "J" { Resize "Decrease Down"; } - bind "K" { Resize "Decrease Up"; } - bind "L" { Resize "Decrease Right"; } - bind "=" "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - } - pane { - bind "Ctrl p" { SwitchToMode "Normal"; } - bind "h" "Left" { MoveFocus "Left"; } - bind "l" "Right" { MoveFocus "Right"; } - bind "j" "Down" { MoveFocus "Down"; } - bind "k" "Up" { MoveFocus "Up"; } - bind "p" { SwitchFocus; } - bind "n" { NewPane; SwitchToMode "Normal"; } - bind "d" { NewPane "Down"; SwitchToMode "Normal"; } - bind "r" { NewPane "Right"; SwitchToMode "Normal"; } - bind "x" { CloseFocus; SwitchToMode "Normal"; } - bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "Normal"; } - bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; } - bind "c" { SwitchToMode "RenamePane"; PaneNameInput 0;} - bind "i" { TogglePanePinned; SwitchToMode "Normal"; } - } - move { - bind "Ctrl h" { SwitchToMode "Normal"; } - bind "n" "Tab" { MovePane; } - bind "p" { MovePaneBackwards; } - bind "h" "Left" { MovePane "Left"; } - bind "j" "Down" { MovePane "Down"; } - bind "k" "Up" { MovePane "Up"; } - bind "l" "Right" { MovePane "Right"; } - } - tab { - bind "Ctrl t" { SwitchToMode "Normal"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "h" "Left" "Up" "k" { GoToPreviousTab; } - bind "l" "Right" "Down" "j" { GoToNextTab; } - bind "n" { NewTab; SwitchToMode "Normal"; } - bind "x" { CloseTab; SwitchToMode "Normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; } - bind "b" { BreakPane; SwitchToMode "Normal"; } - bind "]" { BreakPaneRight; SwitchToMode "Normal"; } - bind "[" { BreakPaneLeft; SwitchToMode "Normal"; } - bind "1" { GoToTab 1; SwitchToMode "Normal"; } - bind "2" { GoToTab 2; SwitchToMode "Normal"; } - bind "3" { GoToTab 3; SwitchToMode "Normal"; } - bind "4" { GoToTab 4; SwitchToMode "Normal"; } - bind "5" { GoToTab 5; SwitchToMode "Normal"; } - bind "6" { GoToTab 6; SwitchToMode "Normal"; } - bind "7" { GoToTab 7; SwitchToMode "Normal"; } - bind "8" { GoToTab 8; SwitchToMode "Normal"; } - bind "9" { GoToTab 9; SwitchToMode "Normal"; } - bind "Tab" { ToggleTab; } - } - scroll { - bind "Ctrl s" { SwitchToMode "Normal"; } - bind "e" { EditScrollback; SwitchToMode "Normal"; } - bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - // uncomment this and adjust key if using copy_on_select=false - // bind "Alt c" { Copy; } - } - search { - bind "Ctrl s" { SwitchToMode "Normal"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } - bind "j" "Down" { ScrollDown; } - bind "k" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "n" { Search "down"; } - bind "p" { Search "up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; } - bind "Enter" { SwitchToMode "Search"; } - } - renametab { - bind "Ctrl c" { SwitchToMode "Normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; } - } - renamepane { - bind "Ctrl c" { SwitchToMode "Normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; } - } - session { - bind "Ctrl o" { SwitchToMode "Normal"; } - bind "Ctrl s" { SwitchToMode "Scroll"; } - bind "d" { Detach; } - bind "w" { - LaunchOrFocusPlugin "session-manager" { - floating true - move_to_focused_tab true - }; - SwitchToMode "Normal" - } - bind "c" { - LaunchOrFocusPlugin "configuration" { - floating true - move_to_focused_tab true - }; - SwitchToMode "Normal" - } - bind "p" { - LaunchOrFocusPlugin "plugin-manager" { - floating true - move_to_focused_tab true - }; - SwitchToMode "Normal" - } - bind "a" { - LaunchOrFocusPlugin "zellij:about" { - floating true - move_to_focused_tab true - }; - SwitchToMode "Normal" - } - } - - // Allow to use tmux inside zellij - // - // tmux { - // bind "[" { SwitchToMode "Scroll"; } - // bind "Ctrl b" { Write 2; SwitchToMode "Normal"; } - // bind "\"" { NewPane "Down"; SwitchToMode "Normal"; } - // bind "%" { NewPane "Right"; SwitchToMode "Normal"; } - // bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; } - // bind "c" { NewTab; SwitchToMode "Normal"; } - // bind "," { SwitchToMode "RenameTab"; } - // bind "p" { GoToPreviousTab; SwitchToMode "Normal"; } - // bind "n" { GoToNextTab; SwitchToMode "Normal"; } - // bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; } - // bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; } - // bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; } - // bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; } - // bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; } - // bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; } - // bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; } - // bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; } - // bind "o" { FocusNextPane; } - // bind "d" { Detach; } - // bind "Space" { NextSwapLayout; } - // bind "x" { CloseFocus; SwitchToMode "Normal"; } - // } - shared_except "locked" { - bind "Ctrl g" { SwitchToMode "Locked"; } - bind "Ctrl q" { Quit; } - bind "Alt f" { ToggleFloatingPanes; } - bind "Alt n" { NewPane; } - bind "Alt i" { MoveTab "Left"; } - bind "Alt o" { MoveTab "Right"; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "Alt [" { PreviousSwapLayout; } - bind "Alt ]" { NextSwapLayout; } - } - shared_except "normal" "locked" { - bind "Enter" "Esc" { SwitchToMode "Normal"; } - } - shared_except "pane" "locked" { - bind "Ctrl p" { SwitchToMode "Pane"; } - } - shared_except "resize" "locked" { - bind "Ctrl n" { SwitchToMode "Resize"; } - } - shared_except "scroll" "locked" { - bind "Ctrl s" { SwitchToMode "Scroll"; } - } - shared_except "session" "locked" { - bind "Ctrl o" { SwitchToMode "Session"; } - } - shared_except "tab" "locked" { - bind "Ctrl t" { SwitchToMode "Tab"; } - } - shared_except "move" "locked" { - bind "Ctrl h" { SwitchToMode "Move"; } - } - - // shared_except "tmux" "locked" { - // bind "Ctrl b" { SwitchToMode "Tmux"; } - // } -} - -// Plugin aliases - can be used to change the implementation of Zellij -// changing these requires a restart to take effect -plugins { - tab-bar location="zellij:tab-bar" - status-bar location="zellij:status-bar" - strider location="zellij:strider" - compact-bar location="zellij:compact-bar" - session-manager location="zellij:session-manager" - welcome-screen location="zellij:session-manager" { - welcome_screen true - } - filepicker location="zellij:strider" { - cwd "/" - } - configuration location="zellij:configuration" - plugin-manager location="zellij:plugin-manager" - about location="zellij:about" -} - -// Plugins to load in the background when a new session starts -load_plugins { - // "file:/path/to/my-plugin.wasm" - // "https://example.com/my-plugin.wasm" -} - -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// (Requires restart) -// Options: -// - detach (Default) -// - quit -// -// on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -// simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -default_shell "nu" - -// Choose the path to override cwd that zellij will use for opening new panes -// -// default_cwd "" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -// pane_frames true - -// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible -// Options: -// - true (default) -// - false -// -// auto_layout true - -// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected -// (Requires restart) -// Options: -// - true (default) -// - false -// -// session_serialization false - -// Whether pane viewports are serialized along with the session, default is false -// (Requires restart) -// Options: -// - true -// - false (default) -// -// serialize_pane_viewport true - -// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0 -// defaults to the scrollback size. If this number is higher than the scrollback size, it will -// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true. -// (Requires restart) -// -// scrollback_lines_to_serialize 10000 - -// Choose the theme that is specified in the themes section. -// Default: default -// -theme "catppuccin-mocha" - - -// The name of the default layout to load on startup -// Default: "default" -// (Requires restart) -// -// default_layout "compact" - -// Choose the mode that zellij uses when starting up. -// Default: normal -// -// default_mode "locked" - -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// (Requires restart) -// Options: -// - true (default) -// - false -// -// mouse_mode false - -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// (Requires restart) -// Valid values: positive integers -// Default value: 10000 -// -// scroll_buffer_size 10000 - -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command "xclip -selection clipboard" // x11 -// copy_command "wl-copy" // wayland -// copy_command "pbcopy" // osx - -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -// copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -// copy_on_select false - -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -// scrollback_editor "/usr/bin/vim" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// (Requires restart) -// Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// (Requires restart) -// -// layout_dir "/path/to/my/layout_dir" - -// The folder in which Zellij will look for themes -// (Requires restart) -// -// theme_dir "/path/to/my/theme_dir" - -// Enable or disable the rendering of styled and colored underlines (undercurl). -// May need to be disabled for certain unsupported terminals -// (Requires restart) -// Default: true -// -// styled_underlines false - -// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know -// metadata info on this session) -// (Requires restart) -// Default: false -// -// disable_session_metadata true - -// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it) -// (Requires restart) -// Default: true (if the host terminal supports it) -// -// support_kitty_keyboard_protocol false - -// Whether to stack panes when resizing beyond a certain size -// Default: true -// -// stacked_resize false - -// Whether to show release notes on first version run -// Default: true -// -show_release_notes false - -// Whether to show startup tips on session start -// Default: true -// -show_startup_tips false diff --git a/home/base/tui/zellij/default.nix b/home/base/tui/zellij/default.nix deleted file mode 100644 index 5432e174..00000000 --- a/home/base/tui/zellij/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ pkgs, ... }: -let - shellAliases = { - "zj" = "zellij"; - }; -in -{ - programs.zellij = { - enable = true; - package = pkgs.zellij; - }; - xdg.configFile."zellij/config.kdl".source = ./config.kdl; - # Disable catppuccin to avoid conflict with my non-nix config. - catppuccin.zellij.enable = false; - - # auto start zellij in nushell - programs.nushell.extraConfig = '' - # auto start zellij - # except when in emacs or zellij itself - if (not ("ZELLIJ" in $env)) and (not ("INSIDE_EMACS" in $env)) { - if "ZELLIJ_AUTO_ATTACH" in $env and $env.ZELLIJ_AUTO_ATTACH == "true" { - ^zellij attach -c - } else { - ^zellij - } - - # Auto exit the shell session when zellij exit - $env.ZELLIJ_AUTO_EXIT = "false" # disable auto exit - if "ZELLIJ_AUTO_EXIT" in $env and $env.ZELLIJ_AUTO_EXIT == "true" { - exit - } - } - ''; - - # only works in bash/zsh, not nushell - home.shellAliases = shellAliases; - programs.nushell.shellAliases = shellAliases; -} diff --git a/home/darwin/README.md b/home/darwin/README.md index 215a9e2c..cc0142a1 100644 --- a/home/darwin/README.md +++ b/home/darwin/README.md @@ -8,7 +8,7 @@ This directory contains macOS-specific Home Manager configurations for Darwin sy - **default.nix**: Entry point that imports all Darwin configurations - **shell.nix**: Shell configurations and environment settings -- **terminal.nix**: Sets a 15px font size across Alacritty, Ghostty, and Kitty +- **terminal.nix**: Sets a 15px font size across Ghostty and Kitty - **rime-squirrel.nix**: [Rime Squirrel](https://github.com/rime/squirrel) input method configuration diff --git a/home/darwin/terminal.nix b/home/darwin/terminal.nix index bda8dab1..6ccd5b8b 100644 --- a/home/darwin/terminal.nix +++ b/home/darwin/terminal.nix @@ -3,7 +3,6 @@ let fontSize = 15; in { - programs.alacritty.settings.font.size = lib.mkForce fontSize; programs.ghostty.settings.font-size = lib.mkForce fontSize; programs.kitty.font.size = lib.mkForce fontSize; } diff --git a/home/linux/base/tools.nix b/home/linux/base/tools.nix index 8e423e22..74fee374 100644 --- a/home/linux/base/tools.nix +++ b/home/linux/base/tools.nix @@ -5,6 +5,5 @@ # misc libnotify wireguard-tools # manage wireguard vpn manually, via wg-quick - tuios # terminal window manager / multiplexer (trial) ]; } diff --git a/home/linux/gui/base/xdg/autostart.nix b/home/linux/gui/base/xdg/autostart.nix index fa31e430..a41c27f5 100644 --- a/home/linux/gui/base/xdg/autostart.nix +++ b/home/linux/gui/base/xdg/autostart.nix @@ -13,9 +13,8 @@ xdg.autostart.enable = true; # This fixes nixpak sandboxed apps (like firefox) accessing mapped folders correctly xdg.autostart.entries = [ - "${pkgs.foot}/share/applications/foot.desktop" - "${pkgs.alacritty}/share/applications/Alacritty.desktop" "${pkgs.ghostty}/share/applications/com.mitchellh.ghostty.desktop" + "${pkgs.kitty}/share/applications/kitty.desktop" "${pkgs-master.clash-verge-rev}/share/applications/clash-verge.desktop" diff --git a/home/linux/gui/niri/conf/keybindings.kdl b/home/linux/gui/niri/conf/keybindings.kdl index 18c547ca..9fecfc99 100644 --- a/home/linux/gui/niri/conf/keybindings.kdl +++ b/home/linux/gui/niri/conf/keybindings.kdl @@ -14,8 +14,8 @@ binds { Mod+Shift+Slash { show-hotkey-overlay; } // Suggested binds for running programs: terminal, app launcher, screen locker. - Mod+Return { spawn "foot"; } - Mod+Shift+Return { spawn "alacritty"; } + Mod+Return { spawn "ghostty"; } + Mod+Shift+Return { spawn "kitty"; } // Launcher Mod+D { spawn "noctalia" "msg" "panel-toggle" "launcher"; } diff --git a/home/linux/gui/niri/conf/windowrules.kdl b/home/linux/gui/niri/conf/windowrules.kdl index 75766051..b214f2a6 100644 --- a/home/linux/gui/niri/conf/windowrules.kdl +++ b/home/linux/gui/niri/conf/windowrules.kdl @@ -2,31 +2,24 @@ // Find more information on the wiki: // https://yalter.github.io/niri/Configuration:-Window-Rules -// Terminal applications - open in workspace 1, with blur +// Draw the focus ring as an outline for every window, never as a solid +// rectangle behind it. Niri's default paints a `#7fc8ff` block behind the +// focused window, which shows through any semitransparent window (e.g. the +// terminals) as a solid cyan fill. window-rule { - match app-id="foot" - open-on-workspace "1terminal" - open-maximized true - // foot >= 1.26 uses native blur via ext-background-effect, - // no compositor-side blur needed + draw-border-with-background false } + +// Terminal applications - open in workspace 1 window-rule { - match app-id="Alacritty" + match app-id="kitty" open-on-workspace "1terminal" open-maximized true - background-effect { - blur true - } } window-rule { match app-id="com.mitchellh.ghostty" open-on-workspace "1terminal" open-maximized true - // Ghostty native blur via ext-background-effect coming in v1.4; - // use compositor-side blur until then - background-effect { - blur true - } } // Web browsers - open in workspace 2 diff --git a/modules/nixos/base/ssh.nix b/modules/nixos/base/ssh.nix index 303175bb..7490c0a0 100644 --- a/modules/nixos/base/ssh.nix +++ b/modules/nixos/base/ssh.nix @@ -18,14 +18,8 @@ openFirewall = true; }; - # Terminfo entries for the terminals we actually use, so `$TERM` resolves on - # hosts we SSH into. This replaces `environment.enableAllTerminfo`, which - # installs every terminal's terminfo — including rxvt-unicode, which currently - # fails to build with GCC 16 (https://github.com/NixOS/nixpkgs/issues/568896). - # https://github.com/NixOS/nixpkgs/blob/nixos-26.05/nixos/modules/config/terminfo.nix + # Terminfo for the terminals we use, so `$TERM` resolves on hosts we SSH into. environment.systemPackages = [ - pkgs.alacritty.terminfo - pkgs.foot.terminfo pkgs.ghostty.terminfo pkgs.kitty.terminfo ]; diff --git a/modules/nixos/desktop/misc.nix b/modules/nixos/desktop/misc.nix index 00667493..eff47d39 100644 --- a/modules/nixos/desktop/misc.nix +++ b/modules/nixos/desktop/misc.nix @@ -14,7 +14,7 @@ # set user's default shell system-wide users.defaultUserShell = pkgs.bashInteractive; - # fix for `sudo xxx` in kitty/wezterm/foot and other modern terminal emulators + # fix for `sudo xxx` in kitty/ghostty and other modern terminal emulators security.sudo.keepTerminfo = true; # List packages installed in system profile. To search, run: diff --git a/modules/nixos/desktop/xdg.nix b/modules/nixos/desktop/xdg.nix index df9495fd..22725aea 100644 --- a/modules/nixos/desktop/xdg.nix +++ b/modules/nixos/desktop/xdg.nix @@ -7,10 +7,8 @@ let my_terminal_desktop = [ # NOTE: We have add these packages at user level - "Alacritty.desktop" - "kitty.desktop" - "foot.desktop" "com.mitchellh.ghostty.desktop" + "kitty.desktop" ]; in { @@ -47,7 +45,7 @@ # This will make xdg-open use the portal to open programs, # which resolves bugs involving programs opening inside FHS envs or with unexpected env vars set from wrappers. # xdg-open is used by almost all programs to open a unknown file/uri - # alacritty as an example, it use xdg-open as default, but you can also custom this behavior + # a terminal emulator as an example, it uses xdg-open as default, but you can also customize this behavior xdgOpenUsePortal = true; # ls /run/current-system/sw/share/xdg-desktop-portal/portals/