update niri for multi monitor support

This commit is contained in:
Alexander Navarro 2025-12-12 12:18:47 -03:00
parent a85aa9ee0f
commit 20f68e1dee
6 changed files with 42 additions and 40 deletions

View file

@ -3,31 +3,6 @@ packages = ["default"]
[files] [files]
"configs/hypr/work-laptop/hyprland.conf" = "~/.config/hypr/include/work-laptop.conf" "configs/hypr/work-laptop/hyprland.conf" = "~/.config/hypr/include/work-laptop.conf"
"configs/niri/work-laptop/local.kdl" = "~/.config/niri/include/local.kdl"
[files."configs/niri/config.kdl"]
target = "~/.config/niri/config.kdl"
type = "template"
append = """
window-rule {
match app-id="brave-work"
open-on-workspace "1"
open-focused true
default-column-width {
proportion 0.5
}
}
window-rule {
match app-id="brave-personal"
open-on-workspace "2"
open-focused false
default-column-width {
proportion 0.5
}
}
"""
[variables] [variables]

View file

@ -39,4 +39,4 @@ depends = ["niri"]
[default.variables] [default.variables]
[niri.files] [niri.files]
"configs/niri" = "~/.config/niri" "configs/niri/base" = "~/.config/niri"

View file

@ -1,7 +1,7 @@
syntax = "All" syntax = "All"
column_width = 120 column_width = 120
line_endings = "Unix" line_endings = "Unix"
indent_type = "indent_type" indent_type = "Spaces"
indent_width = 2 indent_width = 2
quote_style = "AutoPreferDouble" quote_style = "AutoPreferDouble"
call_parentheses = "Always" call_parentheses = "Always"

View file

@ -1,10 +1,11 @@
include "include/local.kdl"
// ╭─────────────────────────────────────────────────────────╮ // ╭─────────────────────────────────────────────────────────╮
// │ Windows Rules │ // │ Windows Rules │
// ╰─────────────────────────────────────────────────────────╯ // ╰─────────────────────────────────────────────────────────╯
window-rule { window-rule {
// This regular expression is intentionally made as specific as possible, // This regular expression is intentionally made as specific as possible,
// since this is the default config, and we want no false positives. // since this is the default config, and we want no false positives.
// You can get away with just app-id="wezterm" if you want. // You can get away with just app-id="wezterm" f you want.
match app-id="^org\\.wezfurlong\\.wezterm$" match app-id="^org\\.wezfurlong\\.wezterm$"
default-column-width { default-column-width {
@ -109,10 +110,10 @@ binds {
spawn "rofi" "-show" "drun" "-run-command" "uwsm app -- {cmd}" spawn "rofi" "-show" "drun" "-run-command" "uwsm app -- {cmd}"
} }
XF86AudioRaiseVolume allow-when-locked=true { XF86AudioRaiseVolume allow-when-locked=true {
spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+" spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.025+"
} }
XF86AudioLowerVolume allow-when-locked=true { XF86AudioLowerVolume allow-when-locked=true {
spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-" spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.025-"
} }
XF86AudioMute allow-when-locked=true { XF86AudioMute allow-when-locked=true {
spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
@ -151,10 +152,10 @@ binds {
focus-window-or-workspace-up focus-window-or-workspace-up
} }
Mod+Right { Mod+Right {
focus-column-right focus-column-or-monitor-right
} }
Mod+H { Mod+H {
focus-column-left focus-column-or-monitor-left
} }
Mod+J { Mod+J {
focus-window-or-workspace-down focus-window-or-workspace-down
@ -163,7 +164,7 @@ binds {
focus-window-or-workspace-up focus-window-or-workspace-up
} }
Mod+L { Mod+L {
focus-column-right focus-column-or-monitor-right
} }
Mod+Shift+Left { Mod+Shift+Left {
move-column-left move-column-left
@ -423,16 +424,10 @@ environment {
TERMINAL "/usr/bin/kitty" TERMINAL "/usr/bin/kitty"
} }
// ── Display Options ───────────────────────────────────────────────── // ── Display Options ─────────────────────────────────────────────────
output "eDP-1" {
off
}
output "HDMI-A-1" { output "HDMI-A-1" {
scale 1 scale 1
mode "3440x1440" mode "3440x1440"
} }
output "DP-1" {
variable-refresh-rate on-demand=true
}
// ── Input Options ─────────────────────────────────────────────────── // ── Input Options ───────────────────────────────────────────────────
input { input {
keyboard { keyboard {

View file

View file

@ -0,0 +1,32 @@
window-rule {
match app-id="brave-work"
open-on-workspace "1"
open-focused true
default-column-width {
proportion 0.5
}
}
window-rule {
match app-id="brave-personal"
open-on-workspace "2"
open-focused false
default-column-width {
proportion 0.5
}
}
output "HDMI-A-1" {
scale 1
mode "3440x1440"
focus-at-startup
position x=1920 y=0
}
output "eDP-1" {
mode "1920x1080@60.000"
position x=0 y=720
layout {
default-column-width {
proportion 1.0
}
}
}