This commit is contained in:
2026-03-31 20:13:15 +08:00
parent 48044e957d
commit 08c513b995
1155 changed files with 79920 additions and 0 deletions

View File

@ -0,0 +1,10 @@
// ! DO NOT EDIT !
// ! AUTO-GENERATED BY DMS !
// ! CHANGES WILL BE OVERWRITTEN !
// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
recent-windows {
highlight {
corner-radius 12
}
}

View File

@ -0,0 +1,301 @@
// 整合版 binds.kdlShorin 核心配置 + DMS 特有功能与媒体控制
binds {
// =========================================================
// 第一部分Shorin 核心快捷键配置
// =========================================================
// 显示快捷键教程
Mod+Shift+Slash hotkey-overlay-title="快捷键教程 Keybind tutorial" { spawn "~/.config/niri/scripts/niri-binds"; }
Mod+F1 hotkey-overlay-title="开关输入法 Toggle fcitx" {spawn-sh "pkill fcitx5 || fcitx5 ";}
Mod+F5 hotkey-overlay-title="快速存档 Quick save" {spawn "quicksave";}
Mod+F8 hotkey-overlay-title="快速读档 Quick load" {spawn "quickload";}
// 临时开一个浮动终端
Mod+Slash hotkey-overlay-title="临时终端 Quick Terminal" {spawn "kitty" "--single-instance" "--class" "quickterminal";}
//打开浏览器
Mod+B hotkey-overlay-title="浏览器 Browser" { spawn "firefox"; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T hotkey-overlay-title="终端 Terminal" { spawn "kitty" "--single-instance"; }
// settings
Mod+F2 hotkey-overlay-title="设置 Settings" { spawn-sh "dms ipc call settings focusOrToggle";}
Mod+F3 hotkey-overlay-title="录屏 Screen record" { spawn "~/.local/bin/screenrec";}
// 文档管理器。如果有thunar的话会优先打开thunar没有的话会打开nautilus
Mod+E hotkey-overlay-title="文档管理器 Filemanager" { spawn-sh "thunar || env GSK_RENDERER=gl GTK_IM_MODULE=fcitx nautilus"; }
// 另一个打开nautilus的快捷键主要是为了在同时安装thunar和nautilus的情况下打开naultilus
Mod+Alt+E hotkey-overlay-title=null {spawn "env" "GSK_RENDERER=gl" "GTK_IM_MODULE=fcitx" "nautilus" "--new-window";}
Mod+Z hotkey-overlay-title="程序菜单 Applauncher" { spawn-sh "dms ipc call spotlight toggle || fuzzel"; }
// dms 壁纸选择
Mod+Alt+W hotkey-overlay-title="壁纸切换 Wallpaper" { spawn "dms" "ipc" "call" "dankdash" "wallpaper";}
// 随机下载壁纸
Mod+Shift+F10 hotkey-overlay-title="随机下载壁纸 Random wallpaper" { spawn "~/.local/bin/random-anime-wallpaper-dms";}
Mod+O hotkey-overlay-title="切换总览界面 toggle overview" repeat=false { toggle-overview; }
Mod+G repeat=false { toggle-overview; }
// 关闭聚焦窗口
Mod+Q hotkey-overlay-title="关闭聚焦窗口 Close focus window" repeat=false { close-window; }
Alt+F4 hotkey-overlay-title=null repeat=false { close-window; }
// niri-sidebar扩展相关
// 警告:这是实验性功能
// 切换 移动聚焦窗口至侧边栏 建议配合切换浮动聚焦的快捷键使用我设置的是super+n
Mod+Alt+S hotkey-overlay-title="收起窗口 Move to Sidebar" { spawn "niri-sidebar" "toggle-window"; }
Mod+M hotkey-overlay-title="收起窗口 Move to Sidebar" { spawn "niri-sidebar" "toggle-window"; }
// 切换 收起/展开侧边栏
Mod+Alt+Z hotkey-overlay-title="展开/收起侧边栏 Toggle Sidebar" { spawn "niri-sidebar" "toggle-visibility";}
// 反向排序侧边栏
Mod+Alt+X hotkey-overlay-title=null { spawn "niri-sidebar" "flip";}
// 重新排列侧边栏中的窗口(侧边栏中的窗口本质是一个浮动窗口,你有时候可能会把它移动到别的地方
// 例如 ctrl+c居中。此时按下此键可以重新排列
Mod+Alt+R hotkey-overlay-title="重置侧边栏 Reorder Sidebar" { spawn "niri-sidebar" "reorder"; }
// mod+鼠标中键 关闭窗口
Mod+MouseMiddle { close-window; }
// 切换聚焦
// super+方向键
Mod+Left hotkey-overlay-title=null { focus-column-left; }
Mod+Down { focus-window-down; }
Mod+Up { focus-window-up; }
Mod+Right { focus-column-right; }
// super+vim key
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-right; }
// 移动colume
// super+ctrl+方向键
Mod+Ctrl+Left hotkey-overlay-title=null { move-column-left; }
Mod+Ctrl+Right hotkey-overlay-title=null { move-column-right; }
// super+ctrl+vimkey
Mod+Ctrl+H { move-column-left; }
Mod+Ctrl+J { move-window-down; }
Mod+Ctrl+K { move-window-up; }
Mod+Ctrl+L { move-column-right; }
// super+ctrl+a/d 向左/右移动列
Mod+Ctrl+A { move-column-left; }
Mod+Ctrl+D { move-column-right; }
// mod+S/W 上下切换窗口
Mod+S { move-window-down; }
Mod+W { move-window-up; }
// 切换到第一个colume
Mod+Home { focus-column-first; }
// 切换到最后一个colume
Mod+End { focus-column-last; }
// 移动colume到第一个
Mod+Ctrl+Home { move-column-to-first; }
// 移动colume到最后一个
Mod+Ctrl+End { move-column-to-last; }
// 切换显示器聚焦
// mod+shift+方向键
Mod+Shift+Left { focus-monitor-left; }
Mod+Shift+Down { focus-monitor-down; }
Mod+Shift+Up { focus-monitor-up; }
Mod+Shift+Right { focus-monitor-right; }
// mod+shift+vimkey
Mod+Shift+H { focus-monitor-left; }
Mod+Shift+J { focus-monitor-down; }
Mod+Shift+K { focus-monitor-up; }
Mod+Shift+L { focus-monitor-right; }
// 跨显示器移动colume
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
Mod+Shift+Ctrl+A { move-column-to-monitor-left; }
Mod+Shift+Ctrl+S { move-column-to-monitor-down; }
Mod+Shift+Ctrl+W { move-column-to-monitor-up; }
Mod+Shift+Ctrl+D { move-column-to-monitor-right; }
// 移动整个工作区
// mod+shift跨显示器alt代表移动整个工作区再加上三组方向键
Mod+Shift+Alt+W { move-workspace-to-monitor-up; }
Mod+Shift+Alt+S { move-workspace-to-monitor-down; }
Mod+Shift+Alt+D { move-workspace-to-monitor-right; }
Mod+Shift+Alt+A { move-workspace-to-monitor-left; }
Mod+Shift+Alt+K { move-workspace-to-monitor-up; }
Mod+Shift+Alt+J { move-workspace-to-monitor-down; }
Mod+Shift+Alt+L { move-workspace-to-monitor-right; }
Mod+Shift+Alt+H { move-workspace-to-monitor-left; }
Mod+Shift+Alt+Up { move-workspace-to-monitor-up; }
Mod+Shift+Alt+Down { move-workspace-to-monitor-down; }
Mod+Shift+Alt+Right { move-workspace-to-monitor-right; }
Mod+Shift+Alt+Left { move-workspace-to-monitor-left; }
// mod+shitf+滚轮上下切换工作区
Mod+Shift+WheelScrollDown hotkey-overlay-title="切换工作区 Change workspaces" cooldown-ms=150 { focus-workspace-down; }
Mod+Shift+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
//再加上ctrl移动窗口
Mod+Ctrl+Shift+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+Shift+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
// mod+滚轮上下 左右切换聚焦
Mod+WheelScrollDown hotkey-overlay-title="滚轮切换聚焦 Change focus with wheel" { focus-column-right; }
Mod+WheelScrollUp { focus-column-left; }
// 再加上ctrl移动colume
Mod+Ctrl+WheelScrollDown { move-column-right; }
Mod+Ctrl+WheelScrollUp { move-column-left; }
// mod+左右方括号 移动窗口不是移动colume是允许移动到另一个colume的窗口移动
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
// mod+A/D 同效果
Mod+A hotkey-overlay-title="向左移动窗口 Move window to left between columes" { consume-or-expel-window-left; }
Mod+D hotkey-overlay-title="向右移动窗口 Move window to right between columes" { consume-or-expel-window-right; }
// mod+逗号/句号 把窗口合并或者踢出当前的colume
Mod+Comma { consume-window-into-column; }
Mod+Period { expel-window-from-column; }
// mod+shift+A/D 同效果
Mod+Shift+A { consume-window-into-column; }
Mod+Shift+D { expel-window-from-column; }
// 开启colume的标签页模式
Mod+Shift+X { toggle-column-tabbed-display; }
//Mod+X { toggle-column-tabbed-display; }
// mod+鼠标侧键 上下切换聚焦
Mod+MouseForward { focus-window-up; }
Mod+MouseBack { focus-window-down; }
// 按照预设切换窗口宽度
Mod+R hotkey-overlay-title="按预设切换宽度 Switch width " { switch-preset-column-width; }
// 按照预设切换窗口高度
Mod+Shift+R { switch-preset-window-height; }
// 重置窗口高度
Mod+Ctrl+R { reset-window-height; }
Mod+F hotkey-overlay-title="最大化 maximize" { maximize-column; }
Mod+Alt+F hotkey-overlay-title="全屏 fullscreen" { fullscreen-window; }
// 增加窗口宽度占满空闲空间
Mod+Ctrl+F { expand-column-to-available-width; }
// 居中当前聚焦的colume
Mod+C { center-column; }
Mod+Ctrl+C { center-visible-columns; }
// mod+加减号调整窗口宽度
Mod+Minus { set-column-width "-5%"; }
Mod+Equal { set-column-width "+5%"; }
// mod+shift+加减号调整窗口高度
Mod+Shift+Minus { set-window-height "-5%"; }
Mod+Shift+Equal { set-window-height "+5%"; }
// 切换浮动模式
Mod+V hotkey-overlay-title="切换浮动 Toggle floating" { toggle-window-floating; }
// 在浮动模式和非浮动模式之间切换聚焦
Mod+Shift+V hotkey-overlay-title=null { switch-focus-between-floating-and-tiling; }
Mod+N hotkey-overlay-title="切换浮动聚焦 Change focus to floating" { switch-focus-between-floating-and-tiling; }
Alt+grave hotkey-overlay-title=null { switch-focus-between-floating-and-tiling; }
Mod+Alt+N hotkey-overlay-title=null { switch-focus-between-floating-and-tiling; }
// 截图相关
Mod+Alt+A hotkey-overlay-title="选取区域截图 Select screenshot" {spawn-sh "niri msg action screenshot --show-pointer false && pkill -f -USR1 screenshot-sound.sh";}
Mod+Alt+Ctrl+A hotkey-overlay-title="截取聚焦窗口 Focus-window screenshot" { spawn-sh "niri msg action screenshot-window && pkill -f -USR1 screenshot-sound.sh"; }
Mod+Alt+Ctrl+Shift+A hotkey-overlay-title="截取显示器 Monitor screenshot" { spawn-sh "niri msg action screenshot-screen --show-pointer false && pkill -f -USR1 screenshot-sound.sh"; }
Print hotkey-overlay-title=null {spawn-sh "niri msg action screenshot --show-pointer false && pkill -f -USR1 screenshot-sound.sh";}
Ctrl+Print hotkey-overlay-title=null { spawn-sh "niri msg action screenshot-window --show-pointer false && pkill -f -USR1 screenshot-sound.sh"; }
Shift+Print hotkey-overlay-title=null { spawn-sh "niri msg action screenshot-screen --show-pointer false && pkill -f -USR1 screenshot-sound.sh"; }
Mod+Shift+S hotkey-overlay-title="截图后按下此键进行编辑 Edit the image after screenshot" { spawn-sh "wl-paste | satty -f -";}
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
Mod+Shift+E hotkey-overlay-title="退出niri Quit niri" { quit; }
// =========================================================
// 第二部分DMS 特有组件、工作区导航与媒体/亮度控制
// =========================================================
// === DMS 特有组件 ===
// 电源菜单 (Super+X)
Super+X hotkey-overlay-title="Power Menu: Toggle" { spawn "dms" "ipc" "call" "powermenu" "toggle"; }
// 壁纸选择器 (Mod+Y作为 Mod+Alt+W 的备用)
Mod+Y hotkey-overlay-title="Browse Wallpapers" { spawn "dms" "ipc" "call" "dankdash" "wallpaper"; }
// 剪贴板
Mod+Alt+V hotkey-overlay-title="剪贴板 Clipboard" {spawn "dms" "ipc" "call" "clipboard" "toggle";}
// 记事本
Mod+Shift+N hotkey-overlay-title="记事本 Notepad" { spawn "dms" "ipc" "call" "notepad" "toggle"; }
// 锁屏
Mod+Alt+L hotkey-overlay-title="锁屏 Lock Screen" { spawn "dms" "ipc" "call" "lock" "lock"; }
// 锁屏、关闭显示器、休眠
Mod+Alt+P hotkey-overlay-title="挂起 Suspend" { spawn-sh "niri msg action power-off-monitors && dms ipc call lock lock && systemctl suspend";}
// Ctrl+Alt+Del 呼出任务管理器
Ctrl+Alt+Delete hotkey-overlay-title="任务管理器 Task Manager" { spawn "dms" "ipc" "call" "processlist" "focusOrToggle"; }
// 创建窗口规则 (Mod+Shift+W)
Mod+Shift+W hotkey-overlay-title="Create window rule" { spawn "dms" "ipc" "call" "window-rules" "toggle"; }
// === 媒体控制 ===
XF86AudioRaiseVolume allow-when-locked=true { spawn "dms" "ipc" "call" "audio" "increment" "3"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "dms" "ipc" "call" "audio" "decrement" "3"; }
XF86AudioMute allow-when-locked=true { spawn "dms" "ipc" "call" "audio" "mute"; }
XF86AudioMicMute allow-when-locked=true { spawn "dms" "ipc" "call" "audio" "micmute"; }
XF86AudioPause allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "playPause"; }
XF86AudioPlay allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "playPause"; }
XF86AudioPrev allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "previous"; }
XF86AudioNext allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "next"; }
Ctrl+XF86AudioRaiseVolume allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "increment" "3"; }
Ctrl+XF86AudioLowerVolume allow-when-locked=true { spawn "dms" "ipc" "call" "mpris" "decrement" "3"; }
// === 亮度控制 ===
XF86MonBrightnessUp allow-when-locked=true { spawn "dms" "ipc" "call" "brightness" "increment" "5" ""; }
XF86MonBrightnessDown allow-when-locked=true { spawn "dms" "ipc" "call" "brightness" "decrement" "5" ""; }
// === 工作区导航补充 (无冲突项) ===
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Ctrl+U { move-column-to-workspace-down; }
Mod+Ctrl+I { move-column-to-workspace-up; }
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
// 重命名工作区
Ctrl+Shift+R hotkey-overlay-title="Rename Workspace" { spawn "dms" "ipc" "call" "workspace-rename" "open"; }
// === 数字工作区 (1-9) ===
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
// === 其他备用快捷键 ===
// 备用截图键
XF86Launch1 { screenshot; }
Ctrl+XF86Launch1 { screenshot-screen; }
Alt+XF86Launch1 { screenshot-window; }
// 关闭显示器备用
Mod+Shift+P { power-off-monitors; }
}

View File

View File

@ -0,0 +1,10 @@
// 光标配置
cursor {
// 主题,存放路径在~/.local/share/icons
xcursor-theme "breeze_cursors"
// 大小
xcursor-size 30
// 闲置多少毫秒自动隐藏光标
hide-after-inactive-ms 15000
}

View File

@ -0,0 +1,22 @@
// ! DO NOT EDIT !
// ! AUTO-GENERATED BY DMS !
// ! CHANGES WILL BE OVERWRITTEN !
// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
layout {
gaps 4
border {
width 2
}
focus-ring {
width 2
}
}
window-rule {
geometry-corner-radius 12
clip-to-geometry true
tiled-state true
draw-border-with-background false
}

View File

@ -0,0 +1,30 @@
// 带缩略图的alt+tab切换窗口功能但是我设置的是super+tab更符合逻辑
recent-windows {
// 取消//off的注释可以禁用
// off
debounce-ms 750
open-delay-ms 150
highlight {
// 缩略图背景内间距
padding 30
// 缩略图的背景圆角
corner-radius 12
}
//设置缩略图大小
previews {
max-height 480
max-scale 0.2
}
binds {
// scope可以设置显示的窗口是当前工作区的、还是当前显示器的、或者显示全部窗口
Mod+Tab { next-window scope="workspace"; }
Mod+Shift+Tab { previous-window scope="workspace"; }
// grave是波浪键显示当前应用的所有窗口
Mod+grave { next-window filter="app-id"; }
Mod+Shift+grave { previous-window filter="app-id"; }
}
}

