Jump to content

raguay.customct

Member
  • Posts

    756
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by raguay.customct

  1. Hi, I just upgraded the Hammerspoon workflow to have an upgrade option and integration with the AnyBar workflow for the caffienate function. The hs:upgrade command will upgrade all future version without messing with the init.lua file. But, for this, you have to run hs:install to now to create this functionality. The install creates the .hammerspoon/init.lua file with a line to load the alfred.lua file. The hs:upgrade will then only effect the alfred.lua file. If the AnyBar workflow and program are installed, then an indicator is shown. If caffenate is active, red "zzz" will be shown. Otherwise, grey "zzz" are shown. Give it a try and let me know how it works for you.
  2. Hi, That errors says you did not set the working directory properly. The workflow is used to step through a directory of directories that have files. You use the Alfred browser to go to the top directory and use the file action "Set Processing Directory". Then you use "dp:nextdir" to go to the first directory there. Then you use "dp:nextfile" to copy the path of the first file in the first directory in to the clipboard (or pasteboard. I'm just used to calling it the clipboard, but Apple has other words). That way you can step through each file in order (by ls standard and not Finder ordering). If you only have one level of directories, you could put it into a sublevel and then use the workflow. I made the workflow to step through Closed Captions files for attaching to videos where the videos are group by courses. Therefore, the directory structures is: SRTDirectories Course1dir file1 file2 Course2dir file1 Something like that. But, I figured others might find it useful, also. Let me know if this is helpful. Richard
  3. If the following file has text in it, it is assuming that the editor is already open: ~/Library/Application Support/Alfred 2/Workflow Data/com.customct.AlfredEditor/windows.txt where '~' is your home directory. Delete that file and the editor should open again. I have a bug in the logic for determining if an editor is open. The problem being, NW.js doesn't allow more than one instance open at a time. Therefore, I am trying to use a secondary loader to spawn a new window instead of a new instance. But, it keeps getting off here and there. I am currently migrating to the Ace editor instead of CodeMirror editor. More robust in functionality. Keep watching for updates.
  4. Hi, Just updated this one. Fixed some bugs with names that have special symbols.
  5. Picat Workflow This workflow is for programing using the [Picat](http://picat-lang.org/) language. The following commands are available: pic:install This will download and install Picat in to the ~/Documents directory. It then sets up the variables to use in all the other commands. pic:showdir This shows the directory of the install Picat program to the user. pic:setscript This sets the Picat script to execute in the other commands. pic:editscript This opens the Picat script in to the code editor that is setup with pic:seteditor. pic:seteditor This allows for setting the code editor to use to edit Picate scripts. pic:run This runs the currently selected Picat script. pic:suser This opens the Picat User Manual. pic:stutorial This opens the Picat Tutorial. pic:sstarted This opens the Picat Getting Started Manual. There are also three File commands to use in the Alfred Browser: Edit Picat File Allows you to edit the selected Picat file in the Alfred Browser using the editor setup in the pic:seteditor. Run Picat File This runs the current Picat file in the Alfred Browser. Run Files through Picat Program This will pipe the current file to the currently setup Picat script. Packal: http://www.packal.org/workflow/picat-workflow My Website: http://customct.com/ My GitHub: https://github.com/raguay/MyAlfred
  6. AnyBar Workflow AnyBar is an application that sits in the menu bar and displays the currently set graphic. It is updated by UDP requests. This worklfow is to make using it easy. I am working to integrate this with my Hammerspoon workflow to show the state of Mac sleep. This workflow requires the anybar application to be installed. The easiest way to install is by home-brew cask: brew cask install anybar If you do not have home-brew cask installed, follow the instructions here: [HomeBrew Cask](http://caskroom.io/). If you do not have HomeBrew installed, follow the instructions here: [HomeBrew](http://brew.sh/). Then execute the above line. Once installed, you can use the features of this workflow: anybar:launch Launches anybar with optional port number. anybar:setgraphic Set the graphic for the anybar application. It will give a list of usable graphics. Start typing and the list will be narrowed down to the ones that match. Select the one and the last launched Anybar will be changed to that graphic. anybar:setport This allows you to set the port number of the AnyBar app. anybar:setup This copies the graphics I created to the ~/.AnyBar directory. There is a file action, Copy to Anybar, that will copy a png graphic to the ~/.AnyBar directory so that it can be used with the program. There are two External Triggers: SetGraphic and Launch. The SetGraphic external trigger expects a string with the name of the graphic, a '|', and a port number. The Launch external trigger expects a UDP port number to launch the AnyBar program on. Packal: http://www.packal.org/workflow/anybar-workflow My web site: http://customct.com GitHub: https://github.com/raguay/MyAlfred
  7. Oops. I thought I had changed that line. I just fixed the tutorial to copy the library file and put the tcconverter.swift file as it's own file. Thanks for spotting that. From XCode 6 beta to XCode 6.3, there has been a lot of changes to Swift! The first compile line creates .o files. The .o file is the object code unlinked. It is the executable code that has placeholders instead of addressress for branching statements. Relative addresses are compiled in on the link stage. The second line creates the library file that other programs can dynamically load the library instead of statically linking them. The third line creates the .swiftmodule and . swiftdoc files needed by the linker to link the library to the final program. These are mostly used by XCode itself and not so much with the 4th stage. The last line compiles our tcconverter code, links it to the Alfred library, and creates the final execuatable, tcconverter. I hope this de-mystifies it some for you. Compiling is complicated up front, but runs so much faster than interpreting. The Swift compiler is much easier to use than like the gcc compiler for C code! You can really get bogged down in options for some compilers. But, if your system is fast enough, I much prefer interpreters!
  8. I have updated the tutorial and the github account. Thanks for bring this to my attention.
  9. Hi, I have been having trouble getting the latest Xcode installed (file system corruption required me to re-install all). The items you mentioned would be in line with the changes. I will make the changes to the github repo for it. Thanks.
  10. I created a workflow for this quickly so that you can see how to do them: https://db.tt/QL8JIKwP You can use this as a template to create many others as well. I hope this is helpful.
  11. I have written a series of articles on using Alfred for Mac Tuts+. They are: Alfred Workflows for Beginners Alfred Workflows for Intermediates Alfred Workflows for Advanced Alfred Debugging Track Project Time With Alfred Timekeeper Use a Mac to Monitor Website Uptime or Other Regular Tasks Alfred Workflows in Swift It's not an ebook, but it will get you going using Alfred with practical examples. If there is a topic you need and it is not covered, let me know. You can also look at all of my workflows on my website: http://customct.com/alfred-2-workflows
  12. Hi, I finally created my first theme. I based it on the Wild-Cherry Theme for Sublime Text and iTerm2. You can get them on Packal: http://www.packal.org/theme/wild-cherry-dark-theme http://www.packal.org/theme/wild-cherry-light-theme
  13. Hi, It still did not fix it this morning. The logs show that it has not run today and LaunchControl doesn't show an error. It is definitely not being ran after a sleep. Looks like launchd definitely has a bug there. Using other solutions for now....
  14. It does, but I mostly have it control what programs are launched when running battery and what to use for printing. So, I launch it before going on the move and use it while on the move. I run so many utilities that unloading one does help my load. I am still trying to get all the settings good, but it gets distracting sometimes. That one is a hard one to really master.
  15. If it doesn't work, I will use Keyboard Maestro's Run on Wake to get it working. Don't know SleepWatcher, but I already have Keyboard Maestro running. Don't need too many programs going. Yes, I have the latest 10.10.3. I haven't noticed anything else having issues, but I do not have any Launch Agents that run on sleep ControlPlane works fine and I believe it uses launch agents. But, I only run ControlPlane when on the go.
  16. I have your wrapper and new script in place. Waiting to see how they work. Will keep you updated. Thanks.
  17. Hi, I am only seeing the issue in the morning. But, I am active on the system during the day/night. My logs do not show it working in the morning until I force it to get the light theme on. Launch Control doesn't show any errors either. I just updated the script again from your gist. I will check it again in the morning.
  18. This error is only shown if that file doesn't exist, which is the case if you have just started using the workflow. First time to run a cleaner, use "tc:full" and select a cleaner. That routine creates the cleaners.txt file that stores all the cleaners you have made use of. Anyway, I fixed the file not found error. It will now work, but say it could not find any. You still need to use the tc:full to select all the cleaners. I made this separation to make the tc:clean run faster (My full has over 200 cleaners, but my short version only has 50 that I use all the time). The new version is on Packal and my GitHub accounts. Let me know if you have any other problems.
  19. Hey Deanshe, If my system is sleeping during the scheduled event, it gets skipped. Is there a way to force it to run upon awakening?
  20. Inside the script, you have to set your timezone information along with longtitude, latitude, and elevation. That is for the pyhton routines to more accurately calculate your sunrise and sunset. It is documented in the script (around lines 58-67). You can also set the default theme here instead of on the command line. If you are using a different python than the system python, then you need to change the line that creates the launchd script (line 76). Deanishe is really good at python.
  21. Yep, check it out here: http://www.alfredforum.com/topic/5575-automatically-change-themes-at-sunrise-and-sunset/ It was in the theme section of the forums. I use it and it works great.
  22. Hi, I works. But, it leave the process going. If I change the them, it changes it right back. Do you have a version that just terminates after changing?
  23. I know. That is what I tried to say in my last message. It is working now. Thanks.
  24. I changed the reassignment of the launchd command to point to my python in /usr/local/bin as well. Everytime it ran, it changed the lauchd back to /usr/bin/python. It seems to be working without errors now. Thanks.
×
×
  • Create New...