nikivi Posted July 2, 2018 Share Posted July 2, 2018 (edited) I have this workflow that writes some text to a file as a bash script. This text is essentially a TODO task of mine that I can prefill from Alfred keyword or select some text and change the file. My issue however is with displaying the task briefly on the screen with Large Type object. I want to make it so that if I activate this hotkey: The task shows up on the screen as it does currently. I then want to make it so that if I press the hotkey again whilst the Large Type is still showing, it will dismiss it and NOT show it up again on the screen. Furthermore I want to make the Large Type disappear after 1 second if I don't actually dismiss it in the time that it is still up. My workflow is that I want to quickly see the active task on screen, dismiss it immediately once I read the task by pressing the same hotkey or running the external trigger or have it be shown for a bit and let it dismiss on its own. Can I do this? Thank you for any help. Edited July 2, 2018 by nikivi Link to comment
vitor Posted July 2, 2018 Share Posted July 2, 2018 (edited) You can kind of do it, by creating a temporary file and checking for its existence. You’ll also need the Dispatch Key Combo Output, Delay Utility, and Filter Utility. [Hotkey] Press Hotkey ↓ [Run Script] Temp file exists? → [Filter] yes → [Key Combo] ⎋ → [Run Script] Delete temp file ↓ ↑ [Filter] No ↑ ↓ ↑ [Run Script] Create temp file ↑ ↓ ↑ Show Large Type ↑ ↓ ↑ [Delay] Wait ↑ ↓ ↑ [Run Script] Temp file exists? → ↗ You need two [Run Script] Temp file exists? because the second one cannot have a [Filter] No to avoid an undesirable loop. This is bound to break if you dismiss the Large Type by pressing ⎋ yourself or clicking it. But I it’s likely the best we can do right now. Edited July 2, 2018 by vitor Removed syntax highlighting nikivi 1 Link to comment
nikivi Posted July 2, 2018 Author Share Posted July 2, 2018 (edited) Thank you @vitor, this works. Let me know if I can improve it in any way. I do hope @Andrew looks into this when he gets time. Edited July 2, 2018 by nikivi Link to comment
nikivi Posted July 2, 2018 Author Share Posted July 2, 2018 I updated this workflow and published it on GitHub. Now it works for everyone as it uses Alfred Data Dir to save the TODO & temp file. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now