Skip to content
liuxiaobo
Go back

Windows 11 UI 优化:经典右键 + Windhawk 任务栏

Win11 任务栏又高又挤,右键还要多点一层「显示更多选项」。下面这套能把任务栏压到 26px、背景透明、托盘收紧,并恢复经典右键。

Table of contents

Open Table of contents

恢复经典右键菜单

管理员打开 CMD 或 PowerShell,依次执行:

reg.exe add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
taskkill /f /im explorer.exe & start explorer.exe

第一条在当前用户写入一个空的 InprocServer32 默认值,Explorer 会回退到 Win10 风格右键。第二条杀掉并重启资源管理器,立刻生效。

还原 Win11 新菜单:

reg.exe delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f
taskkill /f /im explorer.exe & start explorer.exe

安装 Windhawk

到 windhawk.net 下载安装。装好后左侧 Explore 搜索下面几个 Mod,点 Install。

每个 Mod 装完后:详情页 → Advanced → Mod settings,把对应 YAML 整段贴进去保存。系统大版本更新后若失效,先到 Windhawk 更新 Mod,再禁用/启用一次。

Taskbar height and icon size

把任务栏高度压到 26px,图标 24px。

TaskbarHeight: 26
IconSize: 24
TaskbarButtonWidth: 44
IconSizeSmall: 14
TaskbarButtonWidthSmall: 26

Windows 11 Taskbar Styler

主题 TranslucentTaskbar:背景全透明,去掉底边描边。

theme: TranslucentTaskbar
styleConstants:
  - CommonBgBrush=<SolidColorBrush Color="#00000000" />
controlStyles:
  - target: Taskbar.TaskbarFrame > Grid#RootGrid > Taskbar.TaskbarBackground > Grid > Rectangle#BackgroundFill
    styles:
      - Fill=Transparent
  - target: Taskbar.TaskbarBackground#HoverFlyoutBackgroundControl > Grid > Rectangle#BackgroundFill
    styles:
      - Fill=Transparent
  - target: Rectangle#BackgroundStroke
    styles:
      - Visibility=Collapsed
themeResourceVariables:
  - ''
clickThroughTaskbar: 0
xamlDiagnosticsHandling: ''

Taskbar tray icon spacing and grid

托盘图标宽 24、单行排布。

notificationIconWidth: 24
notificationIconRows: 1
gridArrangement: rowFirstLeftToRight
overflowIconWidth: 32
overflowIconsPerRow: 5

Taskbar Clock Customization

只显示 HH:mm,高度跟任务栏对齐,最大宽度 34,避免时钟把托盘撑开。

ShowSeconds: 0
TimeFormat: HH:mm
DateFormat: ''
DateLocale: ''
WeekdayFormat: ''
WeekdayFormatCustom: ''
TopLine: '%time%'
BottomLine: ''
MiddleLine: ''
TooltipLine: ''
TooltipLineMode: ''
Width: 0
Height: 26
MaxWidth: 34
TextSpacing: -15
TimeStyle:
  Hidden: 0
  TextColor: ''
  TextAlignment: ''
  FontSize: 14
  FontFamily: ''
  FontWeight: ''
  FontStyle: ''
  FontStretch: ''
  CharacterSpacing: 0
  LineHeight: 0
oldTaskbarOnWin11: 0

任务栏 Dock 动画

鼠标悬停时图标放大到 130%,影响半径 100,带轻微弹跳。

AnimationType: 0
MaxScale: 130
EffectRadius: 100
SpacingFactor: 50
BounceDelay: 500
FocusDuration: 150
MirrorForTopTaskbar: 0
DisableVerticalBounce: 0
TaskbarLabelsMode: 0
ExcludeSystemButtonsMode: 0
LerpSpeed: 60
DisableBounce: 0

顺序建议

  1. 先写注册表、重启 Explorer,确认经典右键生效。
  2. 再装 Windhawk,按「高度 → 透明 → 托盘 → 时钟 → Dock」依次启用。
  3. 高度和时钟都设成 26,对不齐就只改 TaskbarHeight / 时钟 Height,别同时乱调。


Next Post
生成和查看 SSH 密钥