Jump to content

xilopaint

Member
  • Content Count

    514
  • Joined

  • Last visited

  • Days Won

    17

Posts posted by xilopaint


  1. 16 minutes ago, deanishe said:

    No new features as such, but the .alfred4workflow extension can now be used in releases to hide updates from Alfred 3 and earlier.

     

    How does it work exactly? Should I rename the workflow file for .alfred4workflow so Alfred 2/3 users will not get updates for v4?


  2. On 6/24/2019 at 2:51 PM, vitor said:

    The answer to that is in the node labeled “Play video”.


    It looks for (in order) mpv, IINA, and VLC. That order is due to the following thought process: VLC is the worst of the three1, but the most popular, so if you have it and one of the other two, you’re more likely to prefer one of them. IINA is based off mpv; it’s essentially less CLI and more GUI, so if you have mpv you’re more likely to prefer it.

     

    I'm an IINNA user. Why do you see mpv better than it? I don't know mpv and find IINA very good.


  3. On 6/1/2019 at 3:34 PM, Carlos-Sz said:

    Evernote 9 beta 4 Workflow for Alfred 4

     

    Here is an update to address the new Alfred 4 data folder (thanks to xilopaint).

     

    DOWNLOAD

     

    Hey Carlos, now I realise you should add a trailing slash in your declaration in order to allow settings.plist be saved in the right place. So you should have:

    set my _data to (system attribute "alfred_workflow_data") & "/"

    Could you fix this and make a new release?


  4. 25 minutes ago, Dasblatz said:

    Thanks but Popclip tell it is not valid?

     

    The extension is not signed for PopClip because I've made changes on the official extension to support Alfred 4.

     

    Does it work for you?


  5. 1 minute ago, deanishe said:

     

    Of course not, but why are you asking for a LaunchBar plugin here? I mean, of all the Mac-related forums you could ask on, can you think of one that has fewer LaunchBar users than the Alfred forum? :) 

     

    hahahaha It's not my intention to make the troll here, but this is the undeniable proof of how Alfred Community rules.


  6. 4 minutes ago, RodgerWW said:

     

    Thank you so much for continuing this, and making it better!  I have been driving myself crazy with the lack of programming knowledge and and trying to find a way to grab the image without the conversion of the plist and also adding files to read from. Awesome job!

     

    No problem! If you look into the repo you'll see a good part of your code there. Also, you're credited on README.


    Do you mind to edit the first post of this thread with the link for the latest release?


    I think would be more productive that any contribution could be made in the repo from now.


  7. 1 minute ago, deanishe said:

     

    Don't know. That returns an NSImage, but you need a filepath. I don’t know if you can get the filepath from an NSImage.

     

    I’ll have a look what I get home

    from work.


    Well, I don't necessarily need a filepath. If it gives me a copy of the .icns or even better a .png the problem is solved.


  8. 5 hours ago, deanishe said:

     

    Not that I know of.

     

    The model names are contained in /System/Library/PrivateFrameworks/ServerInformation.framework/Versions/A/Resources/English.lproj/SIMachineAttributes.plist, and I found some code that the author says can convert a model name into its icon, so perhaps you could read the model names from the plist and feed them to that code to get the right icons?

     

    Hey, don't you think the one-line code mentioned in the SO question you linked is more suitable to my needs?

     

    EDIT: btw, is this line Swift or Objective-C?


  9. 9 minutes ago, deanishe said:

     

    Not that I know of.

     

    The model names are contained in /System/Library/PrivateFrameworks/ServerInformation.framework/Versions/A/Resources/English.lproj/SIMachineAttributes.plist, and I found some code that the author says can convert a model name into its icon, so perhaps you could read the model names from the plist and feed them to that code to get the right icons?

     

    Oh, that looks good! I just don't know anything of Swift or Objective-C (I'm not even sure which of the two languages that code snippet refers to). If anyone can submit a PR I will be grateful. Otherwise I will have to learn how to implement this.


  10. Soulver 3 has been released with automation features including a command-line interface and an Alfred Workflow. The workflow uses the Soulver CLI, which is located inside Soulver’s bundle and symlinked to /usr/local/bin/.

     

    I would love to see an integration with Alfred and use Soulver syntax instead of Alfred standard calculator. Soulver has a friendly syntax which includes:

     

    1) Percentages:

     

    120 + 10%                             | 132
    500k - 30%                            | 350k

    10% of 200                            | 20
    20 is what % of 200             | 10%
    20 is 10% of what                | 200

     

    2) Proportions:

     

    6 is to 60 as 8 is to what                     | 80
    5 is to 10 as what is to 80                   | 40

     

    3) Phrase functions:

     

    larger of 100 and 200                             | 200
    greater of 100 and 200                           | 200

    smaller of 5 and 10                                 | 5
    lesser of 5 and 10                                   | 5

    remainder of 21 divided by 5                | 1 
    21 mod 5                                                  | 1

     

    3) Currency conversions (including crypto!):

     

    10 USD in EUR                    | 8.88 EUR
    20 GBP in AUD                   | 36.29 AUD

    20 BTC in USD                    | 156,250.00 USD
    1,000 EUR in ETH               | 4.47 ETH

     

    4) Units conversions

     

    10 km in m                                            | 10,000 m
    5 hours 30 minutes to seconds        | 19,800 seconds
    100 pounds in kg                                 | 45.36 kg

     

    5)  Date Calculation

     

    10 June + 3 weeks                                             | 1 July
    April 1, 2019 − 3 months 5 days                      | 25 December 2018
    Yesterday + 1 week                                           | 11 June
    Today − 1 month                                               | 5 May
    3:35 am + 7 hours 15 minutes                        | 10:50 am
    12/02/1988 + 32 years                                    | 12 February 2020
    01.05.2005 + 3 years 2 months 3 weeks      | 22 July 2008

     

    I love 1Password integration and honestly think Soulver would make a great integration with Alfred as well.

     

    Here's Soulver documentation.


  11. On 1/12/2018 at 5:33 PM, deanishe said:

    A rather minor thing, but would you consider storing the generated txt files in the workflow's data or cache directory, not in the workflow directory?

     

    The issue is that files in the workflow directory get synced between machines, so when I use the workflow to quickly check which video card my Mac has or what the numerical version of the OS is (I can never ever seem to remember which is 10.10, 10.11, 10.12 etc.), the cache files often contain the data from the wrong Mac, so it takes a lot longer than need be to load.

     

     

    Your issue is fixed in the new workflow. See my last post.

     

    Btw, would you help me to find a way to generate mymac.png programatically without the need of using the HardwareIcons.xml file? All Mac icons are located in

    /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ but I didn't find a way to correlate one of them to the user machine.


    There are 3 icons for the MacBook Air in this folder as an example:

     

    com.apple.macbookair.icns

    com.apple.macbookair-11-unibody.icns
    com.apple.macbookair-13-unibody.icns.

     

    Is there any .plist file determining which one should be displayed in About This Mac.app?

     

    I don't know if @RodgerWW is still active on the Forum. Maybe he can contribute for this discussion.


  12. I've just released a new About This Mac workflow on GitHub based on Rodger's work.


    The new workflow should be more fast and reliable since I've fixed some bugs and rewritten the code to not write any more .txt files.


    The  xabout keyword was suppressed since the data is generated in each run so no need to reset the workflow.


  13. 5 hours ago, deanishe said:

    I have one workflow per repo so I can use GitHub releases for updates.

     

    Fundamentally, I have a subdirectory with the actual workflow contents (that I can symlink or copy to Alfred’s workflow directory).

     

    In the case of scripting languages, this is called “src”,  and I have the README, licence and probably the built workflow in the repo root.

     

    In the case of compiled languages (Go in my case), the “build” subdirectory is what gets linked to Alfred’s workflow directory. The top-level contains code and build scripts (as is normal with Go).

     

    I adopted your folder structure. Btw, I also created a workflow for your script to symlink/install workflows. It's awesome.

×
×
  • Create New...