Skip to content

Add click_command action to the clock module#5

Open
heath-toby wants to merge 1 commit into
destructatron:mainfrom
heath-toby:feat/clock-click-command
Open

Add click_command action to the clock module#5
heath-toby wants to merge 1 commit into
destructatron:mainfrom
heath-toby:feat/clock-click-command

Conversation

@heath-toby

Copy link
Copy Markdown

Summary

Lets users wire a shell command to the clock item's default action. When the configured command is non-empty and resolves on PATH, the clock exposes a click Activate action that runs it; when empty or unresolvable the clock stays click-inert as before (default behaviour preserved).

The motivating use is binding the clock to waynotify-client so pressing Enter on the clock opens notification history, but any executable works.

Config example

[modules.clock]
click_command = "waynotify-client"

Test plan

  • With click_command unset/empty, the clock item is click-inert (no default Activate action exposed).
  • With click_command = "echo hi", focusing the clock and pressing Enter runs the command.
  • With click_command = "nonexistent-command", the action is silently dropped (resolved via PATH check) and no action is exposed.
  • Hot-reload: edit the config to add/remove click_command and confirm the action appears/disappears.

🤖 Generated with Claude Code

Lets users wire a shell command to the clock item's default action. When
the configured command is non-empty and resolves on PATH, the clock
exposes a "click" Activate action that runs it; when empty or unresolvable
the clock stays click-inert as before (default behaviour preserved).

The motivating use is binding the clock to `waynotify-client` so pressing
Enter on the clock opens notification history, but any executable works.

Config example:
  [modules.clock]
  click_command = "waynotify-client"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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