All 176 bind descriptions across the shipped Hyprland binding files switch to Simplified Chinese; brand names stay English. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp
127 lines
6.9 KiB
Lua
127 lines
6.9 KiB
Lua
o.bind("SUPER + SPACE", "Omarchy 菜单", "omarchy-menu toggle")
|
||
o.bind("SUPER + ALT + SPACE", "应用菜单", "omarchy-menu toggle apps")
|
||
o.bind("SUPER + CTRL + E", "表情", "omarchy-shell shell toggle omarchy.emojis")
|
||
o.bind("SUPER + CTRL + C", "截取菜单", "omarchy-menu toggle capture")
|
||
o.bind("SUPER + CTRL + O", "切换菜单", "omarchy-menu toggle toggle")
|
||
o.bind("SUPER + CTRL + H", "硬件菜单", "omarchy-menu toggle hardware")
|
||
o.bind("SUPER + SHIFT + code:201", "Omarchy 菜单", "omarchy-menu toggle root")
|
||
o.bind("SUPER + ESCAPE", "系统菜单", "omarchy-menu toggle system")
|
||
o.bind("XF86PowerOff", "电源菜单", "omarchy-menu toggle system", { locked = true })
|
||
o.bind("SUPER + K", "快捷键", "omarchy-menu-keybindings")
|
||
o.bind("SUPER + ALT + K", "Tmux 快捷键", "omarchy-menu-tmux-keybindings")
|
||
o.bind("SUPER + CTRL + K", "Herdr 快捷键", "omarchy-menu-herdr-keybindings")
|
||
o.bind("SUPER + CTRL + Q", "计算器", "omacalc")
|
||
o.bind("XF86Calculator", "计算器", "omacalc")
|
||
|
||
o.bind_toggle("SUPER + SHIFT + SPACE", "切换顶栏", "bar")
|
||
o.bind("SUPER + CTRL + SPACE", "壁纸切换", "omarchy-menu toggle background")
|
||
o.bind("SUPER + SHIFT + CTRL + SPACE", "主题菜单", "omarchy-menu toggle theme")
|
||
o.bind("SUPER + BACKSPACE", "切换窗口透明", "omarchy-hyprland-window-transparency-toggle")
|
||
o.bind("SUPER + SHIFT + BACKSPACE", "切换窗口间距", "omarchy-hyprland-window-gaps-toggle")
|
||
o.bind("SUPER + CTRL + BACKSPACE", "切换单窗口方形比例", "omarchy-hyprland-window-single-square-aspect-toggle")
|
||
|
||
-- xkbcommon names the comma keysym "comma"; the upper-case "COMMA" does not match.
|
||
o.bind("SUPER + comma", "清除最近通知", "omarchy-shell notifications dismissOne")
|
||
o.bind("SUPER + SHIFT + comma", "清除全部通知", "omarchy-shell notifications dismissAll")
|
||
o.bind_toggle("SUPER + CTRL + comma", "切换通知免打扰", "notification-silencing")
|
||
o.bind("SUPER + ALT + comma", "打开最近通知", "omarchy-shell notifications invokeLast")
|
||
o.bind("SUPER + SHIFT + ALT + comma", "通知历史", "omarchy-shell notifications showHistory")
|
||
|
||
o.bind_toggle("SUPER + CTRL + I", "切换空闲锁定", "idle")
|
||
o.bind_toggle("SUPER + CTRL + N", "切换夜间模式", "nightlight")
|
||
o.bind("SUPER + CTRL + Delete", "切换笔记本屏幕", "omarchy-hyprland-monitor-internal toggle")
|
||
o.bind("SUPER + CTRL + ALT + Delete", "切换笔记本镜像显示", "omarchy-hyprland-monitor-internal-mirror toggle")
|
||
o.bind("switch:on:Lid Switch", nil, "omarchy-system-lid-close", { locked = true })
|
||
o.bind("switch:off:Lid Switch", nil, "omarchy-hyprland-monitor-clamshell", { locked = true })
|
||
|
||
o.bind("PRINT", "截图", "omarchy-capture-screenshot")
|
||
o.bind("ALT + PRINT", "录屏", "omarchy-capture-screenrecording --stop-recording || omarchy-menu toggle trigger.capture.screenrecord")
|
||
o.bind("SUPER + ALT + code:34", "缩小摄像头悬浮窗", "omarchy-capture-webcam-resize smaller")
|
||
o.bind("SUPER + ALT + code:35", "放大摄像头悬浮窗", "omarchy-capture-webcam-resize larger")
|
||
o.bind("SUPER + PRINT", "取色器", "pkill hyprpicker || hyprpicker -a")
|
||
o.bind("SUPER + CTRL + PRINT", "截图取字(OCR)", "omarchy-capture-text")
|
||
|
||
-- Keyboard control for the slurp region picker (see omarchy-capture-region).
|
||
-- The binds live exactly as long as a selection layer is on screen (slurp
|
||
-- opens one per monitor), so they cannot leak or get stuck.
|
||
-- Unbinding by key would take a same-key binding out of the user's own config
|
||
-- with it, so each handle is kept and removed individually.
|
||
local selection_layers = 0
|
||
local selection_binds = {}
|
||
|
||
hl.on("layer.opened", function(layer)
|
||
if layer.namespace == "selection" then
|
||
selection_layers = selection_layers + 1
|
||
if selection_layers == 1 then
|
||
selection_binds = {
|
||
hl.bind("RETURN", hl.dsp.exec_cmd("omarchy-capture-region --take-window"), { description = "Capture highlighted window" }),
|
||
hl.bind("CTRL + RETURN", hl.dsp.exec_cmd("omarchy-capture-region --take-fullscreen"), { description = "Capture entire screen" }),
|
||
hl.bind("TAB", hl.dsp.exec_cmd("omarchy-capture-region --select-window next"), { description = "Select next window to capture" }),
|
||
hl.bind("CTRL + TAB", hl.dsp.exec_cmd("omarchy-capture-region --select-window prev"), { description = "Select previous window to capture" }),
|
||
}
|
||
for _, direction in ipairs({ "left", "right", "up", "down" }) do
|
||
table.insert(
|
||
selection_binds,
|
||
hl.bind(direction:upper(), hl.dsp.exec_cmd("omarchy-capture-region --select-window " .. direction), { description = "Select window to capture" })
|
||
)
|
||
end
|
||
end
|
||
end
|
||
end)
|
||
|
||
hl.on("layer.closed", function(layer)
|
||
if layer.namespace == "selection" and selection_layers > 0 then
|
||
selection_layers = selection_layers - 1
|
||
if selection_layers == 0 then
|
||
for _, keybind in ipairs(selection_binds) do
|
||
keybind:unbind()
|
||
end
|
||
selection_binds = {}
|
||
end
|
||
end
|
||
end)
|
||
|
||
o.bind("SUPER + CTRL + S", "分享", "omarchy-menu toggle share")
|
||
|
||
o.bind("SUPER + CTRL + PERIOD", "转码", "omarchy-transcode")
|
||
|
||
o.bind("SUPER + CTRL + R", "设置提醒", "omarchy-menu toggle reminder-set")
|
||
o.bind("SUPER + CTRL + ALT + R", "查看提醒", "omarchy-reminder show")
|
||
o.bind("SUPER + SHIFT + CTRL + R", "清除提醒", "omarchy-reminder clear")
|
||
|
||
o.bind("SUPER + CTRL + ALT + T", "查看时间", "omarchy-notification-time")
|
||
o.bind("SUPER + CTRL + ALT + B", "查看剩余电量", "omarchy-notification-battery")
|
||
o.bind("SUPER + CTRL + ALT + W", "切换天气", "omarchy-notification-weather")
|
||
|
||
o.bind("SUPER + SHIFT + CTRL + A", "Agent", "omarchy-agent --pick")
|
||
o.bind("SUPER + CTRL + A", "音频", "omarchy-shell shell toggle omarchy.audio")
|
||
o.bind("SUPER + CTRL + B", "蓝牙", "omarchy-shell shell toggle omarchy.bluetooth")
|
||
o.bind("SUPER + CTRL + D", "显示", "omarchy-shell shell toggle omarchy.monitor")
|
||
o.bind("SUPER + CTRL + ALT + D", "日历", "omarchy-shell shell toggle omarchy.clock")
|
||
o.bind("SUPER + CTRL + W", "网络", "omarchy-shell shell toggle omarchy.network")
|
||
o.bind("SUPER + CTRL + P", "电源", "omarchy-shell shell toggle omarchy.power")
|
||
o.bind("SUPER + CTRL + T", "系统活动", { tui = "btop" })
|
||
|
||
-- The letters above name a panel; the numbers count them. 1 is the leftmost
|
||
-- panel in the bar's right section, and a widget with no panel of its own (the
|
||
-- tray) is not counted, so the number matches the icon a user would point at.
|
||
-- A bar with fewer panels than this leaves the tail of the range doing nothing.
|
||
for panel = 1, 9 do
|
||
o.bind(
|
||
"SUPER + CTRL + code:" .. tostring(panel + 9),
|
||
"Bar panel " .. panel,
|
||
"omarchy-shell -q shell togglePanelAt right " .. panel
|
||
)
|
||
end
|
||
|
||
o.bind("SUPER + CTRL + Z", "放大", function()
|
||
local zoom = hl.get_config("cursor.zoom_factor") or 1
|
||
hl.config({ cursor = { zoom_factor = zoom + 1 } })
|
||
end)
|
||
|
||
o.bind("SUPER + CTRL + ALT + Z", "重置缩放", function()
|
||
hl.config({ cursor = { zoom_factor = 1 } })
|
||
end)
|
||
|
||
o.bind("SUPER + CTRL + L", "锁定系统", "omarchy-system-lock")
|