update niri config

This commit is contained in:
Alexander Navarro 2025-10-27 11:39:38 -03:00
parent 5b5e426d94
commit f535d75b96
5 changed files with 494 additions and 414 deletions

View file

@ -4,4 +4,30 @@ 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"
[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

@ -4,7 +4,7 @@ default_target_type = "symbolic"
[helpers] [helpers]
[default] [default]
depends = [] depends = ["niri"]
[default.files] [default.files]
"configs/fish" = "~/.config/fish" "configs/fish" = "~/.config/fish"
@ -21,7 +21,6 @@ depends = []
"configs/mako" = "~/.config/mako" "configs/mako" = "~/.config/mako"
"configs/mise" = "~/.config/mise" "configs/mise" = "~/.config/mise"
"configs/mpv" = "~/.config/mpv" "configs/mpv" = "~/.config/mpv"
"configs/niri" = "~/.config/niri"
"configs/nvim" = "~/.config/nvim" "configs/nvim" = "~/.config/nvim"
"configs/rofi" = "~/.config/rofi" "configs/rofi" = "~/.config/rofi"
"configs/swappy" = "~/.config/swappy" "configs/swappy" = "~/.config/swappy"
@ -37,3 +36,6 @@ depends = []
[default.variables] [default.variables]
[niri.files]
"configs/niri" = "~/.config/niri"

View file

@ -1,53 +1,56 @@
input { // ╭─────────────────────────────────────────────────────────╮
keyboard { // │ Windows Rules │
xkb { // ╰─────────────────────────────────────────────────────────╯
layout "latam" window-rule {
options "caps:escape" // This regular expression is intentionally made as specific as possible,
} // since this is the default config, and we want no false positives.
// Enable numlock on startup, omitting this setting disables it. // You can get away with just app-id="wezterm" if you want.
numlock match app-id="^org\\.wezfurlong\\.wezterm$"
} default-column-width {
// Next sections include libinput settings.
// Omitting settings disables them, or leaves them at their default values.
// All commented-out settings here are examples, not defaults.
touchpad {
// off
tap
// dwt
// dwtp
// drag false
// drag-lock
natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "two-finger"
// disabled-on-external-mouse
}
mouse {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "no-scroll"
} }
trackpoint { }
// off // Floatin Windows
// natural-scroll window-rule {
// accel-speed 0.2 match app-id="firefox$" title="^Picture-in-Picture$"
// accel-profile "flat" match app-id="^brave-.*-Default$"
// scroll-method "on-button-down" // Extensions popup open-floating true
// scroll-button 273 }
// scroll-button-lock window-rule {
// middle-emulation match app-id="^org\\.keepassxc\\.KeePassXC$"
match app-id="^org\\.gnome\\.World\\.Secrets$"
// block-out-from "screen-capture"
// Use this instead if you want them visible on third-party screenshot tools.
block-out-from "screencast"
}
window-rule {
match app-id="brave-browser"
match at-startup=true
default-column-width {
proportion 0.75
} }
// warp-mouse-to-focus
focus-follows-mouse
} }
output "DP-1" { window-rule {
variable-refresh-rate on-demand=true match title="^Meet: .*"
match app-id="brave-browser"
open-floating true
} }
window-rule {
geometry-corner-radius 4
clip-to-geometry true
}
// ╭─────────────────────────────────────────────────────────╮
// │ Auto Start Apps │
// ╰─────────────────────────────────────────────────────────╯
spawn-at-startup "/usr/lib/pam_kwallet_init"
spawn-at-startup "udieskiiw"
spawn-at-startup "brave"
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
// ╭─────────────────────────────────────────────────────────╮
// │ System Config │
// ╰─────────────────────────────────────────────────────────╯
// ── Layout Config ───────────────────────────────────────────────────
layout { layout {
gaps 10 gaps 10
always-center-single-column always-center-single-column
@ -73,60 +76,7 @@ layout {
inactive-color "#505050" inactive-color "#505050"
} }
} }
spawn-at-startup "/usr/lib/pam_kwallet_init" // ── Keybindings ─────────────────────────────────────────────────────
spawn-at-startup "udieskiiw"
spawn-at-startup "brave"
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
hotkey-overlay {
skip-at-startup
}
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
// This option will also fix border/focus ring drawing behind some semitransparent windows.
// After enabling or disabling this, you need to restart the apps for this to take effect.
// prefer-no-csd
screenshot-path null
animations {
// Uncomment to turn off all animations.
// off
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
}
window-rule {
// This regular expression is intentionally made as specific as possible,
// since this is the default config, and we want no false positives.
// You can get away with just app-id="wezterm" if you want.
match app-id="^org\\.wezfurlong\\.wezterm$"
default-column-width {
}
}
window-rule {
match app-id="firefox$" title="^Picture-in-Picture$"
open-floating true
}
window-rule {
match app-id="^org\\.keepassxc\\.KeePassXC$"
match app-id="^org\\.gnome\\.World\\.Secrets$"
// block-out-from "screen-capture"
// Use this instead if you want them visible on third-party screenshot tools.
block-out-from "screencast"
}
window-rule {
match app-id="brave-browser"
match at-startup=true
default-column-width {
proportion 0.75
}
}
window-rule {
geometry-corner-radius 4
clip-to-geometry true
}
binds { binds {
Mod+Shift+Slash { Mod+Shift+Slash {
show-hotkey-overlay show-hotkey-overlay
@ -415,12 +365,12 @@ binds {
Print { Print {
screenshot screenshot
} }
Shift+Ctrl+Print {
screenshot-screen
}
Shift+Print { Shift+Print {
screenshot-window screenshot-window
} }
Shift+Ctrl+Print hotkey-overlay-title="Edit image in Clipboard" {
spawn-sh "wl-paste | swappy -f -"
}
// Applications such as remote-desktop clients and software KVM switches may // Applications such as remote-desktop clients and software KVM switches may
// request that niri stops processing the keyboard shortcuts defined here // request that niri stops processing the keyboard shortcuts defined here
// so they may, for example, forward the key presses as-is to a remote machine. // so they may, for example, forward the key presses as-is to a remote machine.
@ -440,4 +390,102 @@ binds {
quit quit
} }
} }
// ── Environment Variables ───────────────────────────────────────────
environment {
QT_STYLE_OVERRIDE "kvantum"
QT_AUTO_SCREEN_SCALE_FACTOR "1"
QT_QPA_PLATFORM "wayland;xcb"
QT_WAYLAND_DISABLE_WINDOWDECORATION "1"
QT_QPA_PLATFORMTHEME "qt5ct"
MOZ_ENABLE_WAYLAND "1"
XCURSOR_SIZE "24"
GTK_THEME "catppuccin-macchiato-teal-standard-default"
SSH_AUTH_SOCK "$XDG_RUNTIME_DIR/rbw/ssh-agent-socket"
EDITOR "nvim"
VISUAL "nvim"
TERMINAL "/usr/bin/kitty"
}
// ── Display Options ─────────────────────────────────────────────────
output "eDP-1" {
off
}
output "HDMI-A-1" {
scale 1
mode "3440x1440"
}
output "DP-1" {
variable-refresh-rate on-demand=true
}
// ── Input Options ───────────────────────────────────────────────────
input {
keyboard {
xkb {
layout "latam"
options "caps:escape"
}
// Enable numlock on startup, omitting this setting disables it.
numlock
}
// Next sections include libinput settings.
// Omitting settings disables them, or leaves them at their default values.
// All commented-out settings here are examples, not defaults.
touchpad {
// off
tap
// dwt
// dwtp
// drag false
// drag-lock
natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "two-finger"
// disabled-on-external-mouse
}
mouse {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "no-scroll"
}
trackpoint {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "on-button-down"
// scroll-button 273
// scroll-button-lock
// middle-emulation
}
// warp-mouse-to-focus
focus-follows-mouse
}
// ── Animations ──────────────────────────────────────────────────────
animations {
// Uncomment to turn off all animations.
// off
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
}
// ── Misc ────────────────────────────────────────────────────────────
cursor {
xcursor-theme "catppuccin-macchiato-lavender-cursors"
xcursor-size 24
}
hotkey-overlay {
skip-at-startup
}
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
// This option will also fix border/focus ring drawing behind some semitransparent windows.
// After enabling or disabling this, you need to restart the apps for this to take effect.
// prefer-no-csd
screenshot-path null

View file

@ -36,6 +36,7 @@ opt.pumblend = 10 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup opt.pumheight = 10 -- Maximum number of entries in a popup
-- opt.relativenumber = true -- Relative line numbers -- opt.relativenumber = true -- Relative line numbers
opt.scrolloff = 15 -- Lines of context opt.scrolloff = 15 -- Lines of context
opt.sidescrolloff = 25 -- Columns of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" } opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent opt.shiftwidth = 2 -- Size of an indent

3
kdlfmt.kdl Normal file
View file

@ -0,0 +1,3 @@
indent_size 2
use_tabs #false