Created
February 12, 2018 21:17
-
-
Save anonymous/093d0def381139b8d7d07eb4d3f59e61 to your computer and use it in GitHub Desktop.
org-capture in Firefox EXWM buffers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun elmord-exwm-get-firefox-url () | |
(exwm-input--fake-key ?\C-l) | |
(sleep-for 0.1) ;; Wish I could get rid of the sleeps... | |
(exwm-input--fake-key ?\C-c) | |
(sleep-for 0.1) | |
(gui-backend-get-selection 'CLIPBOARD 'STRING)) | |
(defun elmord-exwm-org-store-link () | |
(when (and (equal major-mode 'exwm-mode) | |
(member exwm-class-name '("Firefox" "Firefox-esr"))) | |
(org-store-link-props | |
:type "http" | |
:link (elmord-exwm-get-firefox-url) | |
:description exwm-title))) | |
(add-to-list 'org-store-link-functions 'elmord-exwm-org-store-link) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment