Files
aglab.dotfiles/.config/niri/config.kdl
T
AgxCOy a11e1e4f6a 一坨更新
新装了 bun(换部落格主题了)
给 chrome 撑宽一点(终于支持垂直标签页了,但记不住宽度)
对调了两块屏幕(可以`niri msg outputs`直接看逻辑坐标)
2026-04-16 01:40:47 +08:00

211 lines
4.1 KiB
KDL

// edited. thx to fizzyizzy05.
input {
keyboard {
xkb {
layout "us"
}
numlock
}
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
click-method "clickfinger"
}
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
// middle-emulation
}
warp-mouse-to-focus
// 还需要在`/etc/systemd/logind.conf`里屏蔽关机键行为.
disable-power-key-handling
focus-follows-mouse max-scroll-amount="0%"
}
output "eDP-1" {
scale 1.25
position x=1920 y=0
}
output "HDMI-A-1" {
mode "1920x1080@180.000"
position x=0 y=0
focus-at-startup
}
layout {
gaps 6
center-focused-column "never"
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
// Fixed sets the width in logical pixels exactly.
// fixed 1920
}
// preset-window-heights { }
default-column-width { proportion 0.5; }
focus-ring {
off
}
border {
width 1
active-color "#56949fff"
inactive-color "#403d52ff"
urgent-color "#eb6f92ff"
// active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
shadow {
on
// draw-behind-window true
// Softness controls the shadow blur radius.
softness 15
// Spread expands the shadow.
spread 2
// Offset moves the shadow relative to the window.
offset x=0 y=0
// You can also change the shadow color and opacity.
color "#000b"
}
struts {
//left 0
//right 6
//top 3
//bottom 3
}
insert-hint {
// off
color "#31748f4c"
}
}
overview {
backdrop-color "#26233a"
zoom 0.5
}
layer-rule {
match namespace="^wallpaper$"
place-within-backdrop true
}
animations {
// off
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
window-open {
spring damping-ratio=0.80 stiffness=400 epsilon=0.0001
}
window-close {
duration-ms 350
curve "ease-out-expo"
}
window-resize {
spring damping-ratio=1.0 stiffness=300 epsilon=0.0001
}
window-movement {
spring damping-ratio=1.0 stiffness=300 epsilon=0.0001
}
overview-open-close {
duration-ms 300
curve "ease-out-quad"
}
horizontal-view-movement {
duration-ms 500
curve "ease-out-expo"
}
workspace-switch {
duration-ms 500
curve "ease-out-expo"
}
screenshot-ui-open {
duration-ms 400
curve "ease-out-cubic"
}
}
// 我看雪叶是把能拆的大板块都拆得一干二净,但就我这份配置而言,拆两份常用的出来已经足矣了。
// 部分视觉效果拆出去可能还会失效(比如窗口边框)。
include "config-window.kdl"
include "config-keyboard.kdl"
// spawn-at-startup "waybar" // 建议交给 systemctl --user,它自己没法热重载。
// spawn-sh-at-startup "wl-paste --watch cliphist store"
spawn-at-startup "awww-daemon"
// spawn-at-startup "awww-daemon" "--namespace" "blur"
spawn-at-startup "xwayland-satellite"
spawn-at-startup "/usr/lib/pam_kwallet_init"
environment {
QT_QPA_PLATFORMTHEME "qt6ct"
ELECTRON_OZONE_PLATFORM_HINT "auto"
}
hotkey-overlay {
skip-at-startup
hide-not-bound
}
gestures {
hot-corners {
off
}
}
prefer-no-csd
// 我自己搞了个软链接,把截图丢进 tmpfs 里了。参见 .zshrc。
screenshot-path "~/.tmp/Screenshots/%Y-%m-%d %H-%M-%S.png"
// screenshot-path null