Skip to content

Commit

Permalink
feat: set up timer with default message
Browse files Browse the repository at this point in the history
  • Loading branch information
colomolo committed Jun 10, 2023
1 parent c5bc683 commit 9f7e37a
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 55 deletions.
160 changes: 107 additions & 53 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
<key>vitoclose</key>
<true/>
</dict>
<dict>
<key>destinationuid</key>
<string>F9193B9D-04A2-486B-A688-700CACE36B44</string>
<key>modifiers</key>
<integer>1048576</integer>
<key>modifiersubtext</key>
<string>Set timer with no message</string>
<key>vitoclose</key>
<false/>
</dict>
</array>
<key>2B80824F-8439-4A1A-AE8E-83DB7260FDEA</key>
<array>
Expand Down Expand Up @@ -212,6 +222,19 @@
<false/>
</dict>
</array>
<key>F9193B9D-04A2-486B-A688-700CACE36B44</key>
<array>
<dict>
<key>destinationuid</key>
<string>2AA64328-415B-4B9C-AF4E-248256C4EE6B</string>
<key>modifiers</key>
<integer>0</integer>
<key>modifiersubtext</key>
<string></string>
<key>vitoclose</key>
<false/>
</dict>
</array>
</dict>
<key>createdby</key>
<string>Yuri Mazursky</string>
Expand All @@ -223,37 +246,6 @@
<string>Timer</string>
<key>objects</key>
<array>
<dict>
<key>config</key>
<dict>
<key>action</key>
<integer>0</integer>
<key>argument</key>
<integer>0</integer>
<key>focusedappvariable</key>
<false/>
<key>focusedappvariablename</key>
<string></string>
<key>hotkey</key>
<integer>0</integer>
<key>hotmod</key>
<integer>0</integer>
<key>hotstring</key>
<string></string>
<key>leftcursor</key>
<false/>
<key>modsmode</key>
<integer>0</integer>
<key>relatedAppsMode</key>
<integer>0</integer>
</dict>
<key>type</key>
<string>alfred.workflow.trigger.hotkey</string>
<key>uid</key>
<string>558A4AE4-2E4D-4302-B4B5-BFD5D1743519</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -475,6 +467,37 @@ function run(argv) {
<key>version</key>
<integer>3</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>action</key>
<integer>0</integer>
<key>argument</key>
<integer>0</integer>
<key>focusedappvariable</key>
<false/>
<key>focusedappvariablename</key>
<string></string>
<key>hotkey</key>
<integer>0</integer>
<key>hotmod</key>
<integer>0</integer>
<key>hotstring</key>
<string></string>
<key>leftcursor</key>
<false/>
<key>modsmode</key>
<integer>0</integer>
<key>relatedAppsMode</key>
<integer>0</integer>
</dict>
<key>type</key>
<string>alfred.workflow.trigger.hotkey</string>
<key>uid</key>
<string>558A4AE4-2E4D-4302-B4B5-BFD5D1743519</string>
<key>version</key>
<integer>2</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -515,6 +538,28 @@ function run(argv) {
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>argument</key>
<string></string>
<key>passthroughargument</key>
<false/>
<key>variables</key>
<dict>
<key>timer_message</key>
<string>Timer went off</string>
<key>timer_seconds</key>
<string>{query}</string>
</dict>
</dict>
<key>type</key>
<string>alfred.workflow.utility.argument</string>
<key>uid</key>
<string>F9193B9D-04A2-486B-A688-700CACE36B44</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -785,6 +830,21 @@ function run(argv) {
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>availableviaurlhandler</key>
<true/>
<key>triggerid</key>
<string>show_message</string>
</dict>
<key>type</key>
<string>alfred.workflow.trigger.external</string>
<key>uid</key>
<string>D4E7636D-BD88-4389-B968-F1B9A60D8977</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -814,21 +874,6 @@ function run(argv) {
<key>version</key>
<integer>3</integer>
</dict>
<dict>
<key>config</key>
<dict>
<key>availableviaurlhandler</key>
<true/>
<key>triggerid</key>
<string>show_message</string>
</dict>
<key>type</key>
<string>alfred.workflow.trigger.external</string>
<key>uid</key>
<string>D4E7636D-BD88-4389-B968-F1B9A60D8977</string>
<key>version</key>
<integer>1</integer>
</dict>
<dict>
<key>config</key>
<dict>
Expand Down Expand Up @@ -892,7 +937,7 @@ function run(argv) {
<key>xpos</key>
<real>555</real>
<key>ypos</key>
<real>195</real>
<real>250</real>
</dict>
<key>2CD78571-C416-465E-A9F7-E785A96FD7EB</key>
<dict>
Expand Down Expand Up @@ -928,7 +973,7 @@ function run(argv) {
<key>xpos</key>
<real>410</real>
<key>ypos</key>
<real>165</real>
<real>220</real>
</dict>
<key>43FFB0F6-CCE8-4D6A-9739-109271B175D6</key>
<dict>
Expand All @@ -942,7 +987,7 @@ function run(argv) {
<key>xpos</key>
<real>345</real>
<key>ypos</key>
<real>195</real>
<real>250</real>
</dict>
<key>558A4AE4-2E4D-4302-B4B5-BFD5D1743519</key>
<dict>
Expand All @@ -965,14 +1010,14 @@ function run(argv) {
<key>xpos</key>
<real>625</real>
<key>ypos</key>
<real>165</real>
<real>220</real>
</dict>
<key>7A59166A-1515-4F01-B162-1832DA9CC72F</key>
<dict>
<key>xpos</key>
<real>30</real>
<key>ypos</key>
<real>165</real>
<real>220</real>
</dict>
<key>7D075033-BA78-4612-9D92-0BCE281E752A</key>
<dict>
Expand All @@ -981,7 +1026,7 @@ function run(argv) {
<key>xpos</key>
<real>185</real>
<key>ypos</key>
<real>165</real>
<real>220</real>
</dict>
<key>91B179A3-BB5E-4BBF-93DF-21464F07AE2C</key>
<dict>
Expand Down Expand Up @@ -1026,6 +1071,15 @@ function run(argv) {
<key>ypos</key>
<real>50</real>
</dict>
<key>F9193B9D-04A2-486B-A688-700CACE36B44</key>
<dict>
<key>colorindex</key>
<integer>3</integer>
<key>xpos</key>
<real>450</real>
<key>ypos</key>
<real>160</real>
</dict>
</dict>
<key>userconfigurationconfig</key>
<array>
Expand Down Expand Up @@ -1174,7 +1228,7 @@ function run(argv) {
</dict>
</array>
<key>version</key>
<string>1.0.5</string>
<string>1.0.4</string>
<key>webaddress</key>
<string>http://colomolome.com</string>
</dict>
Expand Down
4 changes: 2 additions & 2 deletions input_to_seconds.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ function run(argv) {
ObjC.import('stdlib');
const time = $.getenv('duration_input');

const ACCEPTED_UNITS_SECONDS = ['', 's', 'sec', 'secs', 'second', 'seconds'];
const ACCEPTED_UNITS_MINUTES = ['m', 'min', 'mins', 'minute', 'minutes'];
const ACCEPTED_UNITS_SECONDS = ['s', 'sec', 'secs', 'second', 'seconds'];
const ACCEPTED_UNITS_MINUTES = ['', 'm', 'min', 'mins', 'minute', 'minutes'];
const ACCEPTED_UNITS_HOURS = ['h', 'hr', 'hrs', 'hour', 'hours'];

const inputToTimeMap = (input) => {
Expand Down

0 comments on commit 9f7e37a

Please sign in to comment.