View File

@ -0,0 +1,133 @@
// 全局窗口规则
window-rule {
// 这一行规则可以让niri变成传统桌面那样的堆叠式桌面。
//open-floating true
// 圆角
geometry-corner-radius 8
// 去掉超出圆角的窗口内容
clip-to-geometry true
// 全局透明度
opacity 0.99
// 禁止边框画到背景里
draw-border-with-background false
}
// 放进overview里的壁纸程序
layer-rule {
match namespace="dms:blurwallpaper"
place-within-backdrop true
}
// 以浮动模式打开imv一个轻量化图片预览程序且不自动聚焦
window-rule {
match app-id="imv"
open-floating true
}
// steam 好友列表
window-rule {
match app-id="steam" title="Friends List"
match app-id="steam" title="好友列表"
default-column-width { proportion 0.20; }
}
//shorinclip剪贴板TUI
window-rule {
match app-id="shorinclip"
default-column-width { fixed 625; }
default-window-height { fixed 700; }
//min-height 800
open-floating true
default-floating-position x=0 y=18 relative-to="top"
}
// 以浮动模式打开的软件
window-rule {
// This app-id regular expression will work for both:
// - host Firefox (app-id is "firefox")
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
match app-id="com.gabm.satty"
match app-id="media_info"
match app-id="video2gif"
match app-id="floating-term"
match app-id="nm-connection-editor"
match app-id="niri-quick-switch"
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
match app-id="steam" title="Friends List"
match app-id="blueberry.py" title="蓝牙"
match app-id="blueman-manager"
match app-id="flameshot"
match app-id="com.github.hluk.copyq"
match app-id="be.alexandervanhee.gradia"
match app-id="org.pulseaudio.pavucontrol" title="音量控制"
match app-id="org.gnome.clocks" title="时钟"
match app-id="fcitx" title="Fcitx5 Input Window"
match app-id="org.gnome.FileRoller"
match app-id="thunar" title="文件操作进度"
match app-id="waypaper"
match app-id="clipse-gui"
match title="群聊的聊天记录"
match title="聊天记录"
match title="日历"
match title="重命名"
match app-id="btrfs-assistant"
match app-id="markpix"
match title="Steam 设置"
match title="另存为"
match app-id="better_control.py"
match app-id="niri-hotkey-menu"
open-floating true
}
//快速终端和笔记
window-rule {
match app-id="quickterminal"
open-floating true
default-floating-position x=20 y=20 relative-to="top"
}
window-rule {
match app-id="bluetui"
match app-id="impala"
default-column-width { fixed 800; }
default-window-height { fixed 800; }
open-floating true
}
window-rule {
match app-id="clipse"
default-column-width { fixed 625; }
default-window-height { fixed 700; }
open-floating true
}
// waydroid调整
window-rule {
match title="gsr ui"
match app-id="waydroid"
open-fullscreen true
open-floating true
focus-ring {
off
}
shadow {
off
}
}
// 取消图片预览、视频播放器之类的透明度,并且以浮动模式打开
window-rule {
match title="图片查看器"
match title="画中画"
match title="图片和视频"
match title="视频播放器"
open-floating true
opacity 1.0
}
window-rule {
match app-id="mpv"
match app-id="celluloid"
opacity 1.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=r#"^org\.wezfurlong\.wezterm$"#
default-column-width {}
}