( defun dwim-shell-commands-feh-marked-files () Sure there is some trickery involved here (like creating an invisible macOS window to anchor the menu), but hey the results are surprisingly usable. :shell-pipe "swift -" :join-separator ", " :no-progress t "Reverse geocode" "lat=\"$(exiftool -csv -n -gpslatitude -gpslongitude ' > ' | tail -n 1 | cut -s -d',' -f2-2)\" if then echo \"no latitude\" exit 1 fi lon=\"$(exiftool -csv -n -gpslatitude -gpslongitude ' > ' | tail -n 1 | cut -s -d',' -f3-3)\" if then echo \"no longitude\" exit 1 fi json=$(curl \"$" x y) ( defun dwim-shell-commands-image-reverse-geocode-location () '( "/Applications" "~/Applications" "/System/Applications")))))Īs usual, I've added dwim-shell-commands-macos-set-default-app to dwim-shell-commands.el, which you can install via MELPA.ĭid you find this tiny integration useful? Check out Hey Emacs, where did I take that photo? ( defun dwim-shell-commands-macos-apps () (shell-command-to-string (format "defaults read ' %s/Contents/ist ' CFBundleIdentifier" (completing-read "Set default app: " apps nil t)))) ( let* ((apps (dwim-shell-commands-macos-apps)) ( defun dwim-shell-commands-macos-set-default-app () But with a dwim shell command like dwim-shell-commands-macos-set-default-app, I can easily invoke the command via swiper's counsel-M-x fuzzy terms: "dwim set". I seldom change default apps on macOS, so my brain forgets about duti itself, let alone its arguments, order, etc. I've been revisiting lots of my command-line usages (specially those that never stuck) and making them more accessible from Emacs via dwim-shell-command. While I liked the ability to change default apps from the command-line, the habit never quite stuck.įast forward to 2022. Now this isn't particularly challenging in macOS, but it does require a little navigating to get to the right place to change this default setting.īack in March 2020, I tweeted about duti: a command-line utility capable of setting default applications for various document types on macOS. But every now and then I'd like to change the default macOS app associated with specific file types. not Emacs) other than the default macOS one.ĭwim-shell-commands-macos-open-with and dwim-shell-commands-open-externally are typically enough for me to handle opening files outside of Emacs. It's pretty handy for opening files using an external app (ie. I will update with any further experiences with TB and GiA compatibility.A few weeks ago, I added an "open with" command to dwim-shell-commands.el. Thanks again for your comments, how great is it to get such advice in a timely manner! It's back to read/write now, in any case, and everything appears to be working and correct now. I have no idea how that happened, in my 30 years of working with Macs I've never experienced that change before. One of the very odd side effects of all of this was that my external drive became a read only drive, which obviously meant that nothing could be written to it no matter the other factors. As time allows I will reinstall the latest version of TB and see if that was the initial problem. Somewhere along the line GiA started working again (there was a false start, but the second attempt on that download was successful), and the only real change of circumstance I made (besides the restarts, etc.) was going back to the earlier version of TunnelBear. I eventually also tried using a previous version of TunnelBear. I have not been able to recreate the first problem and log, so I have tried a number of different things over the last two days, including general stuff like a clean re-install (did this several times), restarting, zapping P-RAM, etc. I am curious why GiA wouldn't work with TunnelBear for others, obviously I do not understand all the aspects of the downloading process. Also, didn't think the streaming aspect would matter, but wanted to make sure. Secondly, I was not getting any partial files or even directories being created, which surprised me, it simply was failing. firstly TunnelBear was working perfectly with GiA for me, and has been since I installed both last month (until a couple of days ago, of course, haha), so I guess things must have changed there in some way. Thanks again for your comments, much appreciated!Ī couple of things.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |