raguay.customct
-
Posts
756 -
Joined
-
Last visited
-
Days Won
12
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by raguay.customct
-
-
I wrote this workflow for working with my TaskPaper files in Dropbox: http://www.alfredforum.com/topic/3560-todo-workflow/?hl=todo
Currently, I use it with FoldingText more thank TaskPaper. The journal functions work very much like what you described.
-
Hi,
I just updated all of the Script Filters to a Haskell program for speed. You can download from the above sources. Let me know if this did speed you up or not. I am trying to figure out how much improvement a dedicated program will be over scripts. Haskell produces much smaller programs than golang. So, I have been switching to it.
-
To run pbpaste, you have to use back ticks `, not normal apostraphes. Therefore, in bash you would
clip=`pbpaste`;
echo $clip
Or, do whatever you want with the clip contents. A single quote (or apostraphe) tells bash it is a string, while back ticks tell bash to execute the command inside and return to the variable.
-
I tried out Mjolnir but couldn't make it work. Admittedly I didn't try for a long time, but I don't find layout slow enough to bother switching (~0.5 second). Also at this point I'm pretty enamored with my setup which I use to bounce windows around my monitors.
Hey that's great. Since you have a working copy of it, maybe share it with those can not find it anywhere.
Hammerspoon is the same as Mjolnir without the crazy installation issuses. Everything is self contained and works well.
Workflow is here:
http://www.packal.org/workflow/hammerspoon-workflow
Program is here:
It came out after Mjolnir to help solve the issues like Lua versions and external libraries. It is a fork from the Mjolnir github.
-
Yes. It is a window manager. To work with tabs of an application, you would have to use AppleScript or JavaScript for automation. You can run AppleScript from Hammerspoon with the hs.applescript module. If you have Dash, the documentation for Hammerspoon is in Dash as well. If not, use the API pages on their website.
Dot are to reference parts of a structure. hs is a global variable that is a structure with an element named applescript. Therefore, to reference it you use hs.applescript. The colons are for class member references. When you get a window, it is a class variable, not a structure. Therefore, it members are referenced with a colon.
It is confusing the difference between different programming languages. I use quite a variety and it does get hard to track them all. But, some are better for some things, while others are better for other things. Lua is super small. That is why they used it in this type of application.
-
Well....just tried this and my /usr/local/bin permissions are rwxr-xr-x but I'm getting the same error with hs not being found. hs:install worked, and I restarted Hammerspoon but no luck -- I can view the config file in Hammerspoon.
I ran the cp command with sudo and things seem to be working now.
From the above, I can deduce that the user ownership for that directory is not you. If sudo can do it and you can not normally, then that directory is owned by a different user. Most likely root. But, if everything is working now, then great. Glad to help. Do you use HomeBrew? This tutorial shows how to install and use it: https://computers.tutsplus.com/tutorials/homebrew-demystified-os-xs-ultimate-package-manager--mac-44884
A side affect of using HomeBrew is that it will fix any permissions problems with your /usr/local directory structure. Plus, it is a great way to get some standard Unix programs.
-
Hammerspoon - what a fascinating tool that I've never heard of before. Potential for use with Alfred Remote seems huge - able to do a lot of what I'd thought of trying to do with AppleScript and Moom and cliclick and various other tools all in one. Thank you for bringing this to the forum.
I am glad you like it. If there is a functionality that you need, but don't see how to implement it, let me know. Two head are better than one!
-
Thanks for the info! I've installed the latest version (1.3) of the workflow and followed your updated instructions. Unfortunately it is still not working, I get the same error message as before. Strange, maybe something special with my setup is causing this error. I may try the Mjolnir workflow instead but this seems more convenient. If you have further ideas what's causing the problems with Hammerspoon I appreciate it.
Could you open the Hammerspoon console and post what it says. I suspect your /usr/local/bin directory has the wrong permissions and not allowing Hammerspoon to install. In a terminal, type the following:
cp /Applications/Hammerspoon.app/Contents/Resources/extensions/hs/ipc/bin/hs /usr/local/bin
If this works, the workflows should start working fine. But, if an error is given, then your permissions for that directory are wrong. On my system, it is rwx on the user, and rx for everyone else. You can check the settings by:
ls -l /usr/local
Let me know if this helps.
BTW: If you are having permissions problems on the /usr/local directories, Mjolnir will be even harder to install and get working.
-
The benefits with Hammerspoon is that you never have to worry about conflicting Lua instances from other programs and installing modules are automatic with Hammerspoon (It packages every known modules in it. So, when there is an update, they are all updated). Also, Hammerspoon only loads the modules in memory when used, but Mjolnir loads all modules into memory at startup based on the lua.ini file.
I am trying to keep both workflows equal, but it is slower at getting the updates. I like using any changes for a while first before releasing them to the public.
Working on your requests....
Hi, I got your request done must faster than I thought. It was easy and I was wanting the mj:running functionality. Let me know if that was what you were thinking.
-
Just added several new functions (mj:tophalf, mj:bottomhalf, mj:fullScreen, mj:tzoom, mj:minimize, and mj:running). All of these have been added to the Remote page as well.
I also fixed mj:caffineate to work correctly. You will have to re-install the lua.init file with mj:undateinit.
-
Just added several new functions (hs:tophalf, hs:bottomhalf, hs:fullScreen, hs:tzoom, hs:minimize, and hs:running). All of these have been added to the Remote page as well.
I also fixed hs:caffineate to work correctly. You will have to re-install the lua.init file with hs:init.
-
This seems like a useful workflow but it does not work for me. I've installed Hammerspoon, reloaded and run "hs:install". When I try to move a window etc. I see the following error message in Alfred's debug tool: "[ERROR: alfred.workflow.action.script] /bin/bash: line 29: /usr/local/bin/hs: No such file or directory". I'm on OS X 10.10.2.
I am sorry. My directions were not accurate. Once you run "hs:install", you have to reload Hammerspoon. The new lua.init file that the install script copies directs Hammerspoon to copy the hs command to /usr/local/bin/hs. Therefore, Hammerspoon has to be reloaded to get that to happen.
If you have the original version of the workflow, it had problems with that. Make sure you have the latest version of the workflow as well.
-
Perhaps I am missing something, how do I choose what directories I can copy/save to?
When you are in the Alfred prompt, go to the Alfred Browser by typing in a path (ie: ~ for home). Move around to the directory you want to mark as a favorate and press right arrow. That brings up a list of possible actions. Type "Add" and select the "Add Directory to Copy/Move locations". Now, when you use the copy/move functions, that directory will show up as a possible destination.
-
The benefits with Hammerspoon is that you never have to worry about conflicting Lua instances from other programs and installing modules are automatic with Hammerspoon (It packages every known modules in it. So, when there is an update, they are all updated). Also, Hammerspoon only loads the modules in memory when used, but Mjolnir loads all modules into memory at startup based on the lua.ini file.
I am trying to keep both workflows equal, but it is slower at getting the updates. I like using any changes for a while first before releasing them to the public.
Working on your requests....
-
Also updated hs:caffienate to prevent the display from sleeping as well. Before, it just prevented system sleep and not display sleep. You will have to load and re-run "hs:install" to get the Lua script changes.
-
Alfred Remote: Please 2/3 Screen / 1/3 Screen move command..
Added to the latest version on Packal and my GitHub account.
-
Once you have Mjolnir installed (loaded on your hard drive, but not configured) and this workflow installed, run "mj:install". This will create the lua.ini file in the ~/.mjolnir directory and install the modules it uses. Make sure you have a working lua 5.2 interpreter as well. That can be loaded using Home Brew with : brew install lua
Or, remove Mjolnir and install Hammerspoon. It is the same program with the right Lua interpreter and modules pre-packaged. My workflow for it is: http://www.alfredforum.com/topic/5334-hammerspoon-workflow/?hl=hammerspoon
Problem with getting startet with mjolnir:
It says on the getting startet page (step 4):
"Create ~/.mjolnir/init.lua, and at the top, require the modules you installed, e.g. like this:"
I have created a init.lua file with textedit. Where do I have to put it, since .mjolnir is not an allowed name for a folder. It does not exist, or at least, I can't find it.
So what do I have to do?
I have no experience with lua and for now I just want to use it with this workflow for alfred.
-
Well, I was able to get it working easy enough. The new Mjolnir workflow is uploaded to Packal and my GitHub account. Both Mjolnir and Hammerspoon now have the exact same functionality. Let me know if you need anything else.
BTW: Try it with Alfred Remote. Makes handling your windows really nice!
-
Hi,
Sorry, but my Mjolnir application kept dying and I have switched to Hammerspoon. It is the same code base, but done as a all in one package (ie: you do not have to figure out dependencies at all or load other versions of Lua).
The Hammerspoon workflow has the two mentioned commands and Alfred Remote added as well. This page is the main thread for it: http://www.alfredforum.com/topic/5334-hammerspoon-workflow/?hl=hammerspoon
BTW: The lua script has the command in it I think: type in an Alfred prompt:
mj:command moveLeftHalf()
mj:command moveRightHalf()
If you want to stay with this version, let me know and I will try to revive Mjolnir on my system. I will have to take off another program with a conflicting lua install.
-
Just added two new commands and Alfred Remote. Have fun!
-
I just updated this workflow by increasing the intelligence of the ft:bookmarks command. If you type partial parts of a title with spaces between, it will wildcard match for the title.
For example:
ft:bookmarks tut cro
will match
Tutorial: Cross-platform Application Development
Since my bookmark list is over 100, I needed better searching!
-
Hey, that is what I wrote my ScratchPad Workflow for: http://www.packal.org/workflow/scratchpad-workflow
You type "sp:". If you do not type anything, it will pull up the clipboard contents. Modify it and enter and it will be copied to your clipboard. But, I use Textwell for scratch padding more these days and the workflow I made for it: http://www.packal.org/workflow/textwell-workflow
Give these a try to see if it fits your needs.
-
This workflow is for sequentially going through the contents of a directory. You can get entries for file and directory separately. The are counted independently.
Set Processing Directory
This file action only appears on directories in the Alfred browser. It will set the directory that is being processed. Both file and directory counters get reset with this action.
dp:nextfile
This command will put the next file in the processing directory to the clipboard and to notifications.
dp:showdir
This command shows the directory currently being processed.
dp:reset
This resets the counts for the current file and directory.
dp:nextdir
This command will put the next directory in the processing directory to the clipboard and to notifications.
This is distributed under the MIT license.Packal: http://www.packal.org/workflow/directory-processing-workflow
GitHub: https://github.com/raguay/MyAlfred
My Website: http://customct.com/alfred-2-workflows
-
This workflow is for processing a text list of items separated by a single character. You set the character and the direction of the search, and the workflow will give you one at a time.
lp:save
This sets the list of items. This is tied to a hotkey that takes the current selection. If there is nothing on the input, the command will grab the clipboard to use. Or, the user can type in what they want.
lp:next
This gives the next item. This is tied to a hotkey as well.
lp:forwardbackward
This sets the direction of the lookup. If backwards, the last item will be given in lp:next. If forwards, the first item in the list will be given.
lp:setseparator
This sets the separator that will be used to process the list.
lp:reset
This sets the list processing back to the original list. Therefore, lp:next starts fresh.
lp:show
This will show the list on the screen for the user to see.
lp:length
This will show the number of items in the list separated by the given separator.
lp:left
This will show the number of items left to be shown.
lp:shown
This will show how many items have been shown.Version: 1.1
Packal: http://www.packal.org/workflow/list-processing-workflow
GitHub: https://github.com/raguay/MyAlfred
My Website: http://customct.com
Automatically change themes at sunrise and sunset
in Themes
Posted
Hi Danishe,
I installed the script and fixed it to use my Homebrew version of Python instead of the system version. I changed the Launchd calling to use the Homebrew version as well. When ran from the command line, it runs fine. But from Launchd, it says it can not load astral, but it performs the task fine. Is there an environment variable to set inside the Launchd script? I am using LaunchControl to edit the Launchd scripts. Thanks. I really like the ability to switch the theme.
Richard