Compare commits
5
Commits
7a11188dd9
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
88c9035c43 | ||
|
|
aef001a855 | ||
|
|
b4010fe910 | ||
|
|
1577638614 | ||
|
|
87be571667 |
+20
@@ -0,0 +1,20 @@
|
|||||||
|
# 备份文件
|
||||||
|
*.bak
|
||||||
|
*.backup
|
||||||
|
*.backup.*
|
||||||
|
*.backup[0-9]*
|
||||||
|
|
||||||
|
# 日志文件
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# fcitx5 运行时缓存
|
||||||
|
fcitx5/conf/cached_layouts
|
||||||
|
|
||||||
|
# DankMaterialShell 运行时标志
|
||||||
|
DankMaterialShell/.firstlaunch
|
||||||
|
DankMaterialShell/.changelog-*
|
||||||
|
|
||||||
|
# 系统杂项
|
||||||
|
.DS_Store
|
||||||
|
*~
|
||||||
|
*.swp
|
||||||
@@ -83,11 +83,15 @@ source $ZSH/oh-my-zsh.sh
|
|||||||
# export LANG=en_US.UTF-8
|
# export LANG=en_US.UTF-8
|
||||||
|
|
||||||
# Preferred editor for local and remote sessions
|
# Preferred editor for local and remote sessions
|
||||||
if [[ -n $SSH_CONNECTION ]]; then
|
# if [[ -n $SSH_CONNECTION ]]; then
|
||||||
export EDITOR='vim'
|
# export EDITOR='vim'
|
||||||
else
|
# else
|
||||||
export EDITOR='nvim'
|
# export EDITOR='nvim'
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
|
export EDITOR='nvim'
|
||||||
|
|
||||||
|
alias vim=nvim
|
||||||
|
|
||||||
# Compilation flags
|
# Compilation flags
|
||||||
# export ARCHFLAGS="-arch $(uname -m)"
|
# export ARCHFLAGS="-arch $(uname -m)"
|
||||||
|
|||||||
@@ -0,0 +1,138 @@
|
|||||||
|
@media -moz-pref("userChrome.theme-material") {
|
||||||
|
:root {
|
||||||
|
--md-sys-color-primary: #0d6680;
|
||||||
|
--md-sys-color-surface-tint: #0d6680;
|
||||||
|
--md-sys-color-on-primary: #ffffff;
|
||||||
|
--md-sys-color-primary-container: #baeaff;
|
||||||
|
--md-sys-color-on-primary-container: #001f29;
|
||||||
|
--md-sys-color-secondary: #4c616b;
|
||||||
|
--md-sys-color-on-secondary: #ffffff;
|
||||||
|
--md-sys-color-secondary-container: #cfe6f1;
|
||||||
|
--md-sys-color-on-secondary-container: #071e26;
|
||||||
|
--md-sys-color-tertiary: #5c5b7e;
|
||||||
|
--md-sys-color-on-tertiary: #ffffff;
|
||||||
|
--md-sys-color-tertiary-container: #e2dfff;
|
||||||
|
--md-sys-color-on-tertiary-container: #181837;
|
||||||
|
--md-sys-color-error: #ba1a1a;
|
||||||
|
--md-sys-color-on-error: #ffffff;
|
||||||
|
--md-sys-color-error-container: #ffdad6;
|
||||||
|
--md-sys-color-on-error-container: #410002;
|
||||||
|
--md-sys-color-background: #f5fafd;
|
||||||
|
--md-sys-color-on-background: #171c1f;
|
||||||
|
--md-sys-color-surface: #f5fafd;
|
||||||
|
--md-sys-color-on-surface: #171c1f;
|
||||||
|
--md-sys-color-surface-variant: #dce4e8;
|
||||||
|
--md-sys-color-on-surface-variant: #40484c;
|
||||||
|
--md-sys-color-outline: #70787d;
|
||||||
|
--md-sys-color-outline-variant: #c0c8cc;
|
||||||
|
--md-sys-color-shadow: #000000;
|
||||||
|
--md-sys-color-scrim: #000000;
|
||||||
|
--md-sys-color-inverse-surface: #2c3134;
|
||||||
|
--md-sys-color-inverse-on-surface: #edf1f5;
|
||||||
|
--md-sys-color-inverse-primary: #89d0ee;
|
||||||
|
--md-sys-color-primary-fixed: #baeaff;
|
||||||
|
--md-sys-color-on-primary-fixed: #001f29;
|
||||||
|
--md-sys-color-primary-fixed-dim: #89d0ee;
|
||||||
|
--md-sys-color-on-primary-fixed-variant: #004d62;
|
||||||
|
--md-sys-color-secondary-fixed: #cfe6f1;
|
||||||
|
--md-sys-color-on-secondary-fixed: #071e26;
|
||||||
|
--md-sys-color-secondary-fixed-dim: #b4cad5;
|
||||||
|
--md-sys-color-on-secondary-fixed-variant: #354a53;
|
||||||
|
--md-sys-color-tertiary-fixed: #e2dfff;
|
||||||
|
--md-sys-color-on-tertiary-fixed: #181837;
|
||||||
|
--md-sys-color-tertiary-fixed-dim: #c4c3ea;
|
||||||
|
--md-sys-color-on-tertiary-fixed-variant: #444465;
|
||||||
|
--md-sys-color-surface-dim: #d6dbde;
|
||||||
|
--md-sys-color-surface-bright: #f5fafd;
|
||||||
|
--md-sys-color-surface-container-lowest: #ffffff;
|
||||||
|
--md-sys-color-surface-container-low: #f0f4f7;
|
||||||
|
--md-sys-color-surface-container: #f5fafd;
|
||||||
|
--md-sys-color-surface-container-high: #f5fafd;
|
||||||
|
--md-sys-color-surface-container-highest: #f5fafd;
|
||||||
|
|
||||||
|
--m3-radius: 12px;
|
||||||
|
--m3-radius-sm: 10px;
|
||||||
|
--m3-elev-0: none;
|
||||||
|
--m3-elev-1: 0 1px 2px color-mix(in srgb, var(--md-sys-color-shadow) 8%, transparent), 0 1px 3px color-mix(in srgb, var(--md-sys-color-shadow) 6%, transparent);
|
||||||
|
--m3-elev-2: 0 2px 6px color-mix(in srgb, var(--md-sys-color-shadow) 10%, transparent), 0 1px 3px color-mix(in srgb, var(--md-sys-color-shadow) 6%, transparent);
|
||||||
|
--m3-elev-3: 0 11px 7px color-mix(in srgb, var(--md-sys-color-shadow) 19%, transparent), 0 13px 25px color-mix(in srgb, var(--md-sys-color-shadow) 30%, transparent);
|
||||||
|
--m3-elev-4: 0 14px 12px color-mix(in srgb, var(--md-sys-color-shadow) 17%, transparent), 0 20px 40px color-mix(in srgb, var(--md-sys-color-shadow) 30%, transparent);
|
||||||
|
--m3-elev-5: 0 17px 17px color-mix(in srgb, var(--md-sys-color-shadow) 15%, transparent), 0 27px 55px color-mix(in srgb, var(--md-sys-color-shadow) 30%, transparent);
|
||||||
|
|
||||||
|
--tab-height: 34px;
|
||||||
|
--urlbar-height: 38px;
|
||||||
|
|
||||||
|
--state-hover: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
|
||||||
|
--state-press: color-mix(in srgb, var(--md-sys-color-on-surface) 12%, transparent);
|
||||||
|
|
||||||
|
--focus-ring: 0 0 0 2px color-mix(in srgb, var(--md-sys-color-primary) 70%, transparent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--md-sys-color-primary: #89d0ee;
|
||||||
|
--md-sys-color-surface-tint: #89d0ee;
|
||||||
|
--md-sys-color-on-primary: #003545;
|
||||||
|
--md-sys-color-primary-container: #004d62;
|
||||||
|
--md-sys-color-on-primary-container: #baeaff;
|
||||||
|
--md-sys-color-secondary: #b4cad5;
|
||||||
|
--md-sys-color-on-secondary: #1e333c;
|
||||||
|
--md-sys-color-secondary-container: #354a53;
|
||||||
|
--md-sys-color-on-secondary-container: #cfe6f1;
|
||||||
|
--md-sys-color-tertiary: #c4c3ea;
|
||||||
|
--md-sys-color-on-tertiary: #2d2d4d;
|
||||||
|
--md-sys-color-tertiary-container: #444465;
|
||||||
|
--md-sys-color-on-tertiary-container: #e2dfff;
|
||||||
|
--md-sys-color-error: #ffb4ab;
|
||||||
|
--md-sys-color-on-error: #690005;
|
||||||
|
--md-sys-color-error-container: #93000a;
|
||||||
|
--md-sys-color-on-error-container: #ffdad6;
|
||||||
|
--md-sys-color-background: #0f1417;
|
||||||
|
--md-sys-color-on-background: #dee3e6;
|
||||||
|
--md-sys-color-surface: #0f1417;
|
||||||
|
--md-sys-color-on-surface: #dee3e6;
|
||||||
|
--md-sys-color-surface-variant: #40484c;
|
||||||
|
--md-sys-color-on-surface-variant: #c0c8cc;
|
||||||
|
--md-sys-color-outline: #8a9296;
|
||||||
|
--md-sys-color-outline-variant: #40484c;
|
||||||
|
--md-sys-color-shadow: #000000;
|
||||||
|
--md-sys-color-scrim: #000000;
|
||||||
|
--md-sys-color-inverse-surface: #dee3e6;
|
||||||
|
--md-sys-color-inverse-on-surface: #2c3134;
|
||||||
|
--md-sys-color-inverse-primary: #0d6680;
|
||||||
|
--md-sys-color-primary-fixed: #baeaff;
|
||||||
|
--md-sys-color-on-primary-fixed: #001f29;
|
||||||
|
--md-sys-color-primary-fixed-dim: #89d0ee;
|
||||||
|
--md-sys-color-on-primary-fixed-variant: #004d62;
|
||||||
|
--md-sys-color-secondary-fixed: #cfe6f1;
|
||||||
|
--md-sys-color-on-secondary-fixed: #071e26;
|
||||||
|
--md-sys-color-secondary-fixed-dim: #b4cad5;
|
||||||
|
--md-sys-color-on-secondary-fixed-variant: #354a53;
|
||||||
|
--md-sys-color-tertiary-fixed: #e2dfff;
|
||||||
|
--md-sys-color-on-tertiary-fixed: #181837;
|
||||||
|
--md-sys-color-tertiary-fixed-dim: #c4c3ea;
|
||||||
|
--md-sys-color-on-tertiary-fixed-variant: #444465;
|
||||||
|
--md-sys-color-surface-dim: #0f1417;
|
||||||
|
--md-sys-color-surface-bright: #353a3d;
|
||||||
|
--md-sys-color-surface-container-lowest: #0a0f11;
|
||||||
|
--md-sys-color-surface-container-low: #171c1f;
|
||||||
|
--md-sys-color-surface-container: #1b2023;
|
||||||
|
--md-sys-color-surface-container-high: #252b2d;
|
||||||
|
--md-sys-color-surface-container-highest: #303638;
|
||||||
|
|
||||||
|
--m3-elev-1: 0 1px 2px color-mix(in srgb, var(--md-sys-color-shadow) 50%, transparent), 0 1px 3px color-mix(in srgb, var(--md-sys-color-shadow) 35%, transparent);
|
||||||
|
--m3-elev-2: 0 4px 10px color-mix(in srgb, var(--md-sys-color-shadow) 55%, transparent), 0 1px 3px color-mix(in srgb, var(--md-sys-color-shadow) 35%, transparent);
|
||||||
|
--m3-elev-3: 0 11px 7px color-mix(in srgb, var(--md-sys-color-shadow) 45%, transparent), 0 13px 25px color-mix(in srgb, var(--md-sys-color-shadow) 55%, transparent);
|
||||||
|
--m3-elev-4: 0 14px 12px color-mix(in srgb, var(--md-sys-color-shadow) 42%, transparent), 0 20px 40px color-mix(in srgb, var(--md-sys-color-shadow) 55%, transparent);
|
||||||
|
--m3-elev-5: 0 17px 17px color-mix(in srgb, var(--md-sys-color-shadow) 40%, transparent), 0 27px 55px color-mix(in srgb, var(--md-sys-color-shadow) 55%, transparent);
|
||||||
|
|
||||||
|
--state-hover: color-mix(in srgb, var(--md-sys-color-on-surface) 6%, transparent);
|
||||||
|
--state-press: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* idk if this even works, but the suggestion in the material updated readme bricks symbols no matter how many fallbacks I add */
|
||||||
|
:root {
|
||||||
|
font-family: system-ui, "Inter Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
|
||||||
|
}
|
||||||
@@ -0,0 +1,839 @@
|
|||||||
|
{
|
||||||
|
"currentThemeName": "dynamic",
|
||||||
|
"currentThemeCategory": "dynamic",
|
||||||
|
"customThemeFile": "",
|
||||||
|
"registryThemeVariants": {},
|
||||||
|
"matugenScheme": "scheme-tonal-spot",
|
||||||
|
"matugenContrast": 0,
|
||||||
|
"runUserMatugenTemplates": true,
|
||||||
|
"matugenTargetMonitor": "",
|
||||||
|
"popupTransparency": 1,
|
||||||
|
"dockTransparency": 1,
|
||||||
|
"widgetBackgroundColor": "sch",
|
||||||
|
"widgetBackgroundCustomColor": "#6750A4",
|
||||||
|
"widgetBackgroundCustomStrength": 0.5,
|
||||||
|
"widgetColorMode": "default",
|
||||||
|
"controlCenterTileColorMode": "primary",
|
||||||
|
"buttonColorMode": "primary",
|
||||||
|
"cornerRadius": 12,
|
||||||
|
"niriLayoutGapsOverride": -1,
|
||||||
|
"niriLayoutRadiusOverride": -1,
|
||||||
|
"niriLayoutBorderSize": -1,
|
||||||
|
"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": false,
|
||||||
|
"padHours12Hour": false,
|
||||||
|
"useFahrenheit": false,
|
||||||
|
"windSpeedUnit": "kmh",
|
||||||
|
"nightModeEnabled": false,
|
||||||
|
"animationSpeed": 2,
|
||||||
|
"customAnimationDuration": 500,
|
||||||
|
"syncComponentAnimationSpeeds": true,
|
||||||
|
"popoutAnimationSpeed": 1,
|
||||||
|
"popoutCustomAnimationDuration": 150,
|
||||||
|
"modalAnimationSpeed": 1,
|
||||||
|
"modalCustomAnimationDuration": 150,
|
||||||
|
"enableRippleEffects": true,
|
||||||
|
"animationVariant": 0,
|
||||||
|
"motionEffect": 0,
|
||||||
|
"m3ElevationEnabled": true,
|
||||||
|
"m3ElevationIntensity": 12,
|
||||||
|
"m3ElevationOpacity": 30,
|
||||||
|
"m3ElevationColorMode": "default",
|
||||||
|
"m3ElevationLightDirection": "top",
|
||||||
|
"m3ElevationCustomColor": "#000000",
|
||||||
|
"modalElevationEnabled": true,
|
||||||
|
"popoutElevationEnabled": true,
|
||||||
|
"barElevationEnabled": false,
|
||||||
|
"blurEnabled": false,
|
||||||
|
"blurForegroundLayers": true,
|
||||||
|
"blurLayerOutlineOpacity": 0.12,
|
||||||
|
"blurBorderEnabled": true,
|
||||||
|
"blurBorderColor": "outline",
|
||||||
|
"blurBorderCustomColor": "#ffffff",
|
||||||
|
"blurBorderOpacity": 0.35,
|
||||||
|
"wallpaperFillMode": "Fill",
|
||||||
|
"blurredWallpaperLayer": false,
|
||||||
|
"blurWallpaperOnOverview": true,
|
||||||
|
"wallpaperBackgroundColorMode": "black",
|
||||||
|
"wallpaperBackgroundCustomColor": "#000000",
|
||||||
|
"showLauncherButton": true,
|
||||||
|
"showWorkspaceSwitcher": true,
|
||||||
|
"showFocusedWindow": true,
|
||||||
|
"showWeather": true,
|
||||||
|
"showMusic": true,
|
||||||
|
"showClipboard": true,
|
||||||
|
"showCpuUsage": true,
|
||||||
|
"showMemUsage": true,
|
||||||
|
"showCpuTemp": true,
|
||||||
|
"showGpuTemp": true,
|
||||||
|
"selectedGpuIndex": 0,
|
||||||
|
"enabledGpuPciIds": [],
|
||||||
|
"showSystemTray": true,
|
||||||
|
"systemTrayIconTintMode": "none",
|
||||||
|
"systemTrayIconTintSaturation": 50,
|
||||||
|
"systemTrayIconTintStrength": 135,
|
||||||
|
"showClock": true,
|
||||||
|
"showNotificationButton": true,
|
||||||
|
"showBattery": true,
|
||||||
|
"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": true,
|
||||||
|
"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
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "idleInhibitor",
|
||||||
|
"enabled": true,
|
||||||
|
"width": 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "doNotDisturb",
|
||||||
|
"enabled": true,
|
||||||
|
"width": 50
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"showWorkspaceIndex": false,
|
||||||
|
"showWorkspaceName": false,
|
||||||
|
"showWorkspacePadding": false,
|
||||||
|
"workspaceScrolling": false,
|
||||||
|
"showWorkspaceApps": false,
|
||||||
|
"workspaceDragReorder": true,
|
||||||
|
"maxWorkspaceIcons": 1,
|
||||||
|
"workspaceAppIconSizeOffset": 0,
|
||||||
|
"groupWorkspaceApps": true,
|
||||||
|
"groupActiveWorkspaceApps": false,
|
||||||
|
"workspaceFollowFocus": false,
|
||||||
|
"showOccupiedWorkspacesOnly": false,
|
||||||
|
"reverseScrolling": false,
|
||||||
|
"dwlShowAllTags": false,
|
||||||
|
"workspaceActiveAppHighlightEnabled": false,
|
||||||
|
"workspaceColorMode": "default",
|
||||||
|
"workspaceFocusedCustomColor": "#6750A4",
|
||||||
|
"workspaceOccupiedColorMode": "none",
|
||||||
|
"workspaceOccupiedCustomColor": "#625B71",
|
||||||
|
"workspaceUnfocusedColorMode": "default",
|
||||||
|
"workspaceUnfocusedCustomColor": "#49454E",
|
||||||
|
"workspaceUrgentColorMode": "default",
|
||||||
|
"workspaceUrgentCustomColor": "#B3261E",
|
||||||
|
"workspaceFocusedBorderEnabled": false,
|
||||||
|
"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": false,
|
||||||
|
"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": "geometric",
|
||||||
|
"clockDateFormat": "",
|
||||||
|
"lockDateFormat": "",
|
||||||
|
"greeterRememberLastSession": true,
|
||||||
|
"greeterRememberLastUser": true,
|
||||||
|
"greeterAutoLogin": false,
|
||||||
|
"greeterEnableFprint": false,
|
||||||
|
"greeterEnableU2f": false,
|
||||||
|
"greeterWallpaperPath": "",
|
||||||
|
"greeterLockDateFormat": "",
|
||||||
|
"greeterFontFamily": "",
|
||||||
|
"greeterWallpaperFillMode": "",
|
||||||
|
"greeterPamExternallyManaged": false,
|
||||||
|
"greeterSyncPending": false,
|
||||||
|
"greeterSyncBaseline": {},
|
||||||
|
"mediaSize": 1,
|
||||||
|
"appLauncherViewMode": "list",
|
||||||
|
"spotlightModalViewMode": "list",
|
||||||
|
"browserPickerViewMode": "list",
|
||||||
|
"browserUsageHistory": {
|
||||||
|
"firefox": {
|
||||||
|
"count": 9,
|
||||||
|
"lastUsed": 1784131326254,
|
||||||
|
"name": "Firefox"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"appPickerViewMode": "grid",
|
||||||
|
"filePickerUsageHistory": {},
|
||||||
|
"sortAppsAlphabetically": false,
|
||||||
|
"appLauncherGridColumns": 4,
|
||||||
|
"spotlightCloseNiriOverview": true,
|
||||||
|
"rememberLastQuery": false,
|
||||||
|
"rememberLastMode": true,
|
||||||
|
"spotlightSectionViewModes": {
|
||||||
|
"apps": "list"
|
||||||
|
},
|
||||||
|
"appDrawerSectionViewModes": {},
|
||||||
|
"niriOverviewOverlayEnabled": true,
|
||||||
|
"niriOverviewLauncherStyle": "full",
|
||||||
|
"dankLauncherV2Size": "compact",
|
||||||
|
"dankLauncherV2ShowSourceBadges": true,
|
||||||
|
"dankLauncherV2BorderEnabled": false,
|
||||||
|
"dankLauncherV2BorderThickness": 2,
|
||||||
|
"dankLauncherV2BorderColor": "primary",
|
||||||
|
"dankLauncherV2ShowFooter": true,
|
||||||
|
"dankLauncherV2UnloadOnClose": true,
|
||||||
|
"dankLauncherV2IncludeFilesInAll": false,
|
||||||
|
"dankLauncherV2IncludeFoldersInAll": false,
|
||||||
|
"launcherUseOverlayLayer": false,
|
||||||
|
"launcherStyle": "full",
|
||||||
|
"spotlightBarShowModeChips": false,
|
||||||
|
"keybindsFloatingWindow": false,
|
||||||
|
"useAutoLocation": true,
|
||||||
|
"weatherEnabled": true,
|
||||||
|
"dashTabs": [
|
||||||
|
{
|
||||||
|
"id": "overview",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "media",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "wallpaper",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "weather",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "settings",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"networkPreference": "wifi",
|
||||||
|
"iconThemeDark": "Adwaita",
|
||||||
|
"iconThemeLight": "System Default",
|
||||||
|
"iconThemePerMode": false,
|
||||||
|
"lastAppliedIconTheme": "Adwaita",
|
||||||
|
"cursorSettings": {
|
||||||
|
"theme": "breeze_cursors",
|
||||||
|
"size": 24,
|
||||||
|
"niri": {
|
||||||
|
"hideWhenTyping": true,
|
||||||
|
"hideAfterInactiveMs": 5000
|
||||||
|
},
|
||||||
|
"hyprland": {
|
||||||
|
"hideOnKeyPress": false,
|
||||||
|
"hideOnTouch": false,
|
||||||
|
"inactiveTimeout": 0
|
||||||
|
},
|
||||||
|
"dwl": {
|
||||||
|
"cursorHideTimeout": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"launcherLogoMode": "os",
|
||||||
|
"launcherLogoCustomPath": "",
|
||||||
|
"launcherLogoColorOverride": "",
|
||||||
|
"launcherLogoColorInvertOnMode": false,
|
||||||
|
"launcherLogoBrightness": 0.5,
|
||||||
|
"launcherLogoContrast": 1,
|
||||||
|
"launcherLogoSizeOffset": 0,
|
||||||
|
"fontFamily": "Inter Variable",
|
||||||
|
"monoFontFamily": "Maple Mono NF CN",
|
||||||
|
"fontWeight": 400,
|
||||||
|
"fontScale": 1,
|
||||||
|
"textRenderType": 0,
|
||||||
|
"textRenderQuality": 0,
|
||||||
|
"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": true,
|
||||||
|
"soundLogin": false,
|
||||||
|
"soundNewNotification": true,
|
||||||
|
"soundVolumeChanged": true,
|
||||||
|
"soundPluggedIn": true,
|
||||||
|
"muteSoundsWhenMediaPlaying": true,
|
||||||
|
"acMonitorTimeout": 1200,
|
||||||
|
"acLockTimeout": 900,
|
||||||
|
"acSuspendTimeout": 3600,
|
||||||
|
"acSuspendBehavior": 0,
|
||||||
|
"acProfileName": "1",
|
||||||
|
"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": true,
|
||||||
|
"loginctlLockIntegration": true,
|
||||||
|
"fadeToLockEnabled": true,
|
||||||
|
"fadeToLockGracePeriod": 5,
|
||||||
|
"fadeToDpmsEnabled": true,
|
||||||
|
"fadeToDpmsGracePeriod": 5,
|
||||||
|
"launchPrefix": "",
|
||||||
|
"brightnessDevicePins": {},
|
||||||
|
"wifiNetworkPins": {},
|
||||||
|
"bluetoothDevicePins": {
|
||||||
|
"preferredDevice": [
|
||||||
|
"08:F0:B6:12:DE:C2"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"audioInputDevicePins": {},
|
||||||
|
"audioOutputDevicePins": {},
|
||||||
|
"gtkThemingEnabled": false,
|
||||||
|
"qtThemingEnabled": false,
|
||||||
|
"syncModeWithPortal": true,
|
||||||
|
"terminalsAlwaysDark": false,
|
||||||
|
"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": false,
|
||||||
|
"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": true,
|
||||||
|
"dockAutoHide": false,
|
||||||
|
"dockSmartAutoHide": true,
|
||||||
|
"dockUseOverlayLayer": false,
|
||||||
|
"dockGroupByApp": false,
|
||||||
|
"dockRestoreSpecialWorkspaceOnClick": false,
|
||||||
|
"dockOpenOnOverview": false,
|
||||||
|
"dockPosition": 1,
|
||||||
|
"dockSpacing": 4,
|
||||||
|
"dockBottomGap": 0,
|
||||||
|
"dockMargin": 0,
|
||||||
|
"dockIconSize": 40,
|
||||||
|
"dockIndicatorStyle": "circle",
|
||||||
|
"dockBorderEnabled": false,
|
||||||
|
"dockBorderColor": "surfaceText",
|
||||||
|
"dockBorderOpacity": 1,
|
||||||
|
"dockBorderThickness": 1,
|
||||||
|
"dockIsolateDisplays": false,
|
||||||
|
"dockLauncherEnabled": true,
|
||||||
|
"dockLauncherLogoMode": "os",
|
||||||
|
"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": "",
|
||||||
|
"lockScreenWallpaperFillMode": "",
|
||||||
|
"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": 4,
|
||||||
|
"osdVolumeEnabled": true,
|
||||||
|
"osdMediaVolumeEnabled": true,
|
||||||
|
"osdMediaPlaybackEnabled": false,
|
||||||
|
"osdBrightnessEnabled": true,
|
||||||
|
"osdIdleInhibitorEnabled": true,
|
||||||
|
"osdMicMuteEnabled": true,
|
||||||
|
"osdCapsLockEnabled": true,
|
||||||
|
"osdPowerProfileEnabled": true,
|
||||||
|
"osdAudioOutputEnabled": true,
|
||||||
|
"powerActionConfirm": true,
|
||||||
|
"powerActionHoldDuration": 0.5,
|
||||||
|
"powerMenuActions": [
|
||||||
|
"reboot",
|
||||||
|
"logout",
|
||||||
|
"poweroff",
|
||||||
|
"lock",
|
||||||
|
"suspend",
|
||||||
|
"restart"
|
||||||
|
],
|
||||||
|
"powerMenuDefaultAction": "logout",
|
||||||
|
"powerMenuGridLayout": true,
|
||||||
|
"customPowerActionLock": "",
|
||||||
|
"customPowerActionLogout": "",
|
||||||
|
"customPowerActionSuspend": "",
|
||||||
|
"customPowerActionHibernate": "",
|
||||||
|
"customPowerActionReboot": "",
|
||||||
|
"customPowerActionPowerOff": "",
|
||||||
|
"updaterHideWidget": false,
|
||||||
|
"updaterCheckOnStart": false,
|
||||||
|
"updaterUseCustomCommand": false,
|
||||||
|
"updaterCustomCommand": "",
|
||||||
|
"updaterTerminalAdditionalParams": "",
|
||||||
|
"updaterIntervalSeconds": 1800,
|
||||||
|
"updaterIncludeFlatpak": true,
|
||||||
|
"updaterAllowAUR": true,
|
||||||
|
"updaterIgnoredPackages": [],
|
||||||
|
"displayNameMode": "system",
|
||||||
|
"screenPreferences": {
|
||||||
|
"wallpaper": [
|
||||||
|
"all"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"showOnLastDisplay": {},
|
||||||
|
"niriOutputSettings": {},
|
||||||
|
"hyprlandOutputSettings": {},
|
||||||
|
"displayProfiles": {},
|
||||||
|
"activeDisplayProfile": {},
|
||||||
|
"displayProfileAutoSelect": false,
|
||||||
|
"displayShowDisconnected": false,
|
||||||
|
"displaySnapToEdge": true,
|
||||||
|
"connectedFrameBarStyleBackups": {},
|
||||||
|
"barConfigs": [
|
||||||
|
{
|
||||||
|
"id": "default",
|
||||||
|
"name": "Main Bar",
|
||||||
|
"enabled": true,
|
||||||
|
"position": 0,
|
||||||
|
"screenPreferences": [
|
||||||
|
"all"
|
||||||
|
],
|
||||||
|
"showOnLastDisplay": true,
|
||||||
|
"leftWidgets": [
|
||||||
|
{
|
||||||
|
"id": "workspaceSwitcher",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "cpuUsage",
|
||||||
|
"enabled": true,
|
||||||
|
"minimumWidth": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "cpuTemp",
|
||||||
|
"enabled": true,
|
||||||
|
"minimumWidth": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "network_speed_monitor",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "focusedWindow",
|
||||||
|
"enabled": true,
|
||||||
|
"focusedWindowCompactMode": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"centerWidgets": [
|
||||||
|
{
|
||||||
|
"id": "music",
|
||||||
|
"enabled": true,
|
||||||
|
"mediaSize": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "weather",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rightWidgets": [
|
||||||
|
{
|
||||||
|
"id": "systemTray",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "clipboard",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "controlCenterButton",
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "clock",
|
||||||
|
"enabled": true,
|
||||||
|
"clockCompactMode": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "battery",
|
||||||
|
"enabled": true,
|
||||||
|
"showBatteryTime": false,
|
||||||
|
"showBatteryTimeOnlyOnBattery": false,
|
||||||
|
"batteryPillStyle": true,
|
||||||
|
"batteryPillPercentSign": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "powerMenuButton",
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"spacing": 0,
|
||||||
|
"innerPadding": 0,
|
||||||
|
"bottomGap": -4,
|
||||||
|
"transparency": 0,
|
||||||
|
"widgetTransparency": 1,
|
||||||
|
"squareCorners": false,
|
||||||
|
"noBackground": false,
|
||||||
|
"maximizeWidgetIcons": false,
|
||||||
|
"maximizeWidgetText": false,
|
||||||
|
"removeWidgetPadding": false,
|
||||||
|
"widgetPadding": 8,
|
||||||
|
"gothCornersEnabled": false,
|
||||||
|
"gothCornerRadiusOverride": true,
|
||||||
|
"gothCornerRadiusValue": 43,
|
||||||
|
"borderEnabled": false,
|
||||||
|
"borderColor": "surfaceText",
|
||||||
|
"borderOpacity": 1,
|
||||||
|
"borderThickness": 1,
|
||||||
|
"widgetOutlineEnabled": false,
|
||||||
|
"widgetOutlineColor": "surfaceText",
|
||||||
|
"widgetOutlineOpacity": 1,
|
||||||
|
"widgetOutlineThickness": 1,
|
||||||
|
"fontScale": 1,
|
||||||
|
"iconScale": 1,
|
||||||
|
"autoHide": false,
|
||||||
|
"autoHideDelay": 250,
|
||||||
|
"showOnWindowsOpen": false,
|
||||||
|
"openOnOverview": false,
|
||||||
|
"visible": true,
|
||||||
|
"popupGapsAuto": true,
|
||||||
|
"popupGapsManual": 4,
|
||||||
|
"maximizeDetection": true,
|
||||||
|
"scrollEnabled": true,
|
||||||
|
"scrollXBehavior": "column",
|
||||||
|
"scrollYBehavior": "workspace",
|
||||||
|
"shadowIntensity": 0,
|
||||||
|
"shadowOpacity": 60,
|
||||||
|
"shadowColorMode": "text",
|
||||||
|
"shadowCustomColor": "#000000",
|
||||||
|
"clickThrough": false,
|
||||||
|
"barInsetPadding": 4
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"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,
|
||||||
|
"systemMonitorGpuPciId": "",
|
||||||
|
"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": {
|
||||||
|
"dms_settings_search": {
|
||||||
|
"trigger": "?"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
#version 330
|
||||||
|
|
||||||
|
in vec2 fragCoord;
|
||||||
|
out vec4 fragColor;
|
||||||
|
|
||||||
|
// bar values. defaults to left channels first (low to high), then right (high to low).
|
||||||
|
uniform float bars[512];
|
||||||
|
|
||||||
|
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||||
|
uniform int bar_width; // bar width (configurable), not used here
|
||||||
|
uniform int bar_spacing; // space between bars (configurable)
|
||||||
|
|
||||||
|
uniform vec3 u_resolution; // window resolution
|
||||||
|
|
||||||
|
// colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
|
||||||
|
uniform vec3 bg_color; // background color
|
||||||
|
uniform vec3 fg_color; // foreground color
|
||||||
|
|
||||||
|
uniform int gradient_count;
|
||||||
|
uniform vec3 gradient_colors[8]; // gradient colors
|
||||||
|
|
||||||
|
uniform float shader_time; // shader execution time s (not used here)
|
||||||
|
|
||||||
|
uniform sampler2D inputTexture; // Texture from the last render pass (not used here)
|
||||||
|
|
||||||
|
vec3 normalize_C(float y, vec3 col_1, vec3 col_2, float y_min, float y_max) {
|
||||||
|
// create color based on fraction of this color and next color
|
||||||
|
float yr = (y - y_min) / (y_max - y_min);
|
||||||
|
return col_1 * (1.0 - yr) + col_2 * yr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
// find which bar to use based on where we are on the x axis
|
||||||
|
float x = u_resolution.x * fragCoord.x;
|
||||||
|
int bar = int(bars_count * fragCoord.x);
|
||||||
|
|
||||||
|
// calculate a bar size
|
||||||
|
float bar_size = u_resolution.x / bars_count;
|
||||||
|
|
||||||
|
// the y coordinate and bar values are the same
|
||||||
|
float y = bars[bar];
|
||||||
|
|
||||||
|
// make sure there is a thin line at bottom
|
||||||
|
if (y * u_resolution.y < 1.0) {
|
||||||
|
y = 1.0 / u_resolution.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
// draw the bar up to current height
|
||||||
|
if (y > fragCoord.y) {
|
||||||
|
// make some space between bars basen on settings
|
||||||
|
if (x > (bar + 1) * (bar_size)-bar_spacing) {
|
||||||
|
fragColor = vec4(bg_color, 1.0);
|
||||||
|
} else {
|
||||||
|
if (gradient_count == 0) {
|
||||||
|
fragColor = vec4(fg_color, 1.0);
|
||||||
|
} else {
|
||||||
|
// find which color in the configured gradient we are at
|
||||||
|
int color = int((gradient_count - 1) * fragCoord.y);
|
||||||
|
|
||||||
|
// find where on y this and next color is supposed to be
|
||||||
|
float y_min = color / (gradient_count - 1.0);
|
||||||
|
float y_max = (color + 1.0) / (gradient_count - 1.0);
|
||||||
|
|
||||||
|
// make color
|
||||||
|
fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color],
|
||||||
|
gradient_colors[color + 1], y_min, y_max),
|
||||||
|
1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fragColor = vec4(bg_color, 1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
#version 330
|
||||||
|
|
||||||
|
// this shader was stolen from shadertoy user ChunderFPV
|
||||||
|
|
||||||
|
#define SCALE 8.0
|
||||||
|
#define PI radians(180.0)
|
||||||
|
#define TAU (PI * 2.0)
|
||||||
|
#define CS(a) vec2(cos(a), sin(a))
|
||||||
|
#define PT(u, r) smoothstep(0.0, r, r - length(u))
|
||||||
|
|
||||||
|
in vec2 fragCoord;
|
||||||
|
out vec4 fragColor;
|
||||||
|
|
||||||
|
uniform float bars[512];
|
||||||
|
|
||||||
|
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||||
|
uniform float shader_time; // shader execution time s
|
||||||
|
uniform int bar_width; // bar width (configurable), not used here
|
||||||
|
uniform int bar_spacing; // space between bars (configurable)
|
||||||
|
|
||||||
|
uniform vec3 u_resolution; // window resolution
|
||||||
|
|
||||||
|
// colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
|
||||||
|
uniform vec3 bg_color; // background color
|
||||||
|
uniform vec3 fg_color; // foreground color
|
||||||
|
|
||||||
|
uniform int gradient_count;
|
||||||
|
uniform vec3 gradient_colors[8]; // gradient colors
|
||||||
|
|
||||||
|
// gradient map ( color, equation, time, width, shadow, reciprocal )
|
||||||
|
vec3 gm(vec3 c, float n, float t, float w, float d, bool i) {
|
||||||
|
float g = min(abs(n), 1.0 / abs(n));
|
||||||
|
float s = abs(sin(n * PI - t));
|
||||||
|
if (i)
|
||||||
|
s = min(s, abs(sin(PI / n + t)));
|
||||||
|
return (1.0 - pow(abs(s), w)) * c * pow(g, d) * 6.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// denominator spiral, use 1/n for numerator
|
||||||
|
// ( screen xy, spiral exponent, decimal, line width, hardness, rotation )
|
||||||
|
float ds(vec2 u, float e, float n, float w, float h, float ro) {
|
||||||
|
float ur = length(u); // unit radius
|
||||||
|
float sr = pow(ur, e); // spiral radius
|
||||||
|
float a = round(sr) * n * TAU; // arc
|
||||||
|
vec2 xy = CS(a + ro) * ur; // xy coords
|
||||||
|
float l = PT(u - xy, w); // line
|
||||||
|
float s = mod(sr + 0.5, 1.0); // gradient smooth
|
||||||
|
s = min(s, 1.0 - s); // darken filter
|
||||||
|
return l * s * h;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
float t = shader_time / PI * 2.0;
|
||||||
|
vec4 m = vec4(0, 0, 0, 0); // iMouse;
|
||||||
|
m.xy = m.xy * 2.0 / u_resolution.xy - 1.0; // ±1x, ±1y
|
||||||
|
if (m.z > 0.0)
|
||||||
|
t += m.y * SCALE; // move time with mouse y
|
||||||
|
float z = (m.z > 0.0) ? pow(1.0 - abs(m.y), sign(m.y)) : 1.0; // zoom (+)
|
||||||
|
float e = (m.z > 0.0) ? pow(1.0 - abs(m.x), -sign(m.x))
|
||||||
|
: 1.0; // screen exponent (+)
|
||||||
|
float se = (m.z > 0.0) ? e * -sign(m.y) : 1.0; // spiral exponent
|
||||||
|
vec3 bg = vec3(0); // black background
|
||||||
|
|
||||||
|
float aa = 3.0; // anti-aliasing
|
||||||
|
|
||||||
|
for (float j = 0.0; j < aa; j++)
|
||||||
|
for (float k = 0.0; k < aa; k++) {
|
||||||
|
vec3 c = vec3(0);
|
||||||
|
vec2 o = vec2(j, k) / aa;
|
||||||
|
vec2 uv = (fragCoord * u_resolution.xy - 0.5 * u_resolution.xy + o) /
|
||||||
|
u_resolution.y * SCALE * z; // apply cartesian, scale and zoom
|
||||||
|
if (m.z > 0.0)
|
||||||
|
uv =
|
||||||
|
exp(log(abs(uv)) * e) * sign(uv); // warp screen space with exponent
|
||||||
|
|
||||||
|
float px = length(fwidth(uv)); // pixel width
|
||||||
|
float x = uv.x; // every pixel on x
|
||||||
|
float y = uv.y; // every pixel on y
|
||||||
|
float l = length(uv); // hypot of xy: sqrt(x*x+y*y)
|
||||||
|
|
||||||
|
float mc = (x * x + y * y - 1.0) / y; // metallic circle at xy
|
||||||
|
float g = min(abs(mc), 1.0 / abs(mc)); // gradient
|
||||||
|
vec3 gold = vec3(1.0, 0.6, 0.0) * g * l;
|
||||||
|
vec3 blue = vec3(0.3, 0.5, 0.9) * (1.0 - g);
|
||||||
|
vec3 rgb = max(gold, blue);
|
||||||
|
|
||||||
|
float w = 0.1; // line width
|
||||||
|
float d = 0.4; // shadow depth
|
||||||
|
c = max(c, gm(rgb, mc, -t, w * bars[0], d, false)); // metallic
|
||||||
|
c = max(c, gm(rgb, abs(y / x) * sign(y), -t, w * bars[1], d,
|
||||||
|
false)); // tangent
|
||||||
|
c = max(c, gm(rgb, (x * x) / (y * y) * sign(y), -t, w * bars[2], d,
|
||||||
|
false)); // sqrt cotangent
|
||||||
|
c = max(c, gm(rgb, (x * x) + (y * y), t, w * bars[3], d,
|
||||||
|
true)); // sqrt circles
|
||||||
|
|
||||||
|
c += rgb * ds(uv, se, t / TAU, px * 2.0 * bars[4], 2.0, 0.0); // spiral 1a
|
||||||
|
c += rgb * ds(uv, se, t / TAU, px * 2.0 * bars[5], 2.0, PI); // spiral 1b
|
||||||
|
c +=
|
||||||
|
rgb * ds(uv, -se, t / TAU, px * 2.0 * bars[6], 2.0, 0.0); // spiral 2a
|
||||||
|
c += rgb * ds(uv, -se, t / TAU, px * 2.0 * bars[7], 2.0, PI); // spiral 2b
|
||||||
|
c = max(c, 0.0); // clear negative color
|
||||||
|
|
||||||
|
c += pow(max(1.0 - l, 0.0), 3.0 / z); // center glow
|
||||||
|
|
||||||
|
if (m.z > 0.0) // display grid on click
|
||||||
|
{
|
||||||
|
vec2 xyg = abs(fract(uv + 0.5) - 0.5) / px; // xy grid
|
||||||
|
c.gb += 0.2 * (1.0 - min(min(xyg.x, xyg.y), 1.0));
|
||||||
|
}
|
||||||
|
bg += c;
|
||||||
|
}
|
||||||
|
bg /= aa * aa;
|
||||||
|
bg *= sqrt(bg) * 1.5;
|
||||||
|
|
||||||
|
fragColor = vec4(bg, 1.0);
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#version 330
|
||||||
|
|
||||||
|
in vec2 fragCoord;
|
||||||
|
out vec4 fragColor;
|
||||||
|
|
||||||
|
// bar values. defaults to left channels first (low to high), then right (high to low).
|
||||||
|
uniform float bars[512];
|
||||||
|
|
||||||
|
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||||
|
|
||||||
|
uniform vec3 u_resolution; // window resolution, not used here
|
||||||
|
|
||||||
|
//colors, configurable in cava config file
|
||||||
|
uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here
|
||||||
|
uniform vec3 fg_color; // foreground color, not used here
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// find which bar to use based on where we are on the x axis
|
||||||
|
int bar = int(bars_count * fragCoord.x);
|
||||||
|
|
||||||
|
float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0;
|
||||||
|
float y = (bars[bar]) * bar_y;
|
||||||
|
|
||||||
|
float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count;
|
||||||
|
float bar_r = 1.0 - abs((bar_x - 0.5)) * 2;
|
||||||
|
|
||||||
|
bar_r = bar_r * bar_r * 2;
|
||||||
|
|
||||||
|
// set color
|
||||||
|
fragColor.r = fg_color.x * y * bar_r;
|
||||||
|
fragColor.g = fg_color.y * y * bar_r;
|
||||||
|
fragColor.b = fg_color.z * y * bar_r;
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#version 330
|
||||||
|
|
||||||
|
|
||||||
|
// Input vertex data, different for all executions of this shader.
|
||||||
|
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||||
|
|
||||||
|
// Output data ; will be interpolated for each fragment.
|
||||||
|
out vec2 fragCoord;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
gl_Position = vec4(vertexPosition_modelspace,1);
|
||||||
|
fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
#version 330
|
||||||
|
|
||||||
|
in vec2 fragCoord;
|
||||||
|
out vec4 fragColor;
|
||||||
|
|
||||||
|
// bar values. defaults to left channels first (low to high), then right (high
|
||||||
|
// to low).
|
||||||
|
uniform float bars[512];
|
||||||
|
|
||||||
|
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||||
|
uniform int bar_width; // bar width (configurable), not used here
|
||||||
|
uniform int bar_spacing; // space between bars (configurable)
|
||||||
|
|
||||||
|
uniform vec3 u_resolution; // window resolution
|
||||||
|
|
||||||
|
// colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
|
||||||
|
uniform vec3 bg_color; // background color
|
||||||
|
uniform vec3 fg_color; // foreground color
|
||||||
|
|
||||||
|
uniform int gradient_count;
|
||||||
|
uniform vec3 gradient_colors[8]; // gradient colors
|
||||||
|
|
||||||
|
uniform sampler2D inputTexture; // Texture from the last render pass
|
||||||
|
|
||||||
|
vec3 normalize_C(float y, vec3 col_1, vec3 col_2, float y_min, float y_max) {
|
||||||
|
// create color based on fraction of this color and next color
|
||||||
|
float yr = (y - y_min) / (y_max - y_min);
|
||||||
|
return col_1 * (1.0 - yr) + col_2 * yr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
// find which bar to use based on where we are on the y axis
|
||||||
|
int bar = int(bars_count * fragCoord.y);
|
||||||
|
float y = bars[bar];
|
||||||
|
float band_size = 1.0 / float(bars_count);
|
||||||
|
float current_band_min = bar * band_size;
|
||||||
|
float current_band_max = (bar + 1) * band_size;
|
||||||
|
|
||||||
|
int hist_length = 512;
|
||||||
|
float win_size = 1.0 / hist_length;
|
||||||
|
|
||||||
|
if (fragCoord.x > 1.0 - win_size) {
|
||||||
|
|
||||||
|
if (fragCoord.y > current_band_min && fragCoord.y < current_band_max) {
|
||||||
|
|
||||||
|
fragColor = vec4(fg_color * y, 1.0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
vec2 offsetCoord = fragCoord;
|
||||||
|
offsetCoord.x += float(win_size);
|
||||||
|
fragColor = texture(inputTexture, offsetCoord);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,112 @@
|
|||||||
|
#version 330
|
||||||
|
|
||||||
|
// Emulate the "line style" spectrum analyzer from Winamp 2.
|
||||||
|
// Try this config for a demonstration:
|
||||||
|
|
||||||
|
/*
|
||||||
|
[general]
|
||||||
|
bar_width = 2
|
||||||
|
bar_spacing = 0
|
||||||
|
higher_cutoff_freq = 22000
|
||||||
|
|
||||||
|
[output]
|
||||||
|
method = sdl_glsl
|
||||||
|
channels = mono
|
||||||
|
fragment_shader = winamp_line_style_spectrum.frag
|
||||||
|
|
||||||
|
[color]
|
||||||
|
background = '#000000'
|
||||||
|
gradient = 1
|
||||||
|
gradient_color_1 = '#319C08'
|
||||||
|
gradient_color_2 = '#29CE10'
|
||||||
|
gradient_color_3 = '#BDDE29'
|
||||||
|
gradient_color_4 = '#DEA518'
|
||||||
|
gradient_color_5 = '#D66600'
|
||||||
|
gradient_color_6 = '#CE2910'
|
||||||
|
|
||||||
|
[smoothing]
|
||||||
|
noise_reduction = 10
|
||||||
|
*/
|
||||||
|
|
||||||
|
in vec2 fragCoord;
|
||||||
|
out vec4 fragColor;
|
||||||
|
|
||||||
|
// bar values. defaults to left channels first (low to high), then right (high to low).
|
||||||
|
uniform float bars[512];
|
||||||
|
|
||||||
|
uniform int bars_count; // number of bars (left + right) (configurable)
|
||||||
|
uniform int bar_width; // bar width (configurable), not used here
|
||||||
|
uniform int bar_spacing; // space between bars (configurable)
|
||||||
|
|
||||||
|
uniform vec3 u_resolution; // window resolution
|
||||||
|
|
||||||
|
//colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
|
||||||
|
uniform vec3 bg_color; // background color
|
||||||
|
uniform vec3 fg_color; // foreground color
|
||||||
|
|
||||||
|
uniform int gradient_count;
|
||||||
|
uniform vec3 gradient_colors[8]; // gradient colors
|
||||||
|
|
||||||
|
vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max)
|
||||||
|
{
|
||||||
|
//create color based on fraction of this color and next color
|
||||||
|
float yr = (y - y_min) / (y_max - y_min);
|
||||||
|
return col_1 * (1.0 - yr) + col_2 * yr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
// find which bar to use based on where we are on the x axis
|
||||||
|
float x = u_resolution.x * fragCoord.x;
|
||||||
|
int bar = int(bars_count * fragCoord.x);
|
||||||
|
|
||||||
|
//calculate a bar size
|
||||||
|
float bar_size = u_resolution.x / bars_count;
|
||||||
|
|
||||||
|
//the y coordinate is stretched by 4X to resemble Winamp
|
||||||
|
float y = min(bars[bar] * 4.0, 1.0);
|
||||||
|
|
||||||
|
// make sure there is a thin line at bottom
|
||||||
|
if (y * u_resolution.y < 1.0)
|
||||||
|
{
|
||||||
|
y = 1.0 / u_resolution.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 bar_color;
|
||||||
|
|
||||||
|
if (gradient_count == 0)
|
||||||
|
{
|
||||||
|
bar_color = vec4(fg_color,1.0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//find color in the configured gradient for the top of the bar
|
||||||
|
int color = int((gradient_count - 1) * y);
|
||||||
|
|
||||||
|
//find where on y this and next color is supposed to be
|
||||||
|
float y_min = float(color) / (gradient_count - 1.0);
|
||||||
|
float y_max = float(color + 1) / (gradient_count - 1.0);
|
||||||
|
|
||||||
|
//make a solid color for the entire bar
|
||||||
|
bar_color = vec4(normalize_C(y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//draw the bar up to current height
|
||||||
|
if (y > fragCoord.y)
|
||||||
|
{
|
||||||
|
//make some space between bars based on settings
|
||||||
|
if (x > (bar + 1) * (bar_size) - bar_spacing)
|
||||||
|
{
|
||||||
|
fragColor = vec4(bg_color,1.0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fragColor = bar_color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fragColor = vec4(bg_color,1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[color]
|
||||||
|
background = '#001e26'
|
||||||
|
foreground = '#708183'
|
||||||
|
|
||||||
|
gradient = 1
|
||||||
|
gradient_color_1 = '#268bd2'
|
||||||
|
gradient_color_2 = '#6c71c4'
|
||||||
|
gradient_color_3 = '#cb4b16'
|
||||||
|
|
||||||
|
horizontal_gradient = 1
|
||||||
|
horizontal_gradient_color_1 = '#586e75'
|
||||||
|
horizontal_gradient_color_2 = '#b58900'
|
||||||
|
horizontal_gradient_color_3 = '#839496'
|
||||||
|
|
||||||
|
blend_direction = 'up'
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[color]
|
||||||
|
horizontal_gradient = 1
|
||||||
|
horizontal_gradient_color_1 = '#c45161'
|
||||||
|
horizontal_gradient_color_2 = '#e094a0'
|
||||||
|
horizontal_gradient_color_3 = '#f2b6c0'
|
||||||
|
horizontal_gradient_color_4 = '#f2dde1'
|
||||||
|
horizontal_gradient_color_5 = '#cbc7d8'
|
||||||
|
horizontal_gradient_color_6 = '#8db7d2'
|
||||||
|
horizontal_gradient_color_7 = '#5e62a9'
|
||||||
|
horizontal_gradient_color_8 = '#434279'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
ELECTRON_OZONE_PLATFORM_HINT=auto
|
||||||
|
TERMINAL=kitty
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# 转换引擎
|
||||||
|
Engine=OpenCC
|
||||||
|
# 启用的输入法
|
||||||
|
EnabledIM=
|
||||||
|
# 简转繁的 OpenCC 配置
|
||||||
|
OpenCCS2TProfile=default
|
||||||
|
# 繁转简的 OpenCC 配置
|
||||||
|
OpenCCT2SProfile=default
|
||||||
|
|
||||||
|
[Hotkey]
|
||||||
|
0=Control+Shift+F
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# 隐藏通知
|
||||||
|
HiddenNotifications=
|
||||||
|
|
||||||
@@ -0,0 +1,153 @@
|
|||||||
|
# 双拼方案
|
||||||
|
ShuangpinProfile=Ziranma
|
||||||
|
# 显示当前双拼模式
|
||||||
|
ShowShuangpinMode=True
|
||||||
|
# 每页候选词
|
||||||
|
PageSize=7
|
||||||
|
# 显示英文候选词
|
||||||
|
SpellEnabled=True
|
||||||
|
# 显示符号候选词
|
||||||
|
SymbolsEnabled=True
|
||||||
|
# 显示拆字候选词
|
||||||
|
ChaiziEnabled=True
|
||||||
|
# 启用 Unicode CJK 拓展区 B 之后的更多字符
|
||||||
|
ExtBEnabled=True
|
||||||
|
# 输入 h(横),s(竖),p(撇),n(捺),z(折) 时显示笔画候选词
|
||||||
|
StrokeCandidateEnabled=True
|
||||||
|
# 启用云拼音
|
||||||
|
CloudPinyinEnabled=False
|
||||||
|
# 云拼音候选词顺序
|
||||||
|
CloudPinyinIndex=2
|
||||||
|
# 加载云拼音的时候显示动画
|
||||||
|
CloudPinyinAnimation=True
|
||||||
|
# 总是显示云拼音的占位符
|
||||||
|
KeepCloudPinyinPlaceHolder=False
|
||||||
|
# 预编辑模式
|
||||||
|
PreeditMode="Composing pinyin"
|
||||||
|
# 将嵌入预编辑文本的光标固定在开头
|
||||||
|
PreeditCursorPositionAtBeginning=True
|
||||||
|
# 在预编辑中显示完整拼音
|
||||||
|
PinyinInPreedit=False
|
||||||
|
# 启用预测
|
||||||
|
Prediction=False
|
||||||
|
# 为下次输入预测保留当前输入的文本
|
||||||
|
KeepCurrentContext=True
|
||||||
|
# 预测数量
|
||||||
|
PredictionSize=49
|
||||||
|
# 预测时退格键的行为
|
||||||
|
BackspaceBehaviorOnPrediction="Backspace when not using on-screen keyboard"
|
||||||
|
# 切换输入法时的行为
|
||||||
|
SwitchInputMethodBehavior="Commit current preedit"
|
||||||
|
# 选择第二个候选词
|
||||||
|
SecondCandidate=
|
||||||
|
# 选择第三个候选词
|
||||||
|
ThirdCandidate=
|
||||||
|
# 使用数字键盘选词
|
||||||
|
UseKeypadAsSelection=False
|
||||||
|
# 选词末字
|
||||||
|
ChooseLastCharFromPhrase=bracketright
|
||||||
|
# 使用退格键取消选词
|
||||||
|
BackSpaceToUnselect=True
|
||||||
|
# 句子数量
|
||||||
|
Number of sentence=2
|
||||||
|
# 词组候选词数
|
||||||
|
WordCandidateLimit=15
|
||||||
|
# 输入长于...时提示长词 (设置为 0 时禁用)
|
||||||
|
LongWordLengthLimit=4
|
||||||
|
# 快速输入的触发键
|
||||||
|
QuickPhraseKey=semicolon
|
||||||
|
# 使用 V 来触发快速输入
|
||||||
|
VAsQuickphrase=True
|
||||||
|
# FirstRun
|
||||||
|
FirstRun=False
|
||||||
|
|
||||||
|
[ForgetWord]
|
||||||
|
0=Control+7
|
||||||
|
|
||||||
|
[PrevPage]
|
||||||
|
0=minus
|
||||||
|
1=Up
|
||||||
|
2=KP_Up
|
||||||
|
3=Page_Up
|
||||||
|
|
||||||
|
[NextPage]
|
||||||
|
0=equal
|
||||||
|
1=Down
|
||||||
|
2=KP_Down
|
||||||
|
3=Next
|
||||||
|
|
||||||
|
[PrevCandidate]
|
||||||
|
0=Shift+Tab
|
||||||
|
|
||||||
|
[NextCandidate]
|
||||||
|
0=Tab
|
||||||
|
|
||||||
|
[CurrentCandidate]
|
||||||
|
0=space
|
||||||
|
1=KP_Space
|
||||||
|
|
||||||
|
[CommitRawInput]
|
||||||
|
0=Return
|
||||||
|
1=KP_Enter
|
||||||
|
2=Control+Return
|
||||||
|
3=Control+KP_Enter
|
||||||
|
4=Shift+Return
|
||||||
|
5=Shift+KP_Enter
|
||||||
|
6=Control+Shift+Return
|
||||||
|
7=Control+Shift+KP_Enter
|
||||||
|
|
||||||
|
[ChooseCharFromPhrase]
|
||||||
|
0=bracketleft
|
||||||
|
|
||||||
|
[FilterByStroke]
|
||||||
|
0=grave
|
||||||
|
|
||||||
|
[QuickPhraseTriggerRegex]
|
||||||
|
0=.(/|@)$
|
||||||
|
1="^(www|bbs|forum|mail|bbs)\\."
|
||||||
|
2=^(http|https|ftp|telnet|mailto):
|
||||||
|
|
||||||
|
[Fuzzy]
|
||||||
|
# ue -> ve
|
||||||
|
VE_UE=True
|
||||||
|
# 常见错误
|
||||||
|
NG_GN=True
|
||||||
|
# 小写时匹配字母
|
||||||
|
LowerCaseMatchLetter=True
|
||||||
|
# 内模糊音节 (xian -> xi'an)
|
||||||
|
Inner=True
|
||||||
|
# 短拼音的内模糊音节 (qie -> qi'e)
|
||||||
|
InnerShort=True
|
||||||
|
# 匹配不完整的元音 (e -> en, eng, ei)
|
||||||
|
PartialFinal=True
|
||||||
|
# 输入长度大于 4 时进行部分双拼匹配
|
||||||
|
PartialSp=False
|
||||||
|
# u <-> v
|
||||||
|
V_U=False
|
||||||
|
# an <-> ang
|
||||||
|
AN_ANG=False
|
||||||
|
# en <-> eng
|
||||||
|
EN_ENG=False
|
||||||
|
# ian <-> iang
|
||||||
|
IAN_IANG=False
|
||||||
|
# in <-> ing
|
||||||
|
IN_ING=False
|
||||||
|
# u <-> ou
|
||||||
|
U_OU=False
|
||||||
|
# uan <-> uang
|
||||||
|
UAN_UANG=False
|
||||||
|
# c <-> ch
|
||||||
|
C_CH=False
|
||||||
|
# f <-> h
|
||||||
|
F_H=False
|
||||||
|
# l <-> n
|
||||||
|
L_N=False
|
||||||
|
# l <-> r
|
||||||
|
L_R=False
|
||||||
|
# s <-> sh
|
||||||
|
S_SH=False
|
||||||
|
# z <-> zh
|
||||||
|
Z_ZH=False
|
||||||
|
# 纠错布局
|
||||||
|
Correction=None
|
||||||
|
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# 字母或者数字之后输入半角标点
|
||||||
|
HalfWidthPuncAfterLetterOrNumber=True
|
||||||
|
# 同时输入成对标点 (例如引号)
|
||||||
|
TypePairedPunctuationsTogether=False
|
||||||
|
# Enabled
|
||||||
|
Enabled=True
|
||||||
|
|
||||||
|
[Hotkey]
|
||||||
|
0=Control+period
|
||||||
|
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
[Hotkey]
|
||||||
|
# 按住切换键的修饰键时进行轮换切换
|
||||||
|
EnumerateWithTriggerKeys=True
|
||||||
|
# 向前切换输入法
|
||||||
|
EnumerateForwardKeys=
|
||||||
|
# 向后切换输入法
|
||||||
|
EnumerateBackwardKeys=
|
||||||
|
# 轮换输入法时跳过第一个输入法
|
||||||
|
EnumerateSkipFirst=False
|
||||||
|
# 触发修饰键快捷键的时限 (毫秒)
|
||||||
|
ModifierOnlyKeyTimeout=250
|
||||||
|
|
||||||
|
[Hotkey/TriggerKeys]
|
||||||
|
0=Control+space
|
||||||
|
1=Zenkaku_Hankaku
|
||||||
|
2=Hangul
|
||||||
|
|
||||||
|
[Hotkey/ActivateKeys]
|
||||||
|
0=Hangul_Hanja
|
||||||
|
|
||||||
|
[Hotkey/DeactivateKeys]
|
||||||
|
0=Hangul_Romaja
|
||||||
|
|
||||||
|
[Hotkey/AltTriggerKeys]
|
||||||
|
0=Shift_L
|
||||||
|
|
||||||
|
[Hotkey/EnumerateGroupForwardKeys]
|
||||||
|
0=Super+space
|
||||||
|
|
||||||
|
[Hotkey/EnumerateGroupBackwardKeys]
|
||||||
|
0=Shift+Super+space
|
||||||
|
|
||||||
|
[Hotkey/PrevPage]
|
||||||
|
0=Up
|
||||||
|
|
||||||
|
[Hotkey/NextPage]
|
||||||
|
0=Down
|
||||||
|
|
||||||
|
[Hotkey/PrevCandidate]
|
||||||
|
0=Shift+Tab
|
||||||
|
|
||||||
|
[Hotkey/NextCandidate]
|
||||||
|
0=Tab
|
||||||
|
|
||||||
|
[Hotkey/TogglePreedit]
|
||||||
|
0=Control+Alt+P
|
||||||
|
|
||||||
|
[Behavior]
|
||||||
|
# 默认激活输入法
|
||||||
|
ActiveByDefault=False
|
||||||
|
# 重新聚焦时重置状态
|
||||||
|
resetStateWhenFocusIn=No
|
||||||
|
# 共享输入状态
|
||||||
|
ShareInputState=No
|
||||||
|
# 在程序中显示预编辑文本
|
||||||
|
PreeditEnabledByDefault=True
|
||||||
|
# 切换输入法时显示输入法信息
|
||||||
|
ShowInputMethodInformation=True
|
||||||
|
# 在焦点更改时显示输入法信息
|
||||||
|
showInputMethodInformationWhenFocusIn=False
|
||||||
|
# 显示紧凑的输入法信息
|
||||||
|
CompactInputMethodInformation=True
|
||||||
|
# 显示第一个输入法的信息
|
||||||
|
ShowFirstInputMethodInformation=True
|
||||||
|
# 缺省每页候选词
|
||||||
|
DefaultPageSize=5
|
||||||
|
# 覆盖 XKB 选项
|
||||||
|
OverrideXkbOption=False
|
||||||
|
# 自定义 XKB 选项
|
||||||
|
CustomXkbOption=
|
||||||
|
# Force Enabled Addons
|
||||||
|
EnabledAddons=
|
||||||
|
# Force Disabled Addons
|
||||||
|
DisabledAddons=
|
||||||
|
# Preload input method to be used by default
|
||||||
|
PreloadInputMethod=True
|
||||||
|
# 允许在密码框中使用输入法
|
||||||
|
AllowInputMethodForPassword=False
|
||||||
|
# 输入密码时显示预编辑文本
|
||||||
|
ShowPreeditForPassword=False
|
||||||
|
# 保存用户数据的时间间隔(以分钟为单位)
|
||||||
|
AutoSavePeriod=30
|
||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
[Groups/0]
|
||||||
|
# Group Name
|
||||||
|
Name=Default
|
||||||
|
# Layout
|
||||||
|
Default Layout=us
|
||||||
|
# Default Input Method
|
||||||
|
DefaultIM=pinyin
|
||||||
|
|
||||||
|
[Groups/0/Items/0]
|
||||||
|
# Name
|
||||||
|
Name=keyboard-us
|
||||||
|
# Layout
|
||||||
|
Layout=
|
||||||
|
|
||||||
|
[Groups/0/Items/1]
|
||||||
|
# Name
|
||||||
|
Name=pinyin
|
||||||
|
# Layout
|
||||||
|
Layout=
|
||||||
|
|
||||||
|
[GroupOrder]
|
||||||
|
0=Default
|
||||||
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* GTK Colors
|
||||||
|
* Generated with Matugen
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* via thairanaru on GitHub: */
|
||||||
|
|
||||||
|
/* Destructive colors are basically error colors */
|
||||||
|
@define-color destructive_bg_color #ffb4ab;
|
||||||
|
@define-color destructive_fg_color #690005;
|
||||||
|
/* Follow material spec */
|
||||||
|
@define-color error_bg_color #ffb4ab;
|
||||||
|
@define-color error_fg_color #690005;
|
||||||
|
/* Follow material spec (also I think looks nicer) */
|
||||||
|
@define-color accent_fg_color #003257;
|
||||||
|
@define-color accent_bg_color #9fcafc;
|
||||||
|
/* Use surface instead of background */
|
||||||
|
@define-color window_bg_color #101418;
|
||||||
|
@define-color window_fg_color #e1e2e8;
|
||||||
|
/* Make it more similar to Adwaita */
|
||||||
|
@define-color view_bg_color #101418;
|
||||||
|
@define-color view_fg_color #e1e2e8;
|
||||||
|
@define-color headerbar_bg_color #101418;
|
||||||
|
@define-color headerbar_fg_color #e1e2e8;
|
||||||
|
@define-color sidebar_bg_color #1d2024;
|
||||||
|
@define-color sidebar_fg_color #e1e2e8;
|
||||||
|
/* There is only like one application I know that uses this, and there isn't a good way to get
|
||||||
|
a color between surface and surface container so I think just giving this surface is a good enough fallback*/
|
||||||
|
@define-color secondary_sidebar_bg_color #101418;
|
||||||
|
@define-color secondary_sidebar_fg_color #e1e2e8;
|
||||||
|
@define-color card_bg_color #1d2024;
|
||||||
|
@define-color card_fg_color #e1e2e8;
|
||||||
|
@define-color overview_bg_color #1d2024;
|
||||||
|
@define-color overview_fg_color #e1e2e8;
|
||||||
|
@define-color popover_bg_color #1d2024;
|
||||||
|
@define-color popover_fg_color #e1e2e8;
|
||||||
|
@define-color dialog_bg_color #101418;
|
||||||
|
@define-color dialog_fg_color #e1e2e8;
|
||||||
|
|
||||||
|
/* Backdrop/unfocused states - prevents white flash on window unfocus */
|
||||||
|
@define-color headerbar_backdrop_color @window_bg_color;
|
||||||
|
@define-color sidebar_backdrop_color @sidebar_bg_color;
|
||||||
|
@define-color theme_unfocused_fg_color @window_fg_color;
|
||||||
|
@define-color theme_unfocused_text_color @view_fg_color;
|
||||||
|
@define-color theme_unfocused_bg_color @window_bg_color;
|
||||||
|
@define-color theme_unfocused_base_color @window_bg_color;
|
||||||
|
@define-color theme_unfocused_selected_bg_color @accent_bg_color;
|
||||||
|
@define-color theme_unfocused_selected_fg_color @accent_fg_color;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[Settings]
|
||||||
|
gtk-icon-theme-name=Adwaita
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* GTK Colors
|
||||||
|
* Generated with Matugen
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* via thairanaru on GitHub: */
|
||||||
|
|
||||||
|
/* Destructive colors are basically error colors */
|
||||||
|
@define-color destructive_bg_color #ffb4ab;
|
||||||
|
@define-color destructive_fg_color #690005;
|
||||||
|
/* Follow material spec */
|
||||||
|
@define-color error_bg_color #ffb4ab;
|
||||||
|
@define-color error_fg_color #690005;
|
||||||
|
/* Follow material spec (also I think looks nicer) */
|
||||||
|
@define-color accent_fg_color #003257;
|
||||||
|
@define-color accent_bg_color #9fcafc;
|
||||||
|
/* Use surface instead of background */
|
||||||
|
@define-color window_bg_color #101418;
|
||||||
|
@define-color window_fg_color #e1e2e8;
|
||||||
|
/* Make it more similar to Adwaita */
|
||||||
|
@define-color view_bg_color #101418;
|
||||||
|
@define-color view_fg_color #e1e2e8;
|
||||||
|
@define-color headerbar_bg_color #101418;
|
||||||
|
@define-color headerbar_fg_color #e1e2e8;
|
||||||
|
@define-color sidebar_bg_color #1d2024;
|
||||||
|
@define-color sidebar_fg_color #e1e2e8;
|
||||||
|
/* There is only like one application I know that uses this, and there isn't a good way to get
|
||||||
|
a color between surface and surface container so I think just giving this surface is a good enough fallback*/
|
||||||
|
@define-color secondary_sidebar_bg_color #101418;
|
||||||
|
@define-color secondary_sidebar_fg_color #e1e2e8;
|
||||||
|
@define-color card_bg_color #1d2024;
|
||||||
|
@define-color card_fg_color #e1e2e8;
|
||||||
|
@define-color overview_bg_color #1d2024;
|
||||||
|
@define-color overview_fg_color #e1e2e8;
|
||||||
|
@define-color popover_bg_color #1d2024;
|
||||||
|
@define-color popover_fg_color #e1e2e8;
|
||||||
|
@define-color dialog_bg_color #101418;
|
||||||
|
@define-color dialog_fg_color #e1e2e8;
|
||||||
|
|
||||||
|
/* Backdrop/unfocused states - prevents white flash on window unfocus */
|
||||||
|
@define-color headerbar_backdrop_color @window_bg_color;
|
||||||
|
@define-color sidebar_backdrop_color @sidebar_bg_color;
|
||||||
|
@define-color theme_unfocused_fg_color @window_fg_color;
|
||||||
|
@define-color theme_unfocused_text_color @view_fg_color;
|
||||||
|
@define-color theme_unfocused_bg_color @window_bg_color;
|
||||||
|
@define-color theme_unfocused_base_color @window_bg_color;
|
||||||
|
@define-color theme_unfocused_selected_bg_color @accent_bg_color;
|
||||||
|
@define-color theme_unfocused_selected_fg_color @accent_fg_color;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[Settings]
|
||||||
|
gtk-icon-theme-name=Adwaita
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
tab_bar_edge top
|
||||||
|
tab_bar_style powerline
|
||||||
|
tab_powerline_style slanted
|
||||||
|
tab_bar_align left
|
||||||
|
tab_bar_min_tabs 2
|
||||||
|
tab_bar_margin_width 0.0
|
||||||
|
tab_bar_margin_height 2.5 1.5
|
||||||
|
tab_bar_margin_color #0f1417
|
||||||
|
|
||||||
|
tab_bar_background #0f1417
|
||||||
|
|
||||||
|
active_tab_foreground #003545
|
||||||
|
active_tab_background #89d0ee
|
||||||
|
active_tab_font_style bold
|
||||||
|
|
||||||
|
inactive_tab_foreground #c0c8cc
|
||||||
|
inactive_tab_background #0f1417
|
||||||
|
inactive_tab_font_style normal
|
||||||
|
|
||||||
|
tab_activity_symbol " ● "
|
||||||
|
|
||||||
|
tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title[:30]}{title[30:] and '…'} [{index}]"
|
||||||
|
active_tab_title_template "{fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.tab}{title[:30]}{title[30:] and '…'} [{index}]"
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
cursor #dee3e6
|
||||||
|
cursor_text_color #c0c8cc
|
||||||
|
|
||||||
|
foreground #dee3e6
|
||||||
|
background #0f1417
|
||||||
|
selection_foreground #1e333c
|
||||||
|
selection_background #b4cad5
|
||||||
|
url_color #89d0ee
|
||||||
|
|
||||||
|
color0 #0f1417
|
||||||
|
color1 #ff72a0
|
||||||
|
color2 #77ee84
|
||||||
|
color3 #fff672
|
||||||
|
color4 #6ebfe2
|
||||||
|
color5 #18546e
|
||||||
|
color6 #89d0ee
|
||||||
|
color7 #eaf5f9
|
||||||
|
color8 #8f979a
|
||||||
|
color9 #ff9fbe
|
||||||
|
color10 #a5ffaf
|
||||||
|
color11 #fff9a5
|
||||||
|
color12 #a3e3ff
|
||||||
|
color13 #b3e8ff
|
||||||
|
color14 #cef0ff
|
||||||
|
color15 #f8fdff
|
||||||
+41
-24
@@ -1,28 +1,45 @@
|
|||||||
shell zsh
|
# Font Configuration
|
||||||
|
font_size 12.0
|
||||||
|
|
||||||
# 字体配置(Nerd Font)
|
# Window Configuration
|
||||||
font_family JetBrainsMono Nerd Font
|
window_padding_width 0
|
||||||
|
background_opacity 0.85
|
||||||
|
background_blur 32
|
||||||
|
hide_window_decorations yes
|
||||||
|
|
||||||
|
# Cursor Configuration
|
||||||
|
cursor_shape block
|
||||||
|
cursor_blink_interval 1
|
||||||
|
cursor_trail 3
|
||||||
|
|
||||||
|
# Scrollback
|
||||||
|
scrollback_lines 3000
|
||||||
|
|
||||||
|
# Terminal features
|
||||||
|
copy_on_select yes
|
||||||
|
strip_trailing_spaces smart
|
||||||
|
|
||||||
|
# Key bindings for common actions
|
||||||
|
map ctrl+shift+n new_window
|
||||||
|
map ctrl+t new_tab
|
||||||
|
map ctrl+plus change_font_size all +1.0
|
||||||
|
map ctrl+minus change_font_size all -1.0
|
||||||
|
map ctrl+0 change_font_size all 0
|
||||||
|
|
||||||
|
# Tab configuration
|
||||||
|
tab_bar_style powerline
|
||||||
|
tab_bar_align left
|
||||||
|
|
||||||
|
# Shell integration
|
||||||
|
shell_integration enabled
|
||||||
|
|
||||||
|
# Dank color generation
|
||||||
|
include dank-tabs.conf
|
||||||
|
include dank-theme.conf
|
||||||
|
|
||||||
|
# BEGIN_KITTY_FONTS
|
||||||
|
font_family family="Maple Mono NF CN"
|
||||||
bold_font auto
|
bold_font auto
|
||||||
italic_font auto
|
italic_font auto
|
||||||
bold_italic_font auto
|
bold_italic_font auto
|
||||||
# font_size 12.0
|
# END_KITTY_FONTS
|
||||||
|
|
||||||
# 背景透明度(0.0 完全透明 - 1.0 完全不透明)
|
|
||||||
background_opacity 0.85
|
|
||||||
|
|
||||||
# 关闭窗口时无需二次确认
|
|
||||||
confirm_os_window_close 0
|
|
||||||
|
|
||||||
# 光标样式
|
|
||||||
cursor_shape beam
|
|
||||||
cursor_blink_interval 0.5
|
|
||||||
cursor_stop_blinking_after 15.0
|
|
||||||
|
|
||||||
# 光标拖尾动画
|
|
||||||
cursor_trail 1
|
|
||||||
cursor_trail_decay 0.1 0.4
|
|
||||||
cursor_trail_start_threshold 2
|
|
||||||
|
|
||||||
# 光标颜色(Catppuccin Mocha)
|
|
||||||
cursor #f5e0dc
|
|
||||||
cursor_text_color #1e1e2e
|
|
||||||
+342
@@ -0,0 +1,342 @@
|
|||||||
|
// This config is in the KDL format: https://kdl.dev
|
||||||
|
// "/-" comments out the following node.
|
||||||
|
// Check the wiki for a full description of the configuration:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Introduction
|
||||||
|
config-notification {
|
||||||
|
disable-failed
|
||||||
|
}
|
||||||
|
// Outputs from existing configuration
|
||||||
|
|
||||||
|
output "eDP-1" {
|
||||||
|
mode "2560x1600@180"
|
||||||
|
scale 1.5
|
||||||
|
transform "normal"
|
||||||
|
position x=0 y=0
|
||||||
|
}
|
||||||
|
|
||||||
|
/-output "eDP-1" {
|
||||||
|
// Uncomment this line to disable this output.
|
||||||
|
// off
|
||||||
|
|
||||||
|
// Resolution and, optionally, refresh rate of the output.
|
||||||
|
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
|
||||||
|
// If the refresh rate is omitted, niri will pick the highest refresh rate
|
||||||
|
// for the resolution.
|
||||||
|
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
|
||||||
|
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
|
||||||
|
mode "1920x1080@120.030"
|
||||||
|
|
||||||
|
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
|
||||||
|
scale 2
|
||||||
|
|
||||||
|
// Transform allows to rotate the output counter-clockwise, valid values are:
|
||||||
|
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
|
||||||
|
transform "normal"
|
||||||
|
|
||||||
|
// Position of the output in the global coordinate space.
|
||||||
|
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
|
||||||
|
// The cursor can only move between directly adjacent outputs.
|
||||||
|
// Output scale and rotation has to be taken into account for positioning:
|
||||||
|
// outputs are sized in logical, or scaled, pixels.
|
||||||
|
// For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
|
||||||
|
// so to put another output directly adjacent to it on the right, set its x to 1920.
|
||||||
|
// If the position is unset or results in an overlap, the output is instead placed
|
||||||
|
// automatically.
|
||||||
|
position x=1280 y=0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
gestures {
|
||||||
|
hot-corners {
|
||||||
|
off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Input device configuration.
|
||||||
|
// Find the full list of options on the wiki:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
|
||||||
|
input {
|
||||||
|
keyboard {
|
||||||
|
xkb {
|
||||||
|
// You can set rules, model, layout, variant and options.
|
||||||
|
// For more information, see xkeyboard-config(7).
|
||||||
|
|
||||||
|
// For example:
|
||||||
|
// layout "us,ru"
|
||||||
|
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
|
||||||
|
|
||||||
|
// If this section is empty, niri will fetch xkb settings
|
||||||
|
// from org.freedesktop.locale1. You can control these using
|
||||||
|
// localectl set-x11-keymap.
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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
|
||||||
|
}
|
||||||
|
|
||||||
|
// Uncomment this to make the mouse warp to the center of newly focused windows.
|
||||||
|
// warp-mouse-to-focus
|
||||||
|
|
||||||
|
// Focus windows and outputs automatically when moving the mouse into them.
|
||||||
|
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
|
||||||
|
// focus-follows-mouse max-scroll-amount="0%"
|
||||||
|
}
|
||||||
|
// You can configure outputs by their name, which you can find
|
||||||
|
// by running `niri msg outputs` while inside a niri instance.
|
||||||
|
// The built-in laptop monitor is usually called "eDP-1".
|
||||||
|
// Find more information on the wiki:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
|
||||||
|
// Remember to uncomment the node by removing "/-"!
|
||||||
|
|
||||||
|
// Settings that influence how windows are positioned and sized.
|
||||||
|
// Find more information on the wiki:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
|
||||||
|
layout {
|
||||||
|
// Set gaps around windows in logical pixels.
|
||||||
|
background-color "transparent"
|
||||||
|
// When to center a column when changing focus, options are:
|
||||||
|
// - "never", default behavior, focusing an off-screen column will keep at the left
|
||||||
|
// or right edge of the screen.
|
||||||
|
// - "always", the focused column will always be centered.
|
||||||
|
// - "on-overflow", focusing a column will center it if it doesn't fit
|
||||||
|
// together with the previously focused column.
|
||||||
|
center-focused-column "never"
|
||||||
|
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
|
||||||
|
preset-column-widths {
|
||||||
|
// Proportion sets the width as a fraction of the output width, taking gaps into account.
|
||||||
|
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
|
||||||
|
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
|
||||||
|
proportion 0.33333
|
||||||
|
proportion 0.5
|
||||||
|
proportion 0.66667
|
||||||
|
// Fixed sets the width in logical pixels exactly.
|
||||||
|
// fixed 1920
|
||||||
|
}
|
||||||
|
// You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
|
||||||
|
// preset-window-heights { }
|
||||||
|
// You can change the default width of the new windows.
|
||||||
|
default-column-width { proportion 0.5; }
|
||||||
|
// If you leave the brackets empty, the windows themselves will decide their initial width.
|
||||||
|
// default-column-width {}
|
||||||
|
// By default focus ring and border are rendered as a solid background rectangle
|
||||||
|
// behind windows. That is, they will show up through semitransparent windows.
|
||||||
|
// This is because windows using client-side decorations can have an arbitrary shape.
|
||||||
|
//
|
||||||
|
// If you don't like that, you should uncomment `prefer-no-csd` below.
|
||||||
|
// Niri will draw focus ring and border *around* windows that agree to omit their
|
||||||
|
// client-side decorations.
|
||||||
|
//
|
||||||
|
// Alternatively, you can override it with a window rule called
|
||||||
|
// `draw-border-with-background`.
|
||||||
|
border {
|
||||||
|
off
|
||||||
|
width 4
|
||||||
|
active-color "#707070" // Neutral gray
|
||||||
|
inactive-color "#d0d0d0" // Light gray
|
||||||
|
urgent-color "#cc4444" // Softer red
|
||||||
|
}
|
||||||
|
shadow {
|
||||||
|
softness 30
|
||||||
|
spread 5
|
||||||
|
offset x=0 y=5
|
||||||
|
color "#0007"
|
||||||
|
}
|
||||||
|
struts {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
layer-rule {
|
||||||
|
match namespace="^quickshell$"
|
||||||
|
place-within-backdrop true
|
||||||
|
}
|
||||||
|
overview {
|
||||||
|
workspace-shadow {
|
||||||
|
off
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Add lines like this to spawn processes at startup.
|
||||||
|
// Note that running niri as a session supports xdg-desktop-autostart,
|
||||||
|
// which may be more convenient to use.
|
||||||
|
// See the binds section below for more spawn examples.
|
||||||
|
// This line starts waybar, a commonly used bar for Wayland compositors.
|
||||||
|
environment {
|
||||||
|
XDG_CURRENT_DESKTOP "niri"
|
||||||
|
// 输入法环境变量(解决 Linux QQ 等应用无法输入中文)
|
||||||
|
GTK_IM_MODULE "fcitx5"
|
||||||
|
QT_IM_MODULE "fcitx5"
|
||||||
|
XMODIFIERS "@im=fcitx5"
|
||||||
|
SDL_IM_MODULE "fcitx5"
|
||||||
|
GLFW_IM_MODULE "ibus"
|
||||||
|
}
|
||||||
|
hotkey-overlay {
|
||||||
|
skip-at-startup
|
||||||
|
}
|
||||||
|
prefer-no-csd
|
||||||
|
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||||
|
animations {
|
||||||
|
// macOS 风格动画配置:流畅、自然、无震荡
|
||||||
|
|
||||||
|
// 工作区切换:轻微弹性,更自然
|
||||||
|
workspace-switch {
|
||||||
|
spring damping-ratio=0.95 stiffness=850 epsilon=0.0001
|
||||||
|
}
|
||||||
|
|
||||||
|
// 窗口打开:柔和适中
|
||||||
|
window-open {
|
||||||
|
duration-ms 200
|
||||||
|
curve "ease-out-cubic"
|
||||||
|
}
|
||||||
|
|
||||||
|
// 窗口关闭:柔和适中
|
||||||
|
window-close {
|
||||||
|
duration-ms 180
|
||||||
|
curve "ease-out-cubic"
|
||||||
|
}
|
||||||
|
|
||||||
|
// 水平视图移动:平滑的弹簧效果
|
||||||
|
horizontal-view-movement {
|
||||||
|
spring damping-ratio=1.0 stiffness=600 epsilon=0.0001
|
||||||
|
}
|
||||||
|
|
||||||
|
// 窗口移动:平滑自然
|
||||||
|
window-movement {
|
||||||
|
spring damping-ratio=1.0 stiffness=600 epsilon=0.0001
|
||||||
|
}
|
||||||
|
|
||||||
|
// 窗口调整大小:跟随手势,物理感
|
||||||
|
window-resize {
|
||||||
|
spring damping-ratio=1.0 stiffness=600 epsilon=0.0001
|
||||||
|
}
|
||||||
|
|
||||||
|
// 配置通知:快速弹出
|
||||||
|
config-notification-open-close {
|
||||||
|
spring damping-ratio=1.0 stiffness=1000 epsilon=0.001
|
||||||
|
}
|
||||||
|
|
||||||
|
// 截图界面
|
||||||
|
screenshot-ui-open {
|
||||||
|
duration-ms 250
|
||||||
|
curve "ease-out-cubic"
|
||||||
|
}
|
||||||
|
|
||||||
|
// 概览界面:快速响应
|
||||||
|
overview-open-close {
|
||||||
|
spring damping-ratio=1.0 stiffness=700 epsilon=0.0001
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Window rules let you adjust behavior for individual windows.
|
||||||
|
// Find more information on the wiki:
|
||||||
|
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
|
||||||
|
// Work around WezTerm's initial configure bug
|
||||||
|
// by setting an empty default-column-width.
|
||||||
|
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 {}
|
||||||
|
}
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^org\.gnome\."#
|
||||||
|
draw-border-with-background false
|
||||||
|
geometry-corner-radius 12
|
||||||
|
clip-to-geometry true
|
||||||
|
}
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^gnome-control-center$"#
|
||||||
|
match app-id=r#"^pavucontrol$"#
|
||||||
|
match app-id=r#"^nm-connection-editor$"#
|
||||||
|
default-column-width { proportion 0.5; }
|
||||||
|
open-floating false
|
||||||
|
}
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^org\.gnome\.Calculator$"#
|
||||||
|
match app-id=r#"^gnome-calculator$"#
|
||||||
|
match app-id=r#"^galculator$"#
|
||||||
|
match app-id=r#"^blueman-manager$"#
|
||||||
|
match app-id=r#"^org\.gnome\.Nautilus$"#
|
||||||
|
match app-id=r#"^xdg-desktop-portal$"#
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^steam$"# title=r#"^notificationtoasts_\d+_desktop$"#
|
||||||
|
default-floating-position x=10 y=10 relative-to="bottom-right"
|
||||||
|
open-focused false
|
||||||
|
}
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||||
|
match app-id="Alacritty"
|
||||||
|
match app-id="zen"
|
||||||
|
match app-id="com.mitchellh.ghostty"
|
||||||
|
match app-id="kitty"
|
||||||
|
draw-border-with-background false
|
||||||
|
}
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
||||||
|
match app-id="zoom"
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
// Open dms windows as floating by default
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"org.quickshell$"#
|
||||||
|
match app-id=r#"com.danklinux.dms$"#
|
||||||
|
open-floating true
|
||||||
|
}
|
||||||
|
debug {
|
||||||
|
honor-xdg-activation-with-invalid-serial
|
||||||
|
}
|
||||||
|
|
||||||
|
// Override to disable super+tab
|
||||||
|
recent-windows {
|
||||||
|
binds {
|
||||||
|
Alt+Tab { next-window scope="output"; }
|
||||||
|
Alt+Shift+Tab { previous-window scope="output"; }
|
||||||
|
Alt+grave { next-window filter="app-id"; }
|
||||||
|
Alt+Shift+grave { previous-window filter="app-id"; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Include dms files
|
||||||
|
include "dms/colors.kdl"
|
||||||
|
include "dms/layout.kdl"
|
||||||
|
include "dms/alttab.kdl"
|
||||||
|
include "dms/binds.kdl"
|
||||||
|
include "dms/outputs.kdl"
|
||||||
|
include "dms/cursor.kdl"
|
||||||
|
|
||||||
|
include "dms/windowrules.kdl"
|
||||||
@@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
binds {
|
||||||
|
// === System & Overview ===
|
||||||
|
Mod+D repeat=false { toggle-overview; }
|
||||||
|
Mod+Tab repeat=false { toggle-overview; }
|
||||||
|
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||||
|
|
||||||
|
// === Application Launchers ===
|
||||||
|
Mod+T hotkey-overlay-title="Open Terminal" { spawn "kitty"; }
|
||||||
|
Mod+Space hotkey-overlay-title="Application Launcher" {
|
||||||
|
spawn "dms" "ipc" "call" "spotlight" "toggle";
|
||||||
|
}
|
||||||
|
Mod+V hotkey-overlay-title="Clipboard Manager" {
|
||||||
|
spawn "dms" "ipc" "call" "clipboard" "toggle";
|
||||||
|
}
|
||||||
|
Mod+M hotkey-overlay-title="Task Manager" {
|
||||||
|
spawn "dms" "ipc" "call" "processlist" "focusOrToggle";
|
||||||
|
}
|
||||||
|
|
||||||
|
Super+X hotkey-overlay-title="Power Menu: Toggle" { spawn "dms" "ipc" "call" "powermenu" "toggle"; }
|
||||||
|
Mod+Comma hotkey-overlay-title="Settings" {
|
||||||
|
spawn "dms" "ipc" "call" "settings" "focusOrToggle";
|
||||||
|
}
|
||||||
|
Mod+Y hotkey-overlay-title="Browse Wallpapers" {
|
||||||
|
spawn "dms" "ipc" "call" "dankdash" "wallpaper";
|
||||||
|
}
|
||||||
|
Mod+N hotkey-overlay-title="Notification Center" { spawn "dms" "ipc" "call" "notifications" "toggle"; }
|
||||||
|
Mod+Shift+N hotkey-overlay-title="Notepad" { spawn "dms" "ipc" "call" "notepad" "toggle"; }
|
||||||
|
|
||||||
|
// === Security ===
|
||||||
|
Mod+Alt+L hotkey-overlay-title="Lock Screen" {
|
||||||
|
spawn "dms" "ipc" "call" "lock" "lock";
|
||||||
|
}
|
||||||
|
Mod+Shift+E { quit; }
|
||||||
|
Ctrl+Alt+Delete hotkey-overlay-title="Task Manager" {
|
||||||
|
spawn "dms" "ipc" "call" "processlist" "focusOrToggle";
|
||||||
|
}
|
||||||
|
|
||||||
|
// === Audio Controls ===
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
|
||||||
|
// === Brightness Controls ===
|
||||||
|
XF86MonBrightnessUp allow-when-locked=true {
|
||||||
|
spawn "dms" "ipc" "call" "brightness" "increment" "5" "";
|
||||||
|
}
|
||||||
|
XF86MonBrightnessDown allow-when-locked=true {
|
||||||
|
spawn "dms" "ipc" "call" "brightness" "decrement" "5" "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// === Window Management ===
|
||||||
|
Mod+Q repeat=false { close-window; }
|
||||||
|
Mod+F { maximize-column; }
|
||||||
|
Mod+Shift+F { fullscreen-window; }
|
||||||
|
Mod+Shift+T { toggle-window-floating; }
|
||||||
|
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
|
||||||
|
Mod+W { toggle-column-tabbed-display; }
|
||||||
|
Mod+Shift+W hotkey-overlay-title="Create window rule" { spawn "dms" "ipc" "call" "window-rules" "toggle"; }
|
||||||
|
|
||||||
|
// === Focus Navigation ===
|
||||||
|
Mod+Left { focus-column-left; }
|
||||||
|
Mod+Down { focus-window-down; }
|
||||||
|
Mod+Up { focus-window-up; }
|
||||||
|
Mod+Right { focus-column-right; }
|
||||||
|
Mod+H { focus-column-left; }
|
||||||
|
Mod+J { focus-window-down; }
|
||||||
|
Mod+K { focus-window-up; }
|
||||||
|
Mod+L { focus-column-right; }
|
||||||
|
|
||||||
|
// === Window Movement ===
|
||||||
|
Mod+Shift+Left { move-column-left; }
|
||||||
|
Mod+Shift+Down { move-window-down; }
|
||||||
|
Mod+Shift+Up { move-window-up; }
|
||||||
|
Mod+Shift+Right { move-column-right; }
|
||||||
|
Mod+Shift+H { move-column-left; }
|
||||||
|
Mod+Shift+J { move-window-down; }
|
||||||
|
Mod+Shift+K { move-window-up; }
|
||||||
|
Mod+Shift+L { move-column-right; }
|
||||||
|
|
||||||
|
// === Column Navigation ===
|
||||||
|
Mod+Home { focus-column-first; }
|
||||||
|
Mod+End { focus-column-last; }
|
||||||
|
Mod+Ctrl+Home { move-column-to-first; }
|
||||||
|
Mod+Ctrl+End { move-column-to-last; }
|
||||||
|
|
||||||
|
// === Monitor Navigation ===
|
||||||
|
Mod+Ctrl+Left { focus-monitor-left; }
|
||||||
|
//Mod+Ctrl+Down { focus-monitor-down; }
|
||||||
|
//Mod+Ctrl+Up { focus-monitor-up; }
|
||||||
|
Mod+Ctrl+Right { focus-monitor-right; }
|
||||||
|
Mod+Ctrl+H { focus-monitor-left; }
|
||||||
|
Mod+Ctrl+J { focus-monitor-down; }
|
||||||
|
Mod+Ctrl+K { focus-monitor-up; }
|
||||||
|
Mod+Ctrl+L { focus-monitor-right; }
|
||||||
|
|
||||||
|
// === Move to Monitor ===
|
||||||
|
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; }
|
||||||
|
|
||||||
|
// === Workspace Navigation ===
|
||||||
|
Mod+Page_Down { focus-workspace-down; }
|
||||||
|
Mod+Page_Up { focus-workspace-up; }
|
||||||
|
Mod+U { focus-workspace-down; }
|
||||||
|
Mod+I { focus-workspace-up; }
|
||||||
|
Mod+Ctrl+Down { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+Up { move-column-to-workspace-up; }
|
||||||
|
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||||
|
|
||||||
|
// === Workspace Management ===
|
||||||
|
Ctrl+Shift+R hotkey-overlay-title="Rename Workspace" {
|
||||||
|
spawn "dms" "ipc" "call" "workspace-rename" "open";
|
||||||
|
}
|
||||||
|
|
||||||
|
// === Move Workspaces ===
|
||||||
|
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; }
|
||||||
|
|
||||||
|
// === Mouse Wheel Navigation ===
|
||||||
|
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||||
|
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||||
|
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||||
|
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||||
|
|
||||||
|
Mod+WheelScrollRight { focus-column-right; }
|
||||||
|
Mod+WheelScrollLeft { focus-column-left; }
|
||||||
|
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||||
|
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||||
|
|
||||||
|
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||||
|
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||||
|
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||||
|
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||||
|
|
||||||
|
// === Numbered Workspaces ===
|
||||||
|
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; }
|
||||||
|
|
||||||
|
// === Move to Numbered Workspaces ===
|
||||||
|
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+Shift+6 { move-column-to-workspace 6; }
|
||||||
|
Mod+Shift+7 { move-column-to-workspace 7; }
|
||||||
|
Mod+Shift+8 { move-column-to-workspace 8; }
|
||||||
|
Mod+Shift+9 { move-column-to-workspace 9; }
|
||||||
|
|
||||||
|
// === Column Management ===
|
||||||
|
Mod+BracketLeft { consume-or-expel-window-left; }
|
||||||
|
Mod+BracketRight { consume-or-expel-window-right; }
|
||||||
|
Mod+Period { expel-window-from-column; }
|
||||||
|
|
||||||
|
// === Sizing & Layout ===
|
||||||
|
Mod+R { switch-preset-column-width; }
|
||||||
|
Mod+Shift+R { switch-preset-window-height; }
|
||||||
|
Mod+Ctrl+R { reset-window-height; }
|
||||||
|
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||||
|
Mod+C { center-column; }
|
||||||
|
Mod+Ctrl+C { center-visible-columns; }
|
||||||
|
|
||||||
|
// === Manual Sizing ===
|
||||||
|
Mod+Minus { set-column-width "-10%"; }
|
||||||
|
Mod+Equal { set-column-width "+10%"; }
|
||||||
|
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||||
|
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||||
|
|
||||||
|
// === Screenshots ===
|
||||||
|
XF86Launch1 { screenshot; }
|
||||||
|
Ctrl+XF86Launch1 { screenshot-screen; }
|
||||||
|
Alt+XF86Launch1 { screenshot-window; }
|
||||||
|
Print { screenshot; }
|
||||||
|
Ctrl+Print { screenshot-screen; }
|
||||||
|
Alt+Print { screenshot-window; }
|
||||||
|
// === System Controls ===
|
||||||
|
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||||
|
Mod+Shift+P { power-off-monitors; }
|
||||||
|
}
|
||||||
@@ -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 "#89d0ee"
|
||||||
|
inactive-color "#8a9296"
|
||||||
|
urgent-color "#ffb4ab"
|
||||||
|
}
|
||||||
|
|
||||||
|
border {
|
||||||
|
active-color "#89d0ee"
|
||||||
|
inactive-color "#8a9296"
|
||||||
|
urgent-color "#ffb4ab"
|
||||||
|
}
|
||||||
|
|
||||||
|
shadow {
|
||||||
|
color "#00000070"
|
||||||
|
}
|
||||||
|
|
||||||
|
tab-indicator {
|
||||||
|
active-color "#89d0ee"
|
||||||
|
inactive-color "#8a9296"
|
||||||
|
urgent-color "#ffb4ab"
|
||||||
|
}
|
||||||
|
|
||||||
|
insert-hint {
|
||||||
|
color "#89d0ee80"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
recent-windows {
|
||||||
|
highlight {
|
||||||
|
active-color "#004d62"
|
||||||
|
urgent-color "#ffb4ab"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// ! DO NOT EDIT !
|
||||||
|
// ! AUTO-GENERATED BY DMS !
|
||||||
|
// ! CHANGES WILL BE OVERWRITTEN !
|
||||||
|
// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
|
||||||
|
|
||||||
|
cursor {
|
||||||
|
xcursor-theme "breeze_cursors"
|
||||||
|
xcursor-size 24
|
||||||
|
hide-when-typing
|
||||||
|
hide-after-inactive-ms 5000
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
// ! 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
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
/-output "eDP-1" {
|
||||||
|
// Uncomment this line to disable this output.
|
||||||
|
// off
|
||||||
|
|
||||||
|
// Resolution and, optionally, refresh rate of the output.
|
||||||
|
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
|
||||||
|
// If the refresh rate is omitted, niri will pick the highest refresh rate
|
||||||
|
// for the resolution.
|
||||||
|
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
|
||||||
|
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
|
||||||
|
mode "1920x1080@120.030"
|
||||||
|
|
||||||
|
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
|
||||||
|
scale 2
|
||||||
|
|
||||||
|
// Transform allows to rotate the output counter-clockwise, valid values are:
|
||||||
|
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
|
||||||
|
transform "normal"
|
||||||
|
|
||||||
|
// Position of the output in the global coordinate space.
|
||||||
|
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
|
||||||
|
// The cursor can only move between directly adjacent outputs.
|
||||||
|
// Output scale and rotation has to be taken into account for positioning:
|
||||||
|
// outputs are sized in logical, or scaled, pixels.
|
||||||
|
// For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
|
||||||
|
// so to put another output directly adjacent to it on the right, set its x to 1920.
|
||||||
|
// If the position is unset or results in an overlap, the output is instead placed
|
||||||
|
// automatically.
|
||||||
|
position x=1280 y=0
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
// ! DO NOT EDIT !
|
||||||
|
// ! AUTO-GENERATED BY DMS !
|
||||||
|
// ! CHANGES WILL BE OVERWRITTEN !
|
||||||
|
// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
|
||||||
|
|
||||||
|
layer-rule {
|
||||||
|
match namespace="dms:blurwallpaper"
|
||||||
|
place-within-backdrop true
|
||||||
|
}
|
||||||
+6
-73
@@ -1,73 +1,6 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- Neovim 入口配置
|
-- init.lua — Neovim 入口文件
|
||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
|
require("config.options")
|
||||||
-- Leader 键
|
require("config.keymaps")
|
||||||
vim.g.mapleader = " "
|
require("config.lazy")
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------------
|
|
||||||
-- 编辑器选项
|
|
||||||
-- ---------------------------------------------------------------------------
|
|
||||||
local opt = vim.opt
|
|
||||||
|
|
||||||
opt.number = true -- 行号
|
|
||||||
opt.relativenumber = true -- 相对行号
|
|
||||||
opt.tabstop = 4 -- Tab 宽度
|
|
||||||
opt.shiftwidth = 4 -- 缩进宽度
|
|
||||||
opt.expandtab = true -- Tab 转空格
|
|
||||||
opt.smartindent = true -- 智能缩进
|
|
||||||
opt.wrap = false -- 不自动换行
|
|
||||||
opt.cursorline = true -- 高亮当前行
|
|
||||||
opt.signcolumn = "yes" -- 始终显示符号列
|
|
||||||
opt.updatetime = 250 -- 快速更新
|
|
||||||
opt.timeoutlen = 300 -- 快捷键超时
|
|
||||||
opt.splitright = true -- 垂直分屏在右侧
|
|
||||||
opt.splitbelow = true -- 水平分屏在下方
|
|
||||||
opt.undofile = true -- 持久化撤销
|
|
||||||
opt.ignorecase = true -- 搜索忽略大小写
|
|
||||||
opt.smartcase = true -- 智能大小写
|
|
||||||
opt.wildmenu = true -- 命令行补全增强
|
|
||||||
opt.wildmode = "longest:full,full"
|
|
||||||
opt.pumheight = 10 -- 补全菜单最大高度
|
|
||||||
opt.clipboard = "unnamedplus" -- 系统剪贴板
|
|
||||||
opt.termguicolors = true -- 真彩色支持
|
|
||||||
opt.foldlevel = 99 -- 默认展开所有折叠
|
|
||||||
|
|
||||||
-- 全局浮动窗口圆角边框(与 blink.cmp 补全菜单一致)
|
|
||||||
vim.o.winborder = "rounded"
|
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------------
|
|
||||||
-- 基础键位
|
|
||||||
-- ---------------------------------------------------------------------------
|
|
||||||
local keymap = vim.keymap.set
|
|
||||||
|
|
||||||
-- 编辑器操作
|
|
||||||
keymap("n", "<leader>w", "<cmd>w<cr>", { desc = "保存" })
|
|
||||||
keymap("n", "<leader>q", "<cmd>q<cr>", { desc = "退出" })
|
|
||||||
keymap("n", "<leader>/", "<cmd>noh<cr>", { desc = "清除搜索高亮" })
|
|
||||||
|
|
||||||
-- 窗口导航
|
|
||||||
keymap("n", "<C-h>", "<C-w>h", { desc = "跳到左边窗口" })
|
|
||||||
keymap("n", "<C-j>", "<C-w>j", { desc = "跳到下面窗口" })
|
|
||||||
keymap("n", "<C-k>", "<C-w>k", { desc = "跳到上面窗口" })
|
|
||||||
keymap("n", "<C-l>", "<C-w>l", { desc = "跳到右边窗口" })
|
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------------
|
|
||||||
-- lazy.nvim 插件管理器
|
|
||||||
-- ---------------------------------------------------------------------------
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
||||||
if not vim.uv.fs_stat(lazypath) then
|
|
||||||
vim.fn.system({
|
|
||||||
"git", "clone", "--filter=blob:none",
|
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
|
||||||
"--branch=stable", lazypath,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
vim.opt.rtp:prepend(lazypath)
|
|
||||||
|
|
||||||
require("lazy").setup({
|
|
||||||
spec = { { import = "plugins" } },
|
|
||||||
defaults = { lazy = true },
|
|
||||||
install = { colorscheme = { "default" } },
|
|
||||||
checker = { enabled = false },
|
|
||||||
})
|
|
||||||
|
|||||||
+32
-10
@@ -1,25 +1,47 @@
|
|||||||
{
|
{
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
|
||||||
"cmake-tools.nvim": { "branch": "master", "commit": "98cdc162572a7b77733030425d8d045d68f2a1fd" },
|
"bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" },
|
||||||
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
|
"cmake-tools.nvim": { "branch": "master", "commit": "22859d754b5de738cfe9945e0910729f63deefd0" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
|
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
|
||||||
|
"dashboard-nvim": { "branch": "master", "commit": "f787e3462c2ee2b6117b17c1aa4ddf66cb6f57fe" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" },
|
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||||
|
"flash.nvim": { "branch": "main", "commit": "b6346946d10d07998efee029fb0f7a593806d0cd" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "31d6fb2d618bca1482b9f274751ead5f03461408" },
|
||||||
|
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "0a695750d747db1e7e70bcf0267ef8951c95fc83" },
|
"lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4068c3ebd4cb335b25239e5ea35c22ee6007962" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "16ba83bfc8a25f52bb545134f5bee082b195c460" },
|
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
|
||||||
|
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
|
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "531771530d4f82ad2d21e436e3cc052d68d7aebb" },
|
"nvim-dap": { "branch": "master", "commit": "9e848e09a697ee95302a3ef2dd43fd6eb709e570" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" },
|
"nvim-dap-ui": { "branch": "master", "commit": "cc9dd33aade7f20bae414d0cba163bc60d4d4b43" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "ed19590a3a9792901553c388d1aadafce012f80d" },
|
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-lspconfig": { "branch": "master", "commit": "b386c50cd7816f8c8a2b13b298a218af1f5a75c6" },
|
||||||
|
"nvim-nio": { "branch": "master", "commit": "edcc181a875301dd21840189aa2f2f9ad69fc172" },
|
||||||
|
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||||
|
"nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" },
|
||||||
|
"nvim-tree.lua": { "branch": "master", "commit": "4213bd6eabac38b16dd6615002b6243b23cf3bf6" },
|
||||||
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" },
|
"nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "0ca28b61a04fe7426cefbdd52c2647ef0e335b5f" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
|
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
|
||||||
|
"persistent-breakpoints.nvim": { "branch": "main", "commit": "d1656221836207787b8a7969cc2dc72668c4742a" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||||
"rustaceanvim": { "branch": "main", "commit": "88575b98bb9937fb9983ddec5e532b67e75ce677" },
|
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||||
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "a798325b7f36acc62741d1029930a7b96d4dd4bf" },
|
||||||
|
"rustaceanvim": { "branch": "main", "commit": "614a3e30e6e94c5aee204fe5d5b6a50cdaac4be6" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
|
||||||
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
|
||||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||||
|
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
|
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
|
||||||
|
"vim-illuminate": { "branch": "master", "commit": "91313e598ca62e110bc71535c49069b66b9883c9" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,146 @@
|
|||||||
|
-- =============================================================================
|
||||||
|
-- keymaps.lua — 基础键位映射
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
local keymap = vim.keymap.set
|
||||||
|
|
||||||
|
-- Leader 键
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
vim.g.maplocalleader = " "
|
||||||
|
|
||||||
|
-- 编辑器操作
|
||||||
|
keymap("n", "<leader>w", "<cmd>w<cr>", { desc = "保存" })
|
||||||
|
|
||||||
|
-- 关闭当前 buffer / 窗口(VSCode 风格)
|
||||||
|
keymap("n", "<leader>q", function()
|
||||||
|
local bt = vim.bo.buftype
|
||||||
|
local ft = vim.bo.filetype
|
||||||
|
|
||||||
|
-- 统计文件 buffer 数量
|
||||||
|
local file_bufs = 0
|
||||||
|
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
|
||||||
|
if vim.api.nvim_buf_is_loaded(bufnr) then
|
||||||
|
local b = vim.bo[bufnr]
|
||||||
|
if b.buftype == "" and b.filetype ~= "" and b.filetype ~= "NvimTree" and b.filetype ~= "dashboard" then
|
||||||
|
file_bufs = file_bufs + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- dashboard:无文件直接退出
|
||||||
|
if ft == "dashboard" then
|
||||||
|
vim.cmd("qa")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- nvim-tree:有文件关闭树,无文件退出
|
||||||
|
if ft == "NvimTree" then
|
||||||
|
if file_bufs == 0 then
|
||||||
|
vim.cmd("qa")
|
||||||
|
else
|
||||||
|
vim.cmd("NvimTreeClose")
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- quickfix:cclose
|
||||||
|
if bt == "quickfix" then
|
||||||
|
vim.cmd("cclose")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 其他特殊 buffer:关闭窗口(失败则退出)
|
||||||
|
if bt ~= "" then
|
||||||
|
local ok = pcall(vim.cmd, "close")
|
||||||
|
if not ok then
|
||||||
|
vim.cmd("qa")
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 普通文件:根据数量决定退出或关闭
|
||||||
|
if file_bufs <= 1 then
|
||||||
|
vim.cmd("qa")
|
||||||
|
else
|
||||||
|
vim.cmd("Bdelete")
|
||||||
|
end
|
||||||
|
end, { desc = "关闭当前 buffer/窗口" })
|
||||||
|
|
||||||
|
keymap("n", "<leader>/", "<cmd>noh<cr>", { desc = "清除搜索高亮" })
|
||||||
|
|
||||||
|
-- 窗口导航
|
||||||
|
keymap("n", "<C-h>", "<C-w>h", { desc = "跳到左边窗口" })
|
||||||
|
keymap("n", "<C-j>", "<C-w>j", { desc = "跳到下面窗口" })
|
||||||
|
keymap("n", "<C-k>", "<C-w>k", { desc = "跳到上面窗口" })
|
||||||
|
keymap("n", "<C-l>", "<C-w>l", { desc = "跳到右边窗口" })
|
||||||
|
|
||||||
|
-- 窗口操作
|
||||||
|
keymap("n", "<leader>sv", "<cmd>vsplit<cr>", { desc = "垂直分屏" })
|
||||||
|
keymap("n", "<leader>sh", "<cmd>split<cr>", { desc = "水平分屏" })
|
||||||
|
keymap("n", "<leader>sc", "<cmd>close<cr>", { desc = "关闭窗口" })
|
||||||
|
|
||||||
|
-- Buffer 导航
|
||||||
|
keymap("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "下一个 buffer" })
|
||||||
|
keymap("n", "<S-l>", "<cmd>bnext<cr>", { desc = "上一个 buffer" })
|
||||||
|
|
||||||
|
-- Buffer 操作
|
||||||
|
keymap("n", "<leader>bc", "<cmd>Bdelete<cr>", { desc = "关闭当前 buffer" })
|
||||||
|
keymap("n", "<leader>bs", "<cmd>wall<cr>", { desc = "保存全部" })
|
||||||
|
keymap("n", "<leader>bo", function()
|
||||||
|
local current = vim.api.nvim_get_current_buf()
|
||||||
|
local special_ft = { NvimTree = true, dashboard = true, [""] = true }
|
||||||
|
|
||||||
|
-- 检查是否有未保存的文件 buffer
|
||||||
|
local unsaved = {}
|
||||||
|
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
|
||||||
|
if vim.api.nvim_buf_is_loaded(bufnr) then
|
||||||
|
local ft = vim.bo[bufnr].filetype
|
||||||
|
local bt = vim.bo[bufnr].buftype
|
||||||
|
-- 只统计普通文件 buffer
|
||||||
|
if bt == "" and not special_ft[ft] and bufnr ~= current then
|
||||||
|
if vim.bo[bufnr].modified then
|
||||||
|
table.insert(unsaved, bufnr)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function close_others(force)
|
||||||
|
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
|
||||||
|
if vim.api.nvim_buf_is_loaded(bufnr) and bufnr ~= current then
|
||||||
|
local ft = vim.bo[bufnr].filetype
|
||||||
|
local bt = vim.bo[bufnr].buftype
|
||||||
|
-- 只关闭普通文件 buffer,保留 nvim-tree/dashboard 等
|
||||||
|
if bt == "" and not special_ft[ft] then
|
||||||
|
vim.api.nvim_buf_delete(bufnr, { force = force })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if #unsaved > 0 then
|
||||||
|
vim.ui.select({ "保存全部", "强制关闭(不保存)", "取消" }, { prompt = "有 " .. #unsaved .. " 个未保存的 buffer" }, function(choice)
|
||||||
|
if not choice then return end
|
||||||
|
if choice == "保存全部" then
|
||||||
|
for _, bufnr in ipairs(unsaved) do
|
||||||
|
vim.api.nvim_buf_call(bufnr, function()
|
||||||
|
vim.cmd("write")
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
close_others(false)
|
||||||
|
elseif choice == "强制关闭(不保存)" then
|
||||||
|
close_others(true)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
close_others(false)
|
||||||
|
end
|
||||||
|
end, { desc = "关闭其他 buffer" })
|
||||||
|
|
||||||
|
-- 文件树
|
||||||
|
keymap("n", "<leader>e", "<cmd>NvimTreeToggle<cr>", { desc = "文件树" })
|
||||||
|
|
||||||
|
-- 终端
|
||||||
|
keymap("n", "<c-`>", "<cmd>ToggleTerm<cr>", { desc = "终端" })
|
||||||
|
keymap("t", "<c-`>", "<cmd>ToggleTerm<cr>", { desc = "终端" })
|
||||||
|
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
-- =============================================================================
|
||||||
|
-- lazy.lua — 插件管理器初始化
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.uv.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git", "clone", "--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = {
|
||||||
|
{ import = "plugins" },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- 默认延迟加载插件
|
||||||
|
defaults = {
|
||||||
|
lazy = true,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- 安装时尝试加载的主题
|
||||||
|
install = {
|
||||||
|
colorscheme = { "tokyonight", "habamax" },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- 关闭自动检查更新(手动 :Lazy check)
|
||||||
|
checker = {
|
||||||
|
enabled = false,
|
||||||
|
notify = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- 统一 UI 圆角边框
|
||||||
|
ui = {
|
||||||
|
border = "rounded",
|
||||||
|
},
|
||||||
|
|
||||||
|
-- 禁用内置插件提升启动速度
|
||||||
|
performance = {
|
||||||
|
rtp = {
|
||||||
|
disabled_plugins = {
|
||||||
|
"gzip",
|
||||||
|
"matchit",
|
||||||
|
"matchparen",
|
||||||
|
"netrwPlugin",
|
||||||
|
"tarPlugin",
|
||||||
|
"tohtml",
|
||||||
|
"tutor",
|
||||||
|
"zipPlugin",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
-- =============================================================================
|
||||||
|
-- options.lua — 编辑器基础选项
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
local opt = vim.opt
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 行号
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.number = true -- 当前行绝对行号
|
||||||
|
opt.relativenumber = true -- 相对行号
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 缩进
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.tabstop = 4 -- Tab 宽度
|
||||||
|
opt.shiftwidth = 4 -- 缩进宽度
|
||||||
|
opt.expandtab = true -- Tab 转空格
|
||||||
|
opt.autoindent = true -- 新行继承上一行缩进
|
||||||
|
opt.smartindent = true -- 智能缩进
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 搜索
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.ignorecase = true -- 搜索忽略大小写
|
||||||
|
opt.smartcase = true -- 含大写字母时区分大小写
|
||||||
|
opt.hlsearch = true -- 高亮搜索匹配
|
||||||
|
opt.incsearch = true -- 实时预览搜索
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 显示 & 界面
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.termguicolors = true -- 真彩色
|
||||||
|
opt.cursorline = true -- 高亮当前行
|
||||||
|
opt.signcolumn = "yes" -- 始终显示符号列
|
||||||
|
opt.wrap = false -- 不自动换行
|
||||||
|
opt.scrolloff = 8 -- 光标距上下边缘保持 8 行
|
||||||
|
opt.sidescrolloff = 8 -- 光标距左右边缘保持 8 列
|
||||||
|
opt.showmode = false -- 隐藏模式提示(状态栏会显示)
|
||||||
|
opt.pumheight = 10 -- 补全菜单最大高度
|
||||||
|
opt.winborder = "rounded" -- 全局浮动窗口圆角
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 分割窗口
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.splitright = true -- 垂直分割在右侧
|
||||||
|
opt.splitbelow = true -- 水平分割在下方
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 文件 & 编码
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.encoding = "utf-8" -- 文件编码
|
||||||
|
opt.fileencoding = "utf-8"
|
||||||
|
opt.swapfile = false -- 关闭交换文件
|
||||||
|
opt.backup = false -- 关闭备份文件
|
||||||
|
opt.undofile = true -- 持久化撤销
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 鼠标 & 剪贴板
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.mouse = "a" -- 所有模式启用鼠标
|
||||||
|
opt.clipboard = "unnamedplus" -- 系统剪贴板
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 性能
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.updatetime = 250 -- LSP 悬浮提示触发延迟
|
||||||
|
opt.timeoutlen = 300 -- 快捷键序列超时
|
||||||
|
opt.wildmenu = true -- 命令行补全增强
|
||||||
|
opt.wildmode = "longest:full,full"
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 补全
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.completeopt = { "menuone", "noselect" } -- blink.cmp 推荐配置
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 折叠(为 nvim-ufo 准备)
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.foldlevel = 99
|
||||||
|
opt.foldlevelstart = 99 -- 启动时展开所有折叠
|
||||||
|
opt.foldenable = true -- 启用折叠
|
||||||
|
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
-- 其他
|
||||||
|
-- ─────────────────────────────────────────────
|
||||||
|
opt.conceallevel = 0 -- 不隐藏特殊字符
|
||||||
|
opt.isfname:append("@-@") -- 文件名识别 @ 符号
|
||||||
@@ -1,11 +1,13 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 自动括号补全 (nvim-autopairs)
|
-- autopairs.lua — 自动括号补全
|
||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
opts = {},
|
opts = {
|
||||||
|
check_ts = true, -- Treesitter 感知,避免在字符串/注释里自动配对
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,49 +1,48 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- CMake 工具 (cmake-tools.nvim)
|
-- cmake-tools.lua — CMake 工具
|
||||||
-- CMake 项目全流程:生成、构建、运行、调试
|
-- =============================================================================
|
||||||
-- ============================================================================
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"Civitasv/cmake-tools.nvim",
|
"Civitasv/cmake-tools.nvim",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
ft = { "cmake", "c", "cpp" },
|
ft = { "cmake", "c", "cpp" },
|
||||||
|
opts = {
|
||||||
|
cmake_command = "cmake",
|
||||||
|
ctest_command = "ctest",
|
||||||
|
cmake_use_preset = true,
|
||||||
|
cmake_regenerate_on_save = true,
|
||||||
|
cmake_generate_options = { "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" },
|
||||||
|
cmake_build_directory = "build",
|
||||||
|
cmake_soft_link_compile_commands = true,
|
||||||
|
cmake_dap_configuration = {
|
||||||
|
name = "cpp",
|
||||||
|
type = "codelldb",
|
||||||
|
request = "launch",
|
||||||
|
stopOnEntry = false,
|
||||||
|
runInTerminal = true,
|
||||||
|
console = "integratedTerminal",
|
||||||
|
},
|
||||||
|
cmake_executor = {
|
||||||
|
name = "quickfix",
|
||||||
opts = {
|
opts = {
|
||||||
cmake_command = "cmake",
|
show = "always",
|
||||||
ctest_command = "ctest",
|
position = "belowright",
|
||||||
cmake_use_preset = true,
|
size = 10,
|
||||||
cmake_regenerate_on_save = true,
|
auto_close_when_success = true,
|
||||||
cmake_generate_options = { "-DCMAKE_EXPORT_COMPILE_COMMANDS=1" },
|
|
||||||
cmake_build_directory = "build",
|
|
||||||
cmake_soft_link_compile_commands = true,
|
|
||||||
cmake_dap_configuration = {
|
|
||||||
name = "cpp",
|
|
||||||
type = "codelldb",
|
|
||||||
request = "launch",
|
|
||||||
stopOnEntry = false,
|
|
||||||
runInTerminal = true,
|
|
||||||
console = "integratedTerminal",
|
|
||||||
},
|
|
||||||
cmake_executor = {
|
|
||||||
name = "quickfix",
|
|
||||||
opts = {
|
|
||||||
show = "always",
|
|
||||||
position = "belowright",
|
|
||||||
size = 10,
|
|
||||||
auto_close_when_success = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>cg", "<cmd>CMakeGenerate<cr>", desc = "CMake 生成" },
|
|
||||||
{ "<leader>cb", "<cmd>CMakeBuild<cr>", desc = "CMake 构建" },
|
|
||||||
{ "<leader>cr", "<cmd>CMakeRun<cr>", desc = "CMake 运行" },
|
|
||||||
{ "<leader>cd", "<cmd>CMakeDebug<cr>", desc = "CMake 调试" },
|
|
||||||
{ "<leader>cc", "<cmd>CMakeClean<cr>", desc = "CMake 清理" },
|
|
||||||
{ "<leader>cs", "<cmd>CMakeSelectBuildType<cr>", desc = "选择构建类型" },
|
|
||||||
{ "<leader>ct", "<cmd>CMakeSelectBuildTarget<cr>", desc = "选择构建目标" },
|
|
||||||
{ "<leader>cl", "<cmd>CMakeSelectLaunchTarget<cr>", desc = "选择运行目标" },
|
|
||||||
{ "<leader>ck", "<cmd>CMakeSelectKit<cr>", desc = "选择编译器" },
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>cg", "<cmd>CMakeGenerate<cr>", desc = "CMake 生成" },
|
||||||
|
{ "<leader>cb", "<cmd>CMakeBuild<cr>", desc = "CMake 构建" },
|
||||||
|
{ "<leader>cr", "<cmd>CMakeRun<cr>", desc = "CMake 运行" },
|
||||||
|
{ "<leader>cd", "<cmd>CMakeDebug<cr>", desc = "CMake 调试" },
|
||||||
|
{ "<leader>cc", "<cmd>CMakeClean<cr>", desc = "CMake 清理" },
|
||||||
|
{ "<leader>cs", "<cmd>CMakeSelectBuildType<cr>", desc = "选择构建类型" },
|
||||||
|
{ "<leader>ct", "<cmd>CMakeSelectBuildTarget<cr>", desc = "选择构建目标" },
|
||||||
|
{ "<leader>cl", "<cmd>CMakeSelectLaunchTarget<cr>", desc = "选择运行目标" },
|
||||||
|
{ "<leader>ck", "<cmd>CMakeSelectKit<cr>", desc = "选择编译器" },
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,42 +1,45 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 主题 (tokyonight)
|
-- colorscheme.lua — 主题
|
||||||
-- 透明背景,与终端透明效果融合
|
-- =============================================================================
|
||||||
-- ============================================================================
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
opts = {
|
opts = {
|
||||||
style = "night",
|
style = "night",
|
||||||
transparent = true,
|
transparent = true,
|
||||||
styles = {
|
styles = {
|
||||||
sidebars = "transparent",
|
sidebars = "transparent",
|
||||||
floats = "transparent",
|
floats = "transparent",
|
||||||
},
|
},
|
||||||
},
|
on_highlights = function(hl, c)
|
||||||
config = function(_, opts)
|
-- bufferline 标签栏背景透明
|
||||||
require("tokyonight").setup(opts)
|
hl.BufferLineFill = { bg = "NONE" }
|
||||||
vim.cmd.colorscheme("tokyonight")
|
hl.BufferLineBackGround = { bg = "NONE", fg = c.fg_gutter }
|
||||||
|
hl.BufferLineBackGroundVisible = { bg = "NONE", fg = c.fg }
|
||||||
-- inlay hints 去掉背景,融入透明主题
|
hl.BufferLineBackGroundSelected = { bg = c.bg_highlight, fg = c.fg, bold = true }
|
||||||
vim.api.nvim_create_autocmd("ColorScheme", {
|
hl.BufferLineSeparator = { fg = c.fg_gutter }
|
||||||
pattern = "tokyonight",
|
hl.BufferLineSeparatorSelected = { fg = c.blue }
|
||||||
callback = function()
|
end,
|
||||||
vim.api.nvim_set_hl(0, "LspInlayHint", {
|
|
||||||
bg = "NONE",
|
|
||||||
fg = "#565f89",
|
|
||||||
italic = true,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
-- 立即生效一次
|
|
||||||
vim.api.nvim_set_hl(0, "LspInlayHint", {
|
|
||||||
bg = "NONE",
|
|
||||||
fg = "#565f89",
|
|
||||||
italic = true,
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("tokyonight").setup(opts)
|
||||||
|
vim.cmd.colorscheme("tokyonight")
|
||||||
|
|
||||||
|
-- inlay hints 去掉背景
|
||||||
|
vim.api.nvim_create_autocmd("ColorScheme", {
|
||||||
|
pattern = "tokyonight",
|
||||||
|
callback = function()
|
||||||
|
vim.api.nvim_set_hl(0, "LspInlayHint", {
|
||||||
|
bg = "NONE", fg = "#565f89", italic = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
vim.api.nvim_set_hl(0, "LspInlayHint", {
|
||||||
|
bg = "NONE", fg = "#565f89", italic = true,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
@@ -1,56 +1,55 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 智能补全 (blink.cmp)
|
-- completion.lua — 智能补全
|
||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
version = "*",
|
version = "*",
|
||||||
event = { "InsertEnter", "CmdlineEnter" },
|
event = "InsertEnter",
|
||||||
opts = {
|
opts = {
|
||||||
keymap = {
|
keymap = {
|
||||||
preset = "super-tab",
|
preset = "super-tab",
|
||||||
["<C-j>"] = { "select_next" },
|
["<C-j>"] = { "select_next" },
|
||||||
["<C-k>"] = { "select_prev" },
|
["<C-k>"] = { "select_prev" },
|
||||||
["<C-u>"] = { "scroll_documentation_up" },
|
["<C-u>"] = { "scroll_documentation_up" },
|
||||||
["<C-n>"] = { "scroll_documentation_down" },
|
["<C-n>"] = { "scroll_documentation_down" },
|
||||||
-- 命令行模式:Enter 确认补全而非执行命令
|
-- Tab 接受补全,回车仅用于确认输入(避免 nvim-tree 文件操作误触发)
|
||||||
["<CR>"] = { "accept", "fallback" },
|
["<Tab>"] = { "accept", "fallback" },
|
||||||
},
|
},
|
||||||
appearance = {
|
appearance = {
|
||||||
use_nvim_cmp_as_default = true,
|
use_nvim_cmp_as_default = true,
|
||||||
nerd_font_variant = "normal",
|
nerd_font_variant = "normal",
|
||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
default = { "lsp", "path", "buffer", "snippets" },
|
default = { "lsp", "path", "buffer", "snippets" },
|
||||||
},
|
},
|
||||||
cmdline = {
|
cmdline = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
sources = function()
|
sources = function()
|
||||||
if vim.fn.getcmdline():find("/") then
|
if vim.fn.getcmdline():find("/") then
|
||||||
return { "buffer" }
|
return { "buffer" }
|
||||||
end
|
end
|
||||||
return { "cmdline" }
|
return { "cmdline" }
|
||||||
end,
|
end,
|
||||||
completion = { menu = { auto_show = true } },
|
completion = { menu = { auto_show = true } },
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
menu = {
|
menu = {
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
-- scrollbar = false,
|
draw = {
|
||||||
draw = {
|
columns = {
|
||||||
columns = {
|
{ "label", "label_description", gap = 1 },
|
||||||
{ "label", "label_description", gap = 1 },
|
{ "source_name" },
|
||||||
{ "source_name" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
documentation = {
|
|
||||||
auto_show = true,
|
|
||||||
auto_show_delay_ms = 500,
|
|
||||||
window = { border = "rounded" },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
documentation = {
|
||||||
|
auto_show = true,
|
||||||
|
auto_show_delay_ms = 500,
|
||||||
|
window = { border = "rounded" },
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
@@ -1,32 +1,41 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 自动格式化 (conform.nvim)
|
-- conform.lua — 自动格式化
|
||||||
-- 保存时自动格式化,手动 <leader>cf 触发
|
-- =============================================================================
|
||||||
-- ============================================================================
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"stevearc/conform.nvim",
|
"stevearc/conform.nvim",
|
||||||
event = { "BufWritePre" },
|
event = { "BufWritePre" },
|
||||||
cmd = { "ConformInfo" },
|
cmd = { "ConformInfo" },
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>cf", function() require("conform").format({ async = true }) end, desc = "格式化" },
|
{ "<leader>lf", function() require("conform").format({ async = true, lsp_fallback = true }) end, desc = "格式化" },
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
format_on_save = {
|
|
||||||
timeout_ms = 500,
|
|
||||||
lsp_fallback = true,
|
|
||||||
},
|
|
||||||
formatters_by_ft = {
|
|
||||||
rust = { "rustfmt" },
|
|
||||||
lua = { "stylua" },
|
|
||||||
c = { "clang-format" },
|
|
||||||
cpp = { "clang-format" },
|
|
||||||
},
|
|
||||||
formatters = {
|
|
||||||
["clang-format"] = {
|
|
||||||
args = { "--style={BasedOnStyle: LLVM, IndentWidth: 4, TabWidth: 4, UseTab: Never, ColumnLimit: 0}" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
opts = {
|
||||||
|
format_on_save = {
|
||||||
|
timeout_ms = 500,
|
||||||
|
lsp_fallback = true,
|
||||||
|
},
|
||||||
|
formatters_by_ft = {
|
||||||
|
rust = { "rustfmt" },
|
||||||
|
lua = { "stylua" },
|
||||||
|
c = { "clang-format" },
|
||||||
|
cpp = { "clang-format" },
|
||||||
|
python = { "black", "isort" },
|
||||||
|
javascript = { "prettier" },
|
||||||
|
typescript = { "prettier" },
|
||||||
|
json = { "prettier" },
|
||||||
|
yaml = { "prettier" },
|
||||||
|
markdown = { "prettier" },
|
||||||
|
html = { "prettier" },
|
||||||
|
css = { "prettier" },
|
||||||
|
go = { "gofmt", "goimports" },
|
||||||
|
sh = { "shfmt" },
|
||||||
|
},
|
||||||
|
formatters = {
|
||||||
|
["clang-format"] = {
|
||||||
|
args = { "--style={BasedOnStyle: LLVM, IndentWidth: 4, TabWidth: 4, UseTab: Never, ColumnLimit: 0}" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+83
-82
@@ -1,88 +1,89 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- DAP 调试器
|
-- dap.lua — DAP 调试器
|
||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
"nvim-neotest/nvim-nio",
|
"nvim-neotest/nvim-nio",
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
},
|
{ "theHamsta/nvim-dap-virtual-text", opts = {} },
|
||||||
config = function()
|
{ "Weissle/persistent-breakpoints.nvim", opts = { load_breakpoints_event = { "BufReadPost" } } },
|
||||||
local dap = require("dap")
|
|
||||||
local dapui = require("dapui")
|
|
||||||
|
|
||||||
-- 断点图标
|
|
||||||
vim.fn.sign_define("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = "" })
|
|
||||||
vim.fn.sign_define("DapBreakpointCondition", { text = "◆", texthl = "DapBreakpointCondition", linehl = "", numhl = "" })
|
|
||||||
vim.fn.sign_define("DapStopped", { text = "▶", texthl = "DapStopped", linehl = "CursorLine", numhl = "" })
|
|
||||||
|
|
||||||
-- dap-ui 布局
|
|
||||||
dapui.setup({
|
|
||||||
layouts = {
|
|
||||||
{
|
|
||||||
elements = {
|
|
||||||
{ id = "stacks", size = 0.25 },
|
|
||||||
{ id = "scopes", size = 0.25 },
|
|
||||||
{ id = "breakpoints", size = 0.25 },
|
|
||||||
{ id = "watches", size = 0.25 },
|
|
||||||
},
|
|
||||||
position = "left",
|
|
||||||
size = 40,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
elements = {
|
|
||||||
{ id = "repl", size = 0.5 },
|
|
||||||
{ id = "console", size = 0.5 },
|
|
||||||
},
|
|
||||||
position = "bottom",
|
|
||||||
size = 10,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- 调试会话自动打开/关闭 UI
|
|
||||||
dap.listeners.before.attach.dapui_config = function() dapui.open() end
|
|
||||||
dap.listeners.before.launch.dapui_config = function() dapui.open() end
|
|
||||||
dap.listeners.before.event_terminated.dapui_config = function() dapui.close() end
|
|
||||||
dap.listeners.before.event_exited.dapui_config = function() dapui.close() end
|
|
||||||
|
|
||||||
-- codelldb 适配器(Mason 安装路径)
|
|
||||||
dap.adapters.codelldb = {
|
|
||||||
type = "server",
|
|
||||||
port = "${port}",
|
|
||||||
executable = {
|
|
||||||
command = vim.fn.stdpath("data") .. "/mason/bin/codelldb",
|
|
||||||
args = { "--port", "${port}" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- C/C++ 调试配置(非 CMake 项目,CMake 项目用 <leader>rd)
|
|
||||||
dap.configurations.c = {
|
|
||||||
{
|
|
||||||
name = "Launch",
|
|
||||||
type = "codelldb",
|
|
||||||
request = "launch",
|
|
||||||
program = function()
|
|
||||||
return vim.fn.input("可执行文件路径: ", vim.fn.getcwd() .. "/", "file")
|
|
||||||
end,
|
|
||||||
cwd = "${workspaceFolder}",
|
|
||||||
stopOnEntry = false,
|
|
||||||
args = {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
dap.configurations.cpp = dap.configurations.c
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
config = function()
|
||||||
|
local dap = require("dap")
|
||||||
|
local dapui = require("dapui")
|
||||||
|
|
||||||
-- Mason DAP 自动安装
|
-- 断点图标
|
||||||
{
|
vim.fn.sign_define("DapBreakpoint", { text = "●", texthl = "DapBreakpoint", linehl = "", numhl = "" })
|
||||||
"jay-babu/mason-nvim-dap.nvim",
|
vim.fn.sign_define("DapBreakpointCondition", { text = "◆", texthl = "DapBreakpointCondition", linehl = "", numhl = "" })
|
||||||
dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" },
|
vim.fn.sign_define("DapStopped", { text = "▶", texthl = "DapStopped", linehl = "CursorLine", numhl = "" })
|
||||||
opts = {
|
|
||||||
ensure_installed = { "codelldb" },
|
-- dap-ui 布局
|
||||||
|
dapui.setup({
|
||||||
|
layouts = {
|
||||||
|
{
|
||||||
|
elements = {
|
||||||
|
{ id = "stacks", size = 0.25 },
|
||||||
|
{ id = "scopes", size = 0.25 },
|
||||||
|
{ id = "breakpoints", size = 0.25 },
|
||||||
|
{ id = "watches", size = 0.25 },
|
||||||
|
},
|
||||||
|
position = "left",
|
||||||
|
size = 40,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
elements = {
|
||||||
|
{ id = "repl", size = 0.5 },
|
||||||
|
{ id = "console", size = 0.5 },
|
||||||
|
},
|
||||||
|
position = "bottom",
|
||||||
|
size = 10,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
|
|
||||||
|
-- 调试会话自动打开/关闭 UI
|
||||||
|
dap.listeners.before.attach.dapui_config = function() dapui.open() end
|
||||||
|
dap.listeners.before.launch.dapui_config = function() dapui.open() end
|
||||||
|
dap.listeners.before.event_terminated.dapui_config = function() dapui.close() end
|
||||||
|
dap.listeners.before.event_exited.dapui_config = function() dapui.close() end
|
||||||
|
|
||||||
|
-- codelldb 适配器
|
||||||
|
dap.adapters.codelldb = {
|
||||||
|
type = "server",
|
||||||
|
port = "${port}",
|
||||||
|
executable = {
|
||||||
|
command = vim.fn.stdpath("data") .. "/mason/bin/codelldb",
|
||||||
|
args = { "--port", "${port}" },
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- C/C++ 调试配置
|
||||||
|
dap.configurations.c = {
|
||||||
|
{
|
||||||
|
name = "Launch",
|
||||||
|
type = "codelldb",
|
||||||
|
request = "launch",
|
||||||
|
program = function()
|
||||||
|
return vim.fn.input("可执行文件路径: ", vim.fn.getcwd() .. "/", "file")
|
||||||
|
end,
|
||||||
|
cwd = "${workspaceFolder}",
|
||||||
|
stopOnEntry = false,
|
||||||
|
args = {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
dap.configurations.cpp = dap.configurations.c
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Mason DAP 自动安装
|
||||||
|
{
|
||||||
|
"jay-babu/mason-nvim-dap.nvim",
|
||||||
|
dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" },
|
||||||
|
event = "BufReadPost",
|
||||||
|
opts = { ensure_installed = { "codelldb" } },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,13 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 图标支持 (nvim-web-devicons)
|
-- devicons.lua — 文件图标
|
||||||
-- 为 oil、telescope、状态栏等提供文件类型图标
|
-- =============================================================================
|
||||||
-- ============================================================================
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
opts = {
|
opts = {
|
||||||
override = {
|
color_icons = true,
|
||||||
rs = { icon = "", color = "#dea584", name = "Rust" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
-- ============================================================================
|
|
||||||
-- Git diff 视图 (diffview)
|
|
||||||
-- 仓库级 diff 总览 + 提交历史对比,补充 gitsigns 的行内能力
|
|
||||||
-- ============================================================================
|
|
||||||
|
|
||||||
return {
|
|
||||||
{
|
|
||||||
"sindrets/diffview.nvim",
|
|
||||||
cmd = "DiffviewOpen",
|
|
||||||
keys = {
|
|
||||||
-- 只保留 3 个核心键位:打开/关闭 diff 视图、查看历史
|
|
||||||
{ "<leader>go", "<cmd>DiffviewOpen<cr>", desc = "查看改动" },
|
|
||||||
{ "<leader>gq", "<cmd>DiffviewClose<cr>", desc = "关闭 diff" },
|
|
||||||
{ "<leader>gl", "<cmd>DiffviewFileHistory %<cr>", desc = "文件历史" },
|
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
file_panel = {
|
|
||||||
listing_style = "tree",
|
|
||||||
tree_options = {
|
|
||||||
flatten_dirs = true,
|
|
||||||
folder_statuses = "only_folded",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keymaps = {
|
|
||||||
view = {
|
|
||||||
-- 覆盖全局 <leader>q:在 diffview 里关闭整个 diffview,而非单个窗口
|
|
||||||
{ "n", "<leader>q", "<cmd>DiffviewClose<cr>", { desc = "关闭 diffview" } },
|
|
||||||
},
|
|
||||||
file_panel = {
|
|
||||||
{ "n", "<leader>q", "<cmd>DiffviewClose<cr>", { desc = "关闭 diffview" } },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
-- =============================================================================
|
||||||
|
-- editor.lua — 编辑器增强插件
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- Comment.nvim: 注释快捷键 gcc / gc
|
||||||
|
{
|
||||||
|
"numToStr/Comment.nvim",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- nvim-surround: 环绕操作 ysiw" / cs"' / ds"
|
||||||
|
{
|
||||||
|
"kylechui/nvim-surround",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
version = "*",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- vim-illuminate: 高亮光标下相同单词
|
||||||
|
{
|
||||||
|
"RRethy/vim-illuminate",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
opts = {
|
||||||
|
delay = 200,
|
||||||
|
large_file_cutoff = 2000,
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
require("illuminate").configure(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- toggleterm.nvim: 集成终端
|
||||||
|
{
|
||||||
|
"akinsho/toggleterm.nvim",
|
||||||
|
version = "*",
|
||||||
|
keys = {
|
||||||
|
{ "<C-`>", "<cmd>ToggleTerm<cr>", mode = { "n", "t" }, desc = "终端" },
|
||||||
|
{ "<leader>tg", "<cmd>ToggleTerm direction=float<cr>", desc = "浮动终端" },
|
||||||
|
{ "<leader>th", "<cmd>ToggleTerm direction=horizontal<cr>", desc = "水平终端" },
|
||||||
|
{ "<leader>tv", "<cmd>ToggleTerm direction=vertical<cr>", desc = "垂直终端" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
size = function(term)
|
||||||
|
if term.direction == "horizontal" then
|
||||||
|
return vim.o.lines * 0.3
|
||||||
|
elseif term.direction == "vertical" then
|
||||||
|
return vim.o.columns * 0.4
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
direction = "horizontal",
|
||||||
|
float_opts = { border = "curved", winblend = 0 },
|
||||||
|
shell = vim.o.shell,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- flash.nvim: 快速跳转
|
||||||
|
{
|
||||||
|
"folke/flash.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- indent-blankline: 缩进参考线
|
||||||
|
{
|
||||||
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
main = "ibl",
|
||||||
|
opts = {
|
||||||
|
indent = { char = "│" },
|
||||||
|
scope = { enabled = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- nvim-ufo: 代码折叠
|
||||||
|
{
|
||||||
|
"kevinhwang91/nvim-ufo",
|
||||||
|
dependencies = { "kevinhwang91/promise-async" },
|
||||||
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
|
config = function()
|
||||||
|
vim.o.foldmethod = "expr"
|
||||||
|
vim.o.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||||
|
vim.o.foldlevel = 99
|
||||||
|
vim.o.foldlevelstart = 99
|
||||||
|
|
||||||
|
require('ufo').setup({
|
||||||
|
provider_selector = function(bufnr, filetype, buftype)
|
||||||
|
return { "treesitter", "indent" }
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds, { desc = "关闭所有折叠" })
|
||||||
|
vim.keymap.set('n', 'zR', require('ufo').openAllFolds, { desc = "展开所有折叠" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- rainbow-delimiters: 彩虹括号
|
||||||
|
{
|
||||||
|
"HiPhish/rainbow-delimiters.nvim",
|
||||||
|
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||||
|
config = function()
|
||||||
|
local rainbow_delimiters = require("rainbow-delimiters")
|
||||||
|
vim.g.rainbow_delimiters = {
|
||||||
|
strategy = { [''] = rainbow_delimiters.strategy.global },
|
||||||
|
query = { [''] = 'rainbow-delimiters' },
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
-- =============================================================================
|
||||||
|
-- filetree.lua — 文件树
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-tree/nvim-tree.lua",
|
||||||
|
version = "*",
|
||||||
|
lazy = false,
|
||||||
|
keys = {
|
||||||
|
{ "<leader>e", "<cmd>NvimTreeToggle<CR>", desc = "侧边文件树" },
|
||||||
|
},
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = function()
|
||||||
|
-- 禁用 netrw
|
||||||
|
vim.g.loaded_netrw = 1
|
||||||
|
vim.g.loaded_netrwPlugin = 1
|
||||||
|
|
||||||
|
require("nvim-tree").setup({
|
||||||
|
sort_by = "case_sensitive",
|
||||||
|
view = {
|
||||||
|
width = 30,
|
||||||
|
side = "left",
|
||||||
|
relativenumber = false,
|
||||||
|
adaptive_size = false,
|
||||||
|
},
|
||||||
|
renderer = {
|
||||||
|
group_empty = true,
|
||||||
|
icons = {
|
||||||
|
show = {
|
||||||
|
file = true,
|
||||||
|
folder = true,
|
||||||
|
folder_arrow = true,
|
||||||
|
git = false,
|
||||||
|
},
|
||||||
|
glyphs = {
|
||||||
|
folder = {
|
||||||
|
arrow_closed = "▶",
|
||||||
|
arrow_open = "▼",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
filters = {
|
||||||
|
dotfiles = false,
|
||||||
|
custom = { "^.git$" },
|
||||||
|
},
|
||||||
|
git = {
|
||||||
|
enable = false,
|
||||||
|
ignore = false,
|
||||||
|
},
|
||||||
|
actions = {
|
||||||
|
open_file = {
|
||||||
|
quit_on_open = false,
|
||||||
|
window_picker = { enable = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
on_attach = function(bufnr)
|
||||||
|
require("nvim-tree.api").config.mappings.default_on_attach(bufnr)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- Git 集成 (gitsigns)
|
-- git.lua — Git 集成
|
||||||
-- 行内 diff 标记 + hunk 操作
|
-- =============================================================================
|
||||||
-- ============================================================================
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
-- gitsigns: 行内 diff 标记
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
event = "BufReadPre",
|
event = "BufReadPre",
|
||||||
@@ -23,29 +24,66 @@ return {
|
|||||||
vim.keymap.set("n", "[h", function() gs.nav_hunk("prev") end, { buffer = bufnr, desc = "上一个修改块" })
|
vim.keymap.set("n", "[h", function() gs.nav_hunk("prev") end, { buffer = bufnr, desc = "上一个修改块" })
|
||||||
|
|
||||||
-- Hunk 操作
|
-- Hunk 操作
|
||||||
vim.keymap.set("n", "<leader>hs", gs.stage_hunk, { buffer = bufnr, desc = "暂存修改块" })
|
vim.keymap.set("n", "<leader>hs", gs.stage_hunk, { buffer = bufnr, desc = "暂存修改块" })
|
||||||
vim.keymap.set("n", "<leader>hr", gs.reset_hunk, { buffer = bufnr, desc = "撤销修改块" })
|
vim.keymap.set("n", "<leader>hr", gs.reset_hunk, { buffer = bufnr, desc = "撤销修改块" })
|
||||||
vim.keymap.set("n", "<leader>hp", gs.preview_hunk, { buffer = bufnr, desc = "预览修改块" })
|
vim.keymap.set("n", "<leader>hp", gs.preview_hunk, { buffer = bufnr, desc = "预览修改块" })
|
||||||
|
|
||||||
-- 文件操作
|
-- 文件操作
|
||||||
vim.keymap.set("n", "<leader>hS", gs.stage_buffer, { buffer = bufnr, desc = "暂存文件" })
|
vim.keymap.set("n", "<leader>hS", gs.stage_buffer, { buffer = bufnr, desc = "暂存文件" })
|
||||||
vim.keymap.set("n", "<leader>hR", gs.reset_buffer, { buffer = bufnr, desc = "撤销文件修改" })
|
vim.keymap.set("n", "<leader>hR", gs.reset_buffer, { buffer = bufnr, desc = "撤销文件修改" })
|
||||||
|
|
||||||
-- Blame
|
-- Blame
|
||||||
vim.keymap.set("n", "<leader>hb", gs.blame_line, { buffer = bufnr, desc = "查看行 blame" })
|
vim.keymap.set("n", "<leader>hb", gs.blame_line, { buffer = bufnr, desc = "查看行 blame" })
|
||||||
vim.keymap.set("n", "<leader>hl", gs.toggle_current_line_blame, { buffer = bufnr, desc = "切换行 blame" })
|
vim.keymap.set("n", "<leader>hl", gs.toggle_current_line_blame, { buffer = bufnr, desc = "切换行 blame" })
|
||||||
|
|
||||||
-- 其他
|
-- 其他
|
||||||
vim.keymap.set("n", "<leader>hw", gs.setqflist, { buffer = bufnr, desc = "列出所有 hunk" })
|
vim.keymap.set("n", "<leader>hw", gs.setqflist, { buffer = bufnr, desc = "列出所有 hunk" })
|
||||||
vim.keymap.set("n", "<leader>hd", gs.toggle_word_diff, { buffer = bufnr, desc = "切换行内 diff" })
|
vim.keymap.set("n", "<leader>hd", gs.toggle_word_diff, { buffer = bufnr, desc = "切换行内 diff" })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
require("gitsigns").setup(opts)
|
require("gitsigns").setup(opts)
|
||||||
-- 自定义颜色
|
vim.api.nvim_set_hl(0, "GitSignsAdd", { fg = "#4CAF50" })
|
||||||
vim.api.nvim_set_hl(0, "GitSignsAdd", { fg = "#4CAF50" })
|
|
||||||
vim.api.nvim_set_hl(0, "GitSignsChange", { fg = "#2196F3" })
|
vim.api.nvim_set_hl(0, "GitSignsChange", { fg = "#2196F3" })
|
||||||
vim.api.nvim_set_hl(0, "GitSignsDelete", { fg = "#F44336" })
|
vim.api.nvim_set_hl(0, "GitSignsDelete", { fg = "#F44336" })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- diffview: Git diff 视图
|
||||||
|
{
|
||||||
|
"sindrets/diffview.nvim",
|
||||||
|
cmd = "DiffviewOpen",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>go", "<cmd>DiffviewOpen<cr>", desc = "查看改动" },
|
||||||
|
{ "<leader>gq", "<cmd>DiffviewClose<cr>", desc = "关闭 diff" },
|
||||||
|
{ "<leader>gl", "<cmd>DiffviewFileHistory %<cr>", desc = "文件历史" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
file_panel = {
|
||||||
|
listing_style = "tree",
|
||||||
|
tree_options = {
|
||||||
|
flatten_dirs = true,
|
||||||
|
folder_statuses = "only_folded",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keymaps = {
|
||||||
|
view = {
|
||||||
|
{ "n", "<leader>q", "<cmd>DiffviewClose<cr>", { desc = "关闭 diffview" } },
|
||||||
|
},
|
||||||
|
file_panel = {
|
||||||
|
{ "n", "<leader>q", "<cmd>DiffviewClose<cr>", { desc = "关闭 diffview" } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- lazygit: Git TUI
|
||||||
|
{
|
||||||
|
"kdheepak/lazygit.nvim",
|
||||||
|
cmd = { "LazyGit", "LazyGitCurrentFile" },
|
||||||
|
keys = {
|
||||||
|
{ "<leader>gg", ":LazyGit<CR>", desc = "LazyGit" },
|
||||||
|
},
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
+31
-24
@@ -16,10 +16,11 @@ return {
|
|||||||
dependencies = { "williamboman/mason.nvim" },
|
dependencies = { "williamboman/mason.nvim" },
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"lua_ls", -- Lua
|
"lua_ls", -- Lua
|
||||||
"bashls", -- Bash
|
"bashls", -- Bash
|
||||||
"clangd", -- C/C++
|
"clangd", -- C/C++
|
||||||
"neocmake", -- CMake
|
"neocmake", -- CMake
|
||||||
|
-- rust_analyzer 由 rustup 管理,不通过 Mason
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -34,6 +35,8 @@ return {
|
|||||||
"saghen/blink.cmp",
|
"saghen/blink.cmp",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
local caps = require("blink.cmp").get_lsp_capabilities()
|
||||||
|
|
||||||
-- LSP 附加时自动开启 inlay hints
|
-- LSP 附加时自动开启 inlay hints
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
callback = function(args)
|
callback = function(args)
|
||||||
@@ -54,47 +57,51 @@ return {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
local caps = require("blink.cmp").get_lsp_capabilities()
|
|
||||||
|
|
||||||
-- Lua
|
-- Lua
|
||||||
vim.lsp.config("lua_ls", {
|
vim.lsp.config['lua_ls'] = {
|
||||||
cmd = { "lua-language-server" },
|
cmd = { 'lua-language-server' },
|
||||||
|
filetypes = { 'lua' },
|
||||||
|
root_markers = { '.luarc.json', '.luarc.jsonc', '.git', 'init.lua' },
|
||||||
capabilities = caps,
|
capabilities = caps,
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = { version = "Lua5.5" },
|
runtime = { version = "LuaJIT" },
|
||||||
workspace = { checkThirdParty = false },
|
workspace = { checkThirdParty = false },
|
||||||
diagnostics = { globals = { "vim" } },
|
diagnostics = { globals = { "vim" } },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
|
|
||||||
-- Bash
|
-- Bash
|
||||||
vim.lsp.config("bashls", {
|
vim.lsp.config['bashls'] = {
|
||||||
cmd = { "bash-language-server", "start" },
|
cmd = { 'bash-language-server', 'start' },
|
||||||
|
filetypes = { 'sh', 'bash' },
|
||||||
|
root_markers = { '.git' },
|
||||||
capabilities = caps,
|
capabilities = caps,
|
||||||
})
|
}
|
||||||
|
|
||||||
-- C/C++ (clangd)
|
-- C/C++ (clangd)
|
||||||
vim.lsp.config("clangd", {
|
vim.lsp.config['clangd'] = {
|
||||||
cmd = { "clangd" },
|
cmd = { 'clangd' },
|
||||||
|
filetypes = { 'c', 'cpp', 'objc', 'objcpp' },
|
||||||
|
root_markers = { '.clangd', 'compile_commands.json', '.git' },
|
||||||
capabilities = caps,
|
capabilities = caps,
|
||||||
})
|
}
|
||||||
|
|
||||||
-- CMake
|
-- CMake
|
||||||
vim.lsp.config("neocmake", {
|
vim.lsp.config['neocmake'] = {
|
||||||
cmd = { "neocmakelsp", "stdio" },
|
cmd = { 'neocmakelsp', 'stdio' },
|
||||||
filetypes = { "cmake" },
|
filetypes = { 'cmake' },
|
||||||
root_dir = vim.fs.root(0, { ".git", "CMakeLists.txt" }),
|
root_markers = { 'CMakeLists.txt', '.git' },
|
||||||
single_file_support = true,
|
capabilities = caps,
|
||||||
init_options = {
|
init_options = {
|
||||||
format = { enable = true },
|
format = { enable = true },
|
||||||
lint = { enable = true },
|
lint = { enable = true },
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
|
|
||||||
-- 启用所有 LSP(Rust 由 rustaceanvim 管理,不在此启用)
|
-- 启用所有 LSP(Rust 由 rustaceanvim 管理)
|
||||||
vim.lsp.enable({ "lua_ls", "bashls", "clangd", "neocmake" })
|
vim.lsp.enable({ 'lua_ls', 'bashls', 'clangd', 'neocmake' })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+31
-32
@@ -1,36 +1,35 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 文件浏览器 (oil.nvim)
|
-- oil.lua — 文件浏览器
|
||||||
-- 缓冲区编辑模式,像编辑文本一样管理文件
|
-- =============================================================================
|
||||||
-- ============================================================================
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"stevearc/oil.nvim",
|
"stevearc/oil.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
|
||||||
opts = {
|
|
||||||
default_file_explorer = true,
|
|
||||||
keymaps = {
|
|
||||||
["<CR>"] = "actions.select",
|
|
||||||
["<C-p>"] = "actions.preview",
|
|
||||||
["<C-c>"] = "actions.close",
|
|
||||||
["<C-r>"] = "actions.refresh",
|
|
||||||
["<C-h>"] = "actions.toggle_hidden",
|
|
||||||
["g?"] = "actions.show_help",
|
|
||||||
},
|
|
||||||
view_options = {
|
|
||||||
show_hidden = true,
|
|
||||||
},
|
|
||||||
float = {
|
|
||||||
padding = 2,
|
|
||||||
max_width = 90,
|
|
||||||
border = "rounded",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "-", "<cmd>Oil<cr>", desc = "打开父目录" },
|
|
||||||
{ "<leader>fe", "<cmd>Oil<cr>", desc = "文件浏览器" },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
opts = {
|
||||||
|
default_file_explorer = true,
|
||||||
|
keymaps = {
|
||||||
|
["<CR>"] = "actions.select",
|
||||||
|
["<C-p>"] = "actions.preview",
|
||||||
|
["<C-c>"] = "actions.close",
|
||||||
|
["<C-r>"] = "actions.refresh",
|
||||||
|
["<C-h>"] = "actions.toggle_hidden",
|
||||||
|
["g?"] = "actions.show_help",
|
||||||
|
},
|
||||||
|
view_options = {
|
||||||
|
show_hidden = true,
|
||||||
|
},
|
||||||
|
float = {
|
||||||
|
padding = 2,
|
||||||
|
max_width = 90,
|
||||||
|
border = "rounded",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "-", "<cmd>Oil<cr>", desc = "打开父目录" },
|
||||||
|
{ "<leader>fe", "<cmd>Oil<cr>", desc = "文件浏览器" },
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-20
@@ -1,25 +1,25 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 统一构建/运行/调试键位
|
-- runner.lua — 统一构建/运行/调试分发器
|
||||||
-- 所有语言共用同一组键位,由 runner.lua 自动分发
|
-- =============================================================================
|
||||||
-- ============================================================================
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
keys = {
|
keys = {
|
||||||
-- 调试控制
|
-- 调试控制
|
||||||
{ "<F5>", function() require("dap").continue() end, desc = "继续调试" },
|
{ "<F5>", function() require("dap").continue() end, desc = "继续调试" },
|
||||||
{ "<F10>", function() require("dap").step_over() end, desc = "单步跳过" },
|
{ "<F10>", function() require("dap").step_over() end, desc = "单步跳过" },
|
||||||
{ "<F11>", function() require("dap").step_into() end, desc = "单步进入" },
|
{ "<F11>", function() require("dap").step_into() end, desc = "单步进入" },
|
||||||
{ "<F12>", function() require("dap").step_out() end, desc = "单步跳出" },
|
{ "<F12>", function() require("dap").step_out() end, desc = "单步跳出" },
|
||||||
{ "<leader>b", function() require("dap").toggle_breakpoint() end, desc = "断点" },
|
-- 断点键位(避免与 buffer 分组冲突)
|
||||||
{ "<leader>du", function() require("dapui").toggle() end, desc = "调试界面" },
|
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "断点" },
|
||||||
|
{ "<leader>du", function() require("dapui").toggle() end, desc = "调试界面" },
|
||||||
|
|
||||||
-- 统一构建/运行/调试/测试
|
-- 统一构建/运行/调试/测试
|
||||||
{ "<leader>rb", function() require("runner").build() end, desc = "构建" },
|
{ "<leader>rb", function() require("runner").build() end, desc = "构建" },
|
||||||
{ "<leader>rr", function() require("runner").run() end, desc = "运行" },
|
{ "<leader>rr", function() require("runner").run() end, desc = "运行" },
|
||||||
{ "<leader>rd", function() require("runner").debug() end, desc = "调试" },
|
{ "<leader>rd", function() require("runner").debug() end, desc = "调试" },
|
||||||
{ "<leader>rt", function() require("runner").test() end, desc = "测试" },
|
{ "<leader>rt", function() require("runner").test() end, desc = "测试" },
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,35 +1,12 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- Rust 工具 (rustaceanvim)
|
-- rustaceanvim.lua — Rust 开发增强
|
||||||
-- Rust 全流程:LSP、调试、运行、测试、宏展开
|
-- =============================================================================
|
||||||
-- ============================================================================
|
-- rustaceanvim 自动管理 rust-analyzer,提供调试、测试等功能
|
||||||
|
-- 依赖:rustup 安装的 rust-analyzer(不要用 Mason 安装,避免冲突)
|
||||||
|
-- 安装:rustup component add rust-analyzer
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
"mrcjkb/rustaceanvim",
|
||||||
"mrcjkb/rustaceanvim",
|
ft = { "rust" },
|
||||||
version = "^6",
|
version = "^6",
|
||||||
lazy = false,
|
|
||||||
ft = { "rust" },
|
|
||||||
config = function()
|
|
||||||
vim.g.rustaceanvim = {
|
|
||||||
-- LSP 配置
|
|
||||||
server = {
|
|
||||||
default_settings = {
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
cargo = { allFeatures = true },
|
|
||||||
check = { command = "clippy" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
-- DAP 适配器(复用 Mason 安装的 codelldb)
|
|
||||||
dap = {
|
|
||||||
adapter = function()
|
|
||||||
local codelldb_path = vim.fn.stdpath("data") .. "/mason/bin/codelldb"
|
|
||||||
local library_path = vim.fn.stdpath("data")
|
|
||||||
.. "/mason/packages/codelldb/extension/lldb/lib/liblldb.so"
|
|
||||||
return require("rustaceanvim.config").get_codelldb_adapter(codelldb_path, library_path)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,47 +1,53 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 模糊搜索 (telescope)
|
-- telescope.lua — 模糊搜索
|
||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
branch = "0.1.x",
|
branch = "0.1.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-telescope/telescope-ui-select.nvim",
|
"nvim-telescope/telescope-ui-select.nvim",
|
||||||
},
|
{
|
||||||
cmd = "Telescope",
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
keys = {
|
build = "make",
|
||||||
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "查找文件" },
|
cond = function() return vim.fn.executable("make") == 1 end,
|
||||||
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "全局搜索" },
|
},
|
||||||
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "切换缓冲区" },
|
|
||||||
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "帮助文档" },
|
|
||||||
{ "<leader>fk", "<cmd>Telescope keymaps<cr>", desc = "查找键位" },
|
|
||||||
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "最近文件" },
|
|
||||||
},
|
|
||||||
-- 启动即加载:ui-select 扩展需要全局接管 vim.ui.select,
|
|
||||||
-- 懒加载会导致未触发 :Telescope 时(如 <leader>rr)回退到原生 UI
|
|
||||||
lazy = false,
|
|
||||||
opts = {
|
|
||||||
defaults = {
|
|
||||||
prompt_prefix = " > ",
|
|
||||||
selection_caret = " > ",
|
|
||||||
layout_strategy = "flex",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
config = function(_, opts)
|
|
||||||
local telescope = require("telescope")
|
|
||||||
|
|
||||||
-- extensions 需要 require telescope.themes,必须在 config 里构造
|
|
||||||
opts.extensions = {
|
|
||||||
["ui-select"] = {
|
|
||||||
require("telescope.themes").get_dropdown({}),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
telescope.setup(opts)
|
|
||||||
-- 用 pcall 保护,避免 ui-select 扩展未安装时崩溃
|
|
||||||
pcall(telescope.load_extension, "ui-select")
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
cmd = "Telescope",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "查找文件" },
|
||||||
|
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "全局搜索" },
|
||||||
|
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "切换缓冲区" },
|
||||||
|
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "帮助文档" },
|
||||||
|
{ "<leader>fk", "<cmd>Telescope keymaps<cr>", desc = "查找键位" },
|
||||||
|
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "最近文件" },
|
||||||
|
{ "<leader>fc", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "当前文件搜索" },
|
||||||
|
{ "<leader>fd", "<cmd>Telescope diagnostics<cr>", desc = "诊断信息" },
|
||||||
|
},
|
||||||
|
opts = {
|
||||||
|
defaults = {
|
||||||
|
prompt_prefix = " > ",
|
||||||
|
selection_caret = " > ",
|
||||||
|
layout_strategy = "flex",
|
||||||
|
file_ignore_patterns = {
|
||||||
|
"node_modules", ".git/", "dist/", "build/", "%.lock",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local telescope = require("telescope")
|
||||||
|
|
||||||
|
opts.extensions = {
|
||||||
|
["ui-select"] = {
|
||||||
|
require("telescope.themes").get_dropdown({}),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
telescope.setup(opts)
|
||||||
|
pcall(telescope.load_extension, "ui-select")
|
||||||
|
pcall(telescope.load_extension, "fzf")
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
@@ -1,31 +1,21 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 语法高亮 (Tree-sitter)
|
-- treesitter.lua — 语法高亮与折叠
|
||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
build = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
opts = {
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"lua", -- Lua
|
"lua", "bash", "rust", "c", "cpp", "cmake",
|
||||||
"bash", -- Bash
|
"python", "java", "go", "json", "toml",
|
||||||
"rust", -- Rust
|
"markdown", "regex", "vim",
|
||||||
"c", -- C
|
},
|
||||||
"cpp", -- C++
|
highlight = { enable = true },
|
||||||
"cmake", -- CMake
|
indent = { enable = true },
|
||||||
"python", -- Python
|
fold = { enable = true }, -- nvim-ufo 依赖
|
||||||
"java", -- Java
|
|
||||||
"go", -- Go
|
|
||||||
"json", -- JSON
|
|
||||||
"toml", -- TOML
|
|
||||||
"markdown", -- Markdown
|
|
||||||
"regex", -- 正则
|
|
||||||
"vim", -- Vimscript
|
|
||||||
},
|
|
||||||
highlight = { enable = true },
|
|
||||||
indent = { enable = true },
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,177 @@
|
|||||||
|
-- =============================================================================
|
||||||
|
-- ui.lua — UI 美化套件
|
||||||
|
-- =============================================================================
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- bufferline: 顶部标签栏
|
||||||
|
{
|
||||||
|
"akinsho/bufferline.nvim",
|
||||||
|
version = "*",
|
||||||
|
event = "BufAdd",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
"famiu/bufdelete.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("bufferline").setup({
|
||||||
|
options = {
|
||||||
|
mode = "buffers",
|
||||||
|
style_preset = require("bufferline").style_preset.default,
|
||||||
|
themable = true,
|
||||||
|
numbers = "none",
|
||||||
|
close_command = "Bdelete!",
|
||||||
|
right_mouse_command = "Bdelete!",
|
||||||
|
indicator = { style = "icon", icon = "▎" },
|
||||||
|
buffer_close_icon = "",
|
||||||
|
modified_icon = "●",
|
||||||
|
close_icon = "",
|
||||||
|
left_trunc_marker = "",
|
||||||
|
right_trunc_marker = "",
|
||||||
|
max_name_length = 18,
|
||||||
|
max_prefix_length = 15,
|
||||||
|
truncate_names = true,
|
||||||
|
tab_size = 18,
|
||||||
|
diagnostics = "nvim_lsp",
|
||||||
|
diagnostics_update_in_insert = false,
|
||||||
|
offsets = {
|
||||||
|
{ filetype = "oil", text = "文件浏览器", highlight = "Directory", text_align = "left" },
|
||||||
|
{ filetype = "NvimTree", text = "文件树", highlight = "Directory", text_align = "left" },
|
||||||
|
},
|
||||||
|
color_icons = true,
|
||||||
|
show_buffer_icons = true,
|
||||||
|
show_buffer_close_icons = true,
|
||||||
|
show_close_icon = false,
|
||||||
|
show_tab_indicators = true,
|
||||||
|
persist_buffer_sort = true,
|
||||||
|
separator_style = "thin",
|
||||||
|
enforce_regular_tabs = false,
|
||||||
|
always_show_bufferline = true,
|
||||||
|
hover = { enabled = true, delay = 200, reveal = { "close" } },
|
||||||
|
-- 隐藏非文件 buffer(quickfix/终端/help 等),避免 cmake 输出污染标签栏
|
||||||
|
custom_filter = function(bufnr)
|
||||||
|
return vim.bo[bufnr].buftype == ""
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- lualine: 底部状态栏
|
||||||
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
event = "BufAdd",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
opts = {
|
||||||
|
options = {
|
||||||
|
component_separators = "|",
|
||||||
|
section_separators = "",
|
||||||
|
globalstatus = true,
|
||||||
|
theme = "tokyonight",
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = { "mode" },
|
||||||
|
lualine_b = { "branch", "diff", "diagnostics" },
|
||||||
|
lualine_c = { { "filename", path = 1 } },
|
||||||
|
lualine_x = { "encoding", "fileformat", "filetype" },
|
||||||
|
lualine_y = { "progress" },
|
||||||
|
lualine_z = { "location" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- noice.nvim: 命令行美化
|
||||||
|
{
|
||||||
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
cmdline = {
|
||||||
|
view = "cmdline_popup",
|
||||||
|
format = {
|
||||||
|
search_down = { icon = " " },
|
||||||
|
search_up = { icon = " " },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
messages = {
|
||||||
|
enabled = true,
|
||||||
|
view = "notify",
|
||||||
|
view_error = "notify",
|
||||||
|
view_warn = "notify",
|
||||||
|
},
|
||||||
|
popupmenu = { enabled = true, backend = "nui" },
|
||||||
|
presets = {
|
||||||
|
bottom_search = false,
|
||||||
|
command_palette = true,
|
||||||
|
long_message_to_split = true,
|
||||||
|
inc_rename = true,
|
||||||
|
lsp_doc_border = true,
|
||||||
|
},
|
||||||
|
-- 禁用 vim.ui.input 的补全,避免 nvim-tree 文件操作时回车误触发补全
|
||||||
|
input = {
|
||||||
|
enabled = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- nvim-notify: 通知美化
|
||||||
|
{
|
||||||
|
"rcarriga/nvim-notify",
|
||||||
|
event = "BufAdd",
|
||||||
|
opts = {
|
||||||
|
timeout = 3000,
|
||||||
|
max_width = 50,
|
||||||
|
render = "compact",
|
||||||
|
stages = "fade",
|
||||||
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local notify = require("notify")
|
||||||
|
notify.setup(opts)
|
||||||
|
vim.notify = notify
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- dressing.nvim: 输入框美化
|
||||||
|
{
|
||||||
|
"stevearc/dressing.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- dashboard-nvim: 启动首页
|
||||||
|
{
|
||||||
|
"nvimdev/dashboard-nvim",
|
||||||
|
lazy = false,
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
config = function()
|
||||||
|
require("dashboard").setup({
|
||||||
|
theme = "doom",
|
||||||
|
config = {
|
||||||
|
header = {
|
||||||
|
"",
|
||||||
|
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗ ██╗██╗███╗ ███╗",
|
||||||
|
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║ ██║██║████╗ ████║",
|
||||||
|
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║ ██║██║██╔████╔██║",
|
||||||
|
" ██║╚██╗██║██╔════╝██║ ██║╚██╗ ██╔╝╚██╗ ██╔╝██║██║╚██╔╝██║",
|
||||||
|
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║",
|
||||||
|
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝",
|
||||||
|
"",
|
||||||
|
},
|
||||||
|
center = {
|
||||||
|
{ icon = " ", key = "f", desc = "f 查找文件", action = "Telescope find_files" },
|
||||||
|
{ icon = " ", key = "r", desc = "r 最近文件", action = "Telescope oldfiles" },
|
||||||
|
{ icon = " ", key = "g", desc = "g 全局搜索", action = "Telescope live_grep" },
|
||||||
|
{ icon = " ", key = "l", desc = "l 插件管理", action = "Lazy" },
|
||||||
|
{ icon = " ", key = "m", desc = "m LSP 管理", action = "Mason" },
|
||||||
|
{ icon = " ", key = "q", desc = "q 退出", action = "qa" },
|
||||||
|
},
|
||||||
|
footer = { " type :help for help · :q to exit" },
|
||||||
|
vertical_center = true, -- 官方垂直居中选项
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- 通用依赖
|
||||||
|
{ "nvim-lua/plenary.nvim", lazy = true },
|
||||||
|
{ "MunifTanjim/nui.nvim", lazy = true },
|
||||||
|
}
|
||||||
@@ -1,16 +1,63 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 键位提示 (which-key)
|
-- whichkey.lua — 键位提示
|
||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
enabled = false,
|
event = "VeryLazy",
|
||||||
event = "VeryLazy",
|
opts = {
|
||||||
opts = {
|
preset = "modern",
|
||||||
delay = 300,
|
delay = 200,
|
||||||
icons = { breadcrumb = ">", separator = "->", group = "+" },
|
icons = {
|
||||||
spec = { { "z", hidden = true } },
|
breadcrumb = "»",
|
||||||
|
separator = "➜",
|
||||||
|
group = "+",
|
||||||
|
},
|
||||||
|
win = {
|
||||||
|
border = "rounded",
|
||||||
|
padding = { 1, 1 },
|
||||||
|
wo = { winblend = 0 },
|
||||||
|
},
|
||||||
|
plugins = {
|
||||||
|
spelling = { enabled = true, suggestions = 20 },
|
||||||
|
presets = {
|
||||||
|
operators = false,
|
||||||
|
motions = false,
|
||||||
|
text_objects = false,
|
||||||
|
windows = false,
|
||||||
|
nav = false,
|
||||||
|
z = true,
|
||||||
|
g = true,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
config = function(_, opts)
|
||||||
|
local wk = require("which-key")
|
||||||
|
wk.setup(opts)
|
||||||
|
|
||||||
|
-- 键位分组提示
|
||||||
|
wk.add({
|
||||||
|
{ "<leader>e", group = "文件树" },
|
||||||
|
{ "<leader>f", group = "搜索" },
|
||||||
|
{ "<leader>g", group = "Git" },
|
||||||
|
{ "<leader>h", group = "Hunk 操作" },
|
||||||
|
{ "<leader>l", group = "LSP" },
|
||||||
|
{ "<leader>r", group = "运行/调试" },
|
||||||
|
{ "<leader>c", group = "CMake/C++" },
|
||||||
|
{ "<leader>b", group = "标签操作" },
|
||||||
|
{ "<leader>bc", desc = "关闭标签" },
|
||||||
|
{ "<leader>bo", desc = "关闭其他标签" },
|
||||||
|
{ "<leader>d", group = "调试操作" },
|
||||||
|
{ "<leader>db", desc = "切换断点" },
|
||||||
|
{ "<leader>du", desc = "调试界面" },
|
||||||
|
{ "<leader>dd", desc = "行诊断" },
|
||||||
|
{ "<leader>W", group = "窗口操作" },
|
||||||
|
{ "<leader>e", group = "文件浏览" },
|
||||||
|
{ "z", group = "折叠" },
|
||||||
|
{ "zM", desc = "关闭所有折叠" },
|
||||||
|
{ "zR", desc = "展开所有折叠" },
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+61
-23
@@ -1,7 +1,6 @@
|
|||||||
-- ============================================================================
|
-- =============================================================================
|
||||||
-- 统一构建/运行/调试分发器
|
-- runner.lua — 统一构建/运行/调试分发器
|
||||||
-- 根据项目类型自动选择正确的工具
|
-- =============================================================================
|
||||||
-- ============================================================================
|
|
||||||
|
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
@@ -19,38 +18,77 @@ function M.detect()
|
|||||||
return "unknown"
|
return "unknown"
|
||||||
end
|
end
|
||||||
|
|
||||||
--- 构建
|
-- 存储终端实例
|
||||||
|
local terminals = {}
|
||||||
|
|
||||||
|
--- 在底部终端运行命令(保留颜色,复用已有终端)
|
||||||
|
---@param cmd string 要运行的命令
|
||||||
|
---@param title string 窗口标题
|
||||||
|
local function run_in_terminal(cmd, title)
|
||||||
|
local Terminal = require("toggleterm.terminal").Terminal
|
||||||
|
|
||||||
|
-- 检查是否已有同名终端
|
||||||
|
if terminals[title] and vim.api.nvim_buf_is_valid(terminals[title].bufnr) then
|
||||||
|
-- 复用已有终端,先关闭再重新打开(会执行新命令)
|
||||||
|
terminals[title]:close()
|
||||||
|
terminals[title] = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 创建新终端
|
||||||
|
local term = Terminal:new({
|
||||||
|
cmd = cmd,
|
||||||
|
direction = "horizontal",
|
||||||
|
close_on_exit = false,
|
||||||
|
on_open = function(t)
|
||||||
|
pcall(vim.api.nvim_buf_set_name, t.bufnr, title)
|
||||||
|
end,
|
||||||
|
on_exit = function(t, _, exit_code)
|
||||||
|
vim.schedule(function()
|
||||||
|
-- 退出终端模式
|
||||||
|
vim.api.nvim_buf_call(t.bufnr, function()
|
||||||
|
vim.cmd("stopinsert")
|
||||||
|
end)
|
||||||
|
-- 显示结果
|
||||||
|
if exit_code == 0 then
|
||||||
|
vim.notify(title .. " 成功", vim.log.levels.INFO)
|
||||||
|
else
|
||||||
|
vim.notify(title .. " 失败 (退出码: " .. exit_code .. ")", vim.log.levels.WARN)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
terminals[title] = term
|
||||||
|
term:toggle()
|
||||||
|
end
|
||||||
|
|
||||||
|
--- 构建(使用底部终端)
|
||||||
function M.build()
|
function M.build()
|
||||||
local project = M.detect()
|
local project = M.detect()
|
||||||
|
|
||||||
if project == "rust" then
|
if project == "rust" then
|
||||||
vim.cmd("RustLsp runnables")
|
run_in_terminal("cargo build", "Cargo Build")
|
||||||
elseif project == "cmake" then
|
elseif project == "cmake" then
|
||||||
vim.cmd("CMakeBuild")
|
vim.cmd("CMakeBuild")
|
||||||
elseif project == "go" then
|
elseif project == "go" then
|
||||||
local result = vim.fn.system("go build ./...")
|
run_in_terminal("go build ./...", "Go Build")
|
||||||
if vim.v.shell_error == 0 then
|
|
||||||
vim.notify("go build 成功", vim.log.levels.INFO)
|
|
||||||
else
|
|
||||||
vim.notify("go build 失败:\n" .. result, vim.log.levels.ERROR)
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
vim.notify("未识别的项目类型,无法自动构建", vim.log.levels.WARN)
|
vim.notify("未识别的项目类型,无法自动构建", vim.log.levels.WARN)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- 运行
|
--- 运行(使用底部终端)
|
||||||
function M.run()
|
function M.run()
|
||||||
local project = M.detect()
|
local project = M.detect()
|
||||||
|
|
||||||
if project == "rust" then
|
if project == "rust" then
|
||||||
vim.cmd("RustLsp runnables")
|
run_in_terminal("cargo run", "Cargo Run")
|
||||||
elseif project == "cmake" then
|
elseif project == "cmake" then
|
||||||
vim.cmd("CMakeRun")
|
vim.cmd("CMakeRun")
|
||||||
elseif project == "go" then
|
elseif project == "go" then
|
||||||
vim.cmd("terminal go run .")
|
run_in_terminal("go run .", "Go Run")
|
||||||
elseif project == "python" then
|
elseif project == "python" then
|
||||||
vim.cmd("terminal python " .. vim.fn.expand("%"))
|
run_in_terminal("python " .. vim.fn.expand("%"), "Python Run")
|
||||||
else
|
else
|
||||||
vim.notify("未识别的项目类型,无法自动运行", vim.log.levels.WARN)
|
vim.notify("未识别的项目类型,无法自动运行", vim.log.levels.WARN)
|
||||||
end
|
end
|
||||||
@@ -61,31 +99,31 @@ function M.debug()
|
|||||||
local project = M.detect()
|
local project = M.detect()
|
||||||
|
|
||||||
if project == "rust" then
|
if project == "rust" then
|
||||||
vim.cmd("RustLsp debuggables")
|
require("dap").continue()
|
||||||
elseif project == "cmake" then
|
elseif project == "cmake" then
|
||||||
vim.cmd("CMakeDebug")
|
vim.cmd("CMakeDebug")
|
||||||
else
|
else
|
||||||
-- 通用 DAP 启动
|
|
||||||
require("dap").continue()
|
require("dap").continue()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- 测试
|
--- 测试(使用底部终端)
|
||||||
function M.test()
|
function M.test()
|
||||||
local project = M.detect()
|
local project = M.detect()
|
||||||
|
|
||||||
if project == "rust" then
|
if project == "rust" then
|
||||||
vim.cmd("RustLsp testables")
|
run_in_terminal("cargo test", "Cargo Test")
|
||||||
elseif project == "cmake" then
|
elseif project == "cmake" then
|
||||||
vim.cmd("CMakeBuild")
|
vim.cmd("CMakeBuild")
|
||||||
vim.cmd("terminal ctest --test-dir build")
|
run_in_terminal("ctest --test-dir build", "CTest")
|
||||||
elseif project == "go" then
|
elseif project == "go" then
|
||||||
vim.cmd("terminal go test ./...")
|
run_in_terminal("go test ./...", "Go Test")
|
||||||
elseif project == "python" then
|
elseif project == "python" then
|
||||||
vim.cmd("terminal pytest")
|
run_in_terminal("pytest", "Pytest")
|
||||||
else
|
else
|
||||||
vim.notify("未识别的项目类型,无法自动测试", vim.log.levels.WARN)
|
vim.notify("未识别的项目类型,无法自动测试", vim.log.levels.WARN)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[Appearance]
|
||||||
|
icon_theme=Adwaita
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
[Appearance]
|
||||||
|
icon_theme=Adwaita
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.2 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user