Skip to content

Load settings from XDG config file at startup#203

Open
hrsather wants to merge 1 commit into
pilotmoon:masterfrom
hrsather:feature/xdg-dotfile-config
Open

Load settings from XDG config file at startup#203
hrsather wants to merge 1 commit into
pilotmoon:masterfrom
hrsather:feature/xdg-dotfile-config

Conversation

@hrsather

@hrsather hrsather commented Jul 9, 2026

Copy link
Copy Markdown

Summary

  • Adds support for configuring Scroll Reverser via a dotfile at $XDG_CONFIG_HOME/scrollreverser/config (defaults to ~/.config/scrollreverser/config)
  • Settings are loaded at app startup and written into NSUserDefaults, so both the UI and the event tap pick them up correctly
  • Only keys present in the file are applied; absent keys leave existing preferences untouched

Config file format

# Scroll Reverser
enabled=true
reverseVertical=true
reverseHorizontal=false
reverseTrackpad=false
reverseMouse=true

Supports true/false and 1/0 values, blank lines, and # comments.

Test plan

  • Create ~/.config/scrollreverser/config with specific values
  • Launch app and verify prefs UI reflects the file contents
  • Change a value in the file, restart, confirm it updates
  • Verify app behaves normally when no config file is present
  • Verify XDG_CONFIG_HOME env var is respected when set

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant