fix(niri): add workspaces 7, 8, 9 for proper bar ordering (#246)

* Create reorder-workspaces.sh
* Update keybindings.kdl
* Update config.kdl
* Update niri-hardware.kdl
* fix(niri): add workspaces 7, 8, 9 for proper bar ordering
This commit is contained in:
0x0D
2026-03-15 17:04:34 +01:00
committed by GitHub
parent f539b686bb
commit 120dd53a7f
5 changed files with 31 additions and 6 deletions

View File

@@ -9,6 +9,8 @@ include "./windowrules.kdl"
include "./niri-hardware.kdl"
include "./noctalia-shell.kdl"
spawn-sh-at-startup "bash ~/nix-config/home/linux/gui/niri/reorder-workspaces.sh"
// Input device configuration.
// Find the full list of options on the wiki:
// https://yalter.github.io/niri/Configuration:-Input

View File

@@ -154,9 +154,9 @@ binds {
Mod+4 { focus-workspace "4music"; }
Mod+5 { focus-workspace "5mail"; }
Mod+6 { focus-workspace "6file"; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+7 { focus-workspace "7"; }
Mod+8 { focus-workspace "8"; }
Mod+9 { focus-workspace "9"; }
Mod+0 { focus-workspace "0other"; }
Mod+Ctrl+1 { move-column-to-workspace "1terminal"; }
Mod+Ctrl+2 { move-column-to-workspace "2browser"; }
@@ -164,9 +164,9 @@ binds {
Mod+Ctrl+4 { move-column-to-workspace "4music"; }
Mod+Ctrl+5 { move-column-to-workspace "5mail"; }
Mod+Ctrl+6 { move-column-to-workspace "6file"; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
Mod+Ctrl+7 { move-column-to-workspace "7"; }
Mod+Ctrl+8 { move-column-to-workspace "8"; }
Mod+Ctrl+9 { move-column-to-workspace "9"; }
Mod+Ctrl+0 { move-column-to-workspace "0other"; }
// Alternatively, there are commands to move just a single window:

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail
# Reorder named workspaces so indices match their numeric prefixes:
# 1 → "1terminal", 2 → "2browser", ..., 6 → "6file", 10 → "0other".
# Requires a running niri session and the `niri msg` command in PATH.
niri msg action move-workspace-to-index 1 --reference "1terminal"
niri msg action move-workspace-to-index 2 --reference "2browser"
niri msg action move-workspace-to-index 3 --reference "3chat"
niri msg action move-workspace-to-index 4 --reference "4music"
niri msg action move-workspace-to-index 5 --reference "5mail"
niri msg action move-workspace-to-index 6 --reference "6file"
niri msg action move-workspace-to-index 7 --reference "7"
niri msg action move-workspace-to-index 8 --reference "8"
niri msg action move-workspace-to-index 9 --reference "9"
niri msg action move-workspace-to-index 10 --reference "0other"

View File

@@ -10,6 +10,9 @@ workspace "3chat" { open-on-output "eDP-1"; }
workspace "4music" { open-on-output "eDP-1"; }
workspace "5mail" { open-on-output "eDP-1"; }
workspace "6file" { open-on-output "eDP-1"; }
workspace "7" { open-on-output "eDP-1"; }
workspace "8" { open-on-output "eDP-1"; }
workspace "9" { open-on-output "eDP-1"; }
workspace "0other" { open-on-output "eDP-1"; }
debug { render-drm-device "/dev/dri/renderD128"; }

View File

@@ -45,4 +45,7 @@ workspace "5music" { open-on-output "DP-2"; }
workspace "1terminal" { open-on-output "HDMI-A-1"; }
workspace "3chat" { open-on-output "HDMI-A-1"; }
workspace "6file" { open-on-output "HDMI-A-1"; }
workspace "7" { open-on-output "HDMI-A-1"; }
workspace "8" { open-on-output "HDMI-A-1"; }
workspace "9" { open-on-output "HDMI-A-1"; }
workspace "0other" { open-on-output "HDMI-A-1"; }