Remove stumpwm integration
I don't currently use stumpwm
This commit is contained in:
parent
a25de0f817
commit
780bd0f3c4
1 changed files with 0 additions and 44 deletions
|
@ -707,50 +707,6 @@
|
||||||
`(add-hook 'emacs-startup-hook #'(lambda () ,@body)))
|
`(add-hook 'emacs-startup-hook #'(lambda () ,@body)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Stumpwm integration
|
|
||||||
|
|
||||||
This variable, macro and function help with integrating Emacs and
|
|
||||||
Stumpwm. They are used by some other functions to make the two seem
|
|
||||||
extra connected.
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(defvar oni:stumpish-program
|
|
||||||
(expand-file-name
|
|
||||||
"~/.local/share/quicklisp/local-projects/stumpwm/contrib/util/stumpish/stumpish")
|
|
||||||
"The location of the stumpish executable.")
|
|
||||||
|
|
||||||
(defmacro oni:stumpwm (&rest body)
|
|
||||||
"Execute BODY in stumpwm."
|
|
||||||
(declare (indent 0))
|
|
||||||
`(call-process oni:stumpish-program nil nil nil
|
|
||||||
,(format "eval '%S'" `(progn ,@body))))
|
|
||||||
|
|
||||||
(defun oni:stumpwm-command (cmd)
|
|
||||||
"Execute CMD in stumpwm."
|
|
||||||
(call-process oni:stumpish-program nil nil nil cmd))
|
|
||||||
|
|
||||||
(defun oni:stumpwm-echo (message)
|
|
||||||
(call-process oni:stumpish-program nil nil nil (format "echo %s" message)))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
** Fall back on stumpwm when moving around
|
|
||||||
|
|
||||||
Using the function specified in [[Stumpwm integration]] wrap the
|
|
||||||
=windmove-do-window-select= function and catch any error produced,
|
|
||||||
hoping it's the error that there's no more window to move to and
|
|
||||||
then request that stumpwm move the focus in the same direction as
|
|
||||||
windmove would have.
|
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
|
||||||
(defadvice windmove-do-window-select
|
|
||||||
(around oni:windmove-stumpwm activate)
|
|
||||||
"If no window can be moved to, move stumpwm."
|
|
||||||
(condition-case err
|
|
||||||
ad-do-it
|
|
||||||
(error (oni:stumpwm-command
|
|
||||||
(format "move-focus %s" (ad-get-arg 0))))))
|
|
||||||
#+END_SRC
|
|
||||||
|
|
||||||
* Use the right dictionary
|
* Use the right dictionary
|
||||||
|
|
||||||
One of the caveats of using two (or more) languages in a single
|
One of the caveats of using two (or more) languages in a single
|
||||||
|
|
Loading…
Reference in a new issue