portable-configs/neru/config.toml
2026-05-24 12:08:51 +08:00

353 lines
13 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Neru default configuration
# Copy to ~/.config/neru/config.toml to customize.
# Full config reference: https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md
# Full CLI reference: https://github.com/y3owk1n/neru/blob/main/docs/CLI.md
# General settings
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#general-settings
[general]
excluded_apps = [] # Bundle IDs to ignore (e.g. "com.apple.Terminal")
kb_layout_to_use = "" # Force a keyboard layout InputSourceID (empty = auto)
passthrough_unbounded_keys = false # Let unbound Cmd/Ctrl/Alt shortcuts reach macOS
should_exit_after_passthrough = false # Exit the current mode after a shortcut is passed through
passthrough_unbounded_keys_blacklist = [] # Shortcuts to still consume when passthrough is on
hide_overlay_in_screen_share = false # Hide overlay from screen sharing apps
# Theme palette
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#theme-palette
[theme.light]
surface = "#FFFFFF"
accent = "#2563EB"
accent_alt = "#DC2626"
on_accent_alt = "#FFFFFF"
text = "#1E293B"
[theme.dark]
surface = "#0A0A0A"
accent = "#60A5FA"
accent_alt = "#F87171"
on_accent_alt = "#FFFFFF"
text = "#F1F5F9"
# Hotkeys
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#hotkeys
# See https://github.com/y3owk1n/neru/blob/main/docs/CLI.md
[hotkeys]
"Primary+Shift+Space" = "hints"
"Primary+Shift+G" = "grid"
"Primary+Shift+C" = "recursive_grid"
"Primary+Shift+S" = "scroll"
"Primary+Shift+1" = "action move_monitor 'Built-in Retina Display'"
"Primary+Shift+2" = "action move_monitor 'Mi Monitor'"
"Primary+Shift+3" = "action move_monitor 'ZOWIE RL LCD'"
# Hint mode
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#hint-mode
[hints]
enabled = true
hint_characters = "arstneio" # Characters used for hint labels
max_depth = 50 # Max accessibility tree depth (0 = unlimited)
include_menubar_hints = false
additional_menubar_hints_targets = [
"com.apple.TextInputMenuAgent",
"com.apple.controlcenter",
"com.apple.systemuiserver",
"com.y3owk1n.neru",
]
include_dock_hints = false
include_nc_hints = false
include_stage_manager_hints = false
include_pip_hints = false
include_screen_capture_hints = false
detect_mission_control = false
clickable_roles = [
"AXButton",
"AXMenuButton",
"AXComboBox",
"AXCheckBox",
"AXRadioButton",
"AXLink",
"AXPopUpButton",
"AXTextField",
"AXSlider",
"AXTabButton",
"AXSwitch",
"AXDisclosureTriangle",
"AXTextArea",
"AXMenuItem",
"AXCell",
"AXRow",
"AXGenericElement",
]
ignore_clickable_check = false
[hints.hotkeys]
"Escape" = "idle"
"}" = "action search_hints"
"Backspace" = "action backspace"
"Tab" = "action cycle_hint"
"Shift+Tab" = "action cycle_hint --backward"
"Enter" = ["action left_click","idle"]
"Shift+R" = "action right_click"
"Shift+M" = "action middle_click"
"Shift+I" = "action mouse_down"
"Shift+U" = "action mouse_up"
"Up" = "action move_mouse_relative --dx=0 --dy=-10"
"Down" = "action move_mouse_relative --dx=0 --dy=10"
"Left" = "action move_mouse_relative --dx=-10 --dy=0"
"Right" = "action move_mouse_relative --dx=10 --dy=0"
[hints.additional_ax_support]
enable = false # Enable enhanced AX for Electron/Chromium/Firefox apps
additional_electron_bundles = []
additional_chromium_bundles = []
additional_firefox_bundles = []
[hints.ui]
font_size = 10
font_family = "" # Empty = system font
border_radius = -1 # -1 = auto pill
padding_x = -1 # -1 = auto based on font size
padding_y = -1 # -1 = auto based on font size
border_width = 1
placement = "bottom" # top, center, bottom
background_color = { light = "#E0F2FE", dark = "#083344" } # Cyan-tinted background
text_color = { light = "#0C4A6E", dark = "#67E8F9" } # High contrast text
matched_text_color = { light = "#DC2626", dark = "#F87171" }
border_color = { light = "#0284C7", dark = "#22D3EE" }
[hints.search_input_ui]
font_size = 10
font_family = "" # Empty = system font
border_radius = -1 # -1 = auto pill
padding_x = -1 # -1 = auto based on font size
padding_y = -1 # -1 = auto based on font size
border_width = 1
position = "bottom_center" # top_left, top_center, top_right, center, bottom_left, bottom_center, bottom_right
x_offset = 0 # Offset from the selected position on the active screen
y_offset = 24 # Offset from the selected position on the active screen
width = 320 # Search input width in pixels
[hints.boundary_highlight]
enabled = false # Draw a subtle outline around each target element
border_width = 1
border_radius = -1 # -1 = auto pill
# Grid mode
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#grid-mode
[grid]
enabled = true
characters = "arstgmneio" # Primary grid labels
sublayer_keys = "arstgmneio" # Subgrid labels (fallback to characters)
live_match_update = true # Highlight cells as you type
hide_unmatched = true # Hide non-matching cells
prewarm_enabled = true # Pre-compute grid on startup (~1.5MB RAM)
enable_gc = false # Periodic memory cleanup (adds CPU overhead)
[grid.hotkeys]
"Escape" = "idle"
"`" = "toggle-cursor-follow-selection"
"Space" = "action reset"
"Backspace" = "action backspace"
"Enter" = ["action left_click","idle"]
"Shift+R" = "action right_click"
"Shift+M" = "action middle_click"
"Shift+I" = "action mouse_down"
"Shift+U" = "action mouse_up"
"Up" = "action move_mouse_relative --dx=0 --dy=-10"
"Down" = "action move_mouse_relative --dx=0 --dy=10"
"Left" = "action move_mouse_relative --dx=-10 --dy=0"
"Right" = "action move_mouse_relative --dx=10 --dy=0"
[grid.ui]
font_size = 8
font_family = ""
border_width = 0
matched_background_color = { light = "#FECACA", dark = "#7F1D1D" } # Red for matched
matched_border_color = { light = "#DC2626", dark = "#F87171" }
border_color = { light = "#D1D5DB", dark = "#374151" }
# Recursive grid mode (recommended)
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#recursive-grid-mode-recommended
[recursive_grid]
enabled = true
grid_cols = 5 # Number of columns (>= 1)
grid_rows = 3 # Number of rows (>= 1)
keys = "qwfpbarstgzxcdv" # Cell selection keys (must be grid_cols * grid_rows chars)
min_size_width = 1 # Stop subdividing below this width (px)
min_size_height = 1 # Stop subdividing below this height (px)
max_depth = 4 # Maximum recursion levels (120)
[recursive_grid.animation]
enabled = false # Opt in to native depth transition animation on supported platforms
duration_ms = 180 # Recursive-grid animation duration in milliseconds
[recursive_grid.hotkeys]
"Escape" = "idle"
"`" = "toggle-cursor-follow-selection"
"Space" = "action reset"
"Backspace" = "action backspace"
"Return" = ["action left_click","idle"]
"Shift+R" = "action right_click"
"Shift+M" = "action middle_click"
"Shift+I" = "action mouse_down"
"Shift+U" = "action mouse_up"
"Up" = "action move_mouse_relative --dx=0 --dy=-10"
"Down" = "action move_mouse_relative --dx=0 --dy=10"
"Left" = "action move_mouse_relative --dx=-10 --dy=0"
"Right" = "action move_mouse_relative --dx=10 --dy=0"
[recursive_grid.ui]
line_width = 1
font_size = 8
font_family = ""
label_background = false # Add rounded backgrounds behind cell labels
label_background_padding_x = -1
label_background_padding_y = -1
label_background_border_radius = -1
label_background_border_width = 1
sub_key_preview = false # Draw miniature key grid inside each cell
sub_key_preview_font_size = 8
sub_key_preview_autohide_multiplier = 1.5
#highlight_color = { light = "#DC2626", dark = "#F87171" } # Bright red highlight
#line_color = { light = "#9CA3AF", dark = "#4B5563" } # Subtle grid lines
#text_color = { light = "#1E293B", dark = "#F1F5F9" }
# Virtual pointer
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#virtual-pointer
[virtual_pointer]
enabled = true
[virtual_pointer.ui]
size = 5 # Larger dot
color = { light = "#DC2626", dark = "#F87171" }
# Mouse action indicator (macOS)
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#mouse-action-indicator
[mouse_action_indicator]
enabled = false # Disabled by default
actions = ["left_click", "right_click", "middle_click", "mouse_down", "mouse_up"]
[mouse_action_indicator.ui]
size = 36
border_width = 2
shape = "circle" # circle or square
[mouse_action_indicator.animation]
duration_ms = 260
start_scale = 0.55
end_scale = 1.35
start_opacity = 0.85
end_opacity = 0.0
easing = "ease_out" # linear, ease_in, ease_out, ease_in_out
# Scroll mode
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#scroll-mode
[scroll]
scroll_step = 50 # Pixels per j/k press
scroll_step_half = 500 # Pixels for d/u (half page)
scroll_step_full = 1000000 # Pixels for gg/G (top/bottom)
[scroll.hotkeys]
"Escape" = "idle"
"k" = "action scroll_up"
"j" = "action scroll_down"
"h" = "action scroll_left"
"l" = "action scroll_right"
"gg" = "action go_top"
"Shift+G" = "action go_bottom"
"u" = "action page_up"
"PageUp" = "action page_up"
"d" = "action page_down"
"PageDown" = "action page_down"
"Shift+L" = "action left_click"
"Shift+R" = "action right_click"
"Shift+M" = "action middle_click"
"Shift+I" = "action mouse_down"
"Shift+U" = "action mouse_up"
"Up" = "action move_mouse_relative --dx=0 --dy=-10"
"Down" = "action move_mouse_relative --dx=0 --dy=10"
"Left" = "action move_mouse_relative --dx=-10 --dy=0"
"Right" = "action move_mouse_relative --dx=10 --dy=0"
# Mode indicator
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#mode-indicator
[mode_indicator]
[mode_indicator.scroll]
enabled = true
text = "Scroll"
[mode_indicator.hints]
enabled = true
text = "Hints"
background_color = { light = "#E0F2FE", dark = "#083344" }
[mode_indicator.grid]
enabled = false
text = "Grid"
[mode_indicator.recursive_grid]
enabled = false
text = "Recursive Grid"
background_color = { light = "#FEE2E2", dark = "#7F1D1D" }
[mode_indicator.ui]
font_size = 10
font_family = ""
border_width = 1
padding_x = -1
padding_y = -1
border_radius = -1
indicator_x_offset = 20
indicator_y_offset = 20
# Sticky modifiers
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#sticky-modifiers
[sticky_modifiers]
enabled = true
tap_max_duration = 300
[sticky_modifiers.ui]
font_size = 10
font_family = ""
border_width = 1
padding_x = -1
padding_y = -1
border_radius = -1
indicator_x_offset = -40
indicator_y_offset = 20
# Smooth cursor (animates cursor movement between positions)
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#smooth-cursor
[smooth_cursor]
move_mouse_enabled = false # Enable smooth mouse movement
steps = 10 # Number of intermediate positions
max_duration = 200 # Maximum animation duration in ms
duration_per_pixel = 0.1 # Ms per pixel for adaptive duration
# Smooth scroll (animates scroll actions with eased chunking)
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#smooth-scroll
[smooth_scroll]
enabled = false # Enable smooth scrolling
steps = 20 # Number of animation steps
max_duration = 180 # Maximum animation duration in ms
duration_per_pixel = 1.00 # Ms per pixel for adaptive duration
# Systray
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#systray
[systray]
enabled = true # Show menu bar icon (false = headless mode)
# Logging
# See https://github.com/y3owk1n/neru/blob/main/docs/CONFIGURATION.md#logging
[logging]
log_level = "info" # debug, info, warn, error
log_file = "" # Custom log path (empty = default location)
structured_logging = true # JSON format
disable_file_logging = true # Console only (no file)
max_file_size = 10 # MB before rotation
max_backups = 5 # Old log files to keep
max_age = 30 # Days to retain old logs