mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-18 15:34:13 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
17
home/linux/gui/niri/reorder-workspaces.sh
Normal file
17
home/linux/gui/niri/reorder-workspaces.sh
Normal 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"
|
||||
@@ -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"; }
|
||||
|
||||
|
||||
@@ -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"; }
|
||||
|
||||
Reference in New Issue
Block a user