Skip to content
Permalink
Browse files

add ssh-find-agent.sh to layer

  • Loading branch information
hh committed Nov 9, 2019
1 parent 73ba366 commit ef95ea3efb24e5d0ff27d64f2792332fc0abb0ee
@@ -32,7 +32,7 @@ This function should only modify configuration layer settings."

;; List of configuration layers to load.
dotspacemacs-configuration-layers
'(
'(html
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
@@ -53,6 +53,7 @@ This function should only modify configuration layer settings."
;; spell-checking
;; syntax-checking
treemacs
emacs-reveal
(lsp :variables
lsp-navigation 'both
lsp-ui-doc-enable t
@@ -248,13 +249,14 @@ It should only modify the values of Spacemacs settings."
;; List of themes, the first of the list is loaded when spacemacs starts.
;; Press `SPC T n' to cycle to the next theme in the list (works great
;; with 2 themes variants, one dark and one light)
dotspacemacs-themes '(spacemacs-dark
dotspacemacs-themes '(
leuven
spacemacs-dark
spacemacs-light
solarized-light
solarized-dark
monokai
zenburn
leuven
)

;; Set the theme for the Spaceline. Supported themes are `spacemacs',
@@ -537,6 +539,12 @@ If you are unsure, try setting them in `dotspacemacs/user-config' first."
This function is called only while dumping Spacemacs configuration. You can
`require' or `load' the libraries of your choice that will be included in the
dump."
(require 'org-capture)
(require 'ansi-color)
(require 'org-capture-pop-frame)
(require 'org-protocol)
(require 'org-protocol-capture-html)
(spacemacs/dump-modes '(org-mode go-mode))
)

(defun dotspacemacs/user-config ()
@@ -545,7 +553,14 @@ This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."
(require 'org-capture)
(require 'ansi-color)
(require 'org-capture-pop-frame)
(require 'org-protocol)
(require 'org-protocol-capture-html)
;; (spacemacs/toggle-line-numbers-on)
;(dotspacemacs/user-load); just in case we haven't loaded
(setq org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js")
(global-set-key (kbd "C-=") 'text-scale-increase)
(global-set-key (kbd "C-+") 'text-scale-increase)
(global-set-key (kbd "C--") 'text-scale-decrease)
@@ -567,15 +582,10 @@ before packages are loaded."
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-smtp-service 587
smtpmail-debug-info t)
(require 'org-capture)
(require 'ansi-color)
(defun display-ansi-colors ()
(interactive)
(ansi-color-apply-on-region (point-min) (point-max)))

(require 'org-capture-pop-frame)
(require 'org-protocol)
(require 'org-protocol-capture-html)
(setq org-capture-templates
'(
("w" "Default template" entry
@@ -1,8 +1,8 @@
#+TITLE: iimacs (people macros)
* Setup
#+begin_src shell
git clone --recursive https://gitlab.ii.coop/ii/tooling/iimacs.git ~/.emacs.d
emacs --batch -l ~/.emacs.d/dump-init.el -eval '(dump-emacs-portable (expand-file-name "~/.emacs.d/.cache/dumps/spacemacs.pdmp"))'
git clone --recursive https://github.com/iimacs/.emacs.d ~/.emacs.d
#emacs --batch -l ~/.emacs.d/dump-init.el -eval '(dump-emacs-portable (expand-file-name "~/.emacs.d/.cache/dumps/spacemacs.pdmp"))'
cp ~/.emacs.d/iimacs /usr/local/bin # or other path
#+end_src
* Usage
BIN +216 Bytes (110%) elpa/gnupg/pubring.kbx
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,55 @@
#+TITLE: emacs-reveal layer
# Document tags are separated with "|" char
# The example below contains 2 tags: "layer" and "web service"
# Avaliable tags are listed in <spacemacs_root>/.ci/spacedoc-cfg.edn
# under ":spacetools.spacedoc.config/valid-tags" section.
#+TAGS: layer|web service

# The maximum height of the logo should be 200 pixels.
[[img/emacs-reveal.png]]

# TOC links should be GitHub style anchors.
* Table of Contents :TOC_4_gh:noexport:
- [[#description][Description]]
- [[#features][Features:]]
- [[#install][Install]]
- [[#sample-usage][Sample Usage]]
- [[#oer-course-on-operating-systems][OER Course on Operating Systems]]
- [[#key-bindings][Key bindings]]

* Description
This layer adds support for something.
https://gitlab.com/oer/emacs-reveal/#emacs-reveal-for-daily-use
** Features:
- Autocomplete
- Lint
- Refactor
- ...

* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =emacs-reveal= to the existing =dotspacemacs-configuration-layers= list in this
file.
* Sample Usage
** OER Course on Operating Systems
#+name: Oer Co
#+begin_src shell

cd /tmp
git clone --recursive https://gitlab.com/oer/OS.git
#+end_src

#+begin_src shell
emacs --batch --load ~/.emacs.d/layers/emacs-reveal/local/emacs-reveal/install.el --funcall install
#+end_src
* Key bindings

| Key Binding | Description |
|-------------+----------------|
| ~SPC x x x~ | Does thing01 |

# Use GitHub URLs if you wish to link a Spacemacs documentation file or its heading.
# Examples:
# [[https://github.com/syl20bnr/spacemacs/blob/master/doc/VIMUSERS.org#sessions]]
# [[https://github.com/syl20bnr/spacemacs/blob/master/layers/%2Bfun/emoji/README.org][Link to Emoji layer README.org]]
# If space-doc-mode is enabled, Spacemacs will open a local copy of the linked file.
@@ -0,0 +1,77 @@
;;; packages.el --- emacs-reveal layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
;;
;; Author: Hippie Hacker <hh@nom>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

;;; Commentary:

;; See the Spacemacs documentation and FAQs for instructions on how to implement
;; a new layer:
;;
;; SPC h SPC layers RET
;;
;;
;; Briefly, each package to be installed or configured by this layer should be
;; added to `emacs-reveal-packages'. Then, for each package PACKAGE:
;;
;; - If PACKAGE is not referenced by any other Spacemacs layer, define a
;; function `emacs-reveal/init-PACKAGE' to load and initialize the package.

;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so
;; define the functions `emacs-reveal/pre-init-PACKAGE' and/or
;; `emacs-reveal/post-init-PACKAGE' to customize the package as it is loaded.

(defun emacs-reveal/init-emacs-reveal ()
(use-package emacs-reveal)
)
(defun emacs-reveal/init-org-re-reveal-ref ()
(use-package org-re-reveal-ref)
)
(defun emacs-reveal/init-oer-reveal ()
(use-package oer-reveal)
)

;;; Code:

(defconst emacs-reveal-packages
'(
(emacs-reveal
:location "~/.emacs.d/layers/emacs-reveal/local/emacs-reveal")
org-re-reveal-ref
oer-reveal
)
"The list of Lisp packages required by the emacs-reveal layer.
Each entry is either:
1. A symbol, which is interpreted as a package to be installed, or
2. A list of the form (PACKAGE KEYS...), where PACKAGE is the
name of the package to be installed or loaded, and KEYS are
any number of keyword-value-pairs.
The following keys are accepted:
- :excluded (t or nil): Prevent the package from being loaded
if value is non-nil
- :location: Specify a custom installation location.
The following values are legal:
- The symbol `elpa' (default) means PACKAGE will be
installed using the Emacs package manager.
- The symbol `local' directs Spacemacs to load the file at
`./local/PACKAGE/PACKAGE.el'
- A list beginning with the symbol `recipe' is a melpa
recipe. See: https://github.com/milkypostman/melpa#recipe-format")


;;; packages.el ends here
@@ -89,10 +89,10 @@
(setq current-tmate-ssh nil)
(setq current-tmate-sh nil)
)
(defun ssh-find-agent ()
(defun ssh-find-agent ()
(interactive)
(setenv "SSH_AUTH_SOCK" (shell-command-to-string "\
. ~/.ssh/ssh-find-agent.sh ;\
(setenv "SSH_AUTH_SOCK" (shell-command-to-string (concat "\
. " (configuration-layer/get-layer-local-dir 'ii) "ssh-find-agent.sh ;\
ssh-find-agent | grep ssh- | tail -1 \
| tail -1 | awk '{print $2}' | awk -F= '{print $2}' \
| tr --delete '\n'"))

0 comments on commit ef95ea3

Please sign in to comment.
You can’t perform that action at this time.