Jump to content

Kalaschnik

Member
  • Posts

    19
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Kalaschnik's Achievements

Helping Hand

Helping Hand (3/5)

1

Reputation

  1. But I want to conditionally overwrite icon.png with an icon that exists. If I delete icon: { path: iconPath }, I would have no chance to show custom-icon.png For example, right now my results look like this: Since I only got the tesla icon in: simple-icons/tesla.svg (see if condition above), I see the tesla icon, however the other icons should have the icon.png
  2. I am iterating over an array, and within my map method, I want to check if the icon file exists (because it is okay if they don't). However, I cannot get this file checking to work. I also tried most other file existence methods: https://byby.dev/node-check-if-file-exists .map((element) => { let iconPath = 'icon.png'; // Check if the file or path exists if (fs.existsSync(iconPath)) { iconPath = `${__dirname}/simple-icons/${element.name.toLowerCase()}.svg`; } return { title: `${element.display} (${element.name}) [${element.key}]`, subtitle: `${element.address.name}, ${element.address.line1}, ${element.address.line2}, ${element.address.contacts}, ${element.address.country}`, arg: element.key, icon: { path: iconPath }, autocomplete: element.key, valid: false, }; }); Is there maybe something already implemented to use a fallback icon, if the path has no target?
  3. Hey everyone, I am writing my first workflow. After doing everything in JXA, I discovered https://github.com/sindresorhus/alfy, which I enjoy. In my use case, I have a simple API endpoint returning JSON. In that endpoint, I can search/filter for a title, but I am interested in the key property. When pressing tab or enter I set autocomplete and the key to key. In other words, a video is more helpful than my description: (Screen capture is from this workflow) After pressing tab/enter on Breaking Bad, it takes the output key of it and launches like a new search instance. How do I achieve this in JavaScript land?
  4. Cool, I got it to work with Var/Args utility. Is it possible to do this without Var/Args?
  5. I started to use Alfred to open Website with a predefined browser: Although I set a fixed browser, I would sometime rather open the website with a different browser (for web dev jobs). In this case I would like provide an argument. Question If the keyword "ex" would open example.com with Safari, I am looking for a solution that would allow me to do this: "ex c" which would open example.com with Chrome. Anything like that in Alfred World?
  6. Is there a way to disable the default settings hits and only show the setting hits from the workflow?
  7. I observed a behavior that fuzzy search in snippets fails when it is not prepended with a space. To be flexible in search terms, I often put examples or synonyms in braces. However, fuzzy search fails as soon as there is no white space before a keyword. See an example here:
  8. @ValSong nice workaround indeed. I feel stupid not to think about symlinking earlier. Unsurprisingly it works like a charm, as all Chromium browsers share the same JSON bookmark structure.
  9. Ah yeah. I would argue this is not a good measure to predict the actual default browser of Alfred users (but this is a different topic).
  10. I wonder how Alfred measures this? Does Alfred look for what’s the default browser? What browsers are installed on the system?
  11. Which makes it so hard for smaller, independent projects to attract user (now speaking for Opera, Brave, et al.), when really awesome apps—like Alfred—just don’t care about other browsers (even they share the same implementation!) Now, I’m actually very curious how you implemented the Chrome bookmarks plugin. Did Google provide you a “supported way” to search bookmarks with one line of code? Maybe I’m all wrong here, and you got some sweet API? I’m using Alfred only since a year, but I guess Alfred had features you needed to drop due to unforeseeable third-party events, even if you evaluated these features carefully before implementing it (which is, tbh, something all software companies do in order to operate sustainably). I mean, what happens if 1Password decides to drop their API support, even if you evaluated adding this feature carefully? Look, I’m sorry, I really don’t want to be a grumpy asshole here. But there are decisions from third-party companies that are not in Alfred’s scope, yet they do affect Alfred. I mean, things can change, and you never can prepare that. Best Steven
×
×
  • Create New...