Skip to content

Global shortcut setup (.desktop file + platform docs) #4

@pgivel

Description

@pgivel

Summary

Provide a way to launch Screen Ruler with a global keyboard shortcut, without requiring a persistent daemon.

Approach

Linux

  • Ship a .desktop file (screen-ruler.desktop) with the appropriate Exec= line.
  • Document how to bind it to a shortcut in common DEs:
    • GNOME: gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ ...
    • KDE: System Settings → Shortcuts → Custom Shortcuts
    • Hyprland/Sway: bind directive in config

macOS

  • Document using Automator / Shortcuts app to wrap the CLI command.
  • Optionally explore CGEventTapCreate for native registration.

Windows

  • Document binding via Settings → Keyboard → Keyboard Shortcuts.
  • Optionally provide a .lnk shortcut file.

Non-goals (for now)

  • No persistent daemon or tray icon — the app lifecycle stays ephemeral (capture → measure → quit).
  • A daemon approach (e.g. pystray + pynput) could be explored later for faster launch if the ~200ms capture time becomes a concern.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions