Migrate full DMS personalization on Ubuntu 24.04

This commit is contained in:
wuyang
2026-07-27 15:40:02 +08:00
parent fd0fcd3437
commit a0030934c0
24 changed files with 1769 additions and 469 deletions
+32 -17
View File
@@ -1,22 +1,24 @@
# Niri Beyond Glass # Niri Beyond Glass
面向 **Ubuntu 24.04 LTS** 的可移植 Niri 桌面配置。一条命令安装 Niri 面向 **Ubuntu 24.04 LTS** 的可移植 Niri + DankMaterialShell 桌面配置。
26.04、Xwayland 支持和一套克制的半透明桌面组件,同时保留原有 GNOME 与 一条命令安装 Niri 26.04、Xwayland 支持、DMS 1.5.3 和 Quickshell 0.3.0
GDM,可在登录界面随时切换会话。 同时保留原有 GNOME 与 GDM,可在登录界面随时切换会话。
## 效果与范围 ## 效果与范围
- Niri 滚动平铺、窗口圆角、阴影、流畅动画 - Niri 滚动平铺、窗口圆角、阴影、流畅动画
- 支持 Niri 26.04 的背景模糊、`xray` 和轻微噪点效果 - 支持 Niri 26.04 的背景模糊、`xray` 和轻微噪点效果
- Waybar 顶栏,时间位于最右侧区域,图标风格统一 - DMS Morandi 顶栏:左侧启动器/工作区/窗口,中间时钟,右侧系统组件
- Fuzzel 启动器、Mako 通知、Swaylock 锁屏和自动息 - 统一的启动器、控制中心、通知、音量亮度 OSD 和 DMS 锁
- Inter Variable 1.2 倍界面字体、1.22 倍图标和 14pt JetBrains Mono 终端
- 0.84/0.88 半透明组件、背景模糊、12px 圆角和 Morandi Nocturne 配色
- 中文快捷键说明 - 中文快捷键说明
- 浏览器、视频播放器、Steam 保持完全不透明 - 浏览器、视频播放器、Steam 保持完全不透明
- 自动备份已有配置,可卸载恢复 - 自动备份已有配置,可卸载恢复
本项目**不包含**动态壁纸、DMS、登录界面或 GRUB 主题,也不重新分发 本项目迁移桌面个性化,但**不包含或替换壁纸**:升级时读取目标机正在使用的
Wallpaper Engine 创意工坊图片。默认使用 Ubuntu 自带静态壁纸;安装时可指定 壁纸并继续使用。项目也不包含动态壁纸、DMS Greeter、GRUB 主题或 Wallpaper
自己的图片 Engine 创意工坊图片,不修改显示器分辨率、缩放和排列
## 一键安装 ## 一键安装
@@ -24,8 +26,16 @@ Wallpaper Engine 创意工坊图片。默认使用 Ubuntu 自带静态壁纸;
curl -fsSL https://git.k1412.top/wuyang/niri-beyond-glass/raw/branch/main/install.sh | bash curl -fsSL https://git.k1412.top/wuyang/niri-beyond-glass/raw/branch/main/install.sh | bash
``` ```
首次安装需要编译 Niri耗时取决于 CPU 和网络。脚本会调用 `sudo` 安装依赖, 首次安装需要编译 Niri并下载约 700 MB 的隔离 DMS 运行环境,最终约占用
但必须以普通用户运行。完成后注销,在 GDM 左下角的会话菜单选择 **Niri** 2.2 GB。脚本会调用 `sudo` 安装依赖,但必须以普通用户运行。完成后注销,在
GDM 会话菜单选择 **Niri**
已经运行过旧版安装器但顶栏风格不一致时,直接再次运行同一命令。脚本会跳过
已经安装的 Niri,原地替换 Waybar/Mako 风格:
```bash
curl -fsSL https://git.k1412.top/wuyang/niri-beyond-glass/raw/branch/main/install.sh | bash
```
使用自己的静态壁纸: 使用自己的静态壁纸:
@@ -46,13 +56,14 @@ bash /tmp/install-niri.sh --config-only
| 快捷键 | 功能 | | 快捷键 | 功能 |
|---|---| |---|---|
| `Super + Enter` | 终端 | | `Super + Enter` | 终端 |
| `Super + D` | 应用启动器 | | `Super + D` / `Super + Space` | DMS 应用启动器 |
| `Super + B` | 默认浏览器 | | `Super + B` | 默认浏览器 |
| `Super + E` | 文件管理器 | | `Super + E` | 文件管理器 |
| `Super + O` | 总览 | | `Super + O` | 总览 |
| `Super + Q` | 关闭窗口 | | `Super + Q` | 关闭窗口 |
| `Super + V` | 切换浮动 | | `Super + V` | 剪贴板 |
| `Super + L` | 锁屏 | | `Super + Alt + L` | DMS 锁屏 |
| `Super + A` | 控制中心 |
| `Super + Shift + /` | 中文快捷键总览 | | `Super + Shift + /` | 中文快捷键总览 |
| `Super + PageUp/PageDown` | 切换工作区 | | `Super + PageUp/PageDown` | 切换工作区 |
| `Super + Shift + E` | 退出 Niri | | `Super + Shift + E` | 退出 Niri |
@@ -63,8 +74,9 @@ bash /tmp/install-niri.sh --config-only
- 仅支持 Ubuntu 24.04,检测到其他版本会停止 - 仅支持 Ubuntu 24.04,检测到其他版本会停止
- 不替换显示管理器,不修改 GDM,不移除 GNOME - 不替换显示管理器,不修改 GDM,不移除 GNOME
- 安装前备份 `niri``waybar``fuzzel``mako``swaylock` - 安装前备份 Niri、旧桌面组件、DMS 和 Alacritty 配置
- Niri 和 Xwayland Satellite 固定到明确版本 - Niri 和 Xwayland Satellite 固定到明确版本
- DMS、Quickshell 及 Qt 依赖位于项目专用 Nix profile,不替换 Ubuntu 系统库
- Rust 工具链隔离在 `~/.local/share/niri-beyond-glass` - Rust 工具链隔离在 `~/.local/share/niri-beyond-glass`
- 配置安装后使用 `niri validate` 校验 - 配置安装后使用 `niri validate` 校验
@@ -91,15 +103,18 @@ curl -fsSL https://git.k1412.top/wuyang/niri-beyond-glass/raw/branch/main/uninst
PPA 二进制包。 PPA 二进制包。
- Ubuntu 24.04 自带的 `libdisplay-info` 版本不足时,脚本会在 - Ubuntu 24.04 自带的 `libdisplay-info` 版本不足时,脚本会在
`/usr/local` 编译安装 0.3.0。 `/usr/local` 编译安装 0.3.0。
- 这是一套 Niri 配置,不复刻 DMS 的控制中心、登录页和动态壁纸。 - Ubuntu 24.04 的 PPA 没有 DMS/Quickshell 软件包,因此使用 Ubuntu 自带 Nix
作为隔离兼容层;这不把 Ubuntu 转换为 NixOS。
- 不安装 DMS Greeter,登录界面仍由 GDM 管理;DMS 锁屏属于 Niri 会话内部。
- 壁纸和显示器布局不会从作者机器迁移。
- NVIDIA 用户应先确保 Ubuntu 官方驱动在 GNOME Wayland 下工作正常。 - NVIDIA 用户应先确保 Ubuntu 官方驱动在 GNOME Wayland 下工作正常。
## 上游项目 ## 上游项目
- [Niri](https://github.com/niri-wm/niri) - [Niri](https://github.com/niri-wm/niri)
- [DankMaterialShell](https://github.com/AvengeMedia/DankMaterialShell)
- [Quickshell](https://quickshell.org/)
- [Xwayland Satellite](https://github.com/Supreeeme/xwayland-satellite) - [Xwayland Satellite](https://github.com/Supreeeme/xwayland-satellite)
- [Waybar](https://github.com/Alexays/Waybar)
- [Fuzzel](https://codeberg.org/dnkl/fuzzel)
## License ## License
+66
View File
@@ -0,0 +1,66 @@
[general]
live_config_reload = true
[window]
opacity = 0.88
decorations = "Full"
decorations_theme_variant = "Dark"
startup_mode = "Windowed"
dynamic_padding = true
padding = { x = 16, y = 16 }
[scrolling]
history = 12000
multiplier = 3
[font]
size = 14.0
normal = { family = "JetBrains Mono", style = "Regular" }
bold = { family = "JetBrains Mono", style = "Bold" }
italic = { family = "JetBrains Mono", style = "Italic" }
bold_italic = { family = "JetBrains Mono", style = "Bold Italic" }
[colors.primary]
background = "#1a1a18"
foreground = "#f2f2f2"
dim_foreground = "#b1b6be"
bright_foreground = "#ffffff"
[colors.cursor]
text = "#1a1a18"
cursor = "#afac9c"
[colors.selection]
text = "#f2f2f2"
background = "#43423c"
[colors.normal]
black = "#0f0f0f"
red = "#ca8685"
green = "#88a069"
yellow = "#caad83"
blue = "#689bbe"
magenta = "#af7dbd"
cyan = "#6baebf"
white = "#b1b6be"
[colors.bright]
black = "#515457"
red = "#b17c57"
green = "#599296"
yellow = "#caad83"
blue = "#4a6da7"
magenta = "#a49fc9"
cyan = "#6baebf"
white = "#d2d2d2"
[bell]
animation = "EaseOutExpo"
duration = 0
[mouse]
hide_when_typing = true
[cursor]
style = { shape = "Beam", blinking = "On" }
blink_interval = 520
+46
View File
@@ -0,0 +1,46 @@
{
"dark": {
"name": "Morandi Nocturne Dark",
"primary": "#AFAC9C",
"primaryText": "#1A1A18",
"primaryContainer": "#43423C",
"secondary": "#88A069",
"surface": "#1A1A18",
"surfaceText": "#F2F2F2",
"surfaceVariant": "#252520",
"surfaceVariantText": "#D2D2D2",
"surfaceTint": "#AFAC9C",
"background": "#0F0F0F",
"backgroundText": "#F2F2F2",
"outline": "#515457",
"surfaceContainer": "#20201D",
"surfaceContainerHigh": "#2B2A26",
"surfaceContainerHighest": "#34332E",
"error": "#CA8685",
"warning": "#CAAD83",
"info": "#6BAEBF",
"matugen_type": "scheme-fidelity"
},
"light": {
"name": "Morandi Nocturne Light",
"primary": "#6E6B5D",
"primaryText": "#FFFFFF",
"primaryContainer": "#E4E0CF",
"secondary": "#65784E",
"surface": "#F4F2EA",
"surfaceText": "#23231F",
"surfaceVariant": "#E7E3D7",
"surfaceVariantText": "#4C4A43",
"surfaceTint": "#6E6B5D",
"background": "#FAF8F0",
"backgroundText": "#1A1A18",
"outline": "#7B786D",
"surfaceContainer": "#EEEADF",
"surfaceContainerHigh": "#E5E1D5",
"surfaceContainerHighest": "#DCD7CA",
"error": "#9F4D4B",
"warning": "#8A6B3E",
"info": "#4C7B86",
"matugen_type": "scheme-fidelity"
}
}
+86
View File
@@ -0,0 +1,86 @@
{
"isLightMode": false,
"doNotDisturb": false,
"doNotDisturbUntil": 0,
"terminalOverride": "",
"wallpaperPath": "__WALLPAPER__",
"perMonitorWallpaper": false,
"monitorWallpapers": {},
"perModeWallpaper": false,
"wallpaperPathLight": "__WALLPAPER__",
"wallpaperPathDark": "__WALLPAPER__",
"monitorWallpapersLight": {},
"monitorWallpapersDark": {},
"monitorWallpaperFillModes": {},
"wallpaperTransition": "iris bloom",
"includedTransitions": [
"fade",
"wipe",
"disc",
"stripes",
"iris bloom",
"pixelate",
"portal"
],
"wallpaperCyclingEnabled": false,
"wallpaperCyclingMode": "interval",
"wallpaperCyclingInterval": 300,
"wallpaperCyclingTime": "06:00",
"monitorCyclingSettings": {},
"nightModeEnabled": false,
"nightModeTemperature": 4500,
"nightModeHighTemperature": 6500,
"nightModeAutoEnabled": false,
"nightModeAutoMode": "time",
"nightModeStartHour": 18,
"nightModeStartMinute": 0,
"nightModeEndHour": 6,
"nightModeEndMinute": 0,
"latitude": 0,
"longitude": 0,
"nightModeUseIPLocation": true,
"nightModeLocationProvider": "",
"themeModeAutoEnabled": false,
"themeModeAutoMode": "location",
"themeModeStartHour": 18,
"themeModeStartMinute": 0,
"themeModeEndHour": 6,
"themeModeEndMinute": 0,
"themeModeShareGammaSettings": false,
"weatherLocation": "",
"weatherCoordinates": "39.9057136,116.3912972",
"pinnedApps": [],
"barPinnedApps": [],
"dockLauncherPosition": 0,
"hiddenTrayIds": [],
"trayItemOrder": [],
"recentColors": [],
"showThirdPartyPlugins": false,
"pluginBrowserInstalledFirst": false,
"pluginBrowserSortMode": "default",
"launchPrefix": "",
"brightnessExponentialDevices": {},
"selectedGpuIndex": 0,
"nvidiaGpuTempEnabled": false,
"nonNvidiaGpuTempEnabled": false,
"enabledGpuPciIds": [],
"wifiDeviceOverride": "",
"weatherHourlyDetailed": true,
"hiddenApps": [],
"appOverrides": {},
"searchAppActions": true,
"deviceMaxVolumes": {},
"hiddenOutputDeviceNames": [],
"hiddenInputDeviceNames": [],
"locale": "",
"timeLocale": "",
"notepadLastMode": "",
"launcherLastMode": "apps",
"launcherLastFileSearchType": "all",
"launcherLastQuery": "",
"appDrawerLastMode": "apps",
"niriOverviewLastMode": "apps",
"settingsSidebarExpandedIds": ",system,power_security,displays,applications,",
"settingsSidebarCollapsedIds": ",",
"configVersion": 3
}
+776
View File
@@ -0,0 +1,776 @@
{
"currentThemeName": "custom",
"currentThemeCategory": "custom",
"customThemeFile": "__DMS_THEME_FILE__",
"registryThemeVariants": {},
"matugenScheme": "scheme-fidelity",
"matugenContrast": -0.08,
"runUserMatugenTemplates": true,
"popupTransparency": 0.84,
"dockTransparency": 0.88,
"widgetBackgroundColor": "sch",
"widgetBackgroundCustomColor": "#6750A4",
"widgetBackgroundCustomStrength": 0.5,
"widgetColorMode": "default",
"controlCenterTileColorMode": "default",
"buttonColorMode": "primary",
"cornerRadius": 12,
"niriLayoutGapsOverride": 8,
"niriLayoutRadiusOverride": 12,
"niriLayoutBorderSize": 2,
"hyprlandLayoutGapsOverride": -1,
"hyprlandLayoutGapsOutOverride": -1,
"hyprlandLayoutRadiusOverride": -1,
"hyprlandLayoutBorderSize": -1,
"hyprlandResizeOnBorder": false,
"mangoLayoutGapsOverride": -1,
"mangoLayoutGapsOutOverride": -1,
"mangoLayoutRadiusOverride": -1,
"mangoLayoutBorderSize": -1,
"mangoTrackpadNaturalScrolling": true,
"firstDayOfWeek": -1,
"showWeekNumber": false,
"calendarBackend": "auto",
"clockFormat": "24h",
"showSeconds": true,
"padHours12Hour": false,
"useFahrenheit": false,
"windSpeedUnit": "kmh",
"nightModeEnabled": false,
"animationSpeed": 1,
"customAnimationDuration": 500,
"syncComponentAnimationSpeeds": true,
"popoutAnimationSpeed": 1,
"popoutCustomAnimationDuration": 150,
"modalAnimationSpeed": 1,
"modalCustomAnimationDuration": 150,
"enableRippleEffects": true,
"animationVariant": 0,
"motionEffect": 0,
"m3ElevationEnabled": true,
"m3ElevationIntensity": 10,
"m3ElevationOpacity": 24,
"m3ElevationColorMode": "default",
"m3ElevationLightDirection": "top",
"m3ElevationCustomColor": "#000000",
"modalElevationEnabled": true,
"popoutElevationEnabled": true,
"barElevationEnabled": true,
"blurEnabled": true,
"blurForegroundLayers": true,
"blurLayerOutlineOpacity": 0.1,
"blurBorderEnabled": true,
"blurBorderColor": "outline",
"blurBorderCustomColor": "#ffffff",
"blurBorderOpacity": 0.22,
"wallpaperFillMode": "Fill",
"blurredWallpaperLayer": false,
"blurWallpaperOnOverview": true,
"wallpaperBackgroundColorMode": "black",
"wallpaperBackgroundCustomColor": "#000000",
"showLauncherButton": true,
"showWorkspaceSwitcher": true,
"showFocusedWindow": true,
"showWeather": false,
"showMusic": true,
"showClipboard": true,
"showCpuUsage": false,
"showMemUsage": false,
"showCpuTemp": false,
"showGpuTemp": false,
"showSystemTray": false,
"systemTrayIconTintMode": "none",
"systemTrayIconTintSaturation": 50,
"systemTrayIconTintStrength": 135,
"showClock": true,
"showNotificationButton": true,
"showBattery": false,
"showBatteryPercent": true,
"showBatteryPercentOnlyOnBattery": false,
"showBatteryTime": false,
"showBatteryTimeOnlyOnBattery": false,
"batteryPillStyle": false,
"batteryPillPercentSign": false,
"showControlCenterButton": true,
"showCapsLockIndicator": true,
"controlCenterShowNetworkIcon": true,
"controlCenterShowBluetoothIcon": true,
"controlCenterShowAudioIcon": true,
"controlCenterShowAudioPercent": false,
"controlCenterShowVpnIcon": true,
"controlCenterShowBrightnessIcon": false,
"controlCenterShowBrightnessPercent": false,
"controlCenterShowMicIcon": false,
"controlCenterShowMicPercent": false,
"controlCenterShowBatteryIcon": false,
"controlCenterShowPrinterIcon": false,
"controlCenterShowScreenSharingIcon": true,
"controlCenterShowIdleInhibitorIcon": false,
"controlCenterShowDoNotDisturbIcon": false,
"showPrivacyButton": true,
"privacyShowMicIcon": false,
"privacyShowCameraIcon": false,
"privacyShowScreenShareIcon": false,
"controlCenterWidgets": [
{
"id": "volumeSlider",
"enabled": true,
"width": 50
},
{
"id": "brightnessSlider",
"enabled": true,
"width": 50
},
{
"id": "wifi",
"enabled": true,
"width": 50
},
{
"id": "bluetooth",
"enabled": true,
"width": 50
},
{
"id": "audioOutput",
"enabled": true,
"width": 50
},
{
"id": "audioInput",
"enabled": true,
"width": 50
},
{
"id": "nightMode",
"enabled": true,
"width": 50
},
{
"id": "darkMode",
"enabled": true,
"width": 50
}
],
"showWorkspaceIndex": true,
"showWorkspaceName": false,
"showWorkspacePadding": false,
"workspaceScrolling": false,
"showWorkspaceApps": true,
"workspaceDragReorder": true,
"maxWorkspaceIcons": 3,
"workspaceAppIconSizeOffset": 0,
"groupWorkspaceApps": true,
"groupActiveWorkspaceApps": false,
"workspaceFollowFocus": false,
"showOccupiedWorkspacesOnly": false,
"reverseScrolling": false,
"dwlShowAllTags": false,
"workspaceActiveAppHighlightEnabled": true,
"workspaceColorMode": "default",
"workspaceFocusedCustomColor": "#6750A4",
"workspaceOccupiedColorMode": "none",
"workspaceOccupiedCustomColor": "#625B71",
"workspaceUnfocusedColorMode": "default",
"workspaceUnfocusedCustomColor": "#49454E",
"workspaceUrgentColorMode": "default",
"workspaceUrgentCustomColor": "#B3261E",
"workspaceFocusedBorderEnabled": true,
"workspaceFocusedBorderColor": "primary",
"workspaceFocusedBorderCustomColor": "#6750A4",
"workspaceFocusedBorderThickness": 2,
"workspaceUnfocusedMonitorSeparateAppearance": false,
"workspaceUnfocusedMonitorColorMode": "default",
"workspaceUnfocusedMonitorFocusedCustomColor": "#6750A4",
"workspaceUnfocusedMonitorOccupiedColorMode": "none",
"workspaceUnfocusedMonitorOccupiedCustomColor": "#625B71",
"workspaceUnfocusedMonitorUnfocusedColorMode": "default",
"workspaceUnfocusedMonitorUnfocusedCustomColor": "#49454E",
"workspaceUnfocusedMonitorUrgentColorMode": "default",
"workspaceUnfocusedMonitorUrgentCustomColor": "#B3261E",
"workspaceUnfocusedMonitorBorderEnabled": false,
"workspaceUnfocusedMonitorBorderColor": "primary",
"workspaceUnfocusedMonitorBorderCustomColor": "#6750A4",
"workspaceUnfocusedMonitorBorderThickness": 2,
"workspaceNameIcons": {},
"waveProgressEnabled": true,
"scrollTitleEnabled": true,
"mediaAdaptiveWidthEnabled": true,
"audioVisualizerEnabled": true,
"mediaUseAlbumArtAccent": false,
"audioScrollMode": "volume",
"audioWheelScrollAmount": 5,
"audioDeviceScrollVolumeEnabled": false,
"mediaExcludePlayers": [],
"clockCompactMode": false,
"focusedWindowCompactMode": true,
"focusedWindowSize": 1,
"focusedWindowShowIcon": true,
"runningAppsCompactMode": true,
"barMaxVisibleApps": 0,
"barMaxVisibleRunningApps": 0,
"barShowOverflowBadge": true,
"trayAutoOverflow": true,
"trayPopupSingleLine": true,
"trayMaxVisibleItems": 0,
"appsDockHideIndicators": false,
"appsDockColorizeActive": false,
"appsDockActiveColorMode": "primary",
"appsDockEnlargeOnHover": false,
"appsDockEnlargePercentage": 125,
"appsDockIconSizePercentage": 100,
"keyboardLayoutNameCompactMode": false,
"keyboardLayoutNameShowIcon": false,
"runningAppsCurrentWorkspace": true,
"runningAppsGroupByApp": false,
"runningAppsCurrentMonitor": false,
"appIdSubstitutions": [
{
"pattern": "Spotify",
"replacement": "spotify",
"type": "exact"
},
{
"pattern": "beepertexts",
"replacement": "beeper",
"type": "exact"
},
{
"pattern": "home assistant desktop",
"replacement": "homeassistant-desktop",
"type": "exact"
},
{
"pattern": "com.transmissionbt.transmission",
"replacement": "transmission-gtk",
"type": "contains"
},
{
"pattern": "^steam_app_(\\d+)$",
"replacement": "steam_icon_$1",
"type": "regex"
}
],
"centeringMode": "index",
"clockDateFormat": "",
"lockDateFormat": "",
"greeterRememberLastSession": true,
"greeterRememberLastUser": true,
"greeterAutoLogin": false,
"greeterEnableFprint": false,
"greeterEnableU2f": false,
"greeterWallpaperPath": "__WALLPAPER__",
"greeterLockDateFormat": "",
"greeterFontFamily": "",
"greeterWallpaperFillMode": "Fill",
"greeterPamExternallyManaged": false,
"greeterSyncPending": false,
"greeterSyncBaseline": {},
"mediaSize": 1,
"appLauncherViewMode": "list",
"spotlightModalViewMode": "list",
"browserPickerViewMode": "grid",
"appPickerViewMode": "grid",
"sortAppsAlphabetically": false,
"appLauncherGridColumns": 4,
"spotlightCloseNiriOverview": true,
"rememberLastQuery": false,
"rememberLastMode": true,
"spotlightSectionViewModes": {},
"appDrawerSectionViewModes": {},
"niriOverviewOverlayEnabled": true,
"niriOverviewLauncherStyle": "full",
"dankLauncherV2Size": "compact",
"dankLauncherV2ShowSourceBadges": false,
"dankLauncherV2BorderEnabled": true,
"dankLauncherV2BorderThickness": 2,
"dankLauncherV2BorderColor": "primary",
"dankLauncherV2ShowFooter": true,
"dankLauncherV2UnloadOnClose": false,
"dankLauncherV2IncludeFilesInAll": false,
"dankLauncherV2IncludeFoldersInAll": false,
"launcherUseOverlayLayer": false,
"launcherStyle": "full",
"spotlightBarShowModeChips": true,
"keybindsFloatingWindow": false,
"useAutoLocation": false,
"weatherEnabled": true,
"dashTabs": [
{
"id": "overview",
"enabled": true
},
{
"id": "media",
"enabled": true
},
{
"id": "wallpaper",
"enabled": true
},
{
"id": "weather",
"enabled": true
},
{
"id": "settings",
"enabled": true
}
],
"networkPreference": "auto",
"iconThemeDark": "Adwaita",
"iconThemeLight": "System Default",
"iconThemePerMode": false,
"lastAppliedIconTheme": "Adwaita",
"cursorSettings": {
"theme": "System Default",
"size": 24,
"niri": {
"hideWhenTyping": false,
"hideAfterInactiveMs": 0
},
"hyprland": {
"hideOnKeyPress": false,
"hideOnTouch": false,
"inactiveTimeout": 0
},
"dwl": {
"cursorHideTimeout": 0
},
"mango": {
"cursorHideTimeout": 0
}
},
"launcherLogoMode": "apps",
"launcherLogoCustomPath": "",
"launcherLogoColorOverride": "",
"launcherLogoColorInvertOnMode": false,
"launcherLogoBrightness": 0.5,
"launcherLogoContrast": 1,
"launcherLogoSizeOffset": 0,
"fontFamily": "Inter Variable",
"monoFontFamily": "JetBrains Mono",
"fontWeight": 500,
"fontScale": 1.2,
"textRenderType": 1,
"textRenderQuality": 3,
"notepadUseMonospace": true,
"notepadFontFamily": "",
"notepadFontSize": 14,
"notificationSummaryFontSize": 0,
"notificationBodyFontSize": 0,
"notepadShowLineNumbers": false,
"notepadAutoSave": false,
"notepadSlideoutSide": "right",
"notepadDefaultMode": "slideout",
"notepadTransparencyOverride": -1,
"notepadLastCustomTransparency": 0.7,
"notepadUseCompositorGap": false,
"notepadEdgeGap": 0,
"soundsEnabled": true,
"useSystemSoundTheme": false,
"soundLogin": false,
"soundNewNotification": true,
"soundVolumeChanged": true,
"soundPluggedIn": true,
"muteSoundsWhenMediaPlaying": true,
"acMonitorTimeout": 0,
"acLockTimeout": 0,
"acSuspendTimeout": 0,
"acSuspendBehavior": 0,
"acProfileName": "",
"acPostLockMonitorTimeout": 0,
"batteryMonitorTimeout": 0,
"batteryLockTimeout": 0,
"batterySuspendTimeout": 0,
"batterySuspendBehavior": 0,
"batteryProfileName": "",
"batteryPostLockMonitorTimeout": 0,
"batteryChargeLimit": 100,
"batteryNotifyChargeLimit": false,
"batteryCriticalThreshold": 10,
"batteryNotifyCritical": true,
"batteryLowThreshold": 20,
"batteryNotifyLow": false,
"batteryChargeLimitNotificationType": 0,
"batteryLowNotificationType": 0,
"batteryCriticalNotificationType": 1,
"batteryAutoPowerSaver": false,
"lockBeforeSuspend": false,
"loginctlLockIntegration": true,
"fadeToLockEnabled": true,
"fadeToLockGracePeriod": 5,
"fadeToDpmsEnabled": true,
"fadeToDpmsGracePeriod": 5,
"launchPrefix": "",
"gtkThemingEnabled": true,
"qtThemingEnabled": true,
"syncModeWithPortal": true,
"terminalsAlwaysDark": true,
"muxType": "tmux",
"muxUseCustomCommand": false,
"muxCustomCommand": "",
"muxSessionFilter": "",
"runDmsMatugenTemplates": true,
"matugenTemplateGtk": true,
"matugenTemplateNiri": true,
"matugenTemplateHyprland": true,
"matugenTemplateMangowc": true,
"matugenTemplateQt5ct": true,
"matugenTemplateQt6ct": true,
"matugenTemplateFirefox": true,
"matugenTemplatePywalfox": true,
"matugenTemplateZenBrowser": true,
"matugenTemplateVesktop": true,
"matugenTemplateVencord": true,
"matugenTemplateEquibop": true,
"matugenTemplateGhostty": true,
"matugenTemplateKitty": true,
"matugenTemplateFoot": true,
"matugenTemplateAlacritty": true,
"matugenTemplateNeovim": false,
"matugenTemplateWezterm": true,
"matugenTemplateDgop": true,
"matugenTemplateKcolorscheme": true,
"matugenTemplateVscode": true,
"matugenTemplateEmacs": true,
"matugenTemplateZed": true,
"matugenTemplateNeovimSettings": {
"dark": {
"baseTheme": "github_dark",
"harmony": 0.5
},
"light": {
"baseTheme": "github_light",
"harmony": 0.5
}
},
"matugenTemplateNeovimSetBackground": true,
"showDock": false,
"dockAutoHide": true,
"dockSmartAutoHide": true,
"dockUseOverlayLayer": false,
"dockGroupByApp": false,
"dockRestoreSpecialWorkspaceOnClick": false,
"dockOpenOnOverview": true,
"dockPosition": 1,
"dockSpacing": 8,
"dockBottomGap": 14,
"dockMargin": 16,
"dockIconSize": 42,
"dockIndicatorStyle": "circle",
"dockBorderEnabled": true,
"dockBorderColor": "primary",
"dockBorderOpacity": 0.3,
"dockBorderThickness": 1,
"dockIsolateDisplays": false,
"dockLauncherEnabled": true,
"dockLauncherLogoMode": "apps",
"dockLauncherLogoCustomPath": "",
"dockLauncherLogoColorOverride": "",
"dockLauncherLogoSizeOffset": 0,
"dockLauncherLogoBrightness": 0.5,
"dockLauncherLogoContrast": 1,
"dockMaxVisibleApps": 0,
"dockMaxVisibleRunningApps": 0,
"dockShowOverflowBadge": true,
"dockShowTrash": false,
"dockTrashFileManager": "default",
"dockTrashCustomCommand": "",
"notificationOverlayEnabled": false,
"notificationPopupShadowEnabled": true,
"notificationPopupPrivacyMode": false,
"notificationForegroundLayers": true,
"modalDarkenBackground": true,
"lockScreenShowPowerActions": true,
"lockScreenShowSystemIcons": true,
"lockScreenShowTime": true,
"lockScreenShowDate": true,
"lockScreenShowProfileImage": true,
"lockScreenShowPasswordField": true,
"lockScreenShowMediaPlayer": true,
"lockScreenPowerOffMonitorsOnLock": true,
"lockAtStartup": false,
"enableFprint": false,
"maxFprintTries": 15,
"enableU2f": false,
"u2fMode": "or",
"lockPamPath": "",
"lockPamInlineFprint": false,
"lockPamInlineU2f": false,
"lockPamExternallyManaged": false,
"lockU2fPamPath": "",
"lockScreenInactiveColor": "#000000",
"lockScreenNotificationMode": 0,
"lockScreenVideoEnabled": false,
"lockScreenVideoPath": "",
"lockScreenVideoCycling": false,
"lockScreenWallpaperPath": "__WALLPAPER__",
"lockScreenWallpaperFillMode": "Fill",
"lockScreenFontFamily": "",
"hideBrightnessSlider": false,
"notificationTimeoutLow": 5000,
"notificationTimeoutNormal": 5000,
"notificationTimeoutCritical": 0,
"notificationCompactMode": false,
"notificationShowTimeoutBar": false,
"notificationDedupeEnabled": true,
"notificationPopupPosition": 0,
"notificationAnimationSpeed": 1,
"notificationCustomAnimationDuration": 400,
"notificationHistoryEnabled": true,
"notificationHistoryMaxCount": 50,
"notificationHistoryMaxAgeDays": 7,
"notificationHistorySaveLow": true,
"notificationHistorySaveNormal": true,
"notificationHistorySaveCritical": true,
"notificationRules": [],
"notificationFocusedMonitor": false,
"osdAlwaysShowValue": false,
"osdPosition": 5,
"osdVolumeEnabled": true,
"osdMediaVolumeEnabled": true,
"osdMediaPlaybackEnabled": false,
"osdBrightnessEnabled": true,
"osdIdleInhibitorEnabled": true,
"osdMicMuteEnabled": true,
"osdCapsLockEnabled": true,
"osdPowerProfileEnabled": false,
"osdAudioOutputEnabled": true,
"powerActionConfirm": true,
"powerActionHoldDuration": 0.5,
"powerMenuActions": [
"reboot",
"logout",
"poweroff",
"lock",
"suspend",
"restart"
],
"powerMenuDefaultAction": "logout",
"powerMenuGridLayout": false,
"customPowerActionLock": "",
"customPowerActionLogout": "",
"customPowerActionSuspend": "",
"customPowerActionHibernate": "",
"customPowerActionReboot": "",
"customPowerActionPowerOff": "",
"updaterHideWidget": false,
"updaterCheckOnStart": true,
"updaterUseCustomCommand": false,
"updaterCustomCommand": "",
"updaterTerminalAdditionalParams": "",
"updaterIntervalSeconds": 1800,
"updaterIncludeFlatpak": true,
"updaterAllowAUR": true,
"updaterIgnoredPackages": [],
"displayNameMode": "system",
"screenPreferences": {
"wallpaper": []
},
"showOnLastDisplay": {},
"displayProfileAutoSelect": false,
"displayShowDisconnected": false,
"displaySnapToEdge": true,
"connectedFrameBarStyleBackups": {},
"barConfigs": [
{
"id": "default",
"name": "Morandi Top Bar",
"enabled": true,
"position": 0,
"screenPreferences": [
"all"
],
"showOnLastDisplay": true,
"leftWidgets": [
"launcherButton",
"workspaceSwitcher",
"focusedWindow"
],
"centerWidgets": [
"clock"
],
"rightWidgets": [
{
"id": "cpuUsage",
"enabled": true,
"minimumWidth": true
},
{
"id": "music",
"enabled": true,
"mediaSize": 2
},
"clipboard",
{
"id": "controlCenterButton",
"enabled": true,
"showNetworkIcon": true,
"showBluetoothIcon": true,
"showAudioIcon": true,
"showAudioPercent": false,
"showVpnIcon": false,
"showBrightnessIcon": false,
"showBrightnessPercent": false,
"showMicIcon": false,
"showMicPercent": false,
"showBatteryIcon": false,
"showDoNotDisturbIcon": false
},
"notificationButton",
{
"id": "powerMenuButton",
"enabled": true
}
],
"spacing": 8,
"innerPadding": 6,
"bottomGap": 0,
"transparency": 0.88,
"widgetTransparency": 0.88,
"squareCorners": false,
"noBackground": false,
"maximizeWidgetIcons": true,
"maximizeWidgetText": false,
"removeWidgetPadding": false,
"widgetPadding": 12,
"gothCornersEnabled": false,
"gothCornerRadiusOverride": false,
"gothCornerRadiusValue": 12,
"borderEnabled": false,
"borderColor": "outline",
"borderOpacity": 0.2,
"borderThickness": 1,
"widgetOutlineEnabled": false,
"widgetOutlineColor": "primary",
"widgetOutlineOpacity": 0.5,
"widgetOutlineThickness": 1,
"fontScale": 1.2,
"iconScale": 1.22,
"autoHide": false,
"autoHideStrict": false,
"autoHideDelay": 250,
"showOnWindowsOpen": false,
"openOnOverview": true,
"visible": true,
"popupGapsAuto": true,
"popupGapsManual": 8,
"maximizeDetection": true,
"useOverlayLayer": false,
"scrollEnabled": true,
"scrollXBehavior": "column",
"scrollYBehavior": "workspace",
"shadowIntensity": 8,
"shadowOpacity": 34,
"shadowColorMode": "default",
"shadowCustomColor": "#000000",
"clickThrough": false,
"hoverPopouts": false,
"hoverPopoutDelay": 150
}
],
"desktopClockEnabled": false,
"desktopClockStyle": "analog",
"desktopClockTransparency": 0.8,
"desktopClockColorMode": "primary",
"desktopClockCustomColor": {
"r": 1,
"g": 1,
"b": 1,
"a": 1,
"hsvHue": -1,
"hsvSaturation": 0,
"hsvValue": 1,
"hslHue": -1,
"hslSaturation": 0,
"hslLightness": 1,
"valid": true
},
"desktopClockShowDate": true,
"desktopClockShowAnalogNumbers": false,
"desktopClockShowAnalogSeconds": true,
"desktopClockX": -1,
"desktopClockY": -1,
"desktopClockWidth": 280,
"desktopClockHeight": 180,
"desktopClockDisplayPreferences": [
"all"
],
"systemMonitorEnabled": false,
"systemMonitorShowHeader": true,
"systemMonitorTransparency": 0.8,
"systemMonitorColorMode": "primary",
"systemMonitorCustomColor": {
"r": 1,
"g": 1,
"b": 1,
"a": 1,
"hsvHue": -1,
"hsvSaturation": 0,
"hsvValue": 1,
"hslHue": -1,
"hslSaturation": 0,
"hslLightness": 1,
"valid": true
},
"systemMonitorShowCpu": true,
"systemMonitorShowCpuGraph": true,
"systemMonitorShowCpuTemp": true,
"systemMonitorShowGpuTemp": false,
"systemMonitorShowMemory": true,
"systemMonitorShowMemoryGraph": true,
"systemMonitorShowNetwork": true,
"systemMonitorShowNetworkGraph": true,
"systemMonitorShowDisk": true,
"systemMonitorShowTopProcesses": false,
"systemMonitorTopProcessCount": 3,
"systemMonitorTopProcessSortBy": "cpu",
"systemMonitorGraphInterval": 60,
"systemMonitorLayoutMode": "auto",
"systemMonitorX": -1,
"systemMonitorY": -1,
"systemMonitorWidth": 320,
"systemMonitorHeight": 480,
"systemMonitorDisplayPreferences": [
"all"
],
"systemMonitorVariants": [],
"desktopWidgetPositions": {},
"desktopWidgetGridSettings": {},
"desktopWidgetInstances": [],
"desktopWidgetGroups": [],
"builtInPluginSettings": {},
"clipboardClickToPaste": false,
"clipboardEnterToPaste": false,
"clipboardRememberTypeFilter": false,
"clipboardTypeFilter": "all",
"clipboardVisibleEntryActions": [
"pin",
"edit",
"delete"
],
"launcherPluginVisibility": {},
"launcherPluginOrder": [],
"frameEnabled": false,
"frameThickness": 16,
"frameRounding": 23,
"frameColor": "",
"frameOpacity": 1,
"frameScreenPreferences": [
"all"
],
"frameBarSize": 40,
"frameShowOnOverview": false,
"frameBlurEnabled": true,
"frameCloseGaps": true,
"frameLauncherEmergeSide": "bottom",
"frameLauncherArcExtender": false,
"frameLauncherEdgeHover": false,
"frameMode": "connected",
"barInsetPaddingShared": -1,
"barInsetPaddingSyncAll": false,
"frameBarInsetPadding": -1,
"configVersion": 12
}
-29
View File
@@ -1,29 +0,0 @@
[main]
font=Noto Sans CJK SC:size=13
terminal=alacritty
prompt="搜索 "
icon-theme=Yaru
icons-enabled=yes
width=46
lines=10
horizontal-pad=20
vertical-pad=14
inner-pad=8
image-size-ratio=0.45
layer=overlay
[colors]
background=181a1de8
text=f0eee8ff
match=d4c5a5ff
selection=3b3e44ff
selection-text=ffffffff
selection-match=e7d8b8ff
border=ffffff20
[border]
width=1
radius=10
[dmenu]
exit-immediately-if-empty=yes
-16
View File
@@ -1,16 +0,0 @@
font=Noto Sans CJK SC 12
background-color=#181a1de8
text-color=#f0eee8
border-color=#ffffff20
progress-color=over #d4c5a5
border-size=1
border-radius=8
padding=14
margin=12
width=360
height=120
max-visible=5
default-timeout=5000
icons=1
layer=overlay
anchor=top-right
+194
View File
@@ -0,0 +1,194 @@
environment {
"XDG_CURRENT_DESKTOP" "niri"
"XDG_SESSION_DESKTOP" "niri"
"QT_QPA_PLATFORM" "wayland;xcb"
"NIXOS_OZONE_WL" "1"
"_JAVA_AWT_WM_NONREPARENTING" "1"
"PATH" "__HOME__/.local/bin:__HOME__/.local/state/niri-beyond-glass/nix-profile/bin:/usr/local/bin:/usr/bin:/bin"
}
input {
keyboard {
numlock
}
touchpad {
tap
natural-scroll
}
mouse {
accel-profile "flat"
}
}
spawn-at-startup "xwayland-satellite"
spawn-at-startup "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1"
spawn-sh-at-startup "systemctl --user start dms.service"
hotkey-overlay {
skip-at-startup
}
prefer-no-csd
screenshot-path "~/Pictures/Screenshots/niri-%Y-%m-%d-%H-%M-%S.png"
animations {
slowdown 0.85
}
layout {
gaps 8
center-focused-column "never"
background-color "transparent"
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
default-column-width {
proportion 0.5
}
focus-ring {
width 2
active-color "#afac9c"
inactive-color "#43423c"
urgent-color "#ca8685"
}
border {
off
width 2
active-color "#afac9c"
inactive-color "#43423c"
urgent-color "#ca8685"
}
shadow {
on
softness 30
spread -5
offset x=0 y=8
color "#00000070"
}
tab-indicator {
active-color "#afac9c"
inactive-color "#43423c"
urgent-color "#ca8685"
}
insert-hint {
color "#afac9c80"
}
}
window-rule {
match app-id=".*"
exclude app-id=r#"^org\.kde\.krita$"#
opacity 0.80
geometry-corner-radius 12
clip-to-geometry true
tiled-state true
draw-border-with-background false
background-effect {
blur true
xray true
noise 0.025
saturation 0.95
}
}
window-rule {
match app-id=r#"^org\.kde\.krita$"#
opacity 1.0
background-effect {
blur false
}
}
window-rule {
match app-id=r#"(?i)^alacritty$"#
opacity 0.88
geometry-corner-radius 12
clip-to-geometry true
default-column-width {
proportion 0.5
}
background-effect {
blur true
xray true
noise 0.025
saturation 0.95
}
}
window-rule {
match app-id=r#"(?i)^(firefox|org\.mozilla\.firefox|google-chrome|chromium|brave-browser|zen-browser)$"#
opacity 1.0
default-column-width {
proportion 0.62
}
}
window-rule {
match app-id=r#"(?i)^(mpv|vlc|io\.github\.celluloid_player\.Celluloid|org\.gnome\.Totem)$"#
opacity 1.0
}
window-rule {
match app-id=r#"^org\.gnome\.(Calculator|Settings|Loupe)$"#
open-floating true
default-column-width {
proportion 0.36
}
}
window-rule {
match app-id=r#"^steam$"#
opacity 1.0
default-column-width {
proportion 0.70
}
}
binds {
Mod+Return hotkey-overlay-title="打开终端" {
spawn "alacritty"
}
Mod+D hotkey-overlay-title="应用启动器" {
spawn "dms" "ipc" "call" "spotlight" "toggle"
}
Mod+Ctrl+Return hotkey-overlay-title="应用启动器" {
spawn "dms" "ipc" "call" "spotlight" "toggle"
}
Mod+B hotkey-overlay-title="打开浏览器" {
spawn "niri-beyond-browser"
}
Mod+E hotkey-overlay-title="文件管理器" {
spawn "nautilus"
}
Mod+A hotkey-overlay-title="控制中心" {
spawn "dms" "ipc" "call" "control-center" "toggle"
}
Mod+Shift+Q hotkey-overlay-title="电源菜单" {
spawn "dms" "ipc" "call" "powermenu" "toggle"
}
Mod+Shift+B hotkey-overlay-title="刷新桌面壳" {
spawn "niri-beyond-refresh"
}
Mod+Shift+Escape hotkey-overlay-title="显示快捷键说明" {
show-hotkey-overlay
}
}
+9 -220
View File
@@ -1,221 +1,10 @@
// Niri Beyond Glass // Beyond Glass Niri session.
// Portable profile for Ubuntu 24.04 and Niri 26.04. // DMS owns files under dms/. Keep hand-written changes in beyond-glass.kdl.
input { include "dms/cursor.kdl"
keyboard { include "dms/colors.kdl"
numlock include "dms/layout.kdl"
} include "dms/binds.kdl"
include "dms/windowrules.kdl"
touchpad { include "dms/alttab.kdl"
tap include "beyond-glass.kdl"
natural-scroll
dwt
}
mouse {
accel-profile "flat"
}
}
environment {
"XDG_CURRENT_DESKTOP" "niri"
"XDG_SESSION_DESKTOP" "niri"
"QT_QPA_PLATFORM" "wayland;xcb"
"NIXOS_OZONE_WL" "1"
"_JAVA_AWT_WM_NONREPARENTING" "1"
}
spawn-at-startup "xwayland-satellite"
spawn-at-startup "sh" "-lc" "$HOME/.local/bin/niri-beyond-wallpaper"
spawn-at-startup "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1"
spawn-at-startup "swayidle" "-w" "timeout" "600" "swaylock -f" "timeout" "660" "niri msg action power-off-monitors" "resume" "niri msg action power-on-monitors" "before-sleep" "swaylock -f"
hotkey-overlay {
skip-at-startup
}
prefer-no-csd
screenshot-path "~/Pictures/Screenshots/niri-%Y-%m-%d-%H-%M-%S.png"
cursor {
xcursor-theme "Yaru"
xcursor-size 24
}
layer-rule {
match namespace="swaybg"
place-within-backdrop true
}
layer-rule {
match namespace="waybar"
geometry-corner-radius 10
background-effect {
blur true
xray true
noise 0.018
saturation 0.94
}
}
animations {
slowdown 0.85
}
layout {
gaps 8
center-focused-column "never"
background-color "#15171a"
preset-column-widths {
proportion 0.33333
proportion 0.5
proportion 0.66667
}
default-column-width {
proportion 0.5
}
focus-ring {
width 2
active-color "#d4c5a5"
inactive-color "#4d5056"
urgent-color "#dc7a78"
}
border {
off
}
shadow {
on
softness 30
spread -5
offset x=0 y=8
color "#00000070"
}
tab-indicator {
active-color "#d4c5a5"
inactive-color "#4d5056"
urgent-color "#dc7a78"
}
insert-hint {
color "#d4c5a580"
}
}
window-rule {
match app-id=".*"
geometry-corner-radius 12
clip-to-geometry true
tiled-state true
draw-border-with-background false
}
window-rule {
match app-id=r#"(?i)^alacritty$"#
opacity 0.88
default-column-width {
proportion 0.5
}
background-effect {
blur true
xray true
noise 0.025
saturation 0.95
}
}
window-rule {
match app-id=r#"(?i)^(firefox|org\.mozilla\.firefox|google-chrome|chromium|brave-browser|zen-browser)$"#
opacity 1.0
default-column-width {
proportion 0.62
}
}
window-rule {
match app-id=r#"(?i)^(mpv|vlc|io\.github\.celluloid_player\.Celluloid|org\.gnome\.Totem|steam)$"#
opacity 1.0
default-column-width {
proportion 0.70
}
}
window-rule {
match app-id=r#"^org\.gnome\.(Calculator|Settings|Loupe)$"#
open-floating true
default-column-width {
proportion 0.36
}
}
binds {
Mod+Return hotkey-overlay-title="打开终端" { spawn "alacritty"; }
Mod+D hotkey-overlay-title="应用启动器" { spawn "fuzzel"; }
Mod+B hotkey-overlay-title="打开默认浏览器" { spawn "sh" "-lc" "xdg-open https://www.google.com"; }
Mod+E hotkey-overlay-title="文件管理器" { spawn "nautilus"; }
Mod+L hotkey-overlay-title="锁定屏幕" { spawn "swaylock" "-f"; }
Mod+Shift+Slash hotkey-overlay-title="显示快捷键说明" { show-hotkey-overlay; }
Mod+Q hotkey-overlay-title="关闭窗口" { close-window; }
Mod+O repeat=false hotkey-overlay-title="总览" { toggle-overview; }
Mod+F hotkey-overlay-title="最大化当前列" { maximize-column; }
Mod+Shift+F hotkey-overlay-title="窗口全屏" { fullscreen-window; }
Mod+V hotkey-overlay-title="切换浮动窗口" { toggle-window-floating; }
Mod+W hotkey-overlay-title="切换标签页模式" { toggle-column-tabbed-display; }
Mod+Left hotkey-overlay-title="焦点向左" { focus-column-left; }
Mod+Down hotkey-overlay-title="焦点向下" { focus-window-down; }
Mod+Up hotkey-overlay-title="焦点向上" { focus-window-up; }
Mod+Right hotkey-overlay-title="焦点向右" { focus-column-right; }
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+Semicolon { focus-column-right; }
Mod+Shift+Left hotkey-overlay-title="窗口向左移动" { move-column-left; }
Mod+Shift+Down hotkey-overlay-title="窗口向下移动" { move-window-down; }
Mod+Shift+Up hotkey-overlay-title="窗口向上移动" { move-window-up; }
Mod+Shift+Right hotkey-overlay-title="窗口向右移动" { move-column-right; }
Mod+Page_Down hotkey-overlay-title="下一个工作区" { focus-workspace-down; }
Mod+Page_Up hotkey-overlay-title="上一个工作区" { focus-workspace-up; }
Mod+Shift+Page_Down hotkey-overlay-title="窗口移到下一个工作区" { move-column-to-workspace-down; }
Mod+Shift+Page_Up hotkey-overlay-title="窗口移到上一个工作区" { move-column-to-workspace-up; }
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+Shift+1 { move-column-to-workspace 1; }
Mod+Shift+2 { move-column-to-workspace 2; }
Mod+Shift+3 { move-column-to-workspace 3; }
Mod+Shift+4 { move-column-to-workspace 4; }
Mod+Shift+5 { move-column-to-workspace 5; }
Mod+R hotkey-overlay-title="切换列宽" { switch-preset-column-width; }
Mod+Shift+R hotkey-overlay-title="切换窗口高度" { switch-preset-window-height; }
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
Print hotkey-overlay-title="截图" { screenshot; }
Ctrl+Print hotkey-overlay-title="截取屏幕" { screenshot-screen; }
Alt+Print hotkey-overlay-title="截取窗口" { screenshot-window; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05-"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "set" "+5%"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "set" "5%-"; }
Mod+Shift+E hotkey-overlay-title="退出 Niri" { quit; }
Mod+Shift+P hotkey-overlay-title="关闭显示器" { power-off-monitors; }
}
+10
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
}
}
+229
View File
@@ -0,0 +1,229 @@
binds {
// === System & Overview ===
Mod+O hotkey-overlay-title="切换总览" repeat=false { toggle-overview; }
Mod+Tab hotkey-overlay-title="切换总览" repeat=false { toggle-overview; }
Mod+Shift+Slash hotkey-overlay-title="显示快捷键说明" { show-hotkey-overlay; }
// === Application Launchers ===
Mod+T hotkey-overlay-title="打开终端" { spawn "alacritty"; }
Mod+Space hotkey-overlay-title="应用启动器" {
spawn "dms" "ipc" "call" "spotlight" "toggle";
}
Alt+Space hotkey-overlay-title="快速搜索栏" {
spawn "dms" "ipc" "call" "spotlight-bar" "toggle";
}
Mod+V hotkey-overlay-title="剪贴板管理器" {
spawn "dms" "ipc" "call" "clipboard" "toggle";
}
Mod+M hotkey-overlay-title="任务管理器" {
spawn "dms" "ipc" "call" "processlist" "focusOrToggle";
}
Super+X hotkey-overlay-title="电源菜单" { spawn "dms" "ipc" "call" "powermenu" "toggle"; }
Mod+Comma hotkey-overlay-title="设置" {
spawn "dms" "ipc" "call" "settings" "focusOrToggle";
}
Mod+Y hotkey-overlay-title="浏览壁纸" {
spawn "dms" "ipc" "call" "dash" "toggle" "wallpaper";
}
Mod+N hotkey-overlay-title="通知中心" { spawn "dms" "ipc" "call" "notifications" "toggle"; }
Mod+Shift+N hotkey-overlay-title="记事本" { spawn "dms" "ipc" "call" "notepad" "toggle"; }
// === Security ===
Mod+Alt+L hotkey-overlay-title="锁屏" {
spawn "dms" "ipc" "call" "lock" "lock";
}
Mod+Shift+E hotkey-overlay-title="退出 niri" { quit; }
Ctrl+Alt+Delete hotkey-overlay-title="任务管理器" {
spawn "dms" "ipc" "call" "processlist" "focusOrToggle";
}
// === Audio Controls ===
XF86AudioRaiseVolume hotkey-overlay-title="增大音量" allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "increment" "3";
}
XF86AudioLowerVolume hotkey-overlay-title="减小音量" allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "decrement" "3";
}
XF86AudioMute hotkey-overlay-title="静音/取消静音" allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "mute";
}
XF86AudioMicMute hotkey-overlay-title="麦克风静音" allow-when-locked=true {
spawn "dms" "ipc" "call" "audio" "micmute";
}
XF86AudioPause hotkey-overlay-title="播放/暂停" allow-when-locked=true {
spawn "dms" "ipc" "call" "mpris" "playPause";
}
XF86AudioPlay hotkey-overlay-title="播放/暂停" allow-when-locked=true {
spawn "dms" "ipc" "call" "mpris" "playPause";
}
XF86AudioPrev hotkey-overlay-title="上一首" allow-when-locked=true {
spawn "dms" "ipc" "call" "mpris" "previous";
}
XF86AudioNext hotkey-overlay-title="下一首" allow-when-locked=true {
spawn "dms" "ipc" "call" "mpris" "next";
}
Ctrl+XF86AudioRaiseVolume hotkey-overlay-title="播放器音量增大" allow-when-locked=true {
spawn "dms" "ipc" "call" "mpris" "increment" "3";
}
Ctrl+XF86AudioLowerVolume hotkey-overlay-title="播放器音量减小" allow-when-locked=true {
spawn "dms" "ipc" "call" "mpris" "decrement" "3";
}
// === Brightness Controls ===
XF86MonBrightnessUp hotkey-overlay-title="提高亮度" allow-when-locked=true {
spawn "dms" "ipc" "call" "brightness" "increment" "5" "";
}
XF86MonBrightnessDown hotkey-overlay-title="降低亮度" allow-when-locked=true {
spawn "dms" "ipc" "call" "brightness" "decrement" "5" "";
}
// === Window Management ===
Mod+Q hotkey-overlay-title="关闭窗口" repeat=false { close-window; }
Mod+F hotkey-overlay-title="最大化当前列" { maximize-column; }
Mod+Shift+F hotkey-overlay-title="全屏窗口" { fullscreen-window; }
Mod+Shift+T hotkey-overlay-title="切换浮动窗口" { toggle-window-floating; }
Mod+Shift+V hotkey-overlay-title="在浮动和普通窗口间切换焦点" { switch-focus-between-floating-and-tiling; }
Mod+W hotkey-overlay-title="切换标签页显示" { toggle-column-tabbed-display; }
Mod+Shift+W hotkey-overlay-title="创建窗口规则" { spawn "dms" "ipc" "call" "window-rules" "toggle"; }
// === Focus Navigation ===
Mod+Left hotkey-overlay-title="焦点移到左侧列" { focus-column-left; }
Mod+Down hotkey-overlay-title="焦点移到下方窗口" { focus-window-down; }
Mod+Up hotkey-overlay-title="焦点移到上方窗口" { focus-window-up; }
Mod+Right hotkey-overlay-title="焦点移到右侧列" { focus-column-right; }
Mod+H hotkey-overlay-title="焦点移到左侧列" { focus-column-left; }
Mod+J hotkey-overlay-title="焦点移到下方窗口" { focus-window-down; }
Mod+K hotkey-overlay-title="焦点移到上方窗口" { focus-window-up; }
Mod+L hotkey-overlay-title="焦点移到右侧列" { focus-column-right; }
// === Window Movement ===
Mod+Shift+Left hotkey-overlay-title="当前列左移" { move-column-left; }
Mod+Shift+Down hotkey-overlay-title="当前窗口下移" { move-window-down; }
Mod+Shift+Up hotkey-overlay-title="当前窗口上移" { move-window-up; }
Mod+Shift+Right hotkey-overlay-title="当前列右移" { move-column-right; }
Mod+Shift+H hotkey-overlay-title="当前列左移" { move-column-left; }
Mod+Shift+J hotkey-overlay-title="当前窗口下移" { move-window-down; }
Mod+Shift+K hotkey-overlay-title="当前窗口上移" { move-window-up; }
Mod+Shift+L hotkey-overlay-title="当前列右移" { move-column-right; }
// === Column Navigation ===
Mod+Home hotkey-overlay-title="焦点移到第一列" { focus-column-first; }
Mod+End hotkey-overlay-title="焦点移到最后一列" { focus-column-last; }
Mod+Ctrl+Home hotkey-overlay-title="当前列移到最前" { move-column-to-first; }
Mod+Ctrl+End hotkey-overlay-title="当前列移到最后" { move-column-to-last; }
// === Monitor Navigation ===
Mod+Ctrl+Left hotkey-overlay-title="焦点移到左侧显示器" { focus-monitor-left; }
//Mod+Ctrl+Down { focus-monitor-down; }
//Mod+Ctrl+Up { focus-monitor-up; }
Mod+Ctrl+Right hotkey-overlay-title="焦点移到右侧显示器" { focus-monitor-right; }
Mod+Ctrl+H hotkey-overlay-title="焦点移到左侧显示器" { focus-monitor-left; }
Mod+Ctrl+J hotkey-overlay-title="焦点移到下方显示器" { focus-monitor-down; }
Mod+Ctrl+K hotkey-overlay-title="焦点移到上方显示器" { focus-monitor-up; }
Mod+Ctrl+L hotkey-overlay-title="焦点移到右侧显示器" { focus-monitor-right; }
// === Move to Monitor ===
Mod+Shift+Ctrl+Left hotkey-overlay-title="当前列移到左侧显示器" { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Down hotkey-overlay-title="当前列移到下方显示器" { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Up hotkey-overlay-title="当前列移到上方显示器" { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Right hotkey-overlay-title="当前列移到右侧显示器" { move-column-to-monitor-right; }
Mod+Shift+Ctrl+H hotkey-overlay-title="当前列移到左侧显示器" { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J hotkey-overlay-title="当前列移到下方显示器" { move-column-to-monitor-down; }
Mod+Shift+Ctrl+K hotkey-overlay-title="当前列移到上方显示器" { move-column-to-monitor-up; }
Mod+Shift+Ctrl+L hotkey-overlay-title="当前列移到右侧显示器" { move-column-to-monitor-right; }
// === Workspace Navigation ===
Mod+Page_Down hotkey-overlay-title="切到下一个工作区" { focus-workspace-down; }
Mod+Page_Up hotkey-overlay-title="切到上一个工作区" { focus-workspace-up; }
Mod+U hotkey-overlay-title="切到下一个工作区" { focus-workspace-down; }
Mod+I hotkey-overlay-title="切到上一个工作区" { focus-workspace-up; }
Mod+Ctrl+Down hotkey-overlay-title="当前列移到下一个工作区" { move-column-to-workspace-down; }
Mod+Ctrl+Up hotkey-overlay-title="当前列移到上一个工作区" { move-column-to-workspace-up; }
Mod+Ctrl+U hotkey-overlay-title="当前列移到下一个工作区" { move-column-to-workspace-down; }
Mod+Ctrl+I hotkey-overlay-title="当前列移到上一个工作区" { move-column-to-workspace-up; }
// === Workspace Management ===
Ctrl+Shift+R hotkey-overlay-title="重命名工作区" {
spawn "dms" "ipc" "call" "workspace-rename" "open";
}
// === Move Workspaces ===
Mod+Shift+Page_Down hotkey-overlay-title="工作区下移" { move-workspace-down; }
Mod+Shift+Page_Up hotkey-overlay-title="工作区上移" { move-workspace-up; }
Mod+Shift+U hotkey-overlay-title="工作区下移" { move-workspace-down; }
Mod+Shift+I hotkey-overlay-title="工作区上移" { move-workspace-up; }
// === Mouse Wheel Navigation ===
Mod+WheelScrollDown hotkey-overlay-title="切到下一个工作区" cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp hotkey-overlay-title="切到上一个工作区" cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown hotkey-overlay-title="当前列移到下一个工作区" cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp hotkey-overlay-title="当前列移到上一个工作区" cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight hotkey-overlay-title="焦点移到右侧列" { focus-column-right; }
Mod+WheelScrollLeft hotkey-overlay-title="焦点移到左侧列" { focus-column-left; }
Mod+Ctrl+WheelScrollRight hotkey-overlay-title="当前列右移" { move-column-right; }
Mod+Ctrl+WheelScrollLeft hotkey-overlay-title="当前列左移" { move-column-left; }
Mod+Shift+WheelScrollDown hotkey-overlay-title="焦点移到右侧列" { focus-column-right; }
Mod+Shift+WheelScrollUp hotkey-overlay-title="焦点移到左侧列" { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown hotkey-overlay-title="当前列右移" { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp hotkey-overlay-title="当前列左移" { move-column-left; }
// === Numbered Workspaces ===
Mod+1 hotkey-overlay-title="切到工作区 1" { focus-workspace 1; }
Mod+2 hotkey-overlay-title="切到工作区 2" { focus-workspace 2; }
Mod+3 hotkey-overlay-title="切到工作区 3" { focus-workspace 3; }
Mod+4 hotkey-overlay-title="切到工作区 4" { focus-workspace 4; }
Mod+5 hotkey-overlay-title="切到工作区 5" { focus-workspace 5; }
Mod+6 hotkey-overlay-title="切到工作区 6" { focus-workspace 6; }
Mod+7 hotkey-overlay-title="切到工作区 7" { focus-workspace 7; }
Mod+8 hotkey-overlay-title="切到工作区 8" { focus-workspace 8; }
Mod+9 hotkey-overlay-title="切到工作区 9" { focus-workspace 9; }
// === Move to Numbered Workspaces ===
Mod+Shift+1 hotkey-overlay-title="当前列移到工作区 1" { move-column-to-workspace 1; }
Mod+Shift+2 hotkey-overlay-title="当前列移到工作区 2" { move-column-to-workspace 2; }
Mod+Shift+3 hotkey-overlay-title="当前列移到工作区 3" { move-column-to-workspace 3; }
Mod+Shift+4 hotkey-overlay-title="当前列移到工作区 4" { move-column-to-workspace 4; }
Mod+Shift+5 hotkey-overlay-title="当前列移到工作区 5" { move-column-to-workspace 5; }
Mod+Shift+6 hotkey-overlay-title="当前列移到工作区 6" { move-column-to-workspace 6; }
Mod+Shift+7 hotkey-overlay-title="当前列移到工作区 7" { move-column-to-workspace 7; }
Mod+Shift+8 hotkey-overlay-title="当前列移到工作区 8" { move-column-to-workspace 8; }
Mod+Shift+9 hotkey-overlay-title="当前列移到工作区 9" { move-column-to-workspace 9; }
// === Column Management ===
Mod+BracketLeft hotkey-overlay-title="向左吸收/移出窗口" { consume-or-expel-window-left; }
Mod+BracketRight hotkey-overlay-title="向右吸收/移出窗口" { consume-or-expel-window-right; }
Mod+Period hotkey-overlay-title="把窗口移出当前列" { expel-window-from-column; }
// === Sizing & Layout ===
Mod+R hotkey-overlay-title="切换列宽" { switch-preset-column-width; }
Mod+Shift+R hotkey-overlay-title="切换窗口高度" { switch-preset-window-height; }
Mod+Ctrl+R hotkey-overlay-title="重置窗口高度" { reset-window-height; }
Mod+Ctrl+F hotkey-overlay-title="列扩展到可用宽度" { expand-column-to-available-width; }
Mod+C hotkey-overlay-title="居中当前列" { center-column; }
Mod+Ctrl+C hotkey-overlay-title="居中可见列" { center-visible-columns; }
// === Manual Sizing ===
Mod+Minus hotkey-overlay-title="减小列宽" { set-column-width "-10%"; }
Mod+Equal hotkey-overlay-title="增大列宽" { set-column-width "+10%"; }
Mod+Shift+Minus hotkey-overlay-title="降低窗口高度" { set-window-height "-10%"; }
Mod+Shift+Equal hotkey-overlay-title="增加窗口高度" { set-window-height "+10%"; }
// === Screenshots ===
XF86Launch1 hotkey-overlay-title="截图选择区域" { screenshot; }
Ctrl+XF86Launch1 hotkey-overlay-title="截取屏幕" { screenshot-screen; }
Alt+XF86Launch1 hotkey-overlay-title="截取窗口" { screenshot-window; }
Print hotkey-overlay-title="截图选择区域" { screenshot; }
Ctrl+Print hotkey-overlay-title="截取屏幕" { screenshot-screen; }
Alt+Print hotkey-overlay-title="截取窗口" { screenshot-window; }
// === Display Profiles ===
Mod+P hotkey-overlay-title="切换显示配置" {
spawn "dms" "ipc" "outputs" "cycleProfile";
}
// === System Controls ===
Mod+Escape hotkey-overlay-title="允许/禁止应用拦截快捷键" allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
Mod+Shift+P hotkey-overlay-title="关闭显示器" { power-off-monitors; }
}
+39
View File
@@ -0,0 +1,39 @@
// ! Auto-generated file. Do not edit directly.
// Remove `include "dms/colors.kdl"` from your config to override.
layout {
background-color "transparent"
focus-ring {
active-color "#afac9c"
inactive-color "#515457"
urgent-color "#ca8685"
}
border {
active-color "#afac9c"
inactive-color "#515457"
urgent-color "#ca8685"
}
shadow {
color "#00000070"
}
tab-indicator {
active-color "#afac9c"
inactive-color "#515457"
urgent-color "#ca8685"
}
insert-hint {
color "#afac9c80"
}
}
recent-windows {
highlight {
active-color "#43423c"
urgent-color "#ca8685"
}
}
View File
+23
View File
@@ -0,0 +1,23 @@
// ! DO NOT EDIT !
// ! AUTO-GENERATED BY DMS !
// ! CHANGES WILL BE OVERWRITTEN !
// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
layout {
gaps 8
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
}
+2
View File
@@ -0,0 +1,2 @@
// DMS Window Rules - Managed by DankMaterialShell
// Do not edit manually - changes may be overwritten
-21
View File
@@ -1,21 +0,0 @@
daemonize
show-failed-attempts
ignore-empty-password
font=Noto Sans CJK SC
font-size=24
indicator-radius=82
indicator-thickness=8
inside-color=181a1dcc
inside-clear-color=d4c5a5cc
inside-ver-color=5d83aacc
inside-wrong-color=dc7a78cc
ring-color=ffffff30
ring-clear-color=d4c5a5ff
ring-ver-color=7aa2c8ff
ring-wrong-color=dc7a78ff
key-hl-color=d4c5a5ff
text-color=f0eee8ff
text-clear-color=181a1dff
text-ver-color=f0eee8ff
text-wrong-color=f0eee8ff
separator-color=00000000
+17
View File
@@ -0,0 +1,17 @@
[Unit]
Description=Dank Material Shell (Beyond Glass)
PartOf=graphical-session.target
After=graphical-session.target
[Service]
Type=dbus
BusName=org.freedesktop.Notifications
Environment=PATH=%h/.local/bin:%h/.local/state/niri-beyond-glass/nix-profile/bin:/usr/local/bin:/usr/bin:/bin
ExecStart=%h/.local/state/niri-beyond-glass/nix-profile/bin/dms run --session
ExecReload=/usr/bin/pkill -USR1 -x dms
Restart=on-failure
RestartSec=1.23
TimeoutStopSec=10
[Install]
WantedBy=graphical-session.target
-56
View File
@@ -1,56 +0,0 @@
{
"layer": "top",
"position": "top",
"height": 36,
"spacing": 6,
"margin-top": 6,
"margin-left": 8,
"margin-right": 8,
"modules-left": ["custom/launcher"],
"modules-center": [],
"modules-right": ["tray", "network", "pulseaudio", "battery", "custom/lock", "custom/power", "clock"],
"custom/launcher": {
"format": " \uf141 ",
"tooltip": false,
"on-click": "fuzzel"
},
"tray": {
"icon-size": 17,
"spacing": 8
},
"network": {
"format-wifi": "\uf1eb {signalStrength}%",
"format-ethernet": "\uf1e6",
"format-disconnected": "\uf071",
"tooltip-format": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "\uf026",
"format-icons": ["\uf026", "\uf027", "\uf028"],
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"tooltip": false
},
"battery": {
"states": {"warning": 30, "critical": 15},
"format": "{icon} {capacity}%",
"format-charging": "\uf0e7 {capacity}%",
"format-icons": ["\uf244", "\uf243", "\uf242", "\uf241", "\uf240"],
"tooltip": false
},
"clock": {
"interval": 1,
"format": "{:%m月%d日 %H:%M}",
"tooltip-format": "<tt>{calendar}</tt>"
},
"custom/lock": {
"format": "\uf023",
"tooltip": false,
"on-click": "swaylock -f"
},
"custom/power": {
"format": "\uf011",
"tooltip": false,
"on-click": "wlogout"
}
}
-59
View File
@@ -1,59 +0,0 @@
@define-color panel rgba(24, 26, 29, 0.76);
@define-color text #f0eee8;
@define-color muted #a8abb2;
@define-color accent #d4c5a5;
@define-color red #dc7a78;
* {
border: none;
border-radius: 0;
min-height: 0;
font-family: "Noto Sans CJK SC", "Noto Sans", "FontAwesome";
font-size: 13px;
font-weight: 500;
}
window#waybar {
background: @panel;
color: @text;
border: 1px solid rgba(255, 255, 255, 0.10);
border-radius: 10px;
}
#custom-launcher,
#tray,
#network,
#pulseaudio,
#battery,
#clock,
#custom-lock,
#custom-power {
padding: 0 10px;
color: @text;
}
#custom-launcher {
color: @accent;
font-size: 16px;
}
#network.disconnected,
#battery.critical {
color: @red;
}
#custom-lock,
#custom-power {
padding: 0 12px;
}
#custom-power {
color: @red;
}
tooltip {
background: #202226;
color: @text;
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 6px;
}
+197 -26
View File
@@ -5,6 +5,8 @@ readonly PROJECT="niri-beyond-glass"
readonly NIRI_TAG="v26.04" readonly NIRI_TAG="v26.04"
readonly XWS_TAG="v0.8.2" readonly XWS_TAG="v0.8.2"
readonly RUST_TOOLCHAIN="1.85.1" readonly RUST_TOOLCHAIN="1.85.1"
readonly DMS_REV="069ddab041c738236a8910e4c39b65d9628d3018"
readonly NIXPKGS_REV="d407951447dcd00442e97087bf374aad70c04cea"
readonly ARCHIVE_URL="https://git.k1412.top/wuyang/niri-beyond-glass/archive/main.tar.gz" readonly ARCHIVE_URL="https://git.k1412.top/wuyang/niri-beyond-glass/archive/main.tar.gz"
wallpaper="" wallpaper=""
@@ -13,13 +15,14 @@ dry_run=0
rebuild=0 rebuild=0
source_dir="${NBG_SOURCE_DIR:-}" source_dir="${NBG_SOURCE_DIR:-}"
tmp_dir="" tmp_dir=""
selected_wallpaper=""
usage() { usage() {
cat <<'EOF' cat <<'EOF'
用法:install.sh [选项] 用法:install.sh [选项]
--wallpaper PATH 使用指定的静态壁纸 --wallpaper PATH 使用指定的静态壁纸
--config-only 只更新配置,不安装/编译软件 --config-only 只更新配置(要求 DMS 运行层已经安装)
--rebuild 强制重新编译 Niri 和 Xwayland Satellite --rebuild 强制重新编译 Niri 和 Xwayland Satellite
--dry-run 显示将执行的主要步骤,不修改系统 --dry-run 显示将执行的主要步骤,不修改系统
-h, --help 显示帮助 -h, --help 显示帮助
@@ -127,10 +130,58 @@ install_packages() {
libxcb1-dev libxcb-composite0-dev libxcb-randr0-dev \ libxcb1-dev libxcb-composite0-dev libxcb-randr0-dev \
libxcb-res0-dev libxcb-xfixes0-dev libxcb-cursor-dev \ libxcb-res0-dev libxcb-xfixes0-dev libxcb-cursor-dev \
xwayland xdg-desktop-portal-gnome xdg-desktop-portal-gtk \ xwayland xdg-desktop-portal-gnome xdg-desktop-portal-gtk \
alacritty fuzzel waybar swaybg swaylock swayidle mako-notifier \ alacritty \
nautilus policykit-1-gnome pipewire-pulse wireplumber \ nautilus policykit-1-gnome pipewire-pulse wireplumber \
brightnessctl playerctl grim slurp wl-clipboard wlogout \ brightnessctl playerctl grim slurp wl-clipboard libnotify-bin \
fonts-noto-core fonts-noto-cjk fonts-noto-color-emoji fonts-font-awesome accountsservice jq nix-bin nix-setup-systemd \
fonts-noto-core fonts-noto-cjk fonts-noto-color-emoji fonts-font-awesome \
fonts-inter fonts-jetbrains-mono
}
install_dms_runtime() {
local state_home="${XDG_STATE_HOME:-$HOME/.local/state}"
local profile="$state_home/$PROJECT/nix-profile"
local dms_flake="github:AvengeMedia/DankMaterialShell/$DMS_REV"
local nixpkgs="github:NixOS/nixpkgs/$NIXPKGS_REV"
if [[ -x "$profile/bin/dms" && -x "$profile/bin/quickshell" &&
-x "$profile/bin/matugen" && -x "$profile/bin/dgop" &&
-x "$profile/bin/dsearch" ]]; then
log "DMS 运行层已经安装,跳过"
return
fi
log "安装隔离的 DMS 1.5.3 与 Quickshell 0.3.0"
run sudo usermod -aG nix-users "$USER"
run sudo systemctl enable --now nix-daemon.socket
run mkdir -p "$state_home/$PROJECT"
if (( dry_run )); then
printf '+ sudo -u %q -g nix-users nix profile install --profile %q ...\n' \
"$USER" "$profile"
return
fi
local attempt
for attempt in 1 2 3 4 5; do
if sudo -u "$USER" -g nix-users env \
HOME="$HOME" USER="$USER" \
NIX_CONFIG="experimental-features = nix-command flakes" \
nix profile install --profile "$profile" \
"$dms_flake#dms-shell" \
"$nixpkgs#quickshell" \
"$nixpkgs#matugen" \
"$nixpkgs#dgop" \
"$nixpkgs#dsearch"; then
break
fi
(( attempt < 5 )) || die "DMS 运行层安装失败,请检查网络后重新运行脚本。"
log "下载中断,正在重试($attempt/5"
sleep 3
done
[[ -x "$profile/bin/dms" && -x "$profile/bin/quickshell" ]] ||
die "DMS 或 Quickshell 安装不完整。"
} }
install_rust() { install_rust() {
@@ -238,9 +289,12 @@ backup_and_install_config() {
local state_home="${XDG_STATE_HOME:-$HOME/.local/state}" local state_home="${XDG_STATE_HOME:-$HOME/.local/state}"
local stamp local stamp
stamp="$(date +%Y%m%d-%H%M%S)" stamp="$(date +%Y%m%d-%H%M%S)"
local backup="$state_home/$PROJECT/backups/$stamp/config" local backup_root="$state_home/$PROJECT/backups/$stamp"
local backup="$backup_root/config"
local original="$state_home/$PROJECT/original" local original="$state_home/$PROJECT/original"
local names=(niri waybar fuzzel mako swaylock niri-beyond-glass) local names=(niri waybar fuzzel mako swaylock niri-beyond-glass DankMaterialShell alacritty)
select_wallpaper "$config_home/niri-beyond-glass/wallpaper"
log "备份并安装用户配置" log "备份并安装用户配置"
run mkdir -p "$backup" run mkdir -p "$backup"
@@ -250,42 +304,127 @@ backup_and_install_config() {
run cp -a "$config_home/$name" "$backup/$name" run cp -a "$config_home/$name" "$backup/$name"
fi fi
done done
if [[ -d "$state_home/DankMaterialShell" ]]; then
run mkdir -p "$backup_root/state"
run cp -a "$state_home/DankMaterialShell" "$backup_root/state/DankMaterialShell"
fi
if [[ ! -e "$original/.captured" ]]; then run mkdir -p "$original/config" "$original/absent"
run mkdir -p "$original/config"
for name in "${names[@]}"; do for name in "${names[@]}"; do
if [[ ! -e "$original/config/$name" && ! -e "$original/absent/$name" ]]; then
if [[ -e "$config_home/$name" ]]; then if [[ -e "$config_home/$name" ]]; then
run cp -a "$config_home/$name" "$original/config/$name" run cp -a "$config_home/$name" "$original/config/$name"
else
run touch "$original/absent/$name"
fi
fi fi
done done
run touch "$original/.captured" run touch "$original/.captured"
if (( dry_run )); then
printf '+ install DMS, Niri and Alacritty style while preserving wallpaper %q\n' \
"$selected_wallpaper"
return
fi fi
run mkdir -p \ mkdir -p \
"$config_home/niri" \ "$config_home/niri" \
"$config_home/waybar" \ "$config_home/niri/dms" \
"$config_home/fuzzel" \
"$config_home/mako" \
"$config_home/swaylock" \
"$config_home/niri-beyond-glass" \ "$config_home/niri-beyond-glass" \
"$config_home/DankMaterialShell/themes" \
"$config_home/alacritty" \
"$config_home/systemd/user" \
"$state_home/DankMaterialShell" \
"$HOME/.local/bin" \ "$HOME/.local/bin" \
"$HOME/Pictures/Screenshots" "$HOME/Pictures/Screenshots"
run install -m644 "$source_dir/config/niri/config.kdl" "$config_home/niri/config.kdl" install -m644 "$source_dir/config/niri/config.kdl" "$config_home/niri/config.kdl"
run install -m644 "$source_dir/config/waybar/config.jsonc" "$config_home/waybar/config.jsonc" sed "s|__HOME__|$HOME|g" "$source_dir/config/niri/beyond-glass.kdl" \
run install -m644 "$source_dir/config/waybar/style.css" "$config_home/waybar/style.css" > "$config_home/niri/beyond-glass.kdl"
run install -m644 "$source_dir/config/fuzzel/fuzzel.ini" "$config_home/fuzzel/fuzzel.ini" install -m644 "$source_dir"/config/niri/dms/*.kdl "$config_home/niri/dms/"
run install -m644 "$source_dir/config/mako/config" "$config_home/mako/config"
run install -m644 "$source_dir/config/swaylock/config" "$config_home/swaylock/config"
run install -m755 "$source_dir/scripts/niri-beyond-wallpaper" "$HOME/.local/bin/niri-beyond-wallpaper"
select_wallpaper "$config_home/niri-beyond-glass/wallpaper" local theme_file="$config_home/DankMaterialShell/themes/beyond-glass.json"
install -m644 "$source_dir/config/dms/beyond-glass.json" "$theme_file"
local settings_tmp session_tmp
settings_tmp="$(mktemp)"
session_tmp="$(mktemp)"
jq --arg wallpaper "$selected_wallpaper" --arg theme "$theme_file" '
.customThemeFile = $theme
| .greeterWallpaperPath = $wallpaper
| .lockScreenWallpaperPath = $wallpaper
| .lockScreenVideoPath = ""
' "$source_dir/config/dms/settings.json" > "$settings_tmp"
jq --arg wallpaper "$selected_wallpaper" '
.wallpaperPath = $wallpaper
| .wallpaperPathLight = $wallpaper
| .wallpaperPathDark = $wallpaper
| .monitorWallpapers = {}
| .monitorWallpapersLight = {}
| .monitorWallpapersDark = {}
| .perMonitorWallpaper = false
' "$source_dir/config/dms/session.json" > "$session_tmp"
install -m644 "$settings_tmp" "$config_home/DankMaterialShell/settings.json"
install -m644 "$session_tmp" "$state_home/DankMaterialShell/session.json"
rm -f "$settings_tmp" "$session_tmp"
touch "$config_home/DankMaterialShell/.firstlaunch" \
"$config_home/DankMaterialShell/.changelog-1.5"
install -m644 "$source_dir/config/alacritty/alacritty.toml" \
"$config_home/alacritty/alacritty.toml"
install -m644 "$source_dir/config/systemd/dms.service" \
"$config_home/systemd/user/dms.service"
install -m755 "$source_dir/scripts/niri-beyond-browser" \
"$HOME/.local/bin/niri-beyond-browser"
install -m755 "$source_dir/scripts/niri-beyond-refresh" \
"$HOME/.local/bin/niri-beyond-refresh"
local profile="$state_home/$PROJECT/nix-profile"
local binary
for binary in dms quickshell qs matugen dgop dsearch; do
if [[ -x "$profile/bin/$binary" ]]; then
ln -sfn "$profile/bin/$binary" "$HOME/.local/bin/$binary"
fi
done
printf '%s\n' "$selected_wallpaper" > "$config_home/niri-beyond-glass/wallpaper"
} }
select_wallpaper() { select_wallpaper() {
local state_file="$1" local state_file="$1"
local selected="$wallpaper" local selected="$wallpaper"
if [[ -z "$selected" ]]; then
local existing=""
if [[ -r "$state_file" ]]; then
existing="$(head -n1 "$state_file")"
fi
if [[ -n "$existing" && -f "$existing" ]]; then
selected="$existing"
fi
fi
if [[ -z "$selected" ]]; then
local session="${XDG_STATE_HOME:-$HOME/.local/state}/DankMaterialShell/session.json"
local existing=""
if [[ -r "$session" ]]; then
existing="$(jq -r '.wallpaperPath // empty' "$session" 2>/dev/null || true)"
fi
if [[ -n "$existing" && -f "$existing" ]]; then
selected="$existing"
fi
fi
if [[ -z "$selected" ]] && command -v gsettings >/dev/null 2>&1; then
local uri=""
uri="$(gsettings get org.gnome.desktop.background picture-uri-dark 2>/dev/null \
| tr -d "'" || true)"
uri="${uri#file://}"
if [[ -n "$uri" && -f "$uri" ]]; then
selected="$uri"
fi
fi
if [[ -z "$selected" ]]; then if [[ -z "$selected" ]]; then
local candidates=( local candidates=(
/usr/share/backgrounds/warty-final-ubuntu.png /usr/share/backgrounds/warty-final-ubuntu.png
@@ -306,10 +445,35 @@ select_wallpaper() {
-print -quit 2>/dev/null || true)" -print -quit 2>/dev/null || true)"
fi fi
[[ -n "$selected" && -f "$selected" ]] ||
die "没有找到可用壁纸;可用 --wallpaper PATH 指定目标机上的图片。"
selected_wallpaper="$selected"
log "保留目标机壁纸:$selected_wallpaper"
}
activate_dms() {
local profile="${XDG_STATE_HOME:-$HOME/.local/state}/$PROJECT/nix-profile"
if (( dry_run )); then if (( dry_run )); then
printf '+ write wallpaper path %q to %q\n' "$selected" "$state_file" printf '+ stop legacy shell processes and enable dms.service\n'
else return
printf '%s\n' "$selected" > "$state_file" fi
if ! systemctl --user daemon-reload 2>/dev/null; then
log "当前没有可用的 systemd 用户会话;DMS 将在下次 Niri 登录时启动"
return
fi
systemctl --user disable --now waybar.service mako.service 2>/dev/null || true
pkill -x waybar 2>/dev/null || true
pkill -x mako 2>/dev/null || true
pkill -x swaybg 2>/dev/null || true
pkill -x swayidle 2>/dev/null || true
systemctl --user enable dms.service
"$profile/bin/dms" auth resolve-lock --quiet >/dev/null 2>&1 || true
if [[ -n "${WAYLAND_DISPLAY:-}" ]]; then
systemctl --user restart dms.service
fi fi
} }
@@ -331,14 +495,21 @@ main() {
install_libdisplay_info install_libdisplay_info
install_niri install_niri
install_xwayland_satellite install_xwayland_satellite
install_dms_runtime
else
local profile="${XDG_STATE_HOME:-$HOME/.local/state}/$PROJECT/nix-profile"
[[ -x "$profile/bin/dms" && -x "$profile/bin/quickshell" ]] ||
die "--config-only 需要先完成一次完整安装。"
fi fi
backup_and_install_config backup_and_install_config
validate_config validate_config
activate_dms
log "安装完成" log "安装完成"
printf '\n请注销,在 GDM 会话菜单中选择“Niri”后登录。\n' printf '\nDMS 个性化已迁移,目标机原壁纸和显示器布局未修改。\n'
printf 'GNOME 和 GDM 均未被修改;快捷键说明:Super+Shift+/。\n' printf '当前若在 Niri 中,顶栏会自动重启;否则注销后选择“Niri”登录。\n'
printf 'GNOME 和 GDM 均未修改;快捷键说明:Super+Shift+/。\n'
} }
main main
+10
View File
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail
for browser in google-chrome google-chrome-stable chromium chromium-browser firefox; do
if command -v "$browser" >/dev/null 2>&1; then
exec "$browser"
fi
done
exec xdg-open https://www.google.com
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail
systemctl --user restart dms.service
-15
View File
@@ -1,15 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
state="${XDG_CONFIG_HOME:-$HOME/.config}/niri-beyond-glass/wallpaper"
wallpaper=""
if [[ -s "$state" ]]; then
IFS= read -r wallpaper < "$state"
fi
if [[ -n "$wallpaper" && -f "$wallpaper" ]]; then
exec swaybg -m fill -i "$wallpaper"
fi
exec swaybg -c '#15171a'
+22 -3
View File
@@ -6,6 +6,9 @@ state_home="${XDG_STATE_HOME:-$HOME/.local/state}"
backup_root="$state_home/niri-beyond-glass/backups" backup_root="$state_home/niri-beyond-glass/backups"
original_root="$state_home/niri-beyond-glass/original" original_root="$state_home/niri-beyond-glass/original"
latest="" latest=""
profile="$state_home/niri-beyond-glass/nix-profile"
systemctl --user disable --now dms.service 2>/dev/null || true
if [[ -e "$original_root/.captured" ]]; then if [[ -e "$original_root/.captured" ]]; then
latest="$original_root" latest="$original_root"
@@ -19,8 +22,23 @@ rm -rf \
"$config_home/fuzzel" \ "$config_home/fuzzel" \
"$config_home/mako" \ "$config_home/mako" \
"$config_home/swaylock" \ "$config_home/swaylock" \
"$config_home/niri-beyond-glass" "$config_home/niri-beyond-glass" \
rm -f "$HOME/.local/bin/niri-beyond-wallpaper" "$config_home/DankMaterialShell" \
"$config_home/alacritty"
rm -f "$config_home/systemd/user/dms.service"
rm -rf "$state_home/DankMaterialShell"
for binary in dms quickshell qs matugen dgop dsearch; do
link="$HOME/.local/bin/$binary"
if [[ -L "$link" && "$(readlink "$link")" == "$profile/"* ]]; then
rm -f "$link"
fi
done
rm -f \
"$HOME/.local/bin/niri-beyond-wallpaper" \
"$HOME/.local/bin/niri-beyond-browser" \
"$HOME/.local/bin/niri-beyond-refresh"
rm -f "$state_home/niri-beyond-glass"/nix-profile*
if [[ -n "$latest" && -d "$latest/config" ]]; then if [[ -n "$latest" && -d "$latest/config" ]]; then
cp -a "$latest/config/." "$config_home/" cp -a "$latest/config/." "$config_home/"
@@ -29,4 +47,5 @@ else
printf '配置已移除;没有找到可恢复的备份。\n' printf '配置已移除;没有找到可恢复的备份。\n'
fi fi
printf 'Niri 和系统软件包被保留。GNOME/GDM 未修改。\n' systemctl --user daemon-reload 2>/dev/null || true
printf '已移除项目专用 DMS 运行层。Niri 和系统软件包被保留,GNOME/GDM 未修改。\n'