From: Christian Heller Date: Sun, 11 Aug 2019 18:25:00 +0000 (+0200) Subject: Restructure source file tree. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/static/%7B%7Bprefix%7D%7D/edit?a=commitdiff_plain;h=72d0c7ff45225d7e122f752a95b24a126d5545ff;p=config Restructure source file tree. --- diff --git a/buster/apt-mark/eeepc b/buster/apt-mark/eeepc index a8cd150..73a755f 100644 --- a/buster/apt-mark/eeepc +++ b/buster/apt-mark/eeepc @@ -1,65 +1,3 @@ -# to avoid booting problems with encrypted LVM, see -cryptsetup-initramfs -lvm2 -# this provides setupcon which reads /etc/default/console-setup -console-setup -# without this, systemd-logind won't run, and so not detect lid close for hibernation -dbus # for wifi firmware-ralink -wicd-curses -# for X to start at all -xserver-xorg-video-intel -# X input: keyboard and touchpad -xserver-xorg-input-evdev -xserver-xorg-input-synaptics -# for startx -xinit -# for xrdb -x11-xserver-utils -# for startx to run for non-root user -libpam-systemd -# window environment -i3 -i3status -suckless-tools -xterm -# to get sleepy at night -redshift -# for alsamixer -alsa-utils -# for xterm and browser unicode display -ttf-unifont -# also useful -vim -sudo -less -man-db -manpages -procps -# firefox dependencies -libdbus-glib-1-2 -libgtk-3-0 -# firefox installation dependencies (remove later?) -curl -python3 -bzip2 -wget -jq -unzip -# to mount encrypted USB stick and use its contents -pmount -cryptsetup -openssh-client -# for syncing -borgbackup -# emacs -emacs25 -elpa-ledger -elpa-elfeed -# mail setup -isync -notmuch -elpa-notmuch -pinentry-gtk2 # diff --git a/buster/apt-mark/user b/buster/apt-mark/user new file mode 100644 index 0000000..3d5ee05 --- /dev/null +++ b/buster/apt-mark/user @@ -0,0 +1,65 @@ +# to avoid booting problems with encrypted LVM, see +cryptsetup-initramfs +lvm2 +# this provides setupcon which reads /etc/default/console-setup +console-setup +# without this, systemd-logind won't run, and so not detect lid close for hibernation +dbus +# for wifi +wicd-curses +wicd-gtk +# for X to start at all +xserver-xorg-video-intel +# X input: keyboard and touchpad +xserver-xorg-input-evdev +xserver-xorg-input-synaptics +# for startx +xinit +# for xrdb +x11-xserver-utils +# for startx to run for non-root user +libpam-systemd +# window environment +i3 +i3status +suckless-tools +xterm +# to get sleepy at night +redshift +# for alsamixer +alsa-utils +# for xterm and browser unicode display +ttf-unifont +# also useful +vim +sudo +less +man-db +manpages +procps +# firefox dependencies +libdbus-glib-1-2 +libgtk-3-0 +# firefox installation dependencies (remove later?) +curl +python3 +bzip2 +wget +jq +unzip +# to mount encrypted USB stick and use its contents +pmount +cryptsetup +openssh-client +# for syncing +borgbackup +# emacs +emacs25 +elpa-ledger +elpa-elfeed +# mail setup +isync +notmuch +elpa-notmuch +pinentry-gtk2 +# diff --git a/buster/apt-mark/x200s b/buster/apt-mark/x200s new file mode 100644 index 0000000..d06ad3f --- /dev/null +++ b/buster/apt-mark/x200s @@ -0,0 +1,3 @@ +# for wifi +firmware-iwlwifi +# diff --git a/buster/etc_files/eeepc/etc/default/console-setup b/buster/etc_files/eeepc/etc/default/console-setup deleted file mode 100644 index 090d241..0000000 --- a/buster/etc_files/eeepc/etc/default/console-setup +++ /dev/null @@ -1,4 +0,0 @@ -CHARMAP="UTF-8" -CODESET="Lat15" -FONTFACE="Terminus" -FONTSIZE="6x12" diff --git a/buster/etc_files/eeepc/etc/systemd/logind.conf b/buster/etc_files/eeepc/etc/systemd/logind.conf deleted file mode 100644 index 6a61f0b..0000000 --- a/buster/etc_files/eeepc/etc/systemd/logind.conf +++ /dev/null @@ -1,8 +0,0 @@ -# This file is part of systemd. -# -# See logind.conf(5) for details. - -[Login] -# Note that with the standard Buster kernel this won't work due to -# . -HandleLidSwitch=hibernate diff --git a/buster/etc_files/eeepc/opt/firefox/blank.html b/buster/etc_files/eeepc/opt/firefox/blank.html deleted file mode 100644 index 79e707e..0000000 --- a/buster/etc_files/eeepc/opt/firefox/blank.html +++ /dev/null @@ -1 +0,0 @@ -not quite blank diff --git a/buster/etc_files/eeepc/opt/firefox/defaults/pref/autoconfig.js b/buster/etc_files/eeepc/opt/firefox/defaults/pref/autoconfig.js deleted file mode 100644 index cf8ea80..0000000 --- a/buster/etc_files/eeepc/opt/firefox/defaults/pref/autoconfig.js +++ /dev/null @@ -1,4 +0,0 @@ -// We set up AutoConfig according to , see firefox.cfg comments on why we need it -pref("general.config.filename", "firefox.cfg"); -pref("general.config.obscure_value", 0); - diff --git a/buster/etc_files/eeepc/opt/firefox/firefox.cfg b/buster/etc_files/eeepc/opt/firefox/firefox.cfg deleted file mode 100644 index cf6b0a2..0000000 --- a/buster/etc_files/eeepc/opt/firefox/firefox.cfg +++ /dev/null @@ -1,12 +0,0 @@ -// do not put any code into this first line, as it gets ignored by Firefox - -// we zero extensions.autoDisableScopes so our pre-installed extensions activate by default -pref("extensions.autoDisableScopes", 0); - -// we turn off annoying setup popups and pages; these settings are the result more of trial and error than thorough understanding by me, so more research might be warranted to discipline them -pref("startup.homepage_welcome_url", "file:///opt/firefox/blank.html"); -pref("browser.startup.homepage", "file:///opt/firefox/blank.html"); -pref("browser.startup.blankWindow", true); -pref("datareporting.policy.firstRunURL", ""); -pref("browser.shell.checkDefaultBrowser", false); -pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true); diff --git a/buster/etc_files/user/etc/default/console-setup b/buster/etc_files/user/etc/default/console-setup new file mode 100644 index 0000000..090d241 --- /dev/null +++ b/buster/etc_files/user/etc/default/console-setup @@ -0,0 +1,4 @@ +CHARMAP="UTF-8" +CODESET="Lat15" +FONTFACE="Terminus" +FONTSIZE="6x12" diff --git a/buster/etc_files/user/etc/systemd/logind.conf b/buster/etc_files/user/etc/systemd/logind.conf new file mode 100644 index 0000000..6a61f0b --- /dev/null +++ b/buster/etc_files/user/etc/systemd/logind.conf @@ -0,0 +1,8 @@ +# This file is part of systemd. +# +# See logind.conf(5) for details. + +[Login] +# Note that with the standard Buster kernel this won't work due to +# . +HandleLidSwitch=hibernate diff --git a/buster/etc_files/user/opt/firefox/blank.html b/buster/etc_files/user/opt/firefox/blank.html new file mode 100644 index 0000000..79e707e --- /dev/null +++ b/buster/etc_files/user/opt/firefox/blank.html @@ -0,0 +1 @@ +not quite blank diff --git a/buster/etc_files/user/opt/firefox/defaults/pref/autoconfig.js b/buster/etc_files/user/opt/firefox/defaults/pref/autoconfig.js new file mode 100644 index 0000000..cf8ea80 --- /dev/null +++ b/buster/etc_files/user/opt/firefox/defaults/pref/autoconfig.js @@ -0,0 +1,4 @@ +// We set up AutoConfig according to , see firefox.cfg comments on why we need it +pref("general.config.filename", "firefox.cfg"); +pref("general.config.obscure_value", 0); + diff --git a/buster/etc_files/user/opt/firefox/firefox.cfg b/buster/etc_files/user/opt/firefox/firefox.cfg new file mode 100644 index 0000000..cf6b0a2 --- /dev/null +++ b/buster/etc_files/user/opt/firefox/firefox.cfg @@ -0,0 +1,12 @@ +// do not put any code into this first line, as it gets ignored by Firefox + +// we zero extensions.autoDisableScopes so our pre-installed extensions activate by default +pref("extensions.autoDisableScopes", 0); + +// we turn off annoying setup popups and pages; these settings are the result more of trial and error than thorough understanding by me, so more research might be warranted to discipline them +pref("startup.homepage_welcome_url", "file:///opt/firefox/blank.html"); +pref("browser.startup.homepage", "file:///opt/firefox/blank.html"); +pref("browser.startup.blankWindow", true); +pref("datareporting.policy.firstRunURL", ""); +pref("browser.shell.checkDefaultBrowser", false); +pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true); diff --git a/buster/home_files/eeepc/.config/i3status/config b/buster/home_files/eeepc/.config/i3status/config new file mode 100644 index 0000000..0acc8c9 --- /dev/null +++ b/buster/home_files/eeepc/.config/i3status/config @@ -0,0 +1,75 @@ +# plomlompom's i3 status bar configuration + +# Activate colors; set update interval of one second. +general { + colors = true + interval = 1 +} + +# Selection / order of status elements. +order += "disk /" +order += "wireless wlp2s0" +order += "ethernet enp1s0" +order += "battery 0" +order += "cpu_usage" +order += "load" +order += "cpu_temperature 0" +order += "time" +order += "volume master" + +# How much space is left in / ? +disk "/" { + format = "/: %avail available of %total" + separator_block_width = 25 +} + +# WLAN status: show IP and connection quality or "down". +wireless wlp2s0 { + format_up = "w: (%quality at %essid) %ip" + format_down = "w: down" + separator_block_width = 10 +} + +# Ethernet status: show IP or "down". +ethernet enp1s0 { + format_up = "e: %ip" + format_down = "e: down" + separator_block_width = 25 +} + +# Battery status: show FULL/CHARGING/BATTERY, storage, time left. +battery 0 { + format = "b: %status %percentage %remaining" + separator_block_width = 25 +} + +# Show CPU usage. +cpu_usage { + format = "cpu: %usage" + separator_block_width = 10 +} + +# Show system load during last 1/5/15 minutes. +load { + format = "%1min %5min %15min" + separator_block_width = 25 +} + +# Show CPU temperature in degrees of celsius. +cpu_temperature 0 { + format = "%degrees °C" + separator_block_width = 25 +} + +# Show date/time/timezone as "year-month-day hour:minute:second +# timezone_numeric/timezone_alphabetic". +time { + format = "%Y-%m-%d %H:%M:%S %z/%Z" + separator_block_width = 25 +} + +volume master { + format = "♪: %volume" + format_muted = "♪: muted (%volume)" + separator_block_width = 25 +} diff --git a/buster/home_files/user/.Xresources b/buster/home_files/user/.Xresources new file mode 100644 index 0000000..45b10af --- /dev/null +++ b/buster/home_files/user/.Xresources @@ -0,0 +1,56 @@ +! otherwise various applications will assume merely 8 colors +XTerm.termName: xterm-256color + +! font +! actually, "mono" is already the default for faceName (it will +! pick whatever fc-match mono delivers), but we need to set _some_ +! faceName to trigger XTerm activating TrueType fonts +! (XTerm*fontRender by itself won't do the trick), and we want +! TrueType fonts because, well, they scale better, and XTerm lets them +! fall back on alternatives (hi there ttf-unifont) when a Unicode +! glyph is not found +XTerm*faceName: mono + +! white on black +XTerm*reverseVideo: on + +! blink screen instead of sound +XTerm*visualBell: on + +! proper ALT as META key treatment +XTerm*eightBitInput: false + +! font sizes +XTerm*faceSize: 8 +XTerm*faceSize1: 4 +XTerm*faceSize2: 5 +XTerm*faceSize3: 6 +XTerm*faceSize4: 8 +XTerm*faceSize5: 14 +XTerm*faceSize6: 25 + +! colors +! black +XTerm*color0: #202020 +XTerm*color8: #3F3F3F +! red +XTerm*color1: #A82020 +XTerm*color9: #E82020 +! green +XTerm*color2: #20A820 +XTerm*color10: #20E820 +! yellow +XTerm*color3: #A8A820 +XTerm*color11: #E8E820 +! blue +XTerm*color4: #3F3FFF +XTerm*color12: #9F9FFF +! magenta +XTerm*color5: #A83FFF +XTerm*color13: #E89FFF +! cyan +XTerm*color6: #3FA8FF +XTerm*color14: #9FE8FF +! white +XTerm*color7: #A8A8A8 +XTerm*color15: #E8E8E8 diff --git a/buster/home_files/user/.borgrepos b/buster/home_files/user/.borgrepos new file mode 100644 index 0000000..423e430 --- /dev/null +++ b/buster/home_files/user/.borgrepos @@ -0,0 +1,4 @@ +plom@plomlompom.com +plom@core.plomlompom.com +plom@play.plomlompom.com +# file read ends at last newline diff --git a/buster/home_files/user/.config/i3/config b/buster/home_files/user/.config/i3/config new file mode 100644 index 0000000..19c654e --- /dev/null +++ b/buster/home_files/user/.config/i3/config @@ -0,0 +1,83 @@ +# plomlompom's i3-wm configuration + +# Font for i3 text +font pango:Terminus 8px + +# Force "tabbed" as default layout for new windows. +workspace_layout tabbed + +# Make the Windows key the modifier key for all i3-wm actions. +set $mod Mod4 +floating_modifier $mod + +# Launch xterm. +bindsym $mod+Return exec xterm + +# Launch programs via dmenu. +bindsym $mod+d exec dmenu_run +bindsym $mod+x exec dmenu_run + +# Kill window. +bindsym $mod+Shift+Q kill + +# Move focus between windows. +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# Don't move focus with mouse. +focus_follows_mouse no + +# Move windows. +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# Resize windows +bindsym $mod+h resize shrink width 1 px or 1 ppt +bindsym $mod+l resize grow width 1 px or 1 ppt +bindsym $mod+j resize shrink height +bindsym $mod+k resize grow height + +# Toggle fullscreen for focused window. +bindsym $mod+f fullscreen + +# Toggle floating of window, focus on floating or tabbed windows. +bindsym $mod+Shift+space floating toggle +bindsym $mod+space focus mode_toggle + +# Switch to workspace x. +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# Move window to workspace x. +bindsym $mod+Shift+exclam move workspace 1 +bindsym $mod+Shift+quotedbl move workspace 2 +bindsym $mod+Shift+section move workspace 3 +bindsym $mod+Shift+dollar move workspace 4 +bindsym $mod+Shift+percent move workspace 5 +bindsym $mod+Shift+ampersand move workspace 6 +bindsym $mod+Shift+slash move workspace 7 +bindsym $mod+Shift+parenleft move workspace 8 +bindsym $mod+Shift+parenright move workspace 9 +bindsym $mod+Shift+equal move workspace 10 + +# Reload i3 config file, restart (keeping sesion) i3, exit i3. +bindsym $mod+Shift+C reload +bindsym $mod+Shift+R restart +bindsym $mod+Shift+P exit + +# Select "i3status" as i3 status bar. +bar { + status_command i3status +} diff --git a/buster/home_files/user/.emacs.d/init.el b/buster/home_files/user/.emacs.d/init.el new file mode 100644 index 0000000..31a4dcb --- /dev/null +++ b/buster/home_files/user/.emacs.d/init.el @@ -0,0 +1,289 @@ +;; general layout +;; ============== + +;; need no stinkin emacs help screen as start up, and no menu bar +(setq inhibit-startup-screen t) +(menu-bar-mode -1) + +;; highlight cursor line, parentheses +(global-hl-line-mode 1) +(show-paren-mode 1) + +;; show line numbers, use separator space +(global-linum-mode) +(setq linum-format "%d ") + +;; count cursor column, row in mode line +(setq column-number-mode t) + +;; settings to make GUI tolerable +(if window-system + (progn + (add-to-list 'default-frame-alist '(foreground-color . "white")) + (add-to-list 'default-frame-alist '(background-color . "black")) + (set-face-attribute 'default nil :height 80) + (scroll-bar-mode -1) + (setq visible-bell t) + (setq linum-format "%d"))) + +;; use as default browser what XDG offers +(setq-default browse-url-browser-function 'browse-url-xdg-open) + +;; general keybindings +;; =================== + +;; create and use a minimal global map using just the self-insert command +;; bindings and a selection of some to me very common keystrokes +(setq minimal-map (make-sparse-keymap)) +(substitute-key-definition 'self-insert-command 'self-insert-command + minimal-map global-map) +(use-global-map minimal-map) +(global-set-key (kbd "DEL") 'backward-delete-char-untabify) +(global-set-key (kbd "RET") 'newline) +(global-set-key (kbd "TAB") 'indent-for-tab-command) +(global-set-key (kbd "") 'previous-line) +(global-set-key (kbd "") 'next-line) +(global-set-key (kbd "") 'left-char) +(global-set-key (kbd "") 'right-char) +(global-set-key (kbd "") 'scroll-down-command) +(global-set-key (kbd "") 'scroll-up-command) +(global-set-key (kbd "M-x") 'execute-extended-command) +(global-set-key (kbd "C-g") 'keyboard-quit) +;(global-set-key (kbd "") 'kmacro-start-macro-or-insert-counter) +;(global-set-key (kbd "") 'kmacro-end-or-call-macro) +;; note how to switch back to the original map: (use-global-map global-map) +(setq shr-map (make-sparse-keymap)) ; got annoying in elfeed-show on URLs + + +;; minibuffer +;; ========== + +;; incremental minibuffer completion +(icomplete-mode 1) + + + +;; text editing +;; ============ + +;; tabs are evil +(setq-default indent-tabs-mode nil) +(setq-default tab-width 4) +(setq indent-line-function 'insert-tab) + +;; show trailing whitespace +(setq-default show-trailing-whitespace 1) + +;; on save, ask whether to ensure text file's last line ends in a +;; newline character +(setq require-final-newline 1) + +;; use dedicated directory for version-controlled, endless backups; +;; never delete old versions +(setq make-backup-files t + backup-directory-alist `(("." . "~/.emacs_backups")) + backup-by-copying t + version-control t + delete-old-versions 1) ;; neither t nor nil: never delete + + + +;; package management +;; ================== + +;; where we get packages from +(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") + ("melpa-unstable" . "https://melpa.org/packages/") + ("melpa-stable" . "https://stable.melpa.org/packages/"))) + +;; ensure certain packages are installed (actually, we use Debian repos here) +;; credit to +;(setq package-list '(elfeed ledger-mode)) +;(package-initialize) +;(dolist (package package-list) +; (unless (package-installed-p package) +; (package-install package))) + + + +;;; window management +;;; ================= +; +;;; track window configurations to allow window config undo +;(winner-mode 1) + + + +;; mail setup +;; ========== + +(setq send-mail-function 'smtpmail-send-it) +(setq smtpmail-smtp-server "core.plomlompom.com") +(setq smtpmail-smtp-service 465) +(setq smtpmail-stream-type 'ssl) +(setq smtpmail-smtp-user "plom") +(setq mml-secure-openpgp-encrypt-to-self t) +(add-hook 'message-setup-hook 'mml-secure-sign-pgpmime) + +;; constructs From: domain if mail composer directly called (from without +;; notmuch), but we don't actually intend to do that +;(setq mail-host-address "plomlompom.com") + +;; otherwise notmuch becomes extremely slow in some cases +(setq-default notmuch-show-indent-content nil) + +;; this only works if we use notmuch-mua-send instead of message-send +(setq notmuch-fcc-dirs '(("plom@plomlompom.com" . "maildir/Sent"))) + +;; this gets rid of "i-did-not-set--mail-host-address--so-tickle-me" +;; in the message ID +(setq mail-host-address "plomlompom.com") + +;; org mode +;; ======== + +;; unsure why, but to re-set the key map, we not only have to explicitely do it +;; only after org-mode loading, but also have to explicitely overwrite the +;; C-c keybinding; TODO: investigate +(with-eval-after-load 'org + (setq org-mode-map (make-sparse-keymap)) + (define-key org-mode-map (kbd "C-c") nil) + (define-key org-mode-map (kbd "TAB") 'org-cycle) + (define-key org-mode-map (kbd "") 'org-shifttab)) + +;; basic org-capture config +(setq org-capture-templates + '(("x" "test" plain (file "~/org/notes.org") "%T: %?"))) +(add-hook 'org-capture-mode-hook 'evil-insert-state) + +;; agenda view on startup +(load-library "find-lisp") +(setq org-agenda-files (find-lisp-find-files "~/org" "\.org$")) +(setq org-agenda-span 90) +(setq org-agenda-use-time-grid nil) +(add-hook 'emacs-startup-hook (lambda () + (org-agenda-list) + (switch-to-buffer "*Org Agenda*") + (other-window 1))) + +;;; for calendar, use ISO date style +;(setq calendar-date-style 'iso) +;(setq diary-number-of-entries 7) +;(diary) +;(setq org-agenda-time-grid '((today require-timed remove-match) +; #("----------------" 0 16 (org-heading t)) +; (0 200 400 600 800 1000 1200 +; 1400 1600 1800 2000 2200))) + +;; empty org-agenda-mode keybindings +(add-hook 'org-agenda-mode-hook + (lambda () + (setq org-agenda-mode-map (make-sparse-keymap)))) +(add-hook 'org-agenda-mode-hook + (lambda () + (use-local-map (make-sparse-keymap)))) + +;; org-publish-all +(setq org-publish-project-alist + '( + ("website" + :base-directory "~/org/web/" + :base-extension "org" + :publishing-directory "~/html/" + :recursive t + :publishing-function org-html-publish-to-html + :headline-levels 4 ; Just the default for this project. + :auto-preamble t + ))) + +;; use [ki:] syntax to hide stuff from exports +(defun classify-information (text backend info) + "Replaces '[ki:WHATEVER]' with '[klassifizierte Information]'." + (replace-regexp-in-string "\\[ki:[^\]]*\]" "[klassifizierte Information]" text)) +(add-hook 'org-export-filter-plain-text-functions 'classify-information) + +;; add HTML validator link to exports +(setq org-html-validation-link "Validate") + + + +;;; plomvi mode +;;; =========== +(load "~/public_repos/plomvi.el/plomvi.el") +(global-set-key (kbd "C-c") 'plomvi-activate) +(plomvi-global-mode 1) + + + +;;; Info mode +;;; ========= + +(setq Info-mode-map (make-sparse-keymap)) +(define-key Info-mode-map (kbd "RET") 'Info-follow-nearest-node) +(define-key Info-mode-map (kbd "u") 'Info-up) +(define-key Info-mode-map (kbd "TAB") 'Info-next-reference) +(define-key Info-mode-map (kbd "") 'Info-prev-reference) +(define-key Info-mode-map (kbd "H") 'Info-history-back) +(define-key Info-mode-map (kbd "L") 'Info-history-forward) +(define-key Info-mode-map (kbd "I") 'Info-goto-node) +(define-key Info-mode-map (kbd "i") 'Info-index) + +;; help mode +;; ========= + +(setq help-mode-map (make-sparse-keymap)) +(define-key help-mode-map (kbd "TAB") 'forward-button) +(define-key help-mode-map (kbd "RET") 'help-follow) +(define-key help-mode-map (kbd "") 'backward-button) + +;; elfeed +;; ====== + +(require 'elfeed) ; needed so we can set the font faces +(set-face-background 'elfeed-search-title-face "magenta") +(set-face-background 'elfeed-search-unread-count-face "magenta") +(setq elfeed-feeds + '("https://capsurvival.blogspot.com/feeds/posts/default" + "https://jungle.world/rss.xml" + "http://news.dieweltistgarnichtso.net/bin/index.xml" + "https://taz.de/!s=&ExportStatus=Intern&SuchRahmen=Online;rss/" + "http://www.tagesschau.de/xml/atom")) +(setq elfeed-search-mode-map (make-sparse-keymap)) +(define-key elfeed-search-mode-map (kbd "RET") 'elfeed-search-show-entry) +(defun elfeed-search-mark-as-read() (interactive) + (elfeed-search-untag-all 'unread)) +(define-key elfeed-search-mode-map (kbd "r") 'elfeed-search-mark-as-read) +(define-key elfeed-search-mode-map (kbd "R") 'elfeed-search-tag-all-unread) +(define-key elfeed-search-mode-map (kbd "f") 'elfeed-search-live-filter) +(define-key elfeed-search-mode-map (kbd "u") 'elfeed-update) +(setq elfeed-show-mode-map (make-sparse-keymap)) +(define-key elfeed-show-mode-map (kbd "u") 'elfeed) +(define-key elfeed-show-mode-map (kbd "TAB") 'shr-next-link) +(define-key elfeed-show-mode-map (kbd "") 'shr-previous-link) +(define-key elfeed-show-mode-map (kbd "a") 'elfeed-show-prev) +(define-key elfeed-show-mode-map (kbd "d") 'elfeed-show-next) +(define-key elfeed-show-mode-map (kbd "y") 'shr-copy-url) +(define-key elfeed-show-mode-map (kbd "RET") 'shr-browse-url) + +;; eww +;; === + +(setq eww-mode-map (make-sparse-keymap)) +(define-key eww-mode-map (kbd "TAB") 'shr-next-link) +(define-key eww-mode-map (kbd "") 'shr-previous-link) +(define-key eww-mode-map (kbd "H") 'eww-back-url) +(define-key eww-mode-map (kbd "L") 'eww-forward-url) + +;; ledger +;; ====== +(setq ledger-mode-map (make-sparse-keymap)) +(define-key ledger-mode-map (kbd "TAB") 'ledger-magic-tab) + + +;; unset other maps so they don't disturb C-c keybinding +;; ===================================================== +;; TODO: saner solution would be a default-activated minor mode that binds +;; C-c +(setq conf-mode-map (make-sparse-keymap)) +(setq sh-mode-map (make-sparse-keymap)) +(setq python-mode-map (make-sparse-keymap)) diff --git a/buster/home_files/user/.mbsyncrc b/buster/home_files/user/.mbsyncrc new file mode 100644 index 0000000..41c9dd4 --- /dev/null +++ b/buster/home_files/user/.mbsyncrc @@ -0,0 +1,28 @@ +IMAPAccount plom +# Address to connect to +Host core.plomlompom.com +User plom +# For some reason, mbsync doesn't accept a PassCmd output beyond 79 chars, +# therefore the pw in ~/.authinfo should not be longer than that. +PassCmd "cat ~/.authinfo | cut -d' ' -f8-" +SSLType IMAPS +AuthMechs LOGIN + +IMAPStore core-remote +Account plom + +MaildirStore core-local +# The trailing "/" is important +Path ~/mail/maildir/ +Inbox ~/mail/inbox/ + +Channel core +Master :core-remote: +Slave :core-local: +Patterns * +# Automatically create missing mailboxes, both locally and on the server +Create Both +# Save the synchronization state files in the relevant directory +SyncState * +# If a mail is marked T ("Trashed") or deleted, remove it for real everywhere +Expunge Both diff --git a/buster/home_files/user/.notmuch-config b/buster/home_files/user/.notmuch-config new file mode 100644 index 0000000..9532761 --- /dev/null +++ b/buster/home_files/user/.notmuch-config @@ -0,0 +1,9 @@ +[database] +path=/home/plom/mail +[search] +exclude_tags=deleted;spam; +# the fields below set the From: if the mail composer is called from +# within notmuch +[user] +name=Christian Heller +primary_email=plom@plomlompom.com diff --git a/buster/home_files/user/.shell_prompt_color b/buster/home_files/user/.shell_prompt_color new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/buster/home_files/user/.shell_prompt_color @@ -0,0 +1 @@ +2 diff --git a/buster/home_files/user/.tridactylrc b/buster/home_files/user/.tridactylrc new file mode 100644 index 0000000..c46948a --- /dev/null +++ b/buster/home_files/user/.tridactylrc @@ -0,0 +1,2 @@ +guiset statuspanel top-left +set newtab file:///opt/firefox/blank.html diff --git a/buster/home_files/user/.xinitrc b/buster/home_files/user/.xinitrc new file mode 100644 index 0000000..250fd77 --- /dev/null +++ b/buster/home_files/user/.xinitrc @@ -0,0 +1,13 @@ +# X init configuration + +# Set keymap. +setxkbmap de + +# Load xterm settings +xrdb -merge ~/.Xresources + +# Redshift to Berlin, Germany. +redshift -rl 53:13 & + +# Launch window manager. +i3 diff --git a/buster/home_files/user/mail_sync.sh b/buster/home_files/user/mail_sync.sh new file mode 100755 index 0000000..0837390 --- /dev/null +++ b/buster/home_files/user/mail_sync.sh @@ -0,0 +1,31 @@ +#!/bin/sh +set -e + +# Ensure all "dir:*"-tagged mails are in proper directories, +# remove all "dir:*" tags. +basedir="/home/plom/mail/maildir/" +for tag in $(notmuch search --output=tags '*'); do + if [ ! $(echo "${tag}" | cut -c-4) = "dir:" ]; then + continue + fi + target_dir="${basedir}"$(echo "${tag}" | cut -c5-)"/cur/" + for f in $(notmuch search --output=files tag:"${tag}"); do + new_name=$(basename "${f}" | sed -e 's/,U=[0-9]*//') + target_path="${target_dir}${new_name}" + if [ ! "${target_path}" = "${f}" ]; then + echo "Moving ${f} to ${target_path}." + mv "${f}" "${target_path}" + fi + done + notmuch tag -"${tag}" tag:"${tag}" +done + +# Remove all "deleted"-tagged files from maildirs. +notmuch search --output=files tag:deleted | while read f; do + echo "Deleting ${f}" + rm "${f}" +done + +# Sync changes back to server and update notmuch index. +mbsync -a +notmuch new diff --git a/buster/home_files/user/public_repos/repos b/buster/home_files/user/public_repos/repos new file mode 100644 index 0000000..27eb028 --- /dev/null +++ b/buster/home_files/user/public_repos/repos @@ -0,0 +1,7 @@ +# List of repos we want cloned in ~/public_repos +config +pingmail.git +plomlombot-irc.git +plomrogue +plomrogue2-experiments +plomvi.el diff --git a/buster/home_files/user_eeepc/.Xresources b/buster/home_files/user_eeepc/.Xresources deleted file mode 100644 index 45b10af..0000000 --- a/buster/home_files/user_eeepc/.Xresources +++ /dev/null @@ -1,56 +0,0 @@ -! otherwise various applications will assume merely 8 colors -XTerm.termName: xterm-256color - -! font -! actually, "mono" is already the default for faceName (it will -! pick whatever fc-match mono delivers), but we need to set _some_ -! faceName to trigger XTerm activating TrueType fonts -! (XTerm*fontRender by itself won't do the trick), and we want -! TrueType fonts because, well, they scale better, and XTerm lets them -! fall back on alternatives (hi there ttf-unifont) when a Unicode -! glyph is not found -XTerm*faceName: mono - -! white on black -XTerm*reverseVideo: on - -! blink screen instead of sound -XTerm*visualBell: on - -! proper ALT as META key treatment -XTerm*eightBitInput: false - -! font sizes -XTerm*faceSize: 8 -XTerm*faceSize1: 4 -XTerm*faceSize2: 5 -XTerm*faceSize3: 6 -XTerm*faceSize4: 8 -XTerm*faceSize5: 14 -XTerm*faceSize6: 25 - -! colors -! black -XTerm*color0: #202020 -XTerm*color8: #3F3F3F -! red -XTerm*color1: #A82020 -XTerm*color9: #E82020 -! green -XTerm*color2: #20A820 -XTerm*color10: #20E820 -! yellow -XTerm*color3: #A8A820 -XTerm*color11: #E8E820 -! blue -XTerm*color4: #3F3FFF -XTerm*color12: #9F9FFF -! magenta -XTerm*color5: #A83FFF -XTerm*color13: #E89FFF -! cyan -XTerm*color6: #3FA8FF -XTerm*color14: #9FE8FF -! white -XTerm*color7: #A8A8A8 -XTerm*color15: #E8E8E8 diff --git a/buster/home_files/user_eeepc/.borgrepos b/buster/home_files/user_eeepc/.borgrepos deleted file mode 100644 index 423e430..0000000 --- a/buster/home_files/user_eeepc/.borgrepos +++ /dev/null @@ -1,4 +0,0 @@ -plom@plomlompom.com -plom@core.plomlompom.com -plom@play.plomlompom.com -# file read ends at last newline diff --git a/buster/home_files/user_eeepc/.config/i3/config b/buster/home_files/user_eeepc/.config/i3/config deleted file mode 100644 index 19c654e..0000000 --- a/buster/home_files/user_eeepc/.config/i3/config +++ /dev/null @@ -1,83 +0,0 @@ -# plomlompom's i3-wm configuration - -# Font for i3 text -font pango:Terminus 8px - -# Force "tabbed" as default layout for new windows. -workspace_layout tabbed - -# Make the Windows key the modifier key for all i3-wm actions. -set $mod Mod4 -floating_modifier $mod - -# Launch xterm. -bindsym $mod+Return exec xterm - -# Launch programs via dmenu. -bindsym $mod+d exec dmenu_run -bindsym $mod+x exec dmenu_run - -# Kill window. -bindsym $mod+Shift+Q kill - -# Move focus between windows. -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# Don't move focus with mouse. -focus_follows_mouse no - -# Move windows. -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right - -# Resize windows -bindsym $mod+h resize shrink width 1 px or 1 ppt -bindsym $mod+l resize grow width 1 px or 1 ppt -bindsym $mod+j resize shrink height -bindsym $mod+k resize grow height - -# Toggle fullscreen for focused window. -bindsym $mod+f fullscreen - -# Toggle floating of window, focus on floating or tabbed windows. -bindsym $mod+Shift+space floating toggle -bindsym $mod+space focus mode_toggle - -# Switch to workspace x. -bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace 2 -bindsym $mod+3 workspace 3 -bindsym $mod+4 workspace 4 -bindsym $mod+5 workspace 5 -bindsym $mod+6 workspace 6 -bindsym $mod+7 workspace 7 -bindsym $mod+8 workspace 8 -bindsym $mod+9 workspace 9 -bindsym $mod+0 workspace 10 - -# Move window to workspace x. -bindsym $mod+Shift+exclam move workspace 1 -bindsym $mod+Shift+quotedbl move workspace 2 -bindsym $mod+Shift+section move workspace 3 -bindsym $mod+Shift+dollar move workspace 4 -bindsym $mod+Shift+percent move workspace 5 -bindsym $mod+Shift+ampersand move workspace 6 -bindsym $mod+Shift+slash move workspace 7 -bindsym $mod+Shift+parenleft move workspace 8 -bindsym $mod+Shift+parenright move workspace 9 -bindsym $mod+Shift+equal move workspace 10 - -# Reload i3 config file, restart (keeping sesion) i3, exit i3. -bindsym $mod+Shift+C reload -bindsym $mod+Shift+R restart -bindsym $mod+Shift+P exit - -# Select "i3status" as i3 status bar. -bar { - status_command i3status -} diff --git a/buster/home_files/user_eeepc/.config/i3status/config b/buster/home_files/user_eeepc/.config/i3status/config deleted file mode 100644 index 0acc8c9..0000000 --- a/buster/home_files/user_eeepc/.config/i3status/config +++ /dev/null @@ -1,75 +0,0 @@ -# plomlompom's i3 status bar configuration - -# Activate colors; set update interval of one second. -general { - colors = true - interval = 1 -} - -# Selection / order of status elements. -order += "disk /" -order += "wireless wlp2s0" -order += "ethernet enp1s0" -order += "battery 0" -order += "cpu_usage" -order += "load" -order += "cpu_temperature 0" -order += "time" -order += "volume master" - -# How much space is left in / ? -disk "/" { - format = "/: %avail available of %total" - separator_block_width = 25 -} - -# WLAN status: show IP and connection quality or "down". -wireless wlp2s0 { - format_up = "w: (%quality at %essid) %ip" - format_down = "w: down" - separator_block_width = 10 -} - -# Ethernet status: show IP or "down". -ethernet enp1s0 { - format_up = "e: %ip" - format_down = "e: down" - separator_block_width = 25 -} - -# Battery status: show FULL/CHARGING/BATTERY, storage, time left. -battery 0 { - format = "b: %status %percentage %remaining" - separator_block_width = 25 -} - -# Show CPU usage. -cpu_usage { - format = "cpu: %usage" - separator_block_width = 10 -} - -# Show system load during last 1/5/15 minutes. -load { - format = "%1min %5min %15min" - separator_block_width = 25 -} - -# Show CPU temperature in degrees of celsius. -cpu_temperature 0 { - format = "%degrees °C" - separator_block_width = 25 -} - -# Show date/time/timezone as "year-month-day hour:minute:second -# timezone_numeric/timezone_alphabetic". -time { - format = "%Y-%m-%d %H:%M:%S %z/%Z" - separator_block_width = 25 -} - -volume master { - format = "♪: %volume" - format_muted = "♪: muted (%volume)" - separator_block_width = 25 -} diff --git a/buster/home_files/user_eeepc/.emacs.d/init.el b/buster/home_files/user_eeepc/.emacs.d/init.el deleted file mode 100644 index 31a4dcb..0000000 --- a/buster/home_files/user_eeepc/.emacs.d/init.el +++ /dev/null @@ -1,289 +0,0 @@ -;; general layout -;; ============== - -;; need no stinkin emacs help screen as start up, and no menu bar -(setq inhibit-startup-screen t) -(menu-bar-mode -1) - -;; highlight cursor line, parentheses -(global-hl-line-mode 1) -(show-paren-mode 1) - -;; show line numbers, use separator space -(global-linum-mode) -(setq linum-format "%d ") - -;; count cursor column, row in mode line -(setq column-number-mode t) - -;; settings to make GUI tolerable -(if window-system - (progn - (add-to-list 'default-frame-alist '(foreground-color . "white")) - (add-to-list 'default-frame-alist '(background-color . "black")) - (set-face-attribute 'default nil :height 80) - (scroll-bar-mode -1) - (setq visible-bell t) - (setq linum-format "%d"))) - -;; use as default browser what XDG offers -(setq-default browse-url-browser-function 'browse-url-xdg-open) - -;; general keybindings -;; =================== - -;; create and use a minimal global map using just the self-insert command -;; bindings and a selection of some to me very common keystrokes -(setq minimal-map (make-sparse-keymap)) -(substitute-key-definition 'self-insert-command 'self-insert-command - minimal-map global-map) -(use-global-map minimal-map) -(global-set-key (kbd "DEL") 'backward-delete-char-untabify) -(global-set-key (kbd "RET") 'newline) -(global-set-key (kbd "TAB") 'indent-for-tab-command) -(global-set-key (kbd "") 'previous-line) -(global-set-key (kbd "") 'next-line) -(global-set-key (kbd "") 'left-char) -(global-set-key (kbd "") 'right-char) -(global-set-key (kbd "") 'scroll-down-command) -(global-set-key (kbd "") 'scroll-up-command) -(global-set-key (kbd "M-x") 'execute-extended-command) -(global-set-key (kbd "C-g") 'keyboard-quit) -;(global-set-key (kbd "") 'kmacro-start-macro-or-insert-counter) -;(global-set-key (kbd "") 'kmacro-end-or-call-macro) -;; note how to switch back to the original map: (use-global-map global-map) -(setq shr-map (make-sparse-keymap)) ; got annoying in elfeed-show on URLs - - -;; minibuffer -;; ========== - -;; incremental minibuffer completion -(icomplete-mode 1) - - - -;; text editing -;; ============ - -;; tabs are evil -(setq-default indent-tabs-mode nil) -(setq-default tab-width 4) -(setq indent-line-function 'insert-tab) - -;; show trailing whitespace -(setq-default show-trailing-whitespace 1) - -;; on save, ask whether to ensure text file's last line ends in a -;; newline character -(setq require-final-newline 1) - -;; use dedicated directory for version-controlled, endless backups; -;; never delete old versions -(setq make-backup-files t - backup-directory-alist `(("." . "~/.emacs_backups")) - backup-by-copying t - version-control t - delete-old-versions 1) ;; neither t nor nil: never delete - - - -;; package management -;; ================== - -;; where we get packages from -(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") - ("melpa-unstable" . "https://melpa.org/packages/") - ("melpa-stable" . "https://stable.melpa.org/packages/"))) - -;; ensure certain packages are installed (actually, we use Debian repos here) -;; credit to -;(setq package-list '(elfeed ledger-mode)) -;(package-initialize) -;(dolist (package package-list) -; (unless (package-installed-p package) -; (package-install package))) - - - -;;; window management -;;; ================= -; -;;; track window configurations to allow window config undo -;(winner-mode 1) - - - -;; mail setup -;; ========== - -(setq send-mail-function 'smtpmail-send-it) -(setq smtpmail-smtp-server "core.plomlompom.com") -(setq smtpmail-smtp-service 465) -(setq smtpmail-stream-type 'ssl) -(setq smtpmail-smtp-user "plom") -(setq mml-secure-openpgp-encrypt-to-self t) -(add-hook 'message-setup-hook 'mml-secure-sign-pgpmime) - -;; constructs From: domain if mail composer directly called (from without -;; notmuch), but we don't actually intend to do that -;(setq mail-host-address "plomlompom.com") - -;; otherwise notmuch becomes extremely slow in some cases -(setq-default notmuch-show-indent-content nil) - -;; this only works if we use notmuch-mua-send instead of message-send -(setq notmuch-fcc-dirs '(("plom@plomlompom.com" . "maildir/Sent"))) - -;; this gets rid of "i-did-not-set--mail-host-address--so-tickle-me" -;; in the message ID -(setq mail-host-address "plomlompom.com") - -;; org mode -;; ======== - -;; unsure why, but to re-set the key map, we not only have to explicitely do it -;; only after org-mode loading, but also have to explicitely overwrite the -;; C-c keybinding; TODO: investigate -(with-eval-after-load 'org - (setq org-mode-map (make-sparse-keymap)) - (define-key org-mode-map (kbd "C-c") nil) - (define-key org-mode-map (kbd "TAB") 'org-cycle) - (define-key org-mode-map (kbd "") 'org-shifttab)) - -;; basic org-capture config -(setq org-capture-templates - '(("x" "test" plain (file "~/org/notes.org") "%T: %?"))) -(add-hook 'org-capture-mode-hook 'evil-insert-state) - -;; agenda view on startup -(load-library "find-lisp") -(setq org-agenda-files (find-lisp-find-files "~/org" "\.org$")) -(setq org-agenda-span 90) -(setq org-agenda-use-time-grid nil) -(add-hook 'emacs-startup-hook (lambda () - (org-agenda-list) - (switch-to-buffer "*Org Agenda*") - (other-window 1))) - -;;; for calendar, use ISO date style -;(setq calendar-date-style 'iso) -;(setq diary-number-of-entries 7) -;(diary) -;(setq org-agenda-time-grid '((today require-timed remove-match) -; #("----------------" 0 16 (org-heading t)) -; (0 200 400 600 800 1000 1200 -; 1400 1600 1800 2000 2200))) - -;; empty org-agenda-mode keybindings -(add-hook 'org-agenda-mode-hook - (lambda () - (setq org-agenda-mode-map (make-sparse-keymap)))) -(add-hook 'org-agenda-mode-hook - (lambda () - (use-local-map (make-sparse-keymap)))) - -;; org-publish-all -(setq org-publish-project-alist - '( - ("website" - :base-directory "~/org/web/" - :base-extension "org" - :publishing-directory "~/html/" - :recursive t - :publishing-function org-html-publish-to-html - :headline-levels 4 ; Just the default for this project. - :auto-preamble t - ))) - -;; use [ki:] syntax to hide stuff from exports -(defun classify-information (text backend info) - "Replaces '[ki:WHATEVER]' with '[klassifizierte Information]'." - (replace-regexp-in-string "\\[ki:[^\]]*\]" "[klassifizierte Information]" text)) -(add-hook 'org-export-filter-plain-text-functions 'classify-information) - -;; add HTML validator link to exports -(setq org-html-validation-link "Validate") - - - -;;; plomvi mode -;;; =========== -(load "~/public_repos/plomvi.el/plomvi.el") -(global-set-key (kbd "C-c") 'plomvi-activate) -(plomvi-global-mode 1) - - - -;;; Info mode -;;; ========= - -(setq Info-mode-map (make-sparse-keymap)) -(define-key Info-mode-map (kbd "RET") 'Info-follow-nearest-node) -(define-key Info-mode-map (kbd "u") 'Info-up) -(define-key Info-mode-map (kbd "TAB") 'Info-next-reference) -(define-key Info-mode-map (kbd "") 'Info-prev-reference) -(define-key Info-mode-map (kbd "H") 'Info-history-back) -(define-key Info-mode-map (kbd "L") 'Info-history-forward) -(define-key Info-mode-map (kbd "I") 'Info-goto-node) -(define-key Info-mode-map (kbd "i") 'Info-index) - -;; help mode -;; ========= - -(setq help-mode-map (make-sparse-keymap)) -(define-key help-mode-map (kbd "TAB") 'forward-button) -(define-key help-mode-map (kbd "RET") 'help-follow) -(define-key help-mode-map (kbd "") 'backward-button) - -;; elfeed -;; ====== - -(require 'elfeed) ; needed so we can set the font faces -(set-face-background 'elfeed-search-title-face "magenta") -(set-face-background 'elfeed-search-unread-count-face "magenta") -(setq elfeed-feeds - '("https://capsurvival.blogspot.com/feeds/posts/default" - "https://jungle.world/rss.xml" - "http://news.dieweltistgarnichtso.net/bin/index.xml" - "https://taz.de/!s=&ExportStatus=Intern&SuchRahmen=Online;rss/" - "http://www.tagesschau.de/xml/atom")) -(setq elfeed-search-mode-map (make-sparse-keymap)) -(define-key elfeed-search-mode-map (kbd "RET") 'elfeed-search-show-entry) -(defun elfeed-search-mark-as-read() (interactive) - (elfeed-search-untag-all 'unread)) -(define-key elfeed-search-mode-map (kbd "r") 'elfeed-search-mark-as-read) -(define-key elfeed-search-mode-map (kbd "R") 'elfeed-search-tag-all-unread) -(define-key elfeed-search-mode-map (kbd "f") 'elfeed-search-live-filter) -(define-key elfeed-search-mode-map (kbd "u") 'elfeed-update) -(setq elfeed-show-mode-map (make-sparse-keymap)) -(define-key elfeed-show-mode-map (kbd "u") 'elfeed) -(define-key elfeed-show-mode-map (kbd "TAB") 'shr-next-link) -(define-key elfeed-show-mode-map (kbd "") 'shr-previous-link) -(define-key elfeed-show-mode-map (kbd "a") 'elfeed-show-prev) -(define-key elfeed-show-mode-map (kbd "d") 'elfeed-show-next) -(define-key elfeed-show-mode-map (kbd "y") 'shr-copy-url) -(define-key elfeed-show-mode-map (kbd "RET") 'shr-browse-url) - -;; eww -;; === - -(setq eww-mode-map (make-sparse-keymap)) -(define-key eww-mode-map (kbd "TAB") 'shr-next-link) -(define-key eww-mode-map (kbd "") 'shr-previous-link) -(define-key eww-mode-map (kbd "H") 'eww-back-url) -(define-key eww-mode-map (kbd "L") 'eww-forward-url) - -;; ledger -;; ====== -(setq ledger-mode-map (make-sparse-keymap)) -(define-key ledger-mode-map (kbd "TAB") 'ledger-magic-tab) - - -;; unset other maps so they don't disturb C-c keybinding -;; ===================================================== -;; TODO: saner solution would be a default-activated minor mode that binds -;; C-c -(setq conf-mode-map (make-sparse-keymap)) -(setq sh-mode-map (make-sparse-keymap)) -(setq python-mode-map (make-sparse-keymap)) diff --git a/buster/home_files/user_eeepc/.mbsyncrc b/buster/home_files/user_eeepc/.mbsyncrc deleted file mode 100644 index 41c9dd4..0000000 --- a/buster/home_files/user_eeepc/.mbsyncrc +++ /dev/null @@ -1,28 +0,0 @@ -IMAPAccount plom -# Address to connect to -Host core.plomlompom.com -User plom -# For some reason, mbsync doesn't accept a PassCmd output beyond 79 chars, -# therefore the pw in ~/.authinfo should not be longer than that. -PassCmd "cat ~/.authinfo | cut -d' ' -f8-" -SSLType IMAPS -AuthMechs LOGIN - -IMAPStore core-remote -Account plom - -MaildirStore core-local -# The trailing "/" is important -Path ~/mail/maildir/ -Inbox ~/mail/inbox/ - -Channel core -Master :core-remote: -Slave :core-local: -Patterns * -# Automatically create missing mailboxes, both locally and on the server -Create Both -# Save the synchronization state files in the relevant directory -SyncState * -# If a mail is marked T ("Trashed") or deleted, remove it for real everywhere -Expunge Both diff --git a/buster/home_files/user_eeepc/.notmuch-config b/buster/home_files/user_eeepc/.notmuch-config deleted file mode 100644 index 9532761..0000000 --- a/buster/home_files/user_eeepc/.notmuch-config +++ /dev/null @@ -1,9 +0,0 @@ -[database] -path=/home/plom/mail -[search] -exclude_tags=deleted;spam; -# the fields below set the From: if the mail composer is called from -# within notmuch -[user] -name=Christian Heller -primary_email=plom@plomlompom.com diff --git a/buster/home_files/user_eeepc/.shell_prompt_color b/buster/home_files/user_eeepc/.shell_prompt_color deleted file mode 100644 index 0cfbf08..0000000 --- a/buster/home_files/user_eeepc/.shell_prompt_color +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/buster/home_files/user_eeepc/.tridactylrc b/buster/home_files/user_eeepc/.tridactylrc deleted file mode 100644 index 7c9e184..0000000 --- a/buster/home_files/user_eeepc/.tridactylrc +++ /dev/null @@ -1 +0,0 @@ -set newtab file:///opt/firefox/blank.html diff --git a/buster/home_files/user_eeepc/.xinitrc b/buster/home_files/user_eeepc/.xinitrc deleted file mode 100644 index 250fd77..0000000 --- a/buster/home_files/user_eeepc/.xinitrc +++ /dev/null @@ -1,13 +0,0 @@ -# X init configuration - -# Set keymap. -setxkbmap de - -# Load xterm settings -xrdb -merge ~/.Xresources - -# Redshift to Berlin, Germany. -redshift -rl 53:13 & - -# Launch window manager. -i3 diff --git a/buster/home_files/user_eeepc/mail_sync.sh b/buster/home_files/user_eeepc/mail_sync.sh deleted file mode 100755 index 0837390..0000000 --- a/buster/home_files/user_eeepc/mail_sync.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -set -e - -# Ensure all "dir:*"-tagged mails are in proper directories, -# remove all "dir:*" tags. -basedir="/home/plom/mail/maildir/" -for tag in $(notmuch search --output=tags '*'); do - if [ ! $(echo "${tag}" | cut -c-4) = "dir:" ]; then - continue - fi - target_dir="${basedir}"$(echo "${tag}" | cut -c5-)"/cur/" - for f in $(notmuch search --output=files tag:"${tag}"); do - new_name=$(basename "${f}" | sed -e 's/,U=[0-9]*//') - target_path="${target_dir}${new_name}" - if [ ! "${target_path}" = "${f}" ]; then - echo "Moving ${f} to ${target_path}." - mv "${f}" "${target_path}" - fi - done - notmuch tag -"${tag}" tag:"${tag}" -done - -# Remove all "deleted"-tagged files from maildirs. -notmuch search --output=files tag:deleted | while read f; do - echo "Deleting ${f}" - rm "${f}" -done - -# Sync changes back to server and update notmuch index. -mbsync -a -notmuch new diff --git a/buster/home_files/user_eeepc/public_repos/repos b/buster/home_files/user_eeepc/public_repos/repos deleted file mode 100644 index 27eb028..0000000 --- a/buster/home_files/user_eeepc/public_repos/repos +++ /dev/null @@ -1,7 +0,0 @@ -# List of repos we want cloned in ~/public_repos -config -pingmail.git -plomlombot-irc.git -plomrogue -plomrogue2-experiments -plomvi.el diff --git a/buster/home_files/x200s/.config/i3status/config b/buster/home_files/x200s/.config/i3status/config new file mode 100644 index 0000000..0acc8c9 --- /dev/null +++ b/buster/home_files/x200s/.config/i3status/config @@ -0,0 +1,75 @@ +# plomlompom's i3 status bar configuration + +# Activate colors; set update interval of one second. +general { + colors = true + interval = 1 +} + +# Selection / order of status elements. +order += "disk /" +order += "wireless wlp2s0" +order += "ethernet enp1s0" +order += "battery 0" +order += "cpu_usage" +order += "load" +order += "cpu_temperature 0" +order += "time" +order += "volume master" + +# How much space is left in / ? +disk "/" { + format = "/: %avail available of %total" + separator_block_width = 25 +} + +# WLAN status: show IP and connection quality or "down". +wireless wlp2s0 { + format_up = "w: (%quality at %essid) %ip" + format_down = "w: down" + separator_block_width = 10 +} + +# Ethernet status: show IP or "down". +ethernet enp1s0 { + format_up = "e: %ip" + format_down = "e: down" + separator_block_width = 25 +} + +# Battery status: show FULL/CHARGING/BATTERY, storage, time left. +battery 0 { + format = "b: %status %percentage %remaining" + separator_block_width = 25 +} + +# Show CPU usage. +cpu_usage { + format = "cpu: %usage" + separator_block_width = 10 +} + +# Show system load during last 1/5/15 minutes. +load { + format = "%1min %5min %15min" + separator_block_width = 25 +} + +# Show CPU temperature in degrees of celsius. +cpu_temperature 0 { + format = "%degrees °C" + separator_block_width = 25 +} + +# Show date/time/timezone as "year-month-day hour:minute:second +# timezone_numeric/timezone_alphabetic". +time { + format = "%Y-%m-%d %H:%M:%S %z/%Z" + separator_block_width = 25 +} + +volume master { + format = "♪: %volume" + format_muted = "♪: muted (%volume)" + separator_block_width = 25 +} diff --git a/buster/setup_scripts/setup_desktop.sh b/buster/setup_scripts/setup_desktop.sh new file mode 100755 index 0000000..b76fa56 --- /dev/null +++ b/buster/setup_scripts/setup_desktop.sh @@ -0,0 +1,84 @@ +#!/bin/sh +set -e + +if [ "$#" -ne 1 ]; then + echo 'Need exactly one argument (system name).' + false +fi +if [ ! "$1" = "eeepc" ] && [ ! "$1" = "x200s" ]; then + echo "Need legal system name." + false +fi +system_name="$1" + +# Set up system without user environment. +config_tree_prefix="${HOME}/config/buster" +setup_scripts_dir="${config_tree_prefix}/setup_scripts" +cd "${setup_scripts_dir}" +./setup.sh "${system_name}" "" +./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" user "${system_name}" +./install_for_target.sh user "${system_name}" + +# Install Firefox directly from Mozilla. +firefox_release="68.0esr" +firefox_filename="firefox-${firefox_release}.tar.bz2" +url_firefox="https://ftp.mozilla.org/pub/firefox/releases/${firefox_release}/linux-x86_64/en-US/${firefox_filename}" +wget "${url_firefox}" +mv "${firefox_filename}" /opt/ +cd /opt/ +tar xf "${firefox_filename}" +rm "${firefox_filename}" +ln -s /opt/firefox/firefox /usr/local/bin/ +update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox/firefox 200 +update-alternatives --set x-www-browser /opt/firefox/firefox + +# Install Firefox plugins. +# See +extensions_dir="/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/" +mkdir -p "${extensions_dir}" +umatrix_xpi="uMatrix.firefox.signed.xpi" +url_umatrix="https://github.com/gorhill/uMatrix/releases/download/1.3.17rc4/${umatrix_xpi}" +wget "${url_umatrix}" +name=$(unzip -p "${umatrix_xpi}" manifest.json | jq -r .applications.gecko.id) +mv "${umatrix_xpi}" "${name}".xpi +#noscript_xpi="noscript-11.0.2.xpi" +#url_noscript="https://secure.informaction.com/download/releases/${noscript_xpi}" +#wget "${url_noscript}" +#name=$(unzip -p "${noscript_xpi}" manifest.json | jq -r .applications.gecko.id) +#mv "${noscript_xpi}" "${name}.xpi" +tridactyl_xpi="tridactyl-latest.xpi" +url_tridactyl="https://tridactyl.cmcaine.co.uk/betas/${tridactyl_xpi}" +wget "${url_tridactyl}" +name=$(unzip -p "${tridactyl_xpi}" manifest.json | jq -r .applications.gecko.id) +mv "${tridactyl_xpi}" "${name}.xpi" +mv *.xpi "${extensions_dir}" + +# Set up user environments. +secrets_dev="sdb" +source_dir_secrets="/media/${secrets_dev}/to_usb" +target_dir_secrets="/home/plom/tmp_secrets" +cd "${setup_scripts_dir}" +./copy_dirtree.sh "${config_tree_prefix}/home_files" "/root" minimal root +HOME_DIR_EXISTS=$([ ! -d "/home/plom" ]; echo $?) +adduser --disabled-password --gecos "" plom +usermod -a -G sudo plom +passwd plom +if [ "${HOME_DIR_EXISTS}" -eq 0 ]; then + echo "Put secrets drive into slot for /dev/${secrets_dev}." + while [ ! -e /dev/"${secrets_dev}" ]; do + sleep 1 + done + stty -echo + printf "Secrets passphrase: " + read secrets_pass + stty echo + echo "" # newline so user knows their input return was accepted + echo "${secrets_pass}" | pmount /dev/"${secrets_dev}" + cp -a "${source_dir_secrets}" "${target_dir_secrets}" + chown -R plom:plom "${target_dir_secrets}" + pumount "${secrets_dev}" + echo "You can remove /dev/${secrets_dev} now." + cp setup_home.sh /home/plom + chown plom:plom /home/plom/setup_home_eeepc.sh + SECRETS_PASS="${secrets_pass}" su -c "cd && ./setup_home.sh ${system_name}" plom +fi diff --git a/buster/setup_scripts/setup_eeepc.sh b/buster/setup_scripts/setup_eeepc.sh deleted file mode 100755 index 997650a..0000000 --- a/buster/setup_scripts/setup_eeepc.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -set -e - -if [ "$#" -ne 1 ]; then - echo 'Need exactly one argument (hostname).' - false -fi -hostname="$1" - -# Set up system without user environment. -config_tree_prefix="${HOME}/config/buster" -setup_scripts_dir="${config_tree_prefix}/setup_scripts" -cd "${setup_scripts_dir}" -./setup.sh "${hostname}" "" -./copy_dirtree.sh "${config_tree_prefix}/etc_files" "" eeepc -./install_for_target.sh eeepc - -# Install Firefox directly from Mozilla. -firefox_release="68.0esr" -firefox_filename="firefox-${firefox_release}.tar.bz2" -url_firefox="https://ftp.mozilla.org/pub/firefox/releases/${firefox_release}/linux-x86_64/en-US/${firefox_filename}" -wget "${url_firefox}" -mv "${firefox_filename}" /opt/ -cd /opt/ -tar xf "${firefox_filename}" -rm "${firefox_filename}" -ln -s /opt/firefox/firefox /usr/local/bin/ -update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox/firefox 200 -update-alternatives --set x-www-browser /opt/firefox/firefox - -# Install Firefox plugins. -# See -extensions_dir="/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/" -mkdir -p "${extensions_dir}" -umatrix_xpi="uMatrix.firefox.signed.xpi" -url_umatrix="https://github.com/gorhill/uMatrix/releases/download/1.3.17rc4/${umatrix_xpi}" -wget "${url_umatrix}" -name=$(unzip -p "${umatrix_xpi}" manifest.json | jq -r .applications.gecko.id) -mv "${umatrix_xpi}" "${name}".xpi -#noscript_xpi="noscript-11.0.2.xpi" -#url_noscript="https://secure.informaction.com/download/releases/${noscript_xpi}" -#wget "${url_noscript}" -#name=$(unzip -p "${noscript_xpi}" manifest.json | jq -r .applications.gecko.id) -#mv "${noscript_xpi}" "${name}.xpi" -tridactyl_xpi="tridactyl-latest.xpi" -url_tridactyl="https://tridactyl.cmcaine.co.uk/betas/${tridactyl_xpi}" -wget "${url_tridactyl}" -name=$(unzip -p "${tridactyl_xpi}" manifest.json | jq -r .applications.gecko.id) -mv "${tridactyl_xpi}" "${name}.xpi" -mv *.xpi "${extensions_dir}" - -# Set up user environments. -secrets_dev="sdb" -source_dir_secrets="/media/${secrets_dev}/to_usb" -target_dir_secrets="/home/plom/tmp_secrets" -cd "${setup_scripts_dir}" -./copy_dirtree.sh "${config_tree_prefix}/home_files" "/root" minimal root -HOME_DIR_EXISTS=$([ ! -d "/home/plom" ]; echo $?) -adduser --disabled-password --gecos "" plom -usermod -a -G sudo plom -passwd plom -if [ "${HOME_DIR_EXISTS}" -eq 0 ]; then - echo "Put secrets drive into slot for /dev/${secrets_dev}." - while [ ! -e /dev/"${secrets_dev}" ]; do - sleep 1 - done - stty -echo - printf "Secrets passphrase: " - read secrets_pass - stty echo - echo "" # newline so user knows their input return was accepted - echo "${secrets_pass}" | pmount /dev/"${secrets_dev}" - cp -a "${source_dir_secrets}" "${target_dir_secrets}" - chown -R plom:plom "${target_dir_secrets}" - pumount "${secrets_dev}" - echo "You can remove /dev/${secrets_dev} now." - cp setup_home_eeepc.sh /home/plom - chown plom:plom /home/plom/setup_home_eeepc.sh - SECRETS_PASS="${secrets_pass}" su -c "cd && ./setup_home_eeepc.sh" plom -fi diff --git a/buster/setup_scripts/setup_home.sh b/buster/setup_scripts/setup_home.sh new file mode 100755 index 0000000..4a9303d --- /dev/null +++ b/buster/setup_scripts/setup_home.sh @@ -0,0 +1,95 @@ +#!/bin/sh +set -e + +if [ "$#" -ne 1 ]; then + echo 'Need exactly one argument (system name).' + false +fi +if [ ! "$1" = "eeepc" ] && [ ! "$1" = "x200s" ]; then + echo "Need legal system name." + false +fi +system_name="$1" + +public_repos_dir="${HOME}/public_repos" +config_tree_prefix="${public_repos_dir}/config" +path_borgscript="${config_tree_prefix}/all_new_2018/borg.sh" +config_tree_buster="${config_tree_prefix}/buster" +setup_scripts_dir="${config_tree_buster}/setup_scripts" +repos_list_file="${public_repos_dir}/repos" +dir_secrets="${HOME}/tmp_secrets" +borgkeys_dir=~/.config/borg/keys +borgrepos_file=~/.borgrepos +ssh_dir=~/.ssh +authinfo_file=.authinfo +maildir=~/mail/maildir + +ensure_repo() { + repo_name="${1}" + if [ ! -d "${public_repos_dir}/${repo_name}" ]; then + cd "${public_repos_dir}" + git clone https://plomlompom.com/repos/clone/${repo_name} + fi +} + +# Clone config to copy dotfiles etc. from it. +cd +mkdir -p "${public_repos_dir}" +ensure_repo config +cd "${setup_scripts_dir}" +./copy_dirtree.sh "${config_tree_buster}/home_files" "${HOME}" minimal user "${system_name}" + +# Set up native messenger for tridactyl. +curl -fsSl https://raw.githubusercontent.com/tridactyl/tridactyl/78e662efefd1f4af2bdb2a53edecf03b535b997b/native/install.sh | bash + +# Set up non-public parts of infrastructure. +cd "${dir_secrets}" +mkdir -p "${ssh_dir}" +echo "Setting up .ssh" +cp id_rsa ~/.ssh +stty -echo +ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub +stty echo +script -c 'gpg --import secret_keys.asc' /dev/null +tar xf borg_keyfiles.tar +mkdir -p "${borgkeys_dir}" +mv borg_keyfiles/* "${borgkeys_dir}" +# .authinfo may not be present on every secrets drive yet +if [ -f "${authinfo_file}" ]; then + cp "${authinfo_file}" ~ +fi +cd +rm -rf "${dir_secrets}" + +# Sync org dir via borgbackup. For this we need the borgbackup servers +# in our .ssh/known_hosts file. +cat "${borgrepos_file}" | while read line; do + first_char=$(echo "${line}" | cut -c1) + if [ "${first_char}" = "#" ]; then + continue + fi + server=$(echo "${line}" | sed 's/.*@//') + ssh-keyscan "${server}" >> "${ssh_dir}"/known_hosts +done +BORG_PASSPHRASE="${SECRETS_PASS}" "${path_borgscript}" orgpull + +# Fill ~/public_repos. +cat "${repos_list_file}" | while read line; do + first_char=$(echo "${line}" | cut -c1) + if [ "${first_char}" = "#" ]; then + continue + fi + ensure_repo "${line}" +done + +# Set up e-mail system. Note that we only do mbsync if the imap pass file +# is found. It may not be present on every secrets drive yet, so we have to +# deal with the possibility of it being absent at this point. +mkdir -p "${maildir}" # expected by mbsync/isync +if [ -f "${HOME}/${authinfo_file}" ]; then + mbsync -a + notmuch new +fi + +# Final note on how to integrate tridactyl. +echo "TODO: As tridactyl user, don't forget to do :source on the first Firefox run and then re-start." diff --git a/buster/setup_scripts/setup_home_eeepc.sh b/buster/setup_scripts/setup_home_eeepc.sh deleted file mode 100755 index 6e58ef4..0000000 --- a/buster/setup_scripts/setup_home_eeepc.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/sh -set -e - -public_repos_dir="${HOME}/public_repos" -config_tree_prefix="${public_repos_dir}/config" -path_borgscript="${config_tree_prefix}/all_new_2018/borg.sh" -config_tree_buster="${config_tree_prefix}/buster" -setup_scripts_dir="${config_tree_buster}/setup_scripts" -repos_list_file="${public_repos_dir}/repos" -dir_secrets="${HOME}/tmp_secrets" -borgkeys_dir=~/.config/borg/keys -borgrepos_file=~/.borgrepos -ssh_dir=~/.ssh -authinfo_file=.authinfo -maildir=~/mail/maildir - -ensure_repo() { - repo_name="${1}" - if [ ! -d "${public_repos_dir}/${repo_name}" ]; then - cd "${public_repos_dir}" - git clone https://plomlompom.com/repos/clone/${repo_name} - fi -} - -# Clone config to copy dotfiles etc. from it. -cd -mkdir -p "${public_repos_dir}" -ensure_repo config -cd "${setup_scripts_dir}" -./copy_dirtree.sh "${config_tree_buster}/home_files" "${HOME}" minimal user_eeepc - -# Set up native messenger for tridactyl. -curl -fsSl https://raw.githubusercontent.com/tridactyl/tridactyl/78e662efefd1f4af2bdb2a53edecf03b535b997b/native/install.sh | bash - -# Set up non-public parts of infrastructure. -cd "${dir_secrets}" -mkdir -p "${ssh_dir}" -echo "Setting up .ssh" -cp id_rsa ~/.ssh -stty -echo -ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub -stty echo -script -c 'gpg --import secret_keys.asc' /dev/null -tar xf borg_keyfiles.tar -mkdir -p "${borgkeys_dir}" -mv borg_keyfiles/* "${borgkeys_dir}" -# .authinfo may not be present on every secrets drive yet -if [ -f "${authinfo_file}" ]; then - cp "${authinfo_file}" ~ -fi -cd -rm -rf "${dir_secrets}" - -# Sync org dir via borgbackup. For this we need the borgbackup servers -# in our .ssh/known_hosts file. -cat "${borgrepos_file}" | while read line; do - first_char=$(echo "${line}" | cut -c1) - if [ "${first_char}" = "#" ]; then - continue - fi - server=$(echo "${line}" | sed 's/.*@//') - ssh-keyscan "${server}" >> "${ssh_dir}"/known_hosts -done -BORG_PASSPHRASE="${SECRETS_PASS}" "${path_borgscript}" orgpull - -# Fill ~/public_repos. -cat "${repos_list_file}" | while read line; do - first_char=$(echo "${line}" | cut -c1) - if [ "${first_char}" = "#" ]; then - continue - fi - ensure_repo "${line}" -done - -# Set up e-mail system. Note that we only do mbsync if the imap pass file -# is found. It may not be present on every secrets drive yet, so we have to -# deal with the possibility of it being absent at this point. -mkdir -p "${maildir}" # expected by mbsync/isync -if [ -f "${HOME}/${authinfo_file}" ]; then - mbsync -a - notmuch new -fi - -# Final note on how to integrate tridactyl. -echo "TODO: As tridactyl user, don't forget to do :source on the first Firefox run and then re-start."