Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Toggle Timer Widget Command to tomito-controls #16800

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion extensions/tomito-controls/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Tomito Controls Changelog

## [Initial Version] - 2024-01-10
## [Initial Version] - 2024-01-10

## [New Commands] - 2025-02-03
- added a new command for toggling timer widget
2 changes: 2 additions & 0 deletions extensions/tomito-controls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ _\*Only use if "Manually finish sessions and breaks" is selected in preferences_
**Hide**: Hides the timer window

**Show**: Shows the timer window

**Toggle Timer Widget** Shows or hides the timer widget
6 changes: 6 additions & 0 deletions extensions/tomito-controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
"subtitle": "Tomito",
"description": "Show timer window",
"mode": "no-view"
},
{
"name": "toggle-timer-widget",
"title": "Toggle Timer Widget",
"description": "Show or hide the timer widget",
"mode": "no-view"
}
],
"dependencies": {
Expand Down
12 changes: 12 additions & 0 deletions extensions/tomito-controls/src/toggle-timer-widget.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { closeMainWindow } from "@raycast/api";
import { runAppleScript } from "@raycast/utils";
import { checkTomitoInstallation } from "./utilities/checkInstall";

export default async () => {
const isInstalled = await checkTomitoInstallation();

if (isInstalled) {
await closeMainWindow();
await runAppleScript('tell application "Tomito" to toggleTimerWidget');
}
};
Loading