From 6d8a54a1b5140dec906379c0c943f68c36e93aee Mon Sep 17 00:00:00 2001 From: elf Date: Sat, 9 May 2020 02:59:33 +0900 Subject: [PATCH 1/3] [cdist #3] create __colourful_file type --- kjg/dot-cdist/manifest/init | 3 ++- kjg/dot-cdist/type/__colourful_file/manifest | 10 ++++++++++ kjg/dot-cdist/type/__colourful_file/parameter/optional | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 kjg/dot-cdist/type/__colourful_file/manifest create mode 100644 kjg/dot-cdist/type/__colourful_file/parameter/optional diff --git a/kjg/dot-cdist/manifest/init b/kjg/dot-cdist/manifest/init index 3f3a6db..99b61dc 100644 --- a/kjg/dot-cdist/manifest/init +++ b/kjg/dot-cdist/manifest/init @@ -1,6 +1,7 @@ case "$__target_host" in # Everybody has this localhost) - __my_computer + #__my_computer + __colourful_file ;; esac diff --git a/kjg/dot-cdist/type/__colourful_file/manifest b/kjg/dot-cdist/type/__colourful_file/manifest new file mode 100644 index 0000000..31d52a6 --- /dev/null +++ b/kjg/dot-cdist/type/__colourful_file/manifest @@ -0,0 +1,10 @@ +#!/bin/sh + +DOMAIN_NAME="$__object_id" + +COLOUR=$(cat "$__object/parameter/colour") + +__file ~/colourful \ + --mode 0644 --source - < Date: Sat, 9 May 2020 03:19:37 +0900 Subject: [PATCH 2/3] [cdist #3] update for multiple optional --- kjg/dot-cdist/manifest/init | 2 +- kjg/dot-cdist/type/__colourful_file/manifest | 9 +++++---- .../parameter/{optional => optional_multiple} | 0 3 files changed, 6 insertions(+), 5 deletions(-) rename kjg/dot-cdist/type/__colourful_file/parameter/{optional => optional_multiple} (100%) diff --git a/kjg/dot-cdist/manifest/init b/kjg/dot-cdist/manifest/init index 99b61dc..8424f7c 100644 --- a/kjg/dot-cdist/manifest/init +++ b/kjg/dot-cdist/manifest/init @@ -2,6 +2,6 @@ case "$__target_host" in # Everybody has this localhost) #__my_computer - __colourful_file + __colourful_file test --colour test1 --colour test2 ;; esac diff --git a/kjg/dot-cdist/type/__colourful_file/manifest b/kjg/dot-cdist/type/__colourful_file/manifest index 31d52a6..e7470fd 100644 --- a/kjg/dot-cdist/type/__colourful_file/manifest +++ b/kjg/dot-cdist/type/__colourful_file/manifest @@ -4,7 +4,8 @@ DOMAIN_NAME="$__object_id" COLOUR=$(cat "$__object/parameter/colour") -__file ~/colourful \ - --mode 0644 --source - <") (lambda () (interactive) (find-file (concat "~/ungleich-learning-circle/kjg/learning-"(system-name)"-"(format-time-string "%Y")".org")))) +(global-set-key (kbd "C-x g") 'magit-status) +(global-set-key (kbd "C-c a") 'org-agenda) +(global-set-key (kbd "") 'org-todo-list) + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(epg-gpg-program "/usr/local/bin/gpg") + '(org-agenda-files + (quote + ("~/ungleich-learning-circle/kjg/todo.org" "~/learning.org"))) + ;;'(org-directory (expand-file-name "~/ungleich-learning-circle/kjg/")) + '(package-selected-packages (quote (org org-gnome org-dp ## which-key magit))) + '(send-mail-function (quote sendmail-send-it))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) + +(require 'epa-file) + +(epa-file-enable) + +(setq mu4e-mu-binary "/usr/local/bin/mu") + +(add-to-list 'load-path "/usr/local/share/emacs/site-lisp/mu/mu4e") +(require 'mu4e) + +(setq + mue4e-headers-skip-duplicates t + mu4e-view-show-images t + mu4e-view-show-addresses t + mu4e-compose-format-flowed nil + mu4e-date-format "%y/%m/%d" + mu4e-headers-date-format "%Y/%m/%d" + mu4e-change-filenames-when-moving t + mu4e-attachments-dir "~/Downloads" + + mu4e-maildir "~/Maildir/ungleich" ;; top-level Maildir + ;; note that these folders below must start with / + ;; the paths are relative to maildir root + mu4e-refile-folder "/Archive" + mu4e-sent-folder "/Sent" + mu4e-drafts-folder "/Drafts" + mu4e-trash-folder "/Trash" + mu4e-reply-to-address "jinguk.kwon@ungleich.ch" + user-mail-address "jinguk.kwon@ungleich.ch" + user-full-name "kjg") + +;; this setting allows to re-sync and re-index mail +;; by pressing U +(setq mu4e-get-mail-command "mbsync -a") + +(setq mail-host-address "mail.ungleich.ch") + + +(setq send-mail-function 'smtpmail-send-it + message-send-mail-function 'smtpmail-send-it + user-mail-address "jinguk.kwon@ungleich.ch" + smtpmail-starttls-credentials '(("smtp.ungleich.ch" 587 nil nil)) + smtpmail-auth-credentials "~/.authinfo.gpg" + smtpmail-default-smtp-server "smtp.ungleich.ch" + smtpmail-smtp-server "smtp.ungleich.ch" + smtpmail-smtp-service 587 + smtpmail-smtp-user "jinguk.kwon@ungleich.ch" + smtpmail-debug-info t + smtpmail-debug-verb t) + ;;starttls-extra-arguments nil + ;;starttls-gnutls-program (executable-find "gnutls-cli") + ;;smtpmail-warn-about-unknown-extensions t + ;;starttls-use-gnutls t) + +(require 'smtpmail) + +;;store org-mode links to messages +(require 'org-mu4e) + +(define-key mu4e-headers-mode-map (kbd "C-c c") 'mu4e-org-store-and-capture) +(define-key mu4e-view-mode-map (kbd "C-c c") 'mu4e-org-store-and-capture) + +(setq org-directory (expand-file-name "~/ungleich-learning-circle/kjg/")) +;;store link to message if in header view, not to header query +(setq org-mu4e-link-query-in-headers-mode nil) + +(setq org-capture-templates + '(("t" "todo" entry (file+headline (lambda() (concat "~/ungleich-learning-circle/kjg/todo-"(system-name)"-"(format-time-string "%Y")".org")) "Tasks") + "* TODO [#A] %?\nSCHEDULED: %(org-insert-time-stamp (org-read-date nil t \"+0d\"))\n%a\n"))) + +(setq org-log-done 'time) diff --git a/kjg/dot-cdist/type/__my_dotfiles/manifest b/kjg/dot-cdist/type/__my_dotfiles/manifest new file mode 100644 index 0000000..f322198 --- /dev/null +++ b/kjg/dot-cdist/type/__my_dotfiles/manifest @@ -0,0 +1,8 @@ +#!/bin/sh + +cd "$__type/files/" +dotfiles=$(ls -a .[A-z]*) +for df in $dotfiles; do + __file ~/$df \ + --mode 0644 --source "$__type/files/$df" +done \ No newline at end of file diff --git a/kjg/dot-cdist/type/__my_dotfiles/singleton b/kjg/dot-cdist/type/__my_dotfiles/singleton new file mode 100644 index 0000000..e69de29