forked from raycast/script-commands
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart-dnd-me.sh
executable file
·29 lines (21 loc) · 965 Bytes
/
start-dnd-me.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
# Install DND Me from https://runtimesharks.com/projects/dnd-me?ref=producthunt
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Start DND
# @raycast.mode silent
# Optional parameters:
# @raycast.icon 🔕
# @raycast.argument1 { "type": "text", "placeholder": "Duration", "optional": true }
# @raycast.packageName DND Me
# Documentation:
# @raycast.description Starts DND via DND Me. The parameter has to be a menu item or slider equivalent: 15m, 30m, 1h, 2h, ..., 12h, next, next-hour, next-half-hour; it defaults to next. next-hour means the next 60m mark, next-half-hour means the next 30m mark and next means the first of the two. For example, if it's 9:22, next-hour means 10:00, next-half-hour means 9:30 and next means 9:30.
# @raycast.author Roland Leth
# @raycast.authorURL https://runtimesharks.com/projects/dnd-me
duration=$1
if [[ -z "$1" ]]
then
duration=next
fi
open "dndme://start-dnd/$duration"
echo "DND on"