Jump to content

roccitman

Member
  • Content Count

    120
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by roccitman

  1. Hmm. Any errors in console.app fire when you try? Can you try to paste the script into Script Editor.app and see if it compiles there?
  2. Thanks. Yeah, found that today too. Easy enough to workaround. Working great again.
  3. Just noticed that when I press return after an operation the answer is not being copied to the clipboard. Deleted and re-loaded the WF and it's still not working. Something else I need to turn on?
  4. Thanks for the reply. Not sure I want to sacrifice that default behavior, but now I play with it Works http://r.roccit.com/12aIB
  5. Loving this workflow! In my daily work I add a lot of prices, sometimes 10+ numbers together. I see that if you leave a space between numbers it will multiply them together (wouldn't let me embed image) http://r.roccit.com/1539j Is it possible to edit the script somewhere to make the default operation in this case be addition? Here's to saving my pinky finger -roccit
  6. Some odd Console activity today. Not sure what to make of it. Just turned the theme to dark though and it's 2:15ish HST (14:15) 11/03 00:30:46 DEBUG [alfred-theme] Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} 11/03 00:30:46 DEBUG [alfred-theme] Deleted stale PID file : /tmp/net.deanishe.alfred-toggle-theme.pid 11/03 00:30:50 DEBUG [alfred-theme] dark at 2015-03-11 10:30:50 UTC 11/03 00:30:50 INFO [alfred-theme] Light theme : OS X Yosemite 11/03 00:30:50 INFO [alfred-theme] Dark theme : OS X Yosemite Dark 11/03 00:30:51 INFO [alfred-theme] Alfred theme set to `OS X Yosemite Dark` 11/03 00:30:51 INFO [alfred-theme] Next change : Theme `OS X Yosemite` at sunrise in 6 hours, 18 minutes at 06:49 HST 11/03 00:30:51 DEBUG [alfred-theme] Forking into background ... 11/03 00:30:51 DEBUG [alfred-theme] Wrote PID (14053) file : /tmp/net.deanishe.alfred-toggle-theme.pid 11/03 00:30:51 DEBUG [alfred-theme] Running in background 11/03 00:30:53 INFO [alfred-theme] Updated and reloaded Launch Agent /Users/roccoapril/Library/LaunchAgents/net.deanishe.alfred-toggle-theme.plist 11/03 00:30:53 DEBUG [alfred-theme] Pausing for 3 seconds before exiting ... 11/03 00:30:53 DEBUG [alfred-theme] Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} 11/03 00:30:53 DEBUG [alfred-theme] Script already running with PID : 14053 11/03 00:30:53 INFO [alfred-theme] Script is already running. Exiting. 11/03 00:30:56 DEBUG [alfred-theme] Done -------------------------------- 11/03 14:15:54 DEBUG [alfred-theme] Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} 11/03 14:16:03 DEBUG [alfred-theme] dark at 2015-03-12 00:16:03 UTC 11/03 14:16:03 INFO [alfred-theme] Light theme : OS X Yosemite 11/03 14:16:03 INFO [alfred-theme] Dark theme : OS X Yosemite Dark 11/03 14:18:08 CRITICAL [alfred-theme] AppleScript command failed. osascript exited with 1 11/03 14:18:08 INFO [alfred-theme] Next change : Theme `OS X Yosemite` at sunrise in 16 hours, 32 minutes at 06:48 HST 11/03 14:18:08 DEBUG [alfred-theme] Forking into background ...
  7. Just wanted a quick way to change from one theme to another. Currently set to use OS X Yosemite and OS X Yosemite Dark. Download Here.
  8. Gents $ bash toggle-alfred-theme.bash DEBUG Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} DEBUG Deleted stale PID file : /tmp/net.deanishe.alfred-toggle-theme.pid DEBUG light at 2015-03-04 17:26:49 UTC INFO Light theme : OS X Yosemite INFO Dark theme : OS X Yosemite Dark INFO Alfred theme set to `OS X Yosemite` INFO Next change : Theme `OS X Yosemite Dark` at sunset in 11 hours, 15 minutes at 18:42 HST DEBUG Forking into background ... Looks right. And from the console: 04/03 07:26:46 DEBUG [alfred-theme] Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} 04/03 07:26:46 DEBUG [alfred-theme] Deleted stale PID file : /tmp/net.deanishe.alfred-toggle-theme.pid 04/03 07:26:49 DEBUG [alfred-theme] light at 2015-03-04 17:26:49 UTC 04/03 07:26:49 INFO [alfred-theme] Light theme : OS X Yosemite 04/03 07:26:49 INFO [alfred-theme] Dark theme : OS X Yosemite Dark 04/03 07:26:49 INFO [alfred-theme] Alfred theme set to `OS X Yosemite` 04/03 07:26:49 INFO [alfred-theme] Next change : Theme `OS X Yosemite Dark` at sunset in 11 hours, 15 minutes at 18:42 HST 04/03 07:26:49 DEBUG [alfred-theme] Forking into background ... 04/03 07:26:49 DEBUG [alfred-theme] Wrote PID (813) file : /tmp/net.deanishe.alfred-toggle-theme.pid 04/03 07:26:49 DEBUG [alfred-theme] Running in background 04/03 07:26:51 INFO [alfred-theme] Updated and reloaded Launch Agent /Users/roccoapril/Library/LaunchAgents/net.deanishe.alfred-toggle-theme.plist 04/03 07:26:51 DEBUG [alfred-theme] Pausing for 3 seconds before exiting ... 04/03 07:26:51 DEBUG [alfred-theme] Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} 04/03 07:26:51 DEBUG [alfred-theme] Script already running with PID : 813 04/03 07:26:51 INFO [alfred-theme] Script is already running. Exiting. 04/03 07:26:54 DEBUG [alfred-theme] Done -------------------------------- And when I relaunched the launch agent: DEBUG Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} DEBUG Deleted stale PID file : /tmp/net.deanishe.alfred-toggle-theme.pid DEBUG light at 2015-03-04 17:33:41 UTC INFO Light theme : OS X Yosemite INFO Dark theme : OS X Yosemite Dark INFO Alfred theme set to `OS X Yosemite` INFO Next change : Theme `OS X Yosemite Dark` at sunset in 11 hours, 8 minutes at 18:42 HST DEBUG Forking into background ... DEBUG Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} DEBUG Script already running with PID : 903 INFO Script is already running. Exiting. Thought that might help. Oh and all this after updating to the latest script and running from the new wrapper.
  9. No, doesn't look like it tried. I ran the script again and it worked as expected.
  10. Darn, it didn't. The themes got reset back to 'light' and 'dark' again. Not sure what's going on. Machine was sleeping during the change so might be the same thing that Richard was seeing. We'll try again in the morning, heh.
  11. Thanks for taking the time! Learning a lot here. 1) Grabbed the latest just now. 635 2) Still works, but may have found out what's wrong. I had to run it twice for it to catch the themes I was asking for: before... INFO Light theme : Light INFO Dark theme : Dark after... INFO Light theme : OS X Yosemite INFO Dark theme : OS X Yosemite Dark Can't explain that one, just hit the up arrow and did it again. Shrug. 3) Perhaps some more goodies here: DEBUG Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} DEBUG Deleted stale PID file : /tmp/net.deanishe.alfred-toggle-theme.pid DEBUG light at 2015-03-03 21:00:34 UTC INFO Light theme : OS X Yosemite INFO Dark theme : OS X Yosemite Dark INFO Alfred theme set to `OS X Yosemite` INFO Next change : Theme `OS X Yosemite Dark` at sunset in 7 hours, 41 minutes at 18:42 HST DEBUG Forking into background ... As always, thanks for your patience here! Looks like it was simple thing, we'll see in 7 hours 40 minutes...
  12. [ETA astral and pytz versions] I gotta be missing something. More questions from me, sorry! I sat and watched this morning but the theme never changed from dark to light. I do see there is a plist file in the ~/user/library/launchagents/ and it does seem to know when the sunrise is/was but the them never changed. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>Toggle Alfred theme at sunrise and sunset</string> <key>ProgramArguments</key> <array> <string>/usr/bin/python</string> <string>/Users/roccoapril/Documents/_home/toggle_alfred_theme.py</string> <string>--dark</string> <string>OS X Yosemite Dark</string> <string>--light</string> <string>OS X Yosemite</string> </array> <key>StartCalendarInterval</key> <dict> <key>Day</key> <integer>3</integer> <key>Hour</key> <integer>6</integer> <key>Minute</key> <integer>57</integer> <key>Month</key> <integer>3</integer> </dict> </dict> </plist> Do I have something set up wrong? If I rerun the script right now it will change the theme immediately. I ran it last night about an hour after sunset and it changed it to dark. Just ran it again, and ... INFO Light theme : OS X Yosemite INFO Dark theme : OS X Yosemite Dark INFO Alfred theme set to `OS X Yosemite` INFO Next change : Theme `OS X Yosemite Dark` at sunset in 10 hours, 55 minutes at 18:42 HST Looks right. It's 7:47 and sunset should be around 18:30. And it looks like the plist file was edited correctly <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>Toggle Alfred theme at sunrise and sunset</string> <key>ProgramArguments</key> <array> <string>/usr/bin/python</string> <string>/Users/roccoapril/Documents/_home/toggle_alfred_theme.py</string> <string>--dark</string> <string>OS X Yosemite Dark</string> <string>--light</string> <string>OS X Yosemite</string> </array> <key>StartCalendarInterval</key> <dict> <key>Day</key> <integer>3</integer> <key>Hour</key> <integer>18</integer> <key>Minute</key> <integer>43</integer> <key>Month</key> <integer>3</integer> </dict> </dict> </plist> I gotta be missing something. Astral version >>> astral.__version__ '0.8.1' Updated pytz to 2014.10 (from 2013.7). Can't imagine that was a problem, but IDK. >>> pytz.__version__ '2014.10' -newbie out!
  13. Heh, happy to help OK, yeah. Output looks perfect now INFO Light theme : OS X Yosemite INFO Dark theme : OS X Yosemite Dark INFO Alfred theme set to `OS X Yosemite` INFO Next change : Theme `OS X Yosemite Dark` at sunset in 9 hours, 57 minutes at 18:41 HST
  14. Hey Gents Not smart enough to know this, is the error at the end of this output saying that something didn't go right? DEBUG Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} DEBUG Sunrise on 2015-03-02 : 16:57:00 UTC DEBUG Sunset on 2015-03-03 : 04:41:00 UTC DEBUG dark : 04:49:05 UTC DEBUG Current time : 2015-03-02 04:49:05 UTC = dark INFO Light theme : OS X Yosemite INFO Dark theme : OS X Yosemite Dark INFO Alfred theme set to : OS X Yosemite Dark INFO Next change : Theme `OS X Yosemite` at sunrise in 12 hours, 8 minutes at 06:57 HST DEBUG Forking into background ... Traceback (most recent call last): File "toggle_alfred_theme.py", line 582, in <module> sys.exit(main()) File "toggle_alfred_theme.py", line 564, in main daemonise() File "toggle_alfred_theme.py", line 172, in daemonise os.chdir(os.path.dirname(__file__)) OSError: [Errno 2] No such file or directory: ''
  15. Indeed! I am very much a beginner with command line stuff so thanks for your patience. Looks like all the variables are happy now: INFO Next change : Theme `OS X Yosemite Dark` at sunset in 7 hours, 17 minutes at 18:40 HST
  16. Hey Deanishe Got my Python stuff installed, and got this output when I fired up your script. DEBUG Started with options : {u'help': False, u'light': 'OS X Yosemite', u'quiet': False, u'times': False, u'dark': 'OS X Yosemite Dark', u'timezones': False, u'nothing': False, u'verbose': False} DEBUG Sunrise on 2015-02-28 : 06:19:00 UTC DEBUG Sunset on 2015-02-28 : 17:09:00 UTC DEBUG light : 09:37:40 UTC DEBUG Current time : 2015-02-28 09:37:40 UTC = light INFO Light theme : OS X Yosemite INFO Dark theme : OS X Yosemite Dark INFO Alfred theme set to : OS X Yosemite INFO Next change : Theme `OS X Yosemite Dark` at sunset in 7 hours, 32 minutes at 18:09 CET DEBUG Forking into background ... Traceback (most recent call last): File "toggle_alfred_theme.py", line 582, in <module> sys.exit(main()) File "toggle_alfred_theme.py", line 564, in main daemonise() File "toggle_alfred_theme.py", line 172, in daemonise os.chdir(os.path.dirname(__file__)) OSError: [Errno 2] No such file or directory: '' I'm on HST but this looks like it's set up for CET. Am I reading the output wrong? Did I miss a step? Cool stuff, can't wait to get it working. -roccit
  17. Nice! I wonder if Alfred workflows can be automated. I'd like for this to turn on in the evening and off in the morning. Lazy and all, you know
  18. Ewww, nice find! I added a hotkey to mine, so I don't have to evoke Alfred. http://d.pr/i/1bsN6
  19. Yeah, I tried that. It doesn't work for some reason if you're just doing FaceTime Audio: http://d.pr/i/1akfg
  20. Thanks Jack James! Gotta admit, this is a slick addition. It's been fun being close to the evolution of this workflow. -roccit Btw, are you a DJ in your spare time?
×
×
  • Create New...