Jump to content

paulw

Member
  • Posts

    158
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by paulw

  1. Hi @dfay, I'm getting errors running this workflow in Alfred 4 that have to do with Alfred 3 file paths.

     

    Fixed by opening categories.py and replacing references to

    ~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist

     

    with

    ~/Library/Preferences/com.runningwithcrayons.Alfred-Preferences.plist

     

    and replacing references to

    ~/Library/Application Support/Alfred 3/Alfred.alfredpreferences/preferences/workflows/

     

    with

    ~/Library/Application Support/Alfred/Alfred.alfredpreferences/preferences/workflows/

     

    And lastly, editing the osascripts in the workflow to replace "tell application "Alfred 3" with "tell application "Alfred".

     

    And thanks for the workflow!

  2. On 1/13/2021 at 1:56 PM, deanishe said:

    All in all, very well done. @blacs30 is very security aware. I would trust this workflow much more than the browser extension, which was written—at least in part—by idiots.

    @deanishe Could you explain the "idiots" comment re the Bitwarden browser extension? I looked through the linked discussion, but I'm not savvy enough to understand what the problem is.

  3. @troycurtisjr With help from someone on reddit, I was able to cobble together code that tests for Do Not Disturb status on Big Sur. The plist file ~/Library/Preferences/com.apple.ncprefs contains a plist item dnd_prefs. That item contains a base64-encoded binary plist (bplist). When that is decoded, if DND is enabled, it would look something like this:

     

    <?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>dndDisplayLock</key>
    	<false/>
    	<key>dndDisplaySleep</key>
    	<false/>
    	<key>dndMirrored</key>
    	<false/>
    	<key>facetimeCanBreakDND</key>
    	<false/>
    	<key>repeatedFacetimeCallsBreaksDND</key>
    	<false/>
    	<key>userPref</key>
    	<dict>
    		<key>date</key>
    		<date>2021-01-15T04:35:29Z</date>
    		<key>enabled</key>
    		<true/>
    		<key>reason</key>
    		<integer>1</integer>
    	</dict>
    </dict>
    </plist>

     

    The presence of the <key>userPref</key> and the <key>enabled</key> within the adjacent <dict></dict> indicate DND is enabled.

     

    So the following code produces 1 if DND is enabled, and 0 if it is disabled:


     

    #!/bin/zsh
    
    dnd_enabled=$(plutil -extract dnd_prefs xml1 -o - ~/Library/Preferences/com.apple.ncprefs.plist | xpath -q -e 'string(//data)' | base64 -D | plutil -convert xml1 - -o - | xpath -q -e 'boolean(//key[text()="userPref"]/following-sibling::dict/key[text()="enabled"])')
    
    echo $dnd_enabled

     

    Note: there seems to often be a lag time of a few seconds before the result reflects any change to DND.

     

    Feel free to incorporate that in your workflow.

     

  4. The Remote app can't do that, but I would also love a way to sync clipboard history and snippets between iOS and Alfred.

     

    I found this old reference to a Workflow (now Shortcuts app), but the link is for the old Workflow app and doesn't work. [Edit: it does work actually]

     

    And there's also this python script by @deanishe for one-way syncing iOS snippets to Alfred.

  5. On 3/17/2017 at 11:16 PM, bed said:

    This isn't as nice as an integrated iOS keyboard, or even dedicated app... but I wanted access to my Alfred snippets (which I sync with Dropbox) on iOS too.... so I made a Workflow for it, which you can see and grab over at http://abednarz.net/alfred-dropbox-snippets.html:)

    @bed Do you have an updated link? I'd love to use this, but your link is for the old Workflow app.

     

    Edit: Nevermind, the link did work after all!

  6. Well, after restoring the blacklist, it still threw errors, showing that it could not eject my boot drive (I supposed because it is not named "Macintosh HD") and as well, that it could not eject "Preboot" and "VM" which seem to be part of my boot drive core storage volume.

     

    However, after updating to the latest 4.0.3 pre-release, it seems to be working normally now.

  7. 8 hours ago, Andrew said:

    @paulw this shouldn't be the case - can I see a screenshot of Alfred's Features > System prefs to see the settings (eject / eject all / blacklist).

     

    Cheers,

    Andrew 

     

    Hi @Andrew,

     

    Thanks. The blacklist was empty. I clicked "Reset" and now it's populated with:

    Macintosh HD
    MobileBackups
    com.apple.TimeMachine*

    I'll test again next time I'm connected to external drives, since "Eject All" doesn't come up with nothing attached.

     

    I usually my boot drive. Perhaps the default blacklist could be set to match the actual name of the boot drive, rather than just the expected "Macintosh HD" name?

     

    Paul

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

     

    I don’t think it would. Your previous comment suggests it’s making the right choice for you (IINA), and this is the same technique/order I’m using in both ShortFilms and WatchList. That I recall, no one ever wanted a different order in those, so I’m pretty confident in the choice. Also, don’t underestimate the toll of an extra option like having to choose a player in the action: most people don’t want to pick a different player every time, they want their chosen one to be used without having to think about.

     

    I appreciate your well thought out process here, and I agree!

×
×
  • Create New...