Jump to content

Pennyworth

Member
  • Posts

    46
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Pennyworth

  1. This issue now resolved itself upon restarting my computer. Every iStat Menus menu bar item is now accessible via Alfred workflow keyword.
  2. Hi there! I need to start tracking disk usage stats now, and I'm having trouble adapting this workflow to also incorporate that. I thought it would be as simple as using the "menu bar name finder" script that was provided on this thread, and simply using a unique word for the Disk widget ("Data" or "used" or "free") in the line "let matchiStatsItem = props => { return props.name.match(/{}/) }", but none of those terms work. I tried experimenting to see what would get it to work. By disabling my other workflow keywords for the other widgets (CPU, RAM, Sensor, etc), this new Disk keyword started working again, but none of the others did! And then when I flipped it back around, the Disk keyword stopped working! So I'm not exactly sure what's causing this, but something is amiss. The "menu bar name finder" script also reveals "missing value" entries, so not sure if that's indicative of a greater problem here? I just don't know. Here's the full output from that script: CPU 10% Memory Pressure 63%. Memory Used 79% M1 SOC Die Average 101° Battery 100%, Charged, MagicTrackpad 83%, AirPods 90% missing value missing value missing value missing value Data 99% used. 8.9 GB free missing value
  3. Wow! This is incredible! It's really the little things in life that matter most. Thank you so much 🙏
  4. I'd like to design a workflow where I use a keyword to trigger opening the Alfred 'Snippets' preferences. Ideally it would even open a specific Snippet 'Collection'. Thoughts? Use-case: I use a Snippet Collection called 'Emoji Pack', but I often search for emojis by different keywords than what is originally labeled in the emoji pack, so I find myself often going in and adding extra keywords to certain emojis that I refer to by non-standard names. By creating a custom workflow for this, I can do this much faster.
  5. Follow-up question @dfay or anyone else: how would I create a 'Trigger All' action that opened every URL that the List Filter contains? Let's assume I have 4 websites I'd like to open at once, and then a 5th option that says 'Open All', how would I create that 'Open All' option, that would trigger all Open URL actions within that List Filter?
  6. Thank you for the suggestion @dfay! I accomplished this using a List Filter and the Conditional utility. Worked like a charm!
  7. I currently have a workflow I made called 'DailyDigest', which consists of a keyword named 'daily' triggering 5 separate 'Open URL' actions (of sites that I'd like to visit once a day). I've attached a screenshot of this basic workflow. It works well, but now I'd like to evolve it to the next level. Ideally, I would type the same keyword ('daily'), but this time it would reveal all 5 URLs in a list within Alfred, and offer a 6th option: 'Open All', which would open all at the same time (as it currently does). Even more ideal, each URL would have its own custom favicon. How would one go about doing this?
  8. Yes, seems that way. Makes me wonder how Alfred's workflow action can get the job done faster than the system.
  9. It takes about the same if I open a URL through the shell/Terminal directly or through the Alfred workflow/keyword.
  10. I tried removing the '--profile-directory' argument from the bash script and it still lags by 2 seconds more than Alfred's Open URL action.
  11. "Noticeably" is probably an overstatement, but there's definitely a 1-2 second lag when opening URLs via /bin/bash instead of Alfred's native URL Opener (basically instantaneous).
  12. I should also add that using a scripting language to accomplish this is noticeably slower than Alfred's "native" 'Open URL' action. I wonder if this could be sped up somehow...
  13. Thank you @deanishe, this solved my issue! The formula is: /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome {URL} --profile-directory={profile_ID} Unfortunately the simpler 'open -a' command won't work when using the 'profile-directory' arg, hence the long application file path.
  14. I use various Google Chrome user profiles ("People", per Chrome's parlance) to keep my personal and work browser environments separate. This means that if I open a Google Docs link tied to work on my personal Chrome user profile, then it will say "You don't have access". I therefore have to always make sure my active Chrome window is of the profile for which I'm logged into an account of. At the same time, I have many simple Keyword --> Open URL workflows. How can I have an 'Open URL' action open not just in a specific browser, but a specific user profile of that browser? Is there a way to accomplish this?
  15. That makes perfect sense. Anyway, thank you for all your help. You may as well add this workflow to your list of workflows! I'm sure there's a good overlap between Alfred user and iStat Menus users. Becoming so accustomed to Alfred over the years, I felt like a dunce still using my mouse to check on stats from the menu bar.
  16. Thank you again for this helpful follow-up script! I really appreciate your help. I ran your script and it showed that my 'Sensor' menu bar item actually goes by "CPU PECI {temp}" (PECI being the "Platform Environment Control Interface", which is the thermal management controller that reports temperatures). I simply swapped out your line with "CPU PECI" and it fuzzy-matched! I did the same for date/time, simply using ":" and it fuzzy-matched as well! (Otherwise, your script reports the menu bar name as a dynamically updated name of whatever time it is in the moment it's queried.)
  17. Thank you so much! This is amazing! I don't know the magic behind much of this, but it works perfectly! Just bought you a beer via PayPal! 🍻 I've gone ahead and replaced /CPU/ with /Memory/ and /Battery/ for the other menu bar items and those work great, but still can't figure out what iStat calls their menu bar items for 'Sensors' and 'Time'. Wonder how I could do that? Alternatively, can the line let matchiStatsItem = props => { return props.name.match(/dateandtime/) } be modified so that it's a "fuzzy match"?
  18. Ah, that's what you meant by 'it doesn't work.' Understood. I'll email Bjango to see if they can help. Alternatively, do you recommend any Alfred workflows for revealing the system stats that iStat Menus exposes? I'm mainly interested in: battery health/cycles/condition RAM 'pressure'/swap/% utilization per process CPU % utilization per process GPU Status (integrated vs dedicated) temps for CPU/GPU/ports fan speed CPU/GPU/system wattage
  19. Thank you @deanishe for your help! Your sample script is a helpful start. However, when I run it, it merely selects one of the iStat Menus menu bar items and releases. In other words, it doesn't "open" the menu bar item. I would think that modifying 'click' to 'open' in Line 2 of your script would accomplish this, but there apparently is no 'open' command in AppleScript. Is there a way to 'open' the menu bar item instead of merely clicking/selecting it? Another approach I tried is to write a 'delay' line to give me time to press the down arrow key to 'open' the menu bar item, but this doesn't work, because the delay happens sequentially after the click event.
  20. I'm a heavy user of Bjango's iStat Menus, using it to check my system stats frequently. I also happen to be a heavy Alfred user, making my mouse trips up to the menu bar for iStat Menus feel really infuriating. I'd ideally like to open iStat Menus menu bar items using Alfred keywords. For example, if I type in "cpu" in Alfred, it will open the CPU stats from the menu bar, "ram" for "RAM", etc. I've searched everywhere for a workflow like this but can't find anything. I've conducted some research, mostly around how to get a readout of what menu bar items are called by the SystemUIServer, so I can call them with a script, but even that has been fruitless. I also stumbled upon Menu Bar Activate, which lets users activate the menu bar with a hotkey. However, this does not allow activating the right-side of the menu bar, with all the menu bar 'applets'. I haven't found a way to "reverse engineer" this workflow to access those 'applets'. Any help would be greatly appreciated!
  21. I've searched high-and-low for a memory status workflow but found anything. I'd like a workflow to view swap memory status and page-ins/page-outs. This is a key performance indicator to me and something I check on often. A total memory status readout would be ideal (which would include Memory Used, Cache, App Memory, Wired Memory, Compressed Memory, and possibly the new Memory Pressure figure), but just swap memory is what I need most. Alternatively, how would I be able to build this myself? (screenshot from iStatMenus) PS I know that in more recent versions of OS X, memory management has been optimized and Apple now uses the concept of "Memory Pressure" to indicate RAM load, but I still look to swap status to see why my system's behaving a certain way. Correct me if I'm wrong on that.
  22. Thanks Derick! This works well, except sometimes the print dialogue comes in before the page can render in Safari Reader, despite the delay code.
  23. Hey everyone! I've built an AppleScript workflow that goes like this: Keyword: "pdf" (or Hotkey: CMD + SHIFT + P) Current Safari page renders in Safari Reader File > Export as PDF Auto-save The problem I'm having is that the 'Export as PDF' menu item doesn't work exactly like "Print to PDF." The PDF output has almost zero margins, no header/footer to identify a source, and it's just not as desirable as printing-to-PDF from the print dialogue (though it is more efficient code-wise). Can anyone here tweak the following script to produce the same result through the Print-to-PDF function? I gave it a shot but I'm new to AppleScript and couldn't get it to work. Thanks! on alfred_script(q) tell application "System Events" tell application process "Safari" set frontmost to true # Render page in Safari Reader keystroke "r" using {command down, shift down} # Delay for smoothness delay 0.02 # Export as PDF click menu item "Export as PDF…" of menu "File" of menu bar 1 # Save PDF click button "save" of sheet 1 of window 1 end tell end tell end alfred_script
  24. Thanks dfay! Your solution gets me most of the way there! If there was only a way to pass through the search results to Alfred, we'd be golden.
×
×
  • Create New...