User-password owner-password input output)))))) (output (concat (file-name-sans-extension input) (owner-password (read-passwd "owner-password: ")) ( let* ((user-password (read-passwd "user-password: ")) (downcase (file-name-extension (dired-get-filename nil t)))))) (downcase (file-name-extension (buffer-file-name)))) "Password protect current pdf in buffer or ` dired ' file." ( defun dwim-shell-command-convert-image-to-icns () (buffer-substring-no-properties at (+ at 1)))))Īs a bonus, it ocurred to me that I could use the same press-and-hold to handle question marks in Spanish (from my UK keyboard). Key Repeat: Fast | Delay Until Repeat: Short. 0.27 seems to work for my macOS keyboard settings. ( let ((last-edit-time accent-menu-monitor-last-edit-time) "Monitors text change BEGINNING, END, and LENGTH." ( defun accent-menu-monitor-text-change (beginning end length) (remove-hook 'after-change-functions #'accent-menu-monitor-text-change t))) (add-hook 'after-change-functions #'accent-menu-monitor-text-change 0 t)) (remove-hook 'after-change-functions #'accent-menu-monitor-text-change t) ( define-minor-mode accent-menu-mode "Toggle ` accent-menu ' if repeated keys are detected." :lighter " accent-menu mode" ( defvar accent-menu-monitor-last-edit-time nil) For now, it gives me something akin to press-and-hold. I'm sure there's a better way (anyone with ideas?). I'm now trying a little experiment using an after-change-functions hook to monitor text input and present the accent menu. Perhaps key chords are still an option for someone who doesn't need the "nn" chord, but being a Spanish speaker, I need that "ñ" from long "n" presses! While it kinda works, "nn" quickly got in the way of my n/p magit navigation. What other use-cases would you consider? dwim-shell-command is available on melpa. dwim-shell-commands-video-to-optimized-gif.dwim-shell-commands-pdf-password-protect.dwim-shell-commands-mpv-stream-clipboard-url.dwim-shell-commands-macos-toggle-display-rotation.dwim-shell-commands-macos-hardware-overview.dwim-shell-commands-install-iphone-device-ipa. dwim-shell-commands-git-clone-clipboard-url-to-downloads.dwim-shell-commands-git-clone-clipboard-url.dwim-shell-commands-files-combined-size.dwim-shell-commands-download-clipboard-url.Since then, I've brought in a bunch of use-cases that are now quickly accessible (all in dwim-shell-commands.el): It's been roughly a month since I started playing around with this idea of wrapping command-line utilities more seamlessly. For example, here's a stint at writing a narrowing utility for macOS using chooser. Like elisp gluing all things Emacs, Hammerspoon uses Lua to glue all things macOS. Looping through layouts is done with a global key-binding of option f or, if familiar with a macOS keyboard, ⌥ f.įor those unfamiliar with Hammerspoon… If you're a tinkerer and a macOS user, you'd love Hammerspoon. Hs.hotkey.bind(, "F", reframeFocusedWindow) Return end if win:frame() = leftFrame then Local maximizedFrame = win:screen():frame()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |