From 3c01f2b71f17b0f905becf8611911865034e3cbe Mon Sep 17 00:00:00 2001 From: Francisco Hoecker Date: Mon, 28 Dec 2020 23:40:31 +0100 Subject: [PATCH] added org-gcal and org layers, snippets and templates --- private/README.md | 42 ++++++------ private/local/README.md | 12 ++-- private/org-gcal/README.org | 30 +++++++++ private/org-gcal/packages.el | 71 ++++++++++++++++++++ private/org-roam/packages.el | 122 +++++++++++++++++------------------ private/org/README.org | 30 +++++++++ private/org/packages.el | 66 +++++++++++++++++++ private/templates/README.md | 6 ++ 8 files changed, 291 insertions(+), 88 deletions(-) create mode 100644 private/org-gcal/README.org create mode 100644 private/org-gcal/packages.el create mode 100644 private/org/README.org create mode 100644 private/org/packages.el create mode 100644 private/templates/README.md diff --git a/private/README.md b/private/README.md index f6aaf99..da2b81e 100644 --- a/private/README.md +++ b/private/README.md @@ -1,21 +1,21 @@ -# Private directory - -The content of this directory is ignored by Git. This is the default place -where to store your private configuration layers. - -To create a new configuration layer: - - SPC SPC configuration-layer/create-layer RET - -Then enter the name of your configuration in the prompt. - -A directory named after the created configuration layer will be created here -along with template files within it (packages.el and extensions.el, more info -on the meaning of those files can be found in the [documentation][conf_layers]). - -Each created file has further guidance written in them. - -Once the configuration is done, restart Emacs to load, install and configure -your layer. - -[conf_layers]: https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#extensions-and-packages +# Private directory + +The content of this directory is ignored by Git. This is the default place +where to store your private configuration layers. + +To create a new configuration layer: + + SPC SPC configuration-layer/create-layer RET + +Then enter the name of your configuration in the prompt. + +A directory named after the created configuration layer will be created here +along with template files within it (packages.el and extensions.el, more info +on the meaning of those files can be found in the [documentation][conf_layers]). + +Each created file has further guidance written in them. + +Once the configuration is done, restart Emacs to load, install and configure +your layer. + +[conf_layers]: https://github.com/syl20bnr/spacemacs/blob/master/doc/DOCUMENTATION.org#extensions-and-packages diff --git a/private/local/README.md b/private/local/README.md index 0377f7b..ff74f0b 100644 --- a/private/local/README.md +++ b/private/local/README.md @@ -1,6 +1,6 @@ -# Private directory for local packages - -The content of this directory is ignored by Git. - -This is the place to store the local packages that you define in -the `dotspacemacs-additional-packages` variable of your dotfile. +# Private directory for local packages + +The content of this directory is ignored by Git. + +This is the place to store the local packages that you define in +the `dotspacemacs-additional-packages` variable of your dotfile. diff --git a/private/org-gcal/README.org b/private/org-gcal/README.org new file mode 100644 index 0000000..39a04a7 --- /dev/null +++ b/private/org-gcal/README.org @@ -0,0 +1,30 @@ +#+TITLE: org-gcal layer + +# The maximum height of the logo should be 200 pixels. +[[img/org-gcal.png]] + +# TOC links should be GitHub style anchors. +* Table of Contents :TOC_4_gh:noexport: +- [[#description][Description]] +- [[#install][Install]] +- [[#key-bindings][Key bindings]] + +* Description +This layer does wonderful things: + - thing01 + +* Install +To use this configuration layer, add it to your =~/.spacemacs=. You will need to +add =org-gcal= to the existing =dotspacemacs-configuration-layers= list in this +file. + +* 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. diff --git a/private/org-gcal/packages.el b/private/org-gcal/packages.el new file mode 100644 index 0000000..997aeb6 --- /dev/null +++ b/private/org-gcal/packages.el @@ -0,0 +1,71 @@ +;;; packages.el --- org-gcal layer packages file for Spacemacs. +;; +;; Copyright (c) 2012-2017 Sylvain Benner & Contributors +;; +;; Author: +;; 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 `org-gcal-packages'. Then, for each package PACKAGE: +;; +;; - If PACKAGE is not referenced by any other Spacemacs layer, define a +;; function `org-gcal/init-PACKAGE' to load and initialize the package. + +;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so +;; define the functions `org-gcal/pre-init-PACKAGE' and/or +;; `org-gcal/post-init-PACKAGE' to customize the package as it is loaded. + +;;; Code: + +(defconst org-gcal-packages + '(org-gcal) + "The list of Lisp packages required by the org-gcal 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") + + +(defun org-gcal/init-org-gcal () + (require 'org-gcal) + (setq org-gcal-client-id (getenv "ORG_GCAL_CLIENTID") + org-gcal-client-secret (getenv "ORG_GCAL_SECRET") + org-gcal-file-alist '( + ("wavier@gmail.com" . "~/schedule.org") + )) + ) + +;;; packages.el ends here diff --git a/private/org-roam/packages.el b/private/org-roam/packages.el index 0aee2fd..2f442a1 100644 --- a/private/org-roam/packages.el +++ b/private/org-roam/packages.el @@ -1,61 +1,61 @@ -;;; packages.el --- org-roam layer packages file for Spacemacs. -;; -;; Copyright (c) 2012-2017 Sylvain Benner & Contributors -;; -;; Author: root -;; 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 `org-roam-packages'. Then, for each package PACKAGE: -;; -;; - If PACKAGE is not referenced by any other Spacemacs layer, define a -;; function `org-roam/init-PACKAGE' to load and initialize the package. - -;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so -;; define the functions `org-roam/pre-init-PACKAGE' and/or -;; `org-roam/post-init-PACKAGE' to customize the package as it is loaded. - -;;; Code: - -(defconst org-roam-packages - '( - emacsql - emacsql-lite - org-roam - ) - -(defun org-roam/init-org-roam () - (use-package org-roam - :hook - (after-init . org-roam-mode) - :custom - (org-roam-directory "/mnt/host/perso/roam-notes/") - :init - (progn - (spacemacs/declare-prefix "ar" "org-roam") - (spacemacs/set-leader-keys - "arl" 'org-roam - "art" 'org-roam-today - "arf" 'org-roam-find-file - "arg" 'org-roam-show-graph) - - (spacemacs/declare-prefix-for-mode 'org-mode "mr" "org-roam") - (spacemacs/set-leader-keys-for-major-mode 'org-mode - "rl" 'org-roam - "rt" 'org-roam-today - "rb" 'org-roam-switch-to-buffer - "rf" 'org-roam-find-file - "ri" 'org-roam-insert - "rg" 'org-roam-show-graph)))) +;;; packages.el --- org-roam layer packages file for Spacemacs. +;; +;; Copyright (c) 2012-2017 Sylvain Benner & Contributors +;; +;; Author: root +;; 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 `org-roam-packages'. Then, for each package PACKAGE: +;; +;; - If PACKAGE is not referenced by any other Spacemacs layer, define a +;; function `org-roam/init-PACKAGE' to load and initialize the package. + +;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so +;; define the functions `org-roam/pre-init-PACKAGE' and/or +;; `org-roam/post-init-PACKAGE' to customize the package as it is loaded. + +;;; Code: + +(defconst org-roam-packages + '( + emacsql + emacsql-lite + org-roam + ) + +(defun org-roam/init-org-roam () + (use-package org-roam + :hook + (after-init . org-roam-mode) + :custom + (org-roam-directory "/mnt/host/perso/roam-notes/") + :init + (progn + (spacemacs/declare-prefix "ar" "org-roam") + (spacemacs/set-leader-keys + "arl" 'org-roam + "art" 'org-roam-today + "arf" 'org-roam-find-file + "arg" 'org-roam-show-graph) + + (spacemacs/declare-prefix-for-mode 'org-mode "mr" "org-roam") + (spacemacs/set-leader-keys-for-major-mode 'org-mode + "rl" 'org-roam + "rt" 'org-roam-today + "rb" 'org-roam-switch-to-buffer + "rf" 'org-roam-find-file + "ri" 'org-roam-insert + "rg" 'org-roam-show-graph)))) diff --git a/private/org/README.org b/private/org/README.org new file mode 100644 index 0000000..c1aa910 --- /dev/null +++ b/private/org/README.org @@ -0,0 +1,30 @@ +#+TITLE: org layer + +# The maximum height of the logo should be 200 pixels. +[[img/org.png]] + +# TOC links should be GitHub style anchors. +* Table of Contents :TOC_4_gh:noexport: +- [[#description][Description]] +- [[#install][Install]] +- [[#key-bindings][Key bindings]] + +* Description +This layer does wonderful things: + - thing01 + +* Install +To use this configuration layer, add it to your =~/.spacemacs=. You will need to +add =org= to the existing =dotspacemacs-configuration-layers= list in this +file. + +* 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. diff --git a/private/org/packages.el b/private/org/packages.el new file mode 100644 index 0000000..5d5d1fa --- /dev/null +++ b/private/org/packages.el @@ -0,0 +1,66 @@ +;;; packages.el --- org layer packages file for Spacemacs. +;; +;; Copyright (c) 2012-2017 Sylvain Benner & Contributors +;; +;; Author: +;; 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 `org-packages'. Then, for each package PACKAGE: +;; +;; - If PACKAGE is not referenced by any other Spacemacs layer, define a +;; function `org/init-PACKAGE' to load and initialize the package. + +;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so +;; define the functions `org/pre-init-PACKAGE' and/or +;; `org/post-init-PACKAGE' to customize the package as it is loaded. + +;;; Code: + +(defconst org-packages + '(org) + "The list of Lisp packages required by the org 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") +(defun org/init-org () + (setq-default dotspacemacs-configuration-layers '( + (org :variables + org-enable-jira-support t + jiralib-url "https://m2hycon.atlassian.net:443"))) + ) +;;; packages.el ends here diff --git a/private/templates/README.md b/private/templates/README.md new file mode 100644 index 0000000..8e27a15 --- /dev/null +++ b/private/templates/README.md @@ -0,0 +1,6 @@ +# Private directory for Yatemplate templates + +The content of this directory is ignored by Git. This is the default place +where to store your private templates. + +This path will be loaded automatically and used whenever Yatemplate loads.