From 64fd6db6f677cc73f2455dfef348203998f67426 Mon Sep 17 00:00:00 2001 From: llnu Date: Fri, 1 May 2020 11:37:26 +0200 Subject: [PATCH] Added new type for practice, and laptop configurement --- .../dot-cdist/type/__my_computer/files/.emacs | 100 ++++++++++++++++++ balazs/dot-cdist/type/__my_computer/manifest | 10 ++ balazs/dot-cdist/type/__my_computer/singleton | 0 3 files changed, 110 insertions(+) create mode 100644 balazs/dot-cdist/type/__my_computer/files/.emacs create mode 100755 balazs/dot-cdist/type/__my_computer/manifest create mode 100644 balazs/dot-cdist/type/__my_computer/singleton diff --git a/balazs/dot-cdist/type/__my_computer/files/.emacs b/balazs/dot-cdist/type/__my_computer/files/.emacs new file mode 100644 index 0000000..ec788dc --- /dev/null +++ b/balazs/dot-cdist/type/__my_computer/files/.emacs @@ -0,0 +1,100 @@ +(defun copy-all () + "Copy entire buffer to clipboard" + (interactive) + (clipboard-kill-ring-save (point-min) (point-max))) + + +;; Added by Package.el. This must come before configurations of +;; installed packages. Don't delete this line. If you don't want it, +;; just comment it out by adding a semicolon to the start of the line. +;; You may delete these explanatory comments. +(package-initialize) + +;; (setq x-select-enable-clipboard t) + +;; Disable toolbar +(if window-system + (tool-bar-mode -1) + ) + +(require 'org) +(define-key global-map "\C-cl" 'org-store-link) +(define-key global-map "\C-ca" 'org-agenda) +(setq org-log-done t) + +;; Disable the splash screen (to enable it agin, replace the t with 0) +(setq inhibit-splash-screen t) + +;; Disabling things +;;----------------------------------------------------------------------- +(menu-bar-mode -1) + + +;; Setting key shortcut to open org-mode +(global-set-key (kbd "") (lambda() (interactive)(find-file "/mnt/cephfs/org-mode/todo"))) + +;; Disable auto indentation. Annoying when copying anything into emacs buffer +(when (fboundp 'electric-indent-mode) (electric-indent-mode -1)) + + +;; Enabled repositories +(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") + ("melpa" . "https://melpa.org/packages/"))) +(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. + '(custom-safe-themes + (quote + ("ca8e0d49ebb38646fefb0c0756c411db2fd1f75bd0ad6f9b1ac173ca88d74724" default))) + '(package-selected-packages (quote (editorconfig magit)))) +(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. + ) + +(setq package-selected-packages + '(magit)) +;;(package-refresh-contents) +(package-install-selected-packages) + +;; Key shortcut for magit-status +(global-set-key (kbd "C-x g") 'magit-status) + + +;; Editorconfig plugin +(editorconfig-mode 1) + +;; Mail config : mu4e +(add-to-list 'load-path "/usr/share/emacs/site-lisp/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 "~/.mail/llnu" ;; 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") + +;; this setting allows to re-sync and re-index mail +;; by pressing U +(setq mu4e-get-mail-command "mbsync -a") + +;; +(setq shr-color-visible-luminance-min 70) + +(advice-add #'shr-colorize-region :around (defun shr-no-colourise-region (&rest ignore))) diff --git a/balazs/dot-cdist/type/__my_computer/manifest b/balazs/dot-cdist/type/__my_computer/manifest new file mode 100755 index 0000000..fa79416 --- /dev/null +++ b/balazs/dot-cdist/type/__my_computer/manifest @@ -0,0 +1,10 @@ +#!/bin/sh -e + +#This is a type for practice, used to learn cdist and configure a laptop. + + +for pkg in ndisc6 emacs zsh mosh nmap sipcalc; + do __package $pkg --state present; +done + +__require="__package/emacs" __dot_file .emacs --user user --source "$__type/files/.emacs" diff --git a/balazs/dot-cdist/type/__my_computer/singleton b/balazs/dot-cdist/type/__my_computer/singleton new file mode 100644 index 0000000..e69de29