Jump to content

Kalaschnik

Member
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Kalaschnik

  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
  12. Hey Vero, thanks for the suggestion. That is indeed a workaround. Yet, having full-hover titles would be still good for situations where even wide themes will truncate long titles.
  13. This part from your previous post Maybe the "it’s not true" was not right wording for this context. Rather I mean your statement is bogus. - What do you even mean by Edge should provide an API? - Does Chrome provide an API? Maybe I’m not clear here, the bookmarks file (for all chromium-based browsers) is a plain text file (just open it in an editor and you will see some beautiful JSON). So what API do you expect from any chromium-based browser vendor to offer? It is basically about opening a JSON file and parse the contents. It is already structured data... ... Yeah thats software development. Plus, I don’t see this as a big commitment. All browsers follow the JSON-bookmarks structure from Chromium. I see this a sustainable move to support a wide range of browser which share the same standardized format to store the bookmarks. Of course they can. Why not. Dropping features due to unexpected third-party behavior is not uncommon. I don’t know about the stats (no doubt that Chrome by far the leading the field). Yet, it would just be a good (moral) move from Alfred to support other browsers that are not Apple or Google (actually looking for some Firefox love here as well).
  14. Dear Alfred Devs, I primarily fell in love with the snippet functionality. As I work a lot with ffmpeg I stored some often used commands as snippets. I also use the Name property as a place to add some useful information about a specific command (see screenshot). However, the Snippet Viewer truncates long titles if they exceed a certain width, and the Snippet Viewer indicates this behavior with an ellipsis (…). So far so good. However, a common UX feature is that truncated text reveals its full content when the mouse hovers over it (aka tooltip/title). This not yet the case, and my notes are hidden after the truncation … Thank you for considering.
  15. Thats completely not true. Chromium-Edge uses the exact same bookmarks file structure and has the same internal workings as in Chromium/Chrome (regarding the bookmark management). I actually authored this functionality for a Windows Launcher application (Flow Launcher) to add Edge support for that software: https://github.com/Flow-Launcher/Flow.Launcher/pull/121 The Code change I did was basically just some string replacements to get the path right (easy PR). Everything else was copy/paste from the existing chrome implementation. The bookmarks file is located at: Chrome ~/Library/Application\ Support/Google/Chrome/Default Edge ~/Library/Application\ Support/Microsoft Edge/Default Here you can see the matching folder contents (top is edge), bottom is chrome (along with the highlighted bookmarks file) What that means; Alfred could actually support much more browsers (basically all Chromium (web browser) - Wikipedia). The bookmarks structure is in the Chromium project, it is and not something Chrome did uniquely. So, supporting other chromium-based browsers is an easy addition to the code base. Please Alfred, it is time for some search-and-replace-work to add this feature! Thanks ❤️
×
×
  • Create New...