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. Got suggestions? Alternatives? Lemme know.Ī few weeks ago, I added an "open with" command to dwim-shell-commands.el. I've pushed dwim-shell-commands-kill-process to my config dwim-shell-commands.el. (format "kill -9 %d" (map-elt selection 'pid)) ( when (y-or-n-p (format "Kill? %s" prompt-title)) (nth 2 (split-string (string-trim (car p2)))))) (string-lessp (nth 2 (split-string (string-trim (car p1)))) (format "%s %s %s %s" pid user comm (truncate-string-to-width args args-width nil nil t)) (args-width (- (window-width) (+ pid-width user-width comm-width 3))) (map-elt process 'comm) comm-width nil nil t))) (comm (format (format "%%-%ds" comm-width) (map-elt process 'user) user-width nil nil t))) (user (format (format "%%-%ds" user-width) (pid (format (format "%%%ds" pid-width) (map-elt process 'pid))) ( defun dwim-shell-commands-kill-process ()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |