Jump to content

Floating.Point

Member
  • Posts

    124
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Floating.Point

  1. Alfred version: 5.0.3 [2087]

    MacOS version: macOS Monterey - Version 12.6

     

    When resizing a List Filter's popup window, the "Match mode:" UI elements are pinned to the top instead of the bottom of the popup, so they obscure the above UI elements when resizing the window.

     

    Demonstration:

     

     

  2. I just wanted to share my moment with Alfred today.

     

    As Ive started to do more things with code, I started using big old blocks of ASCII text to make my code more fun and browse-able. For example:

    image.thumb.png.a1412aa1cb775ada5a13fe7a939ab15b.png

     

    So I had been using this web site (https://ascii.today/) where I would type out my heading, then scroll to find my preferred typeface, then click copy, switch back to my text editor and paste.

     

    So many clicks!

     

    Today I realised I'd done this enough times and it was inefficient. Time to put Alfred to work. So I went to the source and found that website was built on figlet.js. Within about 10 minutes I had it installed (along with its CLI) and a tiny little Alfred workflow that puts it to use. Now sure, one might argue that 'it's going to take a few headings before I break even on that 10 minutes spent', but its not just about time. Now I have this capability at my fingertips, I can perform the task without breaking flow. That's the magic, that's the Superpower!

     

    image.gif.f42b094c68fbcb277df35dd8eee00616.gif

     

    Anyway, I just wanted to post this as a little anecdote. Ever since I started dabbling in the command line / scripting / Alfred node based workflows – my time spent on the computer has become way more rewarding. I have styled Alfred to suit my personality, and every time I invoke Alfred to do something unique to my workflow, I am utterly delighted. 

     

     

  3. I think there might be a way to globally change the colour of all generated icons. We could use ImageMagick to search through all images in a folder, and where it finds single colour icons, it could update the RGB value, leaving the alpha channel in tact. Then we would have a way to update all monochrome icons within our Alfred Environment.  

     

    If anyone is handy with ImageMagick and would like to contirbute, I could use some help (either here, or I've also started a discussion over in ImageMagick land).

     

    The script should run along these lines:

    1 Recursively search a directory.

    2 Identifying all images that only contain one colour (+ alpha).

    3 Replace that one colour with a new value (leaving the alpha as is).

    4 Save over the image file.

     

    I think I've found some leads for finding single colour images and for replacing RGB only … but I'm out of my depth for bringing this together into a single script as outlined above.

  4. I love avoiding headaches and have happily implemented {random:UUID} instead of pretty, though devilish, non-ASCII characters. I've also taken on board the imperative to quote variables to avoid problems around spaces. Finally, I understand your guidance around how to best author Alfred workflows on GitHub.

     

    So, I'll finish up the current fixes; restructure the repository; and merge the branch into Master (as a point revision).

    Hopefully I'm getting terminology here somewhat correct and Ill carry on with it :)

     

    Thanks again Vitor!

  5. Hey Mick,

     

    What you need are List Filters (I love List Filters!)

     

    Here you create a new entry, give it a name eg "Text Edit" add an icon if you like, then in the Argument area you put the path to the application… connect that to an Open File action and you're done!

     

    Here's a quick mockup for you to toy with, enjoy!

     

    https://www.dropbox.com/s/i859mlsxcbye46l/Popup Menus for Mick Sanders.alfredworkflow?dl=0

  6. I've been working on a nice little update for this workflow inspired by Vitor's ideas. 

     

    I've ran into a little bit of trouble which I have outlined below. For troubleshooting this issue, I have created a branch in GitHub (I think I'm starting to 'get it' with GitHub). Here's the link

     

    I've set the default save location to /tmp/ and provided a new config field, where the user can choose their own location. Now we need unique naming for the outputs, so let's use the symbol itself for the file name. This works great for the first part of the workflow, where the file is generated and saved to disk. But it isn't playing nice with the AppleScript portion of the script, where the file is then copied to the clipboard.

     

    It seems to fall over when transporting the variable out of Alfred and into AppleScript 

    set output to (system attribute "output")
    set the clipboard to (read (POSIX file output) as  {«class PNGf»})

     

    It's interpreting the output as

    …/ÙÄõ∏.png

    instead of

    …/􀛸.png

     

    But if I hardcode the file path, like below, the AppleScript handles the file copy perfectly fine:

    set the clipboard to (read (POSIX file "/Users/nathan/Desktop/􀛸.png") as  {«class PNGf»})

     

    So if anyone can help get around that hiccup, the overall workflow is coming together pretty nicely.  It's actually super fast using Alfred's universal actions. Just select the symbol in the SF Symbols app, invoke Alfred's actions menu, and execute the workflow. Bam! Icon ready to go. One could even assign a hotkey / temporary macro if they needed to make a bunch of these.

     

    I still need to explore ImageMagick further, for stuff like generating an outline, and I think I'd like to provide the option to choose a background colour and then generate a filled squircle using this colour, along with a drop shadow. Future features 😊 

     

    Overall, it's really fun working on something that I hope might be useful for others.

     

    SCR-20220930-npv-2.png

  7. Hi Vitor,

     

    Thanks for the excellent feedback. Your ideas are all very welcome. I actually have already uploaded to GitHub (see updated post), though I’m not sure I’ve followed best practices there. I’ll review the blog post you linked and try get better acquainted with GitHub. Then I would very much like to address your feedback. These will all be later-things. As it’s very late for me. 


    But for now, cheers! 🍻 

  8. image.png.5b8eed0f5668802c6e7b63c591eefdb2.png

    Icon Generator

    Icon Generator will quickly convert an SF Symbol or Emoji to .png for use in workflows.

    It includes some nice options for adjusting appearance including a configurable colour palette.

     

    Download: Alfred Gallery  |  GitHub

    Dependencies

    (Note: the latter two dependencies can be handled by Alfred if you are installing through the Alfred Gallery)

    Usage

    Start by copying an emoji, or an icon in the SF Symbols app.

    image.thumb.png.07e30c73c52b1e847fbdd66f548598b1.png

    Convert it to PNG with the icon generator keyword. The result will be in your clipboard.

     

    image.thumb.png.3a4ee37ada037c0aad057ebdab7c1c96.png

     

    Alternatively, select the emoji or icon and use the Universal Action.

    image.thumb.png.12c0022a4516ed5583b39245938d485f.png

    You can then paste directly into Alfred.

    image.thumb.png.174cdcd11220d87b135bb00011503c63.png

    Hold option when running Icon Generator to configure the icon's appearance


    image.thumb.png.0ad3b6481656167ef1725a468cf9e3d0.png

    image.thumb.png.b434a537b142ad85aa9699efbe77944e.png

    image.thumb.png.bd30a3370836ff9e513858d9fbfa2996.png

     

     

     

     

  9. Hey Vitor, 

     

    I was hoping you might include a blank hotkey node alongside the "pa" keyword in PinPlus? I have added a command+D hotkey (with related app: Safari) thus replacing Safari's default add bookmark command. This works really nicely, but sadly it disappears every time PinPlus is updated. As I understand if there was a blank hotkey node in the workflow by default, I could migrate my settings on update.

     

    Enormous gratitude for the workflow (regardless of whether this niche request warrants implementation)

     

    Cheers!

    Screen Shot 2022-04-04 at 10.28.58 pm.png

  10. Hey, IMO what you want to do is learn how to use scripting to automate your Mac usage, then employ Alfred to help operate such scripts. It's a pretty deep rabbit hole, but even just a few weeks of learning and you'll start to feel the benefits of automation. Look into AppleScript or the new Shortcuts app. Once you have a handle on how these tools can automate your processes, getting Alfred to help is simple :)

  11. Summary: Requesting context sensitive Keywords - just like the Hotkey's related apps

    --- 

    More and more I am using Alfred to automate activities within the apps I use daily. Running scripts, loading workspaces, modal menus, macros etc - all context sensitive to the foreground application. While I love putting Alfred to use in this way, my implementation lacks one of Alfred's features I find most valuable… the keyword.

     

    I wish there was a way to have something like the 'related apps' function from the hotkey input available for keywords. This would allow the same keyword to do different things depending on the foreground app. For example executing the keyword 'align' would do one thing if Photoshop is foreground, and something completely different if Cinema 4D is foreground.

     

    What I love about Alfred is I don't have to remember myriad different keyboard shortcuts to automate my workflows, so if it were possible to have context sensitive keywords, the whole system would become a little more flexible :)

×
×
  • Create New...