Files
nix-config/home/linux/gui/niri/conf/windowrules.kdl
T
ryan4yin | 二花 42641e2fdf feat!: replace zellij with tuios, default to ghostty + kitty (#349)
* feat!: replace zellij with tuios and switch to ghostty + kitty

Terminal environment overhaul:

- add the tuios flake input (upstream 0.8.5; nixpkgs has 0.8.1) and link
  the checked-in config out-of-store; auto-start tuios in nushell instead
  of zellij
- remove zellij entirely: both modules, config, README and nushell
  completions
- remove foot and alacritty, which lack the Kitty graphics protocol;
2026-10-03 02:34:31 +08:00

156 lines
3.7 KiB
KDL

// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://yalter.github.io/niri/Configuration:-Window-Rules
// 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 {
draw-border-with-background false
}
// Terminal applications - open in workspace 1
window-rule {
match app-id="kitty"
open-on-workspace "1terminal"
open-maximized true
}
window-rule {
match app-id="com.mitchellh.ghostty"
open-on-workspace "1terminal"
open-maximized true
}
// Web browsers - open in workspace 2
window-rule {
match app-id="firefox"
open-on-workspace "2browser"
open-maximized true
}
window-rule {
match app-id="google-chrome"
open-on-workspace "2browser"
open-maximized true
}
window-rule {
match app-id="chromium-browser"
open-on-workspace "2browser"
open-maximized true
}
// Chat applications - open in workspace 3
window-rule {
// match app-id="org.telegram.desktop"
match title="^Telegram"
open-on-workspace "3chat"
}
window-rule {
match app-id="wechat"
open-on-workspace "3chat"
}
window-rule {
match app-id="QQ"
open-on-workspace "3chat"
}
// Entertainment applications - open in workspace 4
window-rule {
match app-id="steam"
open-on-workspace "4entertainment"
}
window-rule {
match app-id="steam_app_default"
open-on-workspace "4entertainment"
}
window-rule {
match app-id="heroic"
open-on-workspace "4entertainment"
}
window-rule {
match app-id="net.lutris.Lutris"
open-on-workspace "4entertainment"
}
window-rule {
match app-id="com.vysp3r.ProtonPlus"
open-on-workspace "4entertainment"
}
window-rule {
// Run anime games on Linux
match app-id="^moe.launcher"
open-on-workspace "4entertainment"
}
window-rule {
// All *.exe (Windows applications)
match app-id=".exe$"
open-on-workspace "4entertainment"
}
window-rule {
match app-id="^mpv$"
open-on-workspace "4entertainment"
}
// Utility applications - open in workspace 5
window-rule {
match app-id="com.github.johnfactotum.Foliate"
open-on-workspace "5utility"
}
window-rule {
match app-id="thunar"
open-on-workspace "5utility"
}
window-rule {
match app-id="(?i)^clash-verge$"
match app-id="^[.]clash-verge-wrapped$"
open-on-workspace "5utility"
}
window-rule {
match app-id="^org[.]kde[.]easyeffects$"
open-on-workspace "5utility"
}
// Other applications - open in workspace 0
window-rule {
match app-id="BambuStudio"
open-on-workspace "0other"
}
window-rule {
match app-id="OrcaSlicer"
open-on-workspace "0other"
}
window-rule {
match app-id="Zoom Workplace"
// Zoom Home Page
match title="^(Zoom Workplace)( - Free account)?$"
open-on-workspace "0other"
}
window-rule {
match app-id="Zoom Workplace"
// Zoom - other windows
exclude title="^(Zoom Workplace)( - Free account)?$"
open-on-workspace "0other"
open-floating true
}
window-rule {
match app-id="^Zoom$"
open-on-workspace "0other"
}
window-rule {
match app-id="^Zoom$" title="^as_toolbar$"
open-floating true
default-floating-position x=0 y=16 relative-to="bottom"
}
window-rule {
match app-id="^Zoom$" title="^zoom_linux_float_video_window$"
open-fullscreen true
}
// Notifications shows bottom right
window-rule {
// match exactly empty string, avoid to be the default behavior
match app-id="^$"
open-floating true
open-focused false
default-floating-position x=0 y=0 relative-to="bottom-right"
}