-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add ability to tell it to clear status after x amount of time #4
Comments
Will take a look - thanks for the idea |
That's a cool technique - I do have some UI management flows e.g. focussing windows and they do seem to break fairly regularly. I could create an option where if you set the timer it goes through a UI function but if left blank it uses the slash command? |
You could do something like this to set a status for 30 minutes: tell application "System Events"
keystroke "y" using {command down, shift down}. # Display status change dialog
delay 0.2
keystroke "Lunch break" # Status text
keystroke tab # Highlight emoji selection button
keystroke return
delay 0.2
keystroke ":sandwich:" # Search emoji
delay 0.2
keystroke return # Select first result
keystroke tab # Emoji selection button
keystroke tab # Clear text button
keystroke tab # "Clear after" dropdown
delay 0.2
key code 126 # 4 hours
key code 126 # 1 hour
key code 126 # 30 minutes
keystroke return
keystroke tab # Save button
keystroke return
end tell |
Thanks - I have been looking into it. My struggle at the moment is designing a nice usable dictionary definition for this. I could create a definition for each one but it doesn't feel user friendly to me yet. Have you got any ideas? |
Hi! I would also love to have this feature 😄 I actually need to clear the slack status after 25min (I'm working with the pomodoro technique and it divides time in chunks of 25min, I'm trying to communicate it to my colleagues with my slack status). I don't know why do you think that
Thanks! |
Hi Julia, The difficulty I was having was communicating the the preset values slack offers (1 hour, 4 hours etc). They do have a custom option but it presents a calendar view which could be a little more brittle to code against the UI. Also trying to surface the options clear after today/this week isn't easily revealed. I think there's enough demand now though for me to give this a go and use the custom method by default perhaps, but I think it will be one of the trickier items to build robustly. I'll keep this thread updated |
Sorry Julia A further update. It seems 25 minutes isn't really an option within slack - you can only choose a specific date and time at half hour intervals. Perhaps we are heading into the area of needing this to become more of a background app that can run using this library as the core library. Are you running any other tools such as Alfred/Keyboard Maestro? |
Thanks a lot for the explanations, now I understand what you meant 😄
I would say that 30min instead of 25min would be acceptable already for my use case.
No, I'm running the script using the automator as explained here. I have Alfred installed (only free version for now) but I don't see how it would help because it only executes the scripts right? |
Ok I'll see what I can produce and get some feedback from everyone (pomodoro timings would've been ideal though!) @josebama preview his Alfred set up here (I think requires premium) #4 (comment) Essentially you can have one workflow that sets the status, runs a timer and then clears the status. Not ideal as it will interrupt your screen to perform the changes but an interim solution possibly |
Just as heads up, I ended up deleting the timer in Alfred to disable the status. I ended up sending unintended messages in slack because I would be typing when the timer would go off and switch the focus to the slack window. What I’m doing now is set the status for 30 minutes through the UI navigation that I mentioned previously and I set do not disturb for 25 minutes through the slash command. And in the status I briefly explain that if I’m in DND I’m focusing, otherwise I’m in a break. |
Hi all, I think I have something working now. This is very much a test carefully feature right now as the UI part makes it very brittle. There are issues I've not been able to overcome yet where if my mouse is in the position on screen where the dialog pops up it ruins the tab ordering. Any help to overcome this would be appreciated.
Note that you can use a 12 hour clock or a 24 hour clock. I am only support same day status clearances currently but should be enough for most pomodoro cases. I won't be working out the in X minutes or in Y hours just yet as that adds some more complications I don't think the library is ready for just yet. Once this is stable then I'll look to add some of that functionality |
I should also add that you can be as precise with the time as you like. Not limited to half hour intervals i.e |
Hi @samknight, Thanks a lot for the effort 😄 I've been trying the new This command sets the status and the clear time perfectly: But when I add the icon it fails: Error: |
Thanks - all fixed now in v1.3.1 |
@samknight I pulled the current master version and I still have the icon issue I commented. Thanks! |
Once more for luck! v1.3.2 |
It is working now, thanks a lot! |
Slack now has auto expiring statuses, would be cool to be able to set that up via this script, thanks for your hard work!
The text was updated successfully, but these errors were encountered: