Added new type for practice, and laptop configurement

This commit is contained in:
llnu 2020-05-01 11:37:26 +02:00
parent 4885f7ca86
commit 64fd6db6f6
3 changed files with 110 additions and 0 deletions

View file

@ -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 "<f3>") (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)))

View file

@ -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"