Updated with kubemacs install.

This commit is contained in:
2020-02-26 19:21:52 +13:00
parent 746db79ee6
commit eb5aa6efe0

View File

@ -242,61 +242,31 @@ This guide will walk through setting up [[https://en.wikipedia.org/wiki/Windows_
#+END_SRC #+END_SRC
Once the right version of emacs is running we can then layer in iimacs on top Once the right version of emacs is running we can then layer in kubemacs on top
Documentation for this is here: https://github.com/iimacs/.emacs.d Documentation for this is here: https://github.com/kubemacs/kubemacs
#+BEGIN_SRC tmate #+BEGIN_SRC tmate
# Clone iimacs from github # Clone iimacs from github
git clone --recursive https://github.com/iimacs/.emacs.d ~/.iimacs.d ~/ sudo git clone --recursive https://github.com/kubemacs/kubemacs /usr/local/share/emacs/site-lisp/
# This ensures ii tooling is added to emacs # Ensure permissions are set for the cloned folder
cat <<EOF | sudo tee /etc/profile.d/99-iimacs.sh sudo chown -R $user:$user /usr/local/share/emacs/site-lisp
export IIMACS=~/.iimacs.d
export PATH=${IIMACS}/bin:${PATH}
export EMACSLOADPATH=${IIMACS}:
EOF
#+END_SRC #+END_SRC
You can now start ~iimacs~ :) You can now start ~emacs~ :)
One final configuration step specific to wsl is setup custom ~xsel~ bindings for copy/paste. One final configuration step specific to wsl is setup custom ~xsel~ bindings for copy/paste.
Add the snippet below to your ~~/.iimacs~ user functions at the bottom of the file.
Once added you can adjust the key bindings to your preferred keys.
#+BEGIN_SRC elisp Overwrite the following file:
(defun copy-to-clipboard () /usr/local/share/emacs/26.3/site-lisp/kubemacs/bin/osc52-tmate.sh
"Copies selection to x-clipboard."
(interactive)
(if (display-graphic-p)
(progn
(message "Yanked region to x-clipboard!")
(call-interactively 'clipboard-kill-ring-save)
)
(if (region-active-p)
(progn
(shell-command-on-region (region-beginning) (region-end) "xsel -i -b")
(message "Copied region to clipboard.")
(deactivate-mark))
(message "No region active; can't copy to clipboard!")))
)
(defun paste-from-clipboard () With the following contents:
"Pastes from x-clipboard." #+BEGIN_SRC tmate
(interactive) #!/bin/bash
(if (display-graphic-p) # xtermcontrol --title k8s@iimacs.org
(progn tmate display -p "#{tmate_ssh} # #{tmate_web} $(date) #{client_tty}@#{host}" | xsel -i -b
(clipboard-yank)
(message "graphics active")
)
(insert (shell-command-to-string "xsel -o -b"))
)
)
(evil-leader/set-key "o y" 'copy-to-clipboard)
(evil-leader/set-key "o p" 'paste-from-clipboard)
#+END_SRC #+END_SRC
** Step 5 - Setup mutt email client ** Step 5 - Setup mutt email client
For reading email we ideally use a cli based client for fast searching For reading email we ideally use a cli based client for fast searching