[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[STUMP] StumpWM and browser bookmarklets

From: Dmitri Minaev
Subject: [STUMP] StumpWM and browser bookmarklets
Date: Thu, 29 Oct 2009 10:58:14 +0400

Bookmarklets can be handy, but very uncomfortable to use in a
basically mouseless environment, like StumpWM. Below is a simple Stump
command which you might find useful -- it triggers a bookmarklet in
the current window. It works in Opera, Firefox and Conkeror.
Unfortunately, in the two latter browsers it works awkwardly: just
pastes the URL into the address bar. It works, but slowly, and it may
be a problem with the bookmarklets longer than the one I used. If you
know a better way, let me know, please :)

(defcommand readability () ()
            (let ((bookmarklet
                  (window-class (format-expand
                  *window-formatters* "%c" (current-window))))
                ((equal window-class "Firefox")
                 (send-meta-key (current-screen) (kbd "C-l"))
                 (window-send-string bookmarklet)
                 (send-meta-key (current-screen) (kbd "RET")))
                ((equal window-class "Opera")
                  (concatenate    'string    "opera    -remote
                          \"openURL(" bookmarklet ")\"")))
                ((equal window-class "Conkeror")
                 (window-send-string (concatenate 'string "g " bookmarklet))
                 (send-meta-key (current-screen) (kbd "RET")))
                (t "no"))))

PS: The bookmarklet text should be one line! Delete linebreaks
inserted by mail clients (if any).

PPS: Actually, the keyboard navigation in Opera makes it an almost
ideal browser for Stump.

With best regards,
Dmitri Minaev

Russian history blog:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]