Earlier quoted context omitted.
It's not trivial, but roughly: use AppleScript/osascript to get the URLs, but mostly pass them to a ~50 line Bash script which: - Brings in the date path components for the dumped-to folder - Makes a hash of the URL for an Obsidian doc (each tab gets their own doc) - Uses Chrome command line (--headless --disable-gpu --dump-dom) to save a snapshot of the page contents - Uses it again with --screenshot to make a thumb…
> - Uses Chrome command line (--headless --disable-gpu --dump-dom) to save a snapshot of the page contents > - Uses it again with --screenshot to make a thumbnail You could combine both of those into "run Archivebox somewhere and pass the URLs into that" (which is what I do for "URLs I save to Instapaper" - they go to my Linkhut, Pinboard, my Archivebox, and once I've fixed my code, to archive.org as well.)
Hammerspoon
111–120 of 154 posts
Re: Hammerspoon
#112Hammerspoon is the glue that holds my Mac together. For a starter list of things to do with this app, a partial list of the things that I'm using it for: - Dumping all open Safari tabs to an Obsidian doc - Adding 'hyper' (Ctrl-Opt-Cmd) keybinds to pop a new window for: - Safari - Finder - Terminal / Ghostty - VS Code - Notes - Editing Hammerspoon/AeroSpace/Sketchybar config - Reloading Hammerspoon config - Reloading…
Could you share your config?
Re: Hammerspoon
#113Earlier quoted context omitted.
> - Dumping all open Safari tabs to an Obsidian doc I'd love to do this too. Would you mind sharing how you do it? Or is it trivially easy and not worth explaining? (I haven't looked too deeply into HS yet.)
It's not trivial, but roughly: use AppleScript/osascript to get the URLs, but mostly pass them to a ~50 line Bash script which: - Brings in the date path components for the dumped-to folder - Makes a hash of the URL for an Obsidian doc (each tab gets their own doc) - Uses Chrome command line (--headless --disable-gpu --dump-dom) to save a snapshot of the page contents - Uses it again with --screenshot to make a thumb…
Also if I may ask, how do you like Obsidian? I had never heard of it until now. Seems like a competitor to the Notes feature of iOS/macOS, but with its own subscription for syncing independently of iCloud?
Re: Hammerspoon
#114Hammerspoon is the glue that holds my Mac together. For a starter list of things to do with this app, a partial list of the things that I'm using it for: - Dumping all open Safari tabs to an Obsidian doc - Adding 'hyper' (Ctrl-Opt-Cmd) keybinds to pop a new window for: - Safari - Finder - Terminal / Ghostty - VS Code - Notes - Editing Hammerspoon/AeroSpace/Sketchybar config - Reloading Hammerspoon config - Reloading…
I use it for one thing only, as a window manager, and for that purpose it has made MacOS eminently more usable for me.
Re: Hammerspoon
#115Earlier quoted context omitted.
It's not trivial, but roughly: use AppleScript/osascript to get the URLs, but mostly pass them to a ~50 line Bash script which: - Brings in the date path components for the dumped-to folder - Makes a hash of the URL for an Obsidian doc (each tab gets their own doc) - Uses Chrome command line (--headless --disable-gpu --dump-dom) to save a snapshot of the page contents - Uses it again with --screenshot to make a thumb…
How does Hammerspoon help with this? Seems like just AppleScript and bash. Also if I may ask, how do you like Obsidian? I had never heard of it until now. Seems like a competitor to the Notes feature of iOS/macOS, but with its own subscription for syncing independently of iCloud?
Obsidian is good! This use of Bases is really my only "proprietary" use of anything Obsidian-specific. The rest is a combo of personal reference, brainstorms, intricate client work specs or outlines, and the beginnings of a personal wiki. The keybinds are great, everything is in one big folder for now, and the fuzzy search makes it fast. For sync, I just have my vault in a folder that is part of my overall Syncthing, so all my computers can access it. On mobile (iPhone moving to Android, and iPad) it's just read-only for now; not using their sync or doing any writing into the system from mobile.
Somewhat relatedly, I just got Standard Notes going on all systems (Mac/Linux/iPhone/Android/iPad) which is good for reliable capture at all places for me right now. I'm not paying, so I don't have (Markdown or other) formatting like in Apple Notes yet.
Re: Hammerspoon
#116Hammerspoon maintainer here - I'm enjoying reading all the comments, and hoping that everyone isn't going to be annoyed that I'm mostly working on a v2 atm, which switches from Lua to JavaScript :D
Yay! :D
>.. enjoying ..
:)
>Lua to JavaScript
:\
Well, I have been a long user of Hammerspoon, and Lua, so thanks for the great app, it made a difference for me for a long time .. would be happy to hear why, but don’t feel obliged, the switch to JS over Lua, but anyway, thanks again!
Re: Hammerspoon
#117Hammerspoon maintainer here - I'm enjoying reading all the comments, and hoping that everyone isn't going to be annoyed that I'm mostly working on a v2 atm, which switches from Lua to JavaScript :D
Can't wait for the JS switch! Personally, it's having to figure out Lua is what's kept me away from it... :)
Lua is a better JS.
/ducks
Re: Hammerspoon
#118Re: Hammerspoon
#119Hammerspoon maintainer here - I'm enjoying reading all the comments, and hoping that everyone isn't going to be annoyed that I'm mostly working on a v2 atm, which switches from Lua to JavaScript :D
Re: Hammerspoon
#120The mail program has a folder tree on the left, the list of messages in the center, and the current message on the right. The IDE has all these tool windows that need showing, in addition to the actual editor. Websites also like it if the window size is a bit more.
Back when I was using Emacs and xterm, mainly, it was nice to show Emacs in the left half and then two xterms on the right.
So instead of tiling, I've come to realize that I only need a couple of window positions and sizes: Mail program and IDE are full screen. The browser occupies 70% width and height, in the top right corner, and the terminal is in the bottom left corner, 200 columns by 44 rows or so. (Lazygit works better if the terminal is a bit larger.) The chat program is full height, 60% width, left edge.
In this way, while the IDE is building or running tests, I can summon the web browser and still see at the bottom and on the left what is the progress of build or test. Also, when I use the software through the browser, I can see a couple of lines of log messages, which is enough to tell me whether to switch.
So I'm now happy with hotkeys in Hammerspoon that reposition and resize the current window to one of these presets, and to jump to a specific app with a keypress. I use a modal for this.
I dig the idea of having multi-level modals, somehow this idea never occurred to me.