From f2dfde23f8157da1532a2b2e236af529fed47713 Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Thu, 11 Apr 2024 16:21:15 -0500 Subject: replace janky deploy script with stow and make re-orgs all the console oriented dotfiles to be stowable makefile to deploy everything move from vimplug to native vim packages cleanup script for blowing away old symlinks --- .gitignore | 9 +- .gitmodules | 27 +++ Makefile | 28 +++ bin/all/color_test | 32 --- bin/all/utf8_demo | 216 --------------------- bin/linux/backup | 27 --- cleanup.sh | 29 +++ config/all/dircolors.conf | 93 --------- config/all/git/config | 49 ----- config/all/git/ignore | 11 -- config/all/zsh/.zprofile | 4 - config/all/zsh/.zshrc | 4 - config/all/zsh/20-appearance.zsh | 79 -------- config/all/zsh/30-behavior.zsh | 54 ------ config/all/zsh/40-key-bindings.zsh | 6 - config/all/zsh/50-completion.zsh | 27 --- config/all/zsh/60-graphical-session.zsh | 8 - config/all/zsh/99-function-overrides.zsh | 8 - deploy.sh | 117 ----------- home/vimrc | 130 ------------- home/zshenv | 1 - stow/console-utils/.local/bin/color_test | 32 +++ stow/console-utils/.local/bin/utf8_demo | 216 +++++++++++++++++++++ stow/dircolors/.config/dircolors.conf | 93 +++++++++ stow/duplicity/.local/bin/backup | 27 +++ .../.local/share/systemd/user/backup.service | 7 + .../.local/share/systemd/user/backup.timer | 9 + stow/git/.config/git/config | 49 +++++ stow/git/.config/git/ignore | 11 ++ stow/vim/.vim/autoload/airline/themes/tempus.vim | 35 ++++ stow/vim/.vim/pack/my-plugins/start/ale | 1 + .../vim/.vim/pack/my-plugins/start/bufexplorer.zip | 1 + stow/vim/.vim/pack/my-plugins/start/ctrlp.vim | 1 + .../.vim/pack/my-plugins/start/tempus-themes-vim | 1 + stow/vim/.vim/pack/my-plugins/start/vim-airline | 1 + stow/vim/.vim/pack/my-plugins/start/vim-dirvish | 1 + stow/vim/.vim/pack/my-plugins/start/vim-eunuch | 1 + stow/vim/.vim/pack/my-plugins/start/vim-gitgutter | 1 + stow/vim/.vim/pack/my-plugins/start/vim-sensible | 1 + stow/vim/.vimrc | 115 +++++++++++ stow/zsh/.config/zsh/.zprofile | 4 + stow/zsh/.config/zsh/.zshrc | 4 + stow/zsh/.config/zsh/20-appearance.zsh | 79 ++++++++ stow/zsh/.config/zsh/30-behavior.zsh | 54 ++++++ stow/zsh/.config/zsh/40-key-bindings.zsh | 6 + stow/zsh/.config/zsh/50-completion.zsh | 27 +++ stow/zsh/.config/zsh/60-graphical-session.zsh | 8 + stow/zsh/.config/zsh/99-function-overrides.zsh | 8 + stow/zsh/.zshenv | 1 + systemd/linux/backup.service | 7 - systemd/linux/backup.timer | 9 - vim/airline/themes/tempus.vim | 35 ---- 52 files changed, 882 insertions(+), 922 deletions(-) create mode 100644 .gitmodules create mode 100644 Makefile delete mode 100755 bin/all/color_test delete mode 100755 bin/all/utf8_demo delete mode 100755 bin/linux/backup create mode 100755 cleanup.sh delete mode 100644 config/all/dircolors.conf delete mode 100644 config/all/git/config delete mode 100644 config/all/git/ignore delete mode 100644 config/all/zsh/.zprofile delete mode 100644 config/all/zsh/.zshrc delete mode 100644 config/all/zsh/20-appearance.zsh delete mode 100644 config/all/zsh/30-behavior.zsh delete mode 100644 config/all/zsh/40-key-bindings.zsh delete mode 100644 config/all/zsh/50-completion.zsh delete mode 100644 config/all/zsh/60-graphical-session.zsh delete mode 100644 config/all/zsh/99-function-overrides.zsh delete mode 100755 deploy.sh delete mode 100644 home/vimrc delete mode 100644 home/zshenv create mode 100755 stow/console-utils/.local/bin/color_test create mode 100755 stow/console-utils/.local/bin/utf8_demo create mode 100644 stow/dircolors/.config/dircolors.conf create mode 100755 stow/duplicity/.local/bin/backup create mode 100644 stow/duplicity/.local/share/systemd/user/backup.service create mode 100644 stow/duplicity/.local/share/systemd/user/backup.timer create mode 100644 stow/git/.config/git/config create mode 100644 stow/git/.config/git/ignore create mode 100644 stow/vim/.vim/autoload/airline/themes/tempus.vim create mode 160000 stow/vim/.vim/pack/my-plugins/start/ale create mode 160000 stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip create mode 160000 stow/vim/.vim/pack/my-plugins/start/ctrlp.vim create mode 160000 stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim create mode 160000 stow/vim/.vim/pack/my-plugins/start/vim-airline create mode 160000 stow/vim/.vim/pack/my-plugins/start/vim-dirvish create mode 160000 stow/vim/.vim/pack/my-plugins/start/vim-eunuch create mode 160000 stow/vim/.vim/pack/my-plugins/start/vim-gitgutter create mode 160000 stow/vim/.vim/pack/my-plugins/start/vim-sensible create mode 100644 stow/vim/.vimrc create mode 100644 stow/zsh/.config/zsh/.zprofile create mode 100644 stow/zsh/.config/zsh/.zshrc create mode 100644 stow/zsh/.config/zsh/20-appearance.zsh create mode 100644 stow/zsh/.config/zsh/30-behavior.zsh create mode 100644 stow/zsh/.config/zsh/40-key-bindings.zsh create mode 100644 stow/zsh/.config/zsh/50-completion.zsh create mode 100644 stow/zsh/.config/zsh/60-graphical-session.zsh create mode 100644 stow/zsh/.config/zsh/99-function-overrides.zsh create mode 100644 stow/zsh/.zshenv delete mode 100644 systemd/linux/backup.service delete mode 100644 systemd/linux/backup.timer delete mode 100644 vim/airline/themes/tempus.vim diff --git a/.gitignore b/.gitignore index d9500f4..fd22466 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ -config/all/git/config-local -config/all/zsh/00-local.zsh -config/all/zsh/99-local.zsh -config/linux/kitty/local.conf -dotfiles-backup +stow/zsh/.config/zsh/00-local.zsh +stow/git/.config/git/config-local +stow/duplicity/.config/duplicity/config +stow/duplicity/.config/duplicity/excludes diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e775b7d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,27 @@ +[submodule "stow/vim/.vim/pack/my-plugins/start/vim-sensible"] + path = stow/vim/.vim/pack/my-plugins/start/vim-sensible + url = https://github.com/tpope/vim-sensible +[submodule "stow/vim/.vim/pack/my-plugins/start/vim-dirvish"] + path = stow/vim/.vim/pack/my-plugins/start/vim-dirvish + url = https://github.com/justinmk/vim-dirvish +[submodule "stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip"] + path = stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip + url = https://github.com/vim-scripts/bufexplorer.zip +[submodule "stow/vim/.vim/pack/my-plugins/start/ctrlp.vim"] + path = stow/vim/.vim/pack/my-plugins/start/ctrlp.vim + url = https://github.com/ctrlpvim/ctrlp.vim +[submodule "stow/vim/.vim/pack/my-plugins/start/vim-gitgutter"] + path = stow/vim/.vim/pack/my-plugins/start/vim-gitgutter + url = https://github.com/airblade/vim-gitgutter +[submodule "stow/vim/.vim/pack/my-plugins/start/vim-airline"] + path = stow/vim/.vim/pack/my-plugins/start/vim-airline + url = https://github.com/vim-airline/vim-airline +[submodule "stow/vim/.vim/pack/my-plugins/start/vim-eunuch"] + path = stow/vim/.vim/pack/my-plugins/start/vim-eunuch + url = https://github.com/tpope/vim-eunuch +[submodule "stow/vim/.vim/pack/my-plugins/start/ale"] + path = stow/vim/.vim/pack/my-plugins/start/ale + url = https://github.com/dense-analysis/ale +[submodule "stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim"] + path = stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim + url = https://gitlab.com/protesilaos/tempus-themes-vim.git diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bbdaf73 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +REPO_CHANGES := $(shell git status --porcelain | wc -l) + +.PHONY: .initialize +.initialize: +ifneq ($(REPO_CHANGES),0) + $(error cannot run with a dirty repo. stash or commit changes.) +endif + git submodule update --init --recursive + +.PHONY: .local +.local: + mkdir -p stow/duplicity/.config/duplicity + cp --update=none local/duplicity-config stow/duplicity/.config/duplicity/config + cp --update=none local/duplicity-excludes stow/duplicity/.config/duplicity/excludes + cp --update=none local/gitconfig-local stow/git/.config/git/config-local + cp --update=none local/local.zsh stow/zsh/.config/zsh/00-local.zsh + +.PHONY: console +console: .initialize .local + stow --adopt --dir=stow --target=${HOME} console-utils + stow --adopt --dir=stow --target=${HOME} dircolors + stow --adopt --dir=stow --target=${HOME} git + stow --adopt --dir=stow --target=${HOME} vim + stow --adopt --dir=stow --target=${HOME} zsh + stow --adopt --dir=stow --target=${HOME} duplicity + +restore: + git restore . diff --git a/bin/all/color_test b/bin/all/color_test deleted file mode 100755 index b764252..0000000 --- a/bin/all/color_test +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# -# Based on Daniel Crisman's ANSI color chart script from -# The Bash Prompt HOWTO: 6.1. Colours -# http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html -# -# This function echoes a bunch of color codes to the -# terminal to demonstrate what's available. Each -# line is the color code of one forground color, -# out of 17 (default + 16 escapes), followed by a -# test use of that color on all nine background -# colors (default + 8 escapes). - -set -euo pipefail - -T='gYw' # The test text - -echo -e "\n def 40m 41m 42m 43m 44m 45m 46m 47m"; - -for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \ - '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \ - ' 36m' '1;36m' ' 37m' '1;37m'; - - do FG=${FGs// /} - echo -en " $FGs \033[$FG $T " - - for BG in 40m 41m 42m 43m 44m 45m 46m 47m; - do echo -en "\033[$FG\033[$BG $T \033[0m"; - done - echo; -done -echo diff --git a/bin/all/utf8_demo b/bin/all/utf8_demo deleted file mode 100755 index 8dce357..0000000 --- a/bin/all/utf8_demo +++ /dev/null @@ -1,216 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC1111 -# Based on original text file by Markus Kuhn. -# Retrieved from: https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt - -echo "UTF-8 encoded sample plain-text file -‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ - -Markus Kuhn [ˈmaʳkʊs kuːn] — 2002-07-25 CC BY - - -The ASCII compatible UTF-8 encoding used in this plain-text file -is defined in Unicode, ISO 10646-1, and RFC 2279. - - -Using Unicode/UTF-8, you can write in emails and source code things such as - -Mathematics and sciences: - - ∮ E⋅da = Q, n → ∞, ∑ f(i) = ∏ g(i), ⎧⎡⎛┌─────┐⎞⎤⎫ - ⎪⎢⎜│a²+b³ ⎟⎥⎪ - ∀x∈ℝ: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β), ⎪⎢⎜│───── ⎟⎥⎪ - ⎪⎢⎜⎷ c₈ ⎟⎥⎪ - ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ, ⎨⎢⎜ ⎟⎥⎬ - ⎪⎢⎜ ∞ ⎟⎥⎪ - ⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫), ⎪⎢⎜ ⎲ ⎟⎥⎪ - ⎪⎢⎜ ⎳aⁱ-bⁱ⎟⎥⎪ - 2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm ⎩⎣⎝i=1 ⎠⎦⎭ - -Linguistics and dictionaries: - - ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn - Y [ˈʏpsilɔn], Yen [jɛn], Yoga [ˈjoːgɑ] - -APL: - - ((V⍳V)=⍳⍴V)/V←,V ⌷←⍳→⍴∆∇⊃‾⍎⍕⌈ - -Nicer typography in plain text files: - - ╔══════════════════════════════════════════╗ - ║ ║ - ║ • ‘single’ and “double” quotes ║ - ║ ║ - ║ • Curly apostrophes: “We’ve been here” ║ - ║ ║ - ║ • Latin-1 apostrophe and accents: '´\` ║ - ║ ║ - ║ • ‚deutsche‘ „Anführungszeichen“ ║ - ║ ║ - ║ • †, ‡, ‰, •, 3–4, —, −5/+5, ™, … ║ - ║ ║ - ║ • ASCII safety test: 1lI|, 0OD, 8B ║ - ║ ╭─────────╮ ║ - ║ • the euro symbol: │ 14.95 € │ ║ - ║ ╰─────────╯ ║ - ╚══════════════════════════════════════════╝ - -Combining characters: - - STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑ - -Greek (in Polytonic): - - The Greek anthem: - - Σὲ γνωρίζω ἀπὸ τὴν κόψη - τοῦ σπαθιοῦ τὴν τρομερή, - σὲ γνωρίζω ἀπὸ τὴν ὄψη - ποὺ μὲ βία μετράει τὴ γῆ. - - ᾿Απ᾿ τὰ κόκκαλα βγαλμένη - τῶν ῾Ελλήνων τὰ ἱερά - καὶ σὰν πρῶτα ἀνδρειωμένη - χαῖρε, ὦ χαῖρε, ᾿Ελευθεριά! - - From a speech of Demosthenes in the 4th century BC: - - Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν, ὦ ἄνδρες ᾿Αθηναῖοι, - ὅταν τ᾿ εἰς τὰ πράγματα ἀποβλέψω καὶ ὅταν πρὸς τοὺς - λόγους οὓς ἀκούω· τοὺς μὲν γὰρ λόγους περὶ τοῦ - τιμωρήσασθαι Φίλιππον ὁρῶ γιγνομένους, τὰ δὲ πράγματ᾿ - εἰς τοῦτο προήκοντα, ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αὐτοὶ - πρότερον κακῶς σκέψασθαι δέον. οὐδέν οὖν ἄλλο μοι δοκοῦσιν - οἱ τὰ τοιαῦτα λέγοντες ἢ τὴν ὑπόθεσιν, περὶ ἧς βουλεύεσθαι, - οὐχὶ τὴν οὖσαν παριστάντες ὑμῖν ἁμαρτάνειν. ἐγὼ δέ, ὅτι μέν - ποτ᾿ ἐξῆν τῇ πόλει καὶ τὰ αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον - τιμωρήσασθαι, καὶ μάλ᾿ ἀκριβῶς οἶδα· ἐπ᾿ ἐμοῦ γάρ, οὐ πάλαι - γέγονεν ταῦτ᾿ ἀμφότερα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν - προλαβεῖν ἡμῖν εἶναι τὴν πρώτην, ὅπως τοὺς συμμάχους - σώσομεν. ἐὰν γὰρ τοῦτο βεβαίως ὑπάρξῃ, τότε καὶ περὶ τοῦ - τίνα τιμωρήσεταί τις καὶ ὃν τρόπον ἐξέσται σκοπεῖν· πρὶν δὲ - τὴν ἀρχὴν ὀρθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι περὶ τῆς - τελευτῆς ὁντινοῦν ποιεῖσθαι λόγον. - - Δημοσθένους, Γ´ ᾿Ολυνθιακὸς - -Georgian: - - From a Unicode conference invitation: - - გთხოვთ ახლავე გაიაროთ რეგისტრაცია Unicode-ის მეათე საერთაშორისო - კონფერენციაზე დასასწრებად, რომელიც გაიმართება 10-12 მარტს, - ქ. მაინცში, გერმანიაში. კონფერენცია შეჰკრებს ერთად მსოფლიოს - ექსპერტებს ისეთ დარგებში როგორიცაა ინტერნეტი და Unicode-ი, - ინტერნაციონალიზაცია და ლოკალიზაცია, Unicode-ის გამოყენება - ოპერაციულ სისტემებსა, და გამოყენებით პროგრამებში, შრიფტებში, - ტექსტების დამუშავებასა და მრავალენოვან კომპიუტერულ სისტემებში. - -Russian: - - From a Unicode conference invitation: - - Зарегистрируйтесь сейчас на Десятую Международную Конференцию по - Unicode, которая состоится 10-12 марта 1997 года в Майнце в Германии. - Конференция соберет широкий круг экспертов по вопросам глобального - Интернета и Unicode, локализации и интернационализации, воплощению и - применению Unicode в различных операционных системах и программных - приложениях, шрифтах, верстке и многоязычных компьютерных системах. - -Thai (UCS Level 2): - - Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese - classic 'San Gua'): - - [----------------------------|------------------------] - ๏ แผ่นดินฮั่นเสื่อมโทรมแสนสังเวช พระปกเกศกองบู๊กู้ขึ้นใหม่ - สิบสองกษัตริย์ก่อนหน้าแลถัดไป สององค์ไซร้โง่เขลาเบาปัญญา - ทรงนับถือขันทีเป็นที่พึ่ง บ้านเมืองจึงวิปริตเป็นนักหนา - โฮจิ๋นเรียกทัพทั่วหัวเมืองมา หมายจะฆ่ามดชั่วตัวสำคัญ - เหมือนขับไสไล่เสือจากเคหา รับหมาป่าเข้ามาเลยอาสัญ - ฝ่ายอ้องอุ้นยุแยกให้แตกกัน ใช้สาวนั้นเป็นชนวนชื่นชวนใจ - พลันลิฉุยกุยกีกลับก่อเหตุ ช่างอาเพศจริงหนาฟ้าร้องไห้ - ต้องรบราฆ่าฟันจนบรรลัย ฤๅหาใครค้ำชูกู้บรรลังก์ ฯ - - (The above is a two-column text. If combining characters are handled - correctly, the lines of the second column should be aligned with the - | character above.) - -Ethiopian: - - Proverbs in the Amharic language: - - ሰማይ አይታረስ ንጉሥ አይከሰስ። - ብላ ካለኝ እንደአባቴ በቆመጠኝ። - ጌጥ ያለቤቱ ቁምጥና ነው። - ደሀ በሕልሙ ቅቤ ባይጠጣ ንጣት በገደለው። - የአፍ ወለምታ በቅቤ አይታሽም። - አይጥ በበላ ዳዋ ተመታ። - ሲተረጉሙ ይደረግሙ። - ቀስ በቀስ፥ ዕንቁላል በእግሩ ይሄዳል። - ድር ቢያብር አንበሳ ያስር። - ሰው እንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርም። - እግዜር የከፈተውን ጉሮሮ ሳይዘጋው አይድርም። - የጎረቤት ሌባ፥ ቢያዩት ይስቅ ባያዩት ያጠልቅ። - ሥራ ከመፍታት ልጄን ላፋታት። - ዓባይ ማደሪያ የለው፥ ግንድ ይዞ ይዞራል። - የእስላም አገሩ መካ የአሞራ አገሩ ዋርካ። - ተንጋሎ ቢተፉ ተመልሶ ባፉ። - ወዳጅህ ማር ቢሆን ጨርስህ አትላሰው። - እግርህን በፍራሽህ ልክ ዘርጋ። - -Runes: - - ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ - - (Old English, which transcribed into Latin reads 'He cwaeth that he - bude thaem lande northweardum with tha Westsae.' and means 'He said - that he lived in the northern land near the Western Sea.') - -Braille: - - ⡌⠁⠧⠑ ⠼⠁⠒ ⡍⠜⠇⠑⠹⠰⠎ ⡣⠕⠌ - - ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠙⠑⠁⠙⠒ ⠞⠕ ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ ⠊⠎ ⠝⠕ ⠙⠳⠃⠞ - ⠱⠁⠞⠑⠧⠻ ⠁⠃⠳⠞ ⠹⠁⠞⠲ ⡹⠑ ⠗⠑⠛⠊⠌⠻ ⠕⠋ ⠙⠊⠎ ⠃⠥⠗⠊⠁⠇ ⠺⠁⠎ - ⠎⠊⠛⠝⠫ ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹⠍⠁⠝⠂ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ ⠥⠝⠙⠻⠞⠁⠅⠻⠂ - ⠁⠝⠙ ⠹⠑ ⠡⠊⠑⠋ ⠍⠳⠗⠝⠻⠲ ⡎⠊⠗⠕⠕⠛⠑ ⠎⠊⠛⠝⠫ ⠊⠞⠲ ⡁⠝⠙ - ⡎⠊⠗⠕⠕⠛⠑⠰⠎ ⠝⠁⠍⠑ ⠺⠁⠎ ⠛⠕⠕⠙ ⠥⠏⠕⠝ ⠰⡡⠁⠝⠛⠑⠂ ⠋⠕⠗ ⠁⠝⠹⠹⠔⠛ ⠙⠑ - ⠡⠕⠎⠑ ⠞⠕ ⠏⠥⠞ ⠙⠊⠎ ⠙⠁⠝⠙ ⠞⠕⠲ - - ⡕⠇⠙ ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ - - ⡍⠔⠙⠖ ⡊ ⠙⠕⠝⠰⠞ ⠍⠑⠁⠝ ⠞⠕ ⠎⠁⠹ ⠹⠁⠞ ⡊ ⠅⠝⠪⠂ ⠕⠋ ⠍⠹ - ⠪⠝ ⠅⠝⠪⠇⠫⠛⠑⠂ ⠱⠁⠞ ⠹⠻⠑ ⠊⠎ ⠏⠜⠞⠊⠊⠥⠇⠜⠇⠹ ⠙⠑⠁⠙ ⠁⠃⠳⠞ - ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ ⡊ ⠍⠊⠣⠞ ⠙⠁⠧⠑ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ ⠍⠹⠎⠑⠇⠋⠂ ⠞⠕ - ⠗⠑⠛⠜⠙ ⠁ ⠊⠕⠋⠋⠔⠤⠝⠁⠊⠇ ⠁⠎ ⠹⠑ ⠙⠑⠁⠙⠑⠌ ⠏⠊⠑⠊⠑ ⠕⠋ ⠊⠗⠕⠝⠍⠕⠝⠛⠻⠹ - ⠔ ⠹⠑ ⠞⠗⠁⠙⠑⠲ ⡃⠥⠞ ⠹⠑ ⠺⠊⠎⠙⠕⠍ ⠕⠋ ⠳⠗ ⠁⠝⠊⠑⠌⠕⠗⠎ - ⠊⠎ ⠔ ⠹⠑ ⠎⠊⠍⠊⠇⠑⠆ ⠁⠝⠙ ⠍⠹ ⠥⠝⠙⠁⠇⠇⠪⠫ ⠙⠁⠝⠙⠎ - ⠩⠁⠇⠇ ⠝⠕⠞ ⠙⠊⠌⠥⠗⠃ ⠊⠞⠂ ⠕⠗ ⠹⠑ ⡊⠳⠝⠞⠗⠹⠰⠎ ⠙⠕⠝⠑ ⠋⠕⠗⠲ ⡹⠳ - ⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ ⠏⠻⠍⠊⠞ ⠍⠑ ⠞⠕ ⠗⠑⠏⠑⠁⠞⠂ ⠑⠍⠏⠙⠁⠞⠊⠊⠁⠇⠇⠹⠂ ⠹⠁⠞ - ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ - - (The first couple of paragraphs of \"A Christmas Carol\" by Dickens) - -Compact font selection example text: - - ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789 - abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ - –—‘“”„†•…‰™œŠŸž€ ΑΒΓΔΩαβγδω АБВГДабвгд - ∀∂∈ℝ∧∪≡∞ ↑↗↨↻⇣ ┐┼╔╘░►☺♀ fi�⑀₂ἠḂӥẄɐː⍎אԱა - -Greetings in various languages: - - Hello world, Καλημέρα κόσμε, コンニチハ - -Box drawing alignment tests: █ - ▉ - ╔══╦══╗ ┌──┬──┐ ╭──┬──╮ ╭──┬──╮ ┏━━┳━━┓ ┎┒┏┑ ╷ ╻ ┏┯┓ ┌┰┐ ▊ ╱╲╱╲╳╳╳ - ║┌─╨─┐║ │╔═╧═╗│ │╒═╪═╕│ │╓─╁─╖│ ┃┌─╂─┐┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ ┝╋┥ ▋ ╲╱╲╱╳╳╳ - ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╿ │┃ ┍╅╆┓ ╵ ╹ ┗┷┛ └┸┘ ▌ ╱╲╱╲╳╳╳ - ╠╡ ╳ ╞╣ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┐ ╎ ┏┅┅┓ ┋ ▍ ╲╱╲╱╳╳╳ - ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▎ - ║└─╥─┘║ │╚═╤═╝│ │╘═╪═╛│ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▏ - ╚══╩══╝ └──┴──┘ ╰──┴──╯ ╰──┴──╯ ┗━━┻━━┛ ▗▄▖▛▀▜ └╌╌┘ ╎ ┗╍╍┛ ┋ ▁▂▃▄▅▆▇█ - ▝▀▘▙▄▟" diff --git a/bin/linux/backup b/bin/linux/backup deleted file mode 100755 index 6324c05..0000000 --- a/bin/linux/backup +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -set -o allexport -# shellcheck source=../../.config/duplicity/config -source ~/.config/duplicity/config -set +o allexport - -source_directory=~ -excludes=~/.config/duplicity/excludes -target_url=b2://"$B2_KEY_ID"@"$B2_BUCKET" - -# take a new full backup every month, incremental otherwise -duplicity backup --full-if-older-than 1M --exclude-filelist "$excludes" "$source_directory" "$target_url" - -# keep 12 months of full backups -duplicity remove-all-but-n-full 12 --force "$target_url" - -# keep 3 months of incremental backups -duplicity remove-all-inc-of-but-n-full 3 --force "$target_url" - -# cleanup -duplicity cleanup --force "$target_url" - -# show collection status -duplicity collection-status "$target_url" diff --git a/cleanup.sh b/cleanup.sh new file mode 100755 index 0000000..a0d6944 --- /dev/null +++ b/cleanup.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# THIS IS SCARY! +# This is a transitional script for cleaning out old symlinks since +# stow doesn't like overwriting existing symlminks. This should only +# need to run once on a system, and only if dotfiles were managed +# without stow before. Should probably delete this once stow-based +# dotfiles are rolled out everywere. + +set -euo pipefail + +to_delete=" +.local/bin/color_test +.local/bin/utf8_demo +.config/dircolors.conf +.config/git +.vim/autoload +.vim/plugged +.vimrc +.config/zsh +.zshenv +.local/bin/backup +.local/share/systemd/user/backup.service +.local/share/systemd/user/backup.timer +" + +for i in $to_delete; do + rm -rf "$HOME/${i:?}" +done diff --git a/config/all/dircolors.conf b/config/all/dircolors.conf deleted file mode 100644 index f6decec..0000000 --- a/config/all/dircolors.conf +++ /dev/null @@ -1,93 +0,0 @@ -# Copyright (C) 1996, 1999-2010 Free Software Foundation, Inc. -# Copying and distribution of this file, with or without modification, -# are permitted provided the copyright notice and this notice are preserved. - -# -# Colorizable terminals - -TERM Eterm -TERM ansi -TERM color-xterm -TERM con132x25 -TERM con132x30 -TERM con132x43 -TERM con132x60 -TERM con80x25 -TERM con80x28 -TERM con80x30 -TERM con80x43 -TERM con80x50 -TERM con80x60 -TERM cons25 -TERM console -TERM cygwin -TERM dtterm -TERM eterm-color -TERM foot-extra -TERM gnome -TERM gnome-256color -TERM jfbterm -TERM konsole -TERM kterm -TERM linux -TERM linux-c -TERM mach-color -TERM mlterm -TERM putty -TERM rxvt -TERM rxvt-256color -TERM rxvt-cygwin -TERM rxvt-cygwin-native -TERM rxvt-unicode -TERM rxvt-unicode-256color -TERM rxvt-unicode256 -TERM screen -TERM screen-256color -TERM screen-256color-bce -TERM screen-bce -TERM screen-w -TERM screen.rxvt -TERM screen.linux -TERM terminator -TERM vt100 -TERM xterm -TERM xterm-16color -TERM xterm-256color -TERM xterm-88color -TERM xterm-color -TERM xterm-debian -TERM foot - -# -# Generic types - -# Attribute codes: -# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed -# -# Text color codes: -# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white -# -# Background color codes: -# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white - -RESET 0 # reset to "normal" color -DIR 34 # directory -LINK 36 # symbolic link -FIFO 47;33 # pipe -SOCK 35 # socket -DOOR 35 # door -BLK 47;33 # block device driver -CHR 47;33 # character device driver -ORPHAN 47;31 # symlink to nonexistent file, or non-stat'able file -SETUID 37;41 # file that is setuid (u+s) -SETGID 37;43 # file that is setgid (g+s) -CAPABILITY 30;41 # file with capability -STICKY_OTHER_WRITABLE 37;42 # dir that is sticky and other-writable (+t,o+w) -OTHER_WRITABLE 37;42 # dir that is other-writable (o+w) and not sticky -STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable -EXEC 32 # executable files - -# -# Extension-based - -#.tar.gz 01;31 diff --git a/config/all/git/config b/config/all/git/config deleted file mode 100644 index 71bf668..0000000 --- a/config/all/git/config +++ /dev/null @@ -1,49 +0,0 @@ -[user] - name = Matt Singleton - email = matt@xcolour.net - -[alias] - st = status - ci = commit - br = branch - co = checkout - df = diff - lg = log -p - -[core] - whitespace = trailing-space,space-before-tab,cr-at-eol - editor = vim - autocrlf = input - excludesfile = ~/.config/git/ignore - pager = less -+$LESS -RSX - -[push] - default = nothing - -[color] - ui = true - -[mergetool] - keepTemporaries = false - prompt = false - -[mergetool "vimdiff"] - layout = "LOCAL,BASE,REMOTE / MERGED + BASE,LOCAL + BASE,REMOTE" - -[merge] - tool = vimdiff - conflictstyle = zdiff3 - -[diff] - tool = vimdiff - colorMoved = default - algorithm = histogram - -[init] - defaultBranch = main - -[pull] - ff = only - -[include] - path = config-local diff --git a/config/all/git/ignore b/config/all/git/ignore deleted file mode 100644 index 57dd8e6..0000000 --- a/config/all/git/ignore +++ /dev/null @@ -1,11 +0,0 @@ -*.class -*.pyc -*.swo -*.swp -.svn -.swo -*#* -# -.#* -doc/tags -.DS_STORE diff --git a/config/all/zsh/.zprofile b/config/all/zsh/.zprofile deleted file mode 100644 index 68b0ec4..0000000 --- a/config/all/zsh/.zprofile +++ /dev/null @@ -1,4 +0,0 @@ -if [ "$(uname)" = "Darwin" ]; then - # disable Apple Terminal's annoying session restore feature - SHELL_SESSIONS_DISABLE=1 -fi diff --git a/config/all/zsh/.zshrc b/config/all/zsh/.zshrc deleted file mode 100644 index f33ca44..0000000 --- a/config/all/zsh/.zshrc +++ /dev/null @@ -1,4 +0,0 @@ -for f in $ZDOTDIR/*.zsh -do - source "${f}" -done diff --git a/config/all/zsh/20-appearance.zsh b/config/all/zsh/20-appearance.zsh deleted file mode 100644 index fa3c3cc..0000000 --- a/config/all/zsh/20-appearance.zsh +++ /dev/null @@ -1,79 +0,0 @@ -# -# colorize shell programs - -if ls -Z . &>/dev/null 2>&1; then - # gnu coreutils? - alias ls='ls --color=auto' - eval `dircolors ${XDG_CONFIG_HOME:-${HOME}/.config}/dircolors.conf` -elif (( $+commands[gls] )); then - # prefixed gnu coreutils? - alias ls='gls --color=auto' - eval `gdircolors ${XDG_CONFIG_HOME:-${HOME}/.config}/dircolors.conf` -else - # assume bsd ls - alias ls='ls -G' - export LSCOLORS="exgxbxdxcxegedxbxgxcxd" -fi - -# grep -alias grep='grep --color=auto' -alias egrep='egrep --color=auto' -alias fgrep='fgrep --color=auto' - -# less -export LESS_TERMCAP_mb=$'\e[1;31m' # begin blinking - bold red -export LESS_TERMCAP_md=$'\e[1;36m' # begin bold - bold cyan -export LESS_TERMCAP_me=$'\e[0m' # end mode -export LESS_TERMCAP_so=$'\e[33;47m' # begin standout mode - yellow on light gray ("white") -export LESS_TERMCAP_se=$'\e[0m' # end standout mode -export LESS_TERMCAP_us=$'\e[4;35m' # begin underline - magenta underline -export LESS_TERMCAP_ue=$'\e[0m' # end underline -export MANROFFOPT="-c" - -# -# make a sweet prompt - -autoload colors; colors; -setopt prompt_subst # expansion of color codes, etc. in the prompt - -# print the fully resolved shell command with time stamp -# to be run from zsh's builtin 'preexec' with all arguments passed through ($*) -function theme_preexec () { - echo "($fg[magenta]`date +%r`$reset_color) $fg[cyan]$3$reset_color" -} - -# print the prompt char in red if the last command exited non-zero -function prompt_char { - echo "%(?.$.%{$fg[red]%}$%{$reset_color%})" -} - -function repo_prompt_info { - # git - ref=$(git symbolic-ref HEAD 2> /dev/null || git rev-parse --short HEAD 2> /dev/null) - if [ $? -eq 0 ]; then - #repo=$(basename $(git rev-parse --show-toplevel)) - echo "%{$fg[cyan]%}${ref#refs/heads/}%{$reset_color%}" - return - fi -} - -function workspace_prompt_info { - repo=$(repo_prompt_info) - if [ "$repo" ]; then - echo "[$repo] " - return - fi -} - -# print the hostname in green if local, else red -function hostname_info { - if [[ $ZSH_LOCAL_ENV == "true" ]]; then - echo "%{$fg[green]%}%{$ZSH_HOST_PREFIX%}%m%{$ZSH_HOST_SUFFIX%}%{$reset_color%}" - else - echo "%{$fg[red]%}%{$ZSH_HOST_PREFIX%}%m%{$ZSH_HOST_SUFFIX%}%{$reset_color%}" - fi -} - -# a colorful multiline prompt using the above defined functions -PROMPT=$'%{$fg[yellow]%}%n%{$reset_color%}@$(hostname_info):%{$fg[blue]%}%~%{$reset_color%} -$(workspace_prompt_info)$(prompt_char)%{$reset_color%} ' diff --git a/config/all/zsh/30-behavior.zsh b/config/all/zsh/30-behavior.zsh deleted file mode 100644 index 6b2b2c2..0000000 --- a/config/all/zsh/30-behavior.zsh +++ /dev/null @@ -1,54 +0,0 @@ -# -# execution - -setopt rm_star_wait # wait 10 seconds before accepting 'rm *' confirmation -export REPORTTIME=5 # report timing for any command longer than 5 seconds -unsetopt flowcontrol # disable ^s from freezing the terminal - -# -# history - -HISTFILE="${XDG_DATA_HOME:-${HOME}/.local/share}/zsh/history" -HISTSIZE=10000 -SAVEHIST=10000 - -setopt hist_ignore_all_dups # ignore dups including non-sequential ones -setopt share_history # share command history data between sessions -setopt hist_verify # load hist into command buffer rather than exec immediately - -# -# term support - -# make sure $TERM is installed -# if not, fall back on xterm-256color -infocmp "$TERM" > /dev/null 2>&1 || export TERM=xterm-256color - -# set term title appropriately based on term type -# user@host:current_dir (current_command) -case "$TERM" in - xterm*|rxvt*|screen*|alacritty*|foot) - term_preexec () { - printf '\e]0;%s (%s)\a' ${(%):-'%n@%m:%~'} "$1" - } - term_precmd () { - printf '\e]0;%s\a' ${(%):-'%n@%m:%~'} - } - ;; -esac - -# -# draw a horizontal separator - -function hr { - printf "$bg[red]${(l:$COLUMNS:: :)}$reset_color\n" - printf "$bg[yellow]${(l:$COLUMNS:: :)}\n" - printf "$bg[green]${(l:$COLUMNS:: :)}\n" - printf "$bg[cyan]${(l:$COLUMNS:: :)}\n" - printf "$bg[blue]${(l:$COLUMNS:: :)}\n" - printf "$bg[magenta]${(l:$COLUMNS:: :)}$reset_color\n" -} - -# -# less - -export LESS=-i diff --git a/config/all/zsh/40-key-bindings.zsh b/config/all/zsh/40-key-bindings.zsh deleted file mode 100644 index 4deac62..0000000 --- a/config/all/zsh/40-key-bindings.zsh +++ /dev/null @@ -1,6 +0,0 @@ -bindkey -e # use emacs mode -bindkey '^r' history-incremental-search-backward # ctrl-r -bindkey '^[[Z' reverse-menu-complete # shift-tab - -bindkey '\e[3~' delete-char # make sure delete key works -bindkey ' ' magic-space # also do history expansion on space diff --git a/config/all/zsh/50-completion.zsh b/config/all/zsh/50-completion.zsh deleted file mode 100644 index 23cb052..0000000 --- a/config/all/zsh/50-completion.zsh +++ /dev/null @@ -1,27 +0,0 @@ -# initialize the completion system -autoload -U compinit -compinit -d "${XDG_CACHE_HOME:-${HOME}/.cache}/zsh/zcompdump" -zmodload zsh/complist - -# complete only after the second consecutive tab -setopt auto_menu - -# use GNU ls color specification for completion menu -zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} - -# use menu selection by default -zstyle ':completion:*:default' menu select - -# disable named-directories autocompletion -zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories -cdpath=(.) - -# don't autocomplete local users for (ssh|ftp|scp|rsync) -zstyle ':completion:*:*:(ssh|ftp|scp|rsync):*' users - -# Use caching so that commands like apt and dpkg complete are useable -zstyle ':completion::complete:*' use-cache 1 -zstyle ':completion:*' cache-path "${XDG_CACHE_HOME:-${HOME}/.cache}/zsh/zcompcache" - -# always rehash commands list -zstyle ':completion:*:commands' rehash 1 diff --git a/config/all/zsh/60-graphical-session.zsh b/config/all/zsh/60-graphical-session.zsh deleted file mode 100644 index 3d4b53a..0000000 --- a/config/all/zsh/60-graphical-session.zsh +++ /dev/null @@ -1,8 +0,0 @@ -if [ -n "$XDG_SESSION_DESKTOP" ] && command -v gnome-keyring-daemon > /dev/null; then - # load the keyring daemon into the environment if: - # - we're in a graphical session - # - the daemon is installed - # starts the daemon if it hasn't been started already, - # otherwise just exports the auth socket of the existing daemon - export $(gnome-keyring-daemon --start 2> /dev/null) -fi diff --git a/config/all/zsh/99-function-overrides.zsh b/config/all/zsh/99-function-overrides.zsh deleted file mode 100644 index 8b233e5..0000000 --- a/config/all/zsh/99-function-overrides.zsh +++ /dev/null @@ -1,8 +0,0 @@ -preexec () { - type term_preexec &> /dev/null && term_preexec $* - type theme_preexec &> /dev/null && theme_preexec $* -} - -precmd () { - type term_precmd &> /dev/null && term_precmd -} diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index f4fe57a..0000000 --- a/deploy.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -if command -v unzip > /dev/null; then - UNZIPCMD="unzip" -fi -if command -v vim > /dev/null; then - VIMCMD="vim" -fi -if command -v git > /dev/null; then - GITCMD="git" -fi -if command -v wget > /dev/null; then - DLCMD="wget -O" -elif command -v curl > /dev/null; then - DLCMD="curl -Lo" -fi -if [ -z "$UNZIPCMD" ] || [ -z "$VIMCMD" ] || [ -z "$DLCMD" ] || [ -z "$GITCMD" ]; then - echo "requires 'unzip', 'vim', 'git', and either 'wget' or 'curl'" - exit 1 -fi - -set -u - -if [ ! "$(pwd)" = "$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" ]; then - echo "expects to be run from the root of the dotfiles directory" - exit 1 -fi - -uname=$(uname | tr '[:upper:]' '[:lower:]') - -# XDG layout -xcache="${XDG_CACHE_HOME:-${HOME}/.cache}" -xdata="${XDG_DATA_HOME:-${HOME}/.local/share}" -xconfig="${XDG_CONFIG_HOME:-${HOME}/.config}" - -userbin="$HOME/.local/bin" -systemd="$xdata/systemd/user" - -mkdir -p "$xcache" "$xdata" "$xconfig" "$userbin" -mkdir -p "${xcache}/zsh" -mkdir -p "${xdata}/zsh" -if [ "linux" = "$uname" ]; then - mkdir -p "$systemd" -fi - -function link { - local src="$1" - local dest="$2" - if [ -e "$dest" ] && [ ! -L "$dest" ]; then - mkdir -p dotfiles-backup - mv "$dest" dotfiles-backup/. - fi - ln -snf "$src" "$dest" -} - -function link_contents { - local src="$1" - local dest="$2" - local prefix="${3:-}" - if [ -e "$src" ]; then - for f in "$src"/* - do - link "$(pwd)/$f" "$dest/$prefix$(basename "$f")" - done - fi -} - -function deploy { - local src="$1" - local dest="$2" - link_contents "$src/all" "$dest" - link_contents "$src/$uname" "$dest" -} - -# deploy to home -link_contents home "$HOME" '.' - -# deploy to XDG dirs -deploy config "$xconfig" - -# deploy user executables -deploy bin "$userbin" - -# deploy systemd user units -deploy systemd "$systemd" - -autoload="$HOME/.vim/autoload" -mkdir -p "$autoload" -# install vim-plug -if [ ! -e "$HOME/.vim/autoload/plug.vim" ]; then - $DLCMD "$HOME/.vim/autoload/plug.vim" \ - https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - $VIMCMD +PlugInstall +qall -fi - -# deploy custom scripts to vim autoload -link_contents vim "$autoload" - -# create local files -if [ ! -e "$HOME/.config/zsh/00-local.zsh" ]; then - cp local/local.zsh "$HOME/.config/zsh/00-local.zsh" -fi -if [ ! -e "$HOME/.config/git/config-local" ]; then - cp local/gitconfig-local "$HOME/.config/git/config-local" -fi -if [ "$uname" = "linux" ]; then - dconfig="$xconfig/duplicity" - mkdir -p "$dconfig" - if [ ! -e "$dconfig/config" ]; then - cp local/duplicity-config "$dconfig/config" - fi - if [ ! -e "$dconfig/excludes" ]; then - cp local/duplicity-excludes "$dconfig/excludes" - fi -fi diff --git a/home/vimrc b/home/vimrc deleted file mode 100644 index 6ec5b1c..0000000 --- a/home/vimrc +++ /dev/null @@ -1,130 +0,0 @@ -" -" vim-plug -" - -call plug#begin('~/.vim/plugged') - -Plug 'tpope/vim-sensible' -Plug 'justinmk/vim-dirvish' -Plug 'vim-scripts/bufexplorer.zip' -Plug 'ctrlpvim/ctrlp.vim' -Plug 'airblade/vim-gitgutter' -Plug 'vim-airline/vim-airline' -Plug 'tpope/vim-eunuch' -Plug 'dense-analysis/ale' -Plug 'https://gitlab.com/protesilaos/tempus-themes-vim.git' - -call plug#end() - -" -" behavior -" - -set nocompatible " use vim, not vi settings -set wildignore=*.pyc,.git " ignore from autocomplete -set showcmd " display incomplete commands -set ignorecase " ignore case in search -set smartcase " respect case in search if uppercase is used -set nowrap " do not wrap lines -set vb t_vb= " no beeping - -" -" formatting -" - -set tabstop=2 -set softtabstop=2 -set shiftwidth=2 -set expandtab -set shiftround -set listchars=tab:»·,trail:· -set list - -" -" filetype-specific -" - -if has("autocmd") - au! - - " plain text - au FileType text setlocal tw=80 - au FileType markdown setlocal tw=80 - - " python - au FileType python setlocal ts=4 sw=4 sts=4 - - " When editing a file, always jump to the last known cursor position. - " Don't do it when the position is invalid or when inside an event handler - au BufReadPost * - \ if line("'\"") > 0 && line("'\"") <= line("$") | - \ exe "normal g`\"" | - \ endif -endif - -" -" bindings -" - -let mapleader = "," - -" convenience -nnoremap x :source ~/.vimrc -nnoremap -nnoremap j -nnoremap k -nnoremap h -nnoremap l - -" dirvish -nnoremap e :Dirvish - -" bufexplore -nnoremap fe :BufExplorer -nnoremap fs :BufExplorerHorizontalSplit -nnoremap fv :BufExplorerVerticalSplit - -" ctrlp -let g:ctrlp_map ='a' - -" ale -nnoremap r :ALEDetail -let g:ale_linters_ignore = {'python': ['mypy']} " mypy is too slow and doesn't support dmypy - -" -" visual -" - -set background=light -silent! colo tempus_totus -let g:airline_theme='tempus' -set hlsearch -syntax enable - -" don't mess up gutter highlight with gitgutter -highlight clear SignColumn -hi! link SignColumn Background - -" Highlight non-ascii characters as the theme highlights errors -hi clear nonascii -hi link nonascii Error -if has("autocmd") - au BufReadPost * syntax match nonascii /[^\d0-\d127]/ -endif - -" highlight trailing space and tab as the theme highlights errors -hi clear SpecialKey -hi link SpecialKey Error - -let g:airline_powerline_fonts = 1 -let g:airline_left_sep="" -let g:airline_right_sep = "" -let g:airline_skip_empty_sections = 1 - -" -" local additions -" - -if filereadable($HOME."/.vimrc-local") - source ~/.vimrc-local -endif diff --git a/home/zshenv b/home/zshenv deleted file mode 100644 index a573065..0000000 --- a/home/zshenv +++ /dev/null @@ -1 +0,0 @@ -export ZDOTDIR="${XDG_CONFIG_HOME:-${HOME}/.config}/zsh" diff --git a/stow/console-utils/.local/bin/color_test b/stow/console-utils/.local/bin/color_test new file mode 100755 index 0000000..b764252 --- /dev/null +++ b/stow/console-utils/.local/bin/color_test @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Based on Daniel Crisman's ANSI color chart script from +# The Bash Prompt HOWTO: 6.1. Colours +# http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html +# +# This function echoes a bunch of color codes to the +# terminal to demonstrate what's available. Each +# line is the color code of one forground color, +# out of 17 (default + 16 escapes), followed by a +# test use of that color on all nine background +# colors (default + 8 escapes). + +set -euo pipefail + +T='gYw' # The test text + +echo -e "\n def 40m 41m 42m 43m 44m 45m 46m 47m"; + +for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \ + '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \ + ' 36m' '1;36m' ' 37m' '1;37m'; + + do FG=${FGs// /} + echo -en " $FGs \033[$FG $T " + + for BG in 40m 41m 42m 43m 44m 45m 46m 47m; + do echo -en "\033[$FG\033[$BG $T \033[0m"; + done + echo; +done +echo diff --git a/stow/console-utils/.local/bin/utf8_demo b/stow/console-utils/.local/bin/utf8_demo new file mode 100755 index 0000000..8dce357 --- /dev/null +++ b/stow/console-utils/.local/bin/utf8_demo @@ -0,0 +1,216 @@ +#!/bin/bash +# shellcheck disable=SC1111 +# Based on original text file by Markus Kuhn. +# Retrieved from: https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt + +echo "UTF-8 encoded sample plain-text file +‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + +Markus Kuhn [ˈmaʳkʊs kuːn] — 2002-07-25 CC BY + + +The ASCII compatible UTF-8 encoding used in this plain-text file +is defined in Unicode, ISO 10646-1, and RFC 2279. + + +Using Unicode/UTF-8, you can write in emails and source code things such as + +Mathematics and sciences: + + ∮ E⋅da = Q, n → ∞, ∑ f(i) = ∏ g(i), ⎧⎡⎛┌─────┐⎞⎤⎫ + ⎪⎢⎜│a²+b³ ⎟⎥⎪ + ∀x∈ℝ: ⌈x⌉ = −⌊−x⌋, α ∧ ¬β = ¬(¬α ∨ β), ⎪⎢⎜│───── ⎟⎥⎪ + ⎪⎢⎜⎷ c₈ ⎟⎥⎪ + ℕ ⊆ ℕ₀ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ, ⎨⎢⎜ ⎟⎥⎬ + ⎪⎢⎜ ∞ ⎟⎥⎪ + ⊥ < a ≠ b ≡ c ≤ d ≪ ⊤ ⇒ (⟦A⟧ ⇔ ⟪B⟫), ⎪⎢⎜ ⎲ ⎟⎥⎪ + ⎪⎢⎜ ⎳aⁱ-bⁱ⎟⎥⎪ + 2H₂ + O₂ ⇌ 2H₂O, R = 4.7 kΩ, ⌀ 200 mm ⎩⎣⎝i=1 ⎠⎦⎭ + +Linguistics and dictionaries: + + ði ıntəˈnæʃənəl fəˈnɛtık əsoʊsiˈeıʃn + Y [ˈʏpsilɔn], Yen [jɛn], Yoga [ˈjoːgɑ] + +APL: + + ((V⍳V)=⍳⍴V)/V←,V ⌷←⍳→⍴∆∇⊃‾⍎⍕⌈ + +Nicer typography in plain text files: + + ╔══════════════════════════════════════════╗ + ║ ║ + ║ • ‘single’ and “double” quotes ║ + ║ ║ + ║ • Curly apostrophes: “We’ve been here” ║ + ║ ║ + ║ • Latin-1 apostrophe and accents: '´\` ║ + ║ ║ + ║ • ‚deutsche‘ „Anführungszeichen“ ║ + ║ ║ + ║ • †, ‡, ‰, •, 3–4, —, −5/+5, ™, … ║ + ║ ║ + ║ • ASCII safety test: 1lI|, 0OD, 8B ║ + ║ ╭─────────╮ ║ + ║ • the euro symbol: │ 14.95 € │ ║ + ║ ╰─────────╯ ║ + ╚══════════════════════════════════════════╝ + +Combining characters: + + STARGΛ̊TE SG-1, a = v̇ = r̈, a⃑ ⊥ b⃑ + +Greek (in Polytonic): + + The Greek anthem: + + Σὲ γνωρίζω ἀπὸ τὴν κόψη + τοῦ σπαθιοῦ τὴν τρομερή, + σὲ γνωρίζω ἀπὸ τὴν ὄψη + ποὺ μὲ βία μετράει τὴ γῆ. + + ᾿Απ᾿ τὰ κόκκαλα βγαλμένη + τῶν ῾Ελλήνων τὰ ἱερά + καὶ σὰν πρῶτα ἀνδρειωμένη + χαῖρε, ὦ χαῖρε, ᾿Ελευθεριά! + + From a speech of Demosthenes in the 4th century BC: + + Οὐχὶ ταὐτὰ παρίσταταί μοι γιγνώσκειν, ὦ ἄνδρες ᾿Αθηναῖοι, + ὅταν τ᾿ εἰς τὰ πράγματα ἀποβλέψω καὶ ὅταν πρὸς τοὺς + λόγους οὓς ἀκούω· τοὺς μὲν γὰρ λόγους περὶ τοῦ + τιμωρήσασθαι Φίλιππον ὁρῶ γιγνομένους, τὰ δὲ πράγματ᾿ + εἰς τοῦτο προήκοντα, ὥσθ᾿ ὅπως μὴ πεισόμεθ᾿ αὐτοὶ + πρότερον κακῶς σκέψασθαι δέον. οὐδέν οὖν ἄλλο μοι δοκοῦσιν + οἱ τὰ τοιαῦτα λέγοντες ἢ τὴν ὑπόθεσιν, περὶ ἧς βουλεύεσθαι, + οὐχὶ τὴν οὖσαν παριστάντες ὑμῖν ἁμαρτάνειν. ἐγὼ δέ, ὅτι μέν + ποτ᾿ ἐξῆν τῇ πόλει καὶ τὰ αὑτῆς ἔχειν ἀσφαλῶς καὶ Φίλιππον + τιμωρήσασθαι, καὶ μάλ᾿ ἀκριβῶς οἶδα· ἐπ᾿ ἐμοῦ γάρ, οὐ πάλαι + γέγονεν ταῦτ᾿ ἀμφότερα· νῦν μέντοι πέπεισμαι τοῦθ᾿ ἱκανὸν + προλαβεῖν ἡμῖν εἶναι τὴν πρώτην, ὅπως τοὺς συμμάχους + σώσομεν. ἐὰν γὰρ τοῦτο βεβαίως ὑπάρξῃ, τότε καὶ περὶ τοῦ + τίνα τιμωρήσεταί τις καὶ ὃν τρόπον ἐξέσται σκοπεῖν· πρὶν δὲ + τὴν ἀρχὴν ὀρθῶς ὑποθέσθαι, μάταιον ἡγοῦμαι περὶ τῆς + τελευτῆς ὁντινοῦν ποιεῖσθαι λόγον. + + Δημοσθένους, Γ´ ᾿Ολυνθιακὸς + +Georgian: + + From a Unicode conference invitation: + + გთხოვთ ახლავე გაიაროთ რეგისტრაცია Unicode-ის მეათე საერთაშორისო + კონფერენციაზე დასასწრებად, რომელიც გაიმართება 10-12 მარტს, + ქ. მაინცში, გერმანიაში. კონფერენცია შეჰკრებს ერთად მსოფლიოს + ექსპერტებს ისეთ დარგებში როგორიცაა ინტერნეტი და Unicode-ი, + ინტერნაციონალიზაცია და ლოკალიზაცია, Unicode-ის გამოყენება + ოპერაციულ სისტემებსა, და გამოყენებით პროგრამებში, შრიფტებში, + ტექსტების დამუშავებასა და მრავალენოვან კომპიუტერულ სისტემებში. + +Russian: + + From a Unicode conference invitation: + + Зарегистрируйтесь сейчас на Десятую Международную Конференцию по + Unicode, которая состоится 10-12 марта 1997 года в Майнце в Германии. + Конференция соберет широкий круг экспертов по вопросам глобального + Интернета и Unicode, локализации и интернационализации, воплощению и + применению Unicode в различных операционных системах и программных + приложениях, шрифтах, верстке и многоязычных компьютерных системах. + +Thai (UCS Level 2): + + Excerpt from a poetry on The Romance of The Three Kingdoms (a Chinese + classic 'San Gua'): + + [----------------------------|------------------------] + ๏ แผ่นดินฮั่นเสื่อมโทรมแสนสังเวช พระปกเกศกองบู๊กู้ขึ้นใหม่ + สิบสองกษัตริย์ก่อนหน้าแลถัดไป สององค์ไซร้โง่เขลาเบาปัญญา + ทรงนับถือขันทีเป็นที่พึ่ง บ้านเมืองจึงวิปริตเป็นนักหนา + โฮจิ๋นเรียกทัพทั่วหัวเมืองมา หมายจะฆ่ามดชั่วตัวสำคัญ + เหมือนขับไสไล่เสือจากเคหา รับหมาป่าเข้ามาเลยอาสัญ + ฝ่ายอ้องอุ้นยุแยกให้แตกกัน ใช้สาวนั้นเป็นชนวนชื่นชวนใจ + พลันลิฉุยกุยกีกลับก่อเหตุ ช่างอาเพศจริงหนาฟ้าร้องไห้ + ต้องรบราฆ่าฟันจนบรรลัย ฤๅหาใครค้ำชูกู้บรรลังก์ ฯ + + (The above is a two-column text. If combining characters are handled + correctly, the lines of the second column should be aligned with the + | character above.) + +Ethiopian: + + Proverbs in the Amharic language: + + ሰማይ አይታረስ ንጉሥ አይከሰስ። + ብላ ካለኝ እንደአባቴ በቆመጠኝ። + ጌጥ ያለቤቱ ቁምጥና ነው። + ደሀ በሕልሙ ቅቤ ባይጠጣ ንጣት በገደለው። + የአፍ ወለምታ በቅቤ አይታሽም። + አይጥ በበላ ዳዋ ተመታ። + ሲተረጉሙ ይደረግሙ። + ቀስ በቀስ፥ ዕንቁላል በእግሩ ይሄዳል። + ድር ቢያብር አንበሳ ያስር። + ሰው እንደቤቱ እንጅ እንደ ጉረቤቱ አይተዳደርም። + እግዜር የከፈተውን ጉሮሮ ሳይዘጋው አይድርም። + የጎረቤት ሌባ፥ ቢያዩት ይስቅ ባያዩት ያጠልቅ። + ሥራ ከመፍታት ልጄን ላፋታት። + ዓባይ ማደሪያ የለው፥ ግንድ ይዞ ይዞራል። + የእስላም አገሩ መካ የአሞራ አገሩ ዋርካ። + ተንጋሎ ቢተፉ ተመልሶ ባፉ። + ወዳጅህ ማር ቢሆን ጨርስህ አትላሰው። + እግርህን በፍራሽህ ልክ ዘርጋ። + +Runes: + + ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ + + (Old English, which transcribed into Latin reads 'He cwaeth that he + bude thaem lande northweardum with tha Westsae.' and means 'He said + that he lived in the northern land near the Western Sea.') + +Braille: + + ⡌⠁⠧⠑ ⠼⠁⠒ ⡍⠜⠇⠑⠹⠰⠎ ⡣⠕⠌ + + ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠙⠑⠁⠙⠒ ⠞⠕ ⠃⠑⠛⠔ ⠺⠊⠹⠲ ⡹⠻⠑ ⠊⠎ ⠝⠕ ⠙⠳⠃⠞ + ⠱⠁⠞⠑⠧⠻ ⠁⠃⠳⠞ ⠹⠁⠞⠲ ⡹⠑ ⠗⠑⠛⠊⠌⠻ ⠕⠋ ⠙⠊⠎ ⠃⠥⠗⠊⠁⠇ ⠺⠁⠎ + ⠎⠊⠛⠝⠫ ⠃⠹ ⠹⠑ ⠊⠇⠻⠛⠹⠍⠁⠝⠂ ⠹⠑ ⠊⠇⠻⠅⠂ ⠹⠑ ⠥⠝⠙⠻⠞⠁⠅⠻⠂ + ⠁⠝⠙ ⠹⠑ ⠡⠊⠑⠋ ⠍⠳⠗⠝⠻⠲ ⡎⠊⠗⠕⠕⠛⠑ ⠎⠊⠛⠝⠫ ⠊⠞⠲ ⡁⠝⠙ + ⡎⠊⠗⠕⠕⠛⠑⠰⠎ ⠝⠁⠍⠑ ⠺⠁⠎ ⠛⠕⠕⠙ ⠥⠏⠕⠝ ⠰⡡⠁⠝⠛⠑⠂ ⠋⠕⠗ ⠁⠝⠹⠹⠔⠛ ⠙⠑ + ⠡⠕⠎⠑ ⠞⠕ ⠏⠥⠞ ⠙⠊⠎ ⠙⠁⠝⠙ ⠞⠕⠲ + + ⡕⠇⠙ ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ + + ⡍⠔⠙⠖ ⡊ ⠙⠕⠝⠰⠞ ⠍⠑⠁⠝ ⠞⠕ ⠎⠁⠹ ⠹⠁⠞ ⡊ ⠅⠝⠪⠂ ⠕⠋ ⠍⠹ + ⠪⠝ ⠅⠝⠪⠇⠫⠛⠑⠂ ⠱⠁⠞ ⠹⠻⠑ ⠊⠎ ⠏⠜⠞⠊⠊⠥⠇⠜⠇⠹ ⠙⠑⠁⠙ ⠁⠃⠳⠞ + ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ ⡊ ⠍⠊⠣⠞ ⠙⠁⠧⠑ ⠃⠑⠲ ⠔⠊⠇⠔⠫⠂ ⠍⠹⠎⠑⠇⠋⠂ ⠞⠕ + ⠗⠑⠛⠜⠙ ⠁ ⠊⠕⠋⠋⠔⠤⠝⠁⠊⠇ ⠁⠎ ⠹⠑ ⠙⠑⠁⠙⠑⠌ ⠏⠊⠑⠊⠑ ⠕⠋ ⠊⠗⠕⠝⠍⠕⠝⠛⠻⠹ + ⠔ ⠹⠑ ⠞⠗⠁⠙⠑⠲ ⡃⠥⠞ ⠹⠑ ⠺⠊⠎⠙⠕⠍ ⠕⠋ ⠳⠗ ⠁⠝⠊⠑⠌⠕⠗⠎ + ⠊⠎ ⠔ ⠹⠑ ⠎⠊⠍⠊⠇⠑⠆ ⠁⠝⠙ ⠍⠹ ⠥⠝⠙⠁⠇⠇⠪⠫ ⠙⠁⠝⠙⠎ + ⠩⠁⠇⠇ ⠝⠕⠞ ⠙⠊⠌⠥⠗⠃ ⠊⠞⠂ ⠕⠗ ⠹⠑ ⡊⠳⠝⠞⠗⠹⠰⠎ ⠙⠕⠝⠑ ⠋⠕⠗⠲ ⡹⠳ + ⠺⠊⠇⠇ ⠹⠻⠑⠋⠕⠗⠑ ⠏⠻⠍⠊⠞ ⠍⠑ ⠞⠕ ⠗⠑⠏⠑⠁⠞⠂ ⠑⠍⠏⠙⠁⠞⠊⠊⠁⠇⠇⠹⠂ ⠹⠁⠞ + ⡍⠜⠇⠑⠹ ⠺⠁⠎ ⠁⠎ ⠙⠑⠁⠙ ⠁⠎ ⠁ ⠙⠕⠕⠗⠤⠝⠁⠊⠇⠲ + + (The first couple of paragraphs of \"A Christmas Carol\" by Dickens) + +Compact font selection example text: + + ABCDEFGHIJKLMNOPQRSTUVWXYZ /0123456789 + abcdefghijklmnopqrstuvwxyz £©µÀÆÖÞßéöÿ + –—‘“”„†•…‰™œŠŸž€ ΑΒΓΔΩαβγδω АБВГДабвгд + ∀∂∈ℝ∧∪≡∞ ↑↗↨↻⇣ ┐┼╔╘░►☺♀ fi�⑀₂ἠḂӥẄɐː⍎אԱა + +Greetings in various languages: + + Hello world, Καλημέρα κόσμε, コンニチハ + +Box drawing alignment tests: █ + ▉ + ╔══╦══╗ ┌──┬──┐ ╭──┬──╮ ╭──┬──╮ ┏━━┳━━┓ ┎┒┏┑ ╷ ╻ ┏┯┓ ┌┰┐ ▊ ╱╲╱╲╳╳╳ + ║┌─╨─┐║ │╔═╧═╗│ │╒═╪═╕│ │╓─╁─╖│ ┃┌─╂─┐┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ ┝╋┥ ▋ ╲╱╲╱╳╳╳ + ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╿ │┃ ┍╅╆┓ ╵ ╹ ┗┷┛ └┸┘ ▌ ╱╲╱╲╳╳╳ + ╠╡ ╳ ╞╣ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┐ ╎ ┏┅┅┓ ┋ ▍ ╲╱╲╱╳╳╳ + ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▎ + ║└─╥─┘║ │╚═╤═╝│ │╘═╪═╛│ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▏ + ╚══╩══╝ └──┴──┘ ╰──┴──╯ ╰──┴──╯ ┗━━┻━━┛ ▗▄▖▛▀▜ └╌╌┘ ╎ ┗╍╍┛ ┋ ▁▂▃▄▅▆▇█ + ▝▀▘▙▄▟" diff --git a/stow/dircolors/.config/dircolors.conf b/stow/dircolors/.config/dircolors.conf new file mode 100644 index 0000000..f6decec --- /dev/null +++ b/stow/dircolors/.config/dircolors.conf @@ -0,0 +1,93 @@ +# Copyright (C) 1996, 1999-2010 Free Software Foundation, Inc. +# Copying and distribution of this file, with or without modification, +# are permitted provided the copyright notice and this notice are preserved. + +# +# Colorizable terminals + +TERM Eterm +TERM ansi +TERM color-xterm +TERM con132x25 +TERM con132x30 +TERM con132x43 +TERM con132x60 +TERM con80x25 +TERM con80x28 +TERM con80x30 +TERM con80x43 +TERM con80x50 +TERM con80x60 +TERM cons25 +TERM console +TERM cygwin +TERM dtterm +TERM eterm-color +TERM foot-extra +TERM gnome +TERM gnome-256color +TERM jfbterm +TERM konsole +TERM kterm +TERM linux +TERM linux-c +TERM mach-color +TERM mlterm +TERM putty +TERM rxvt +TERM rxvt-256color +TERM rxvt-cygwin +TERM rxvt-cygwin-native +TERM rxvt-unicode +TERM rxvt-unicode-256color +TERM rxvt-unicode256 +TERM screen +TERM screen-256color +TERM screen-256color-bce +TERM screen-bce +TERM screen-w +TERM screen.rxvt +TERM screen.linux +TERM terminator +TERM vt100 +TERM xterm +TERM xterm-16color +TERM xterm-256color +TERM xterm-88color +TERM xterm-color +TERM xterm-debian +TERM foot + +# +# Generic types + +# Attribute codes: +# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed +# +# Text color codes: +# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white +# +# Background color codes: +# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white + +RESET 0 # reset to "normal" color +DIR 34 # directory +LINK 36 # symbolic link +FIFO 47;33 # pipe +SOCK 35 # socket +DOOR 35 # door +BLK 47;33 # block device driver +CHR 47;33 # character device driver +ORPHAN 47;31 # symlink to nonexistent file, or non-stat'able file +SETUID 37;41 # file that is setuid (u+s) +SETGID 37;43 # file that is setgid (g+s) +CAPABILITY 30;41 # file with capability +STICKY_OTHER_WRITABLE 37;42 # dir that is sticky and other-writable (+t,o+w) +OTHER_WRITABLE 37;42 # dir that is other-writable (o+w) and not sticky +STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable +EXEC 32 # executable files + +# +# Extension-based + +#.tar.gz 01;31 diff --git a/stow/duplicity/.local/bin/backup b/stow/duplicity/.local/bin/backup new file mode 100755 index 0000000..6324c05 --- /dev/null +++ b/stow/duplicity/.local/bin/backup @@ -0,0 +1,27 @@ +#!/bin/bash + +set -euo pipefail + +set -o allexport +# shellcheck source=../../.config/duplicity/config +source ~/.config/duplicity/config +set +o allexport + +source_directory=~ +excludes=~/.config/duplicity/excludes +target_url=b2://"$B2_KEY_ID"@"$B2_BUCKET" + +# take a new full backup every month, incremental otherwise +duplicity backup --full-if-older-than 1M --exclude-filelist "$excludes" "$source_directory" "$target_url" + +# keep 12 months of full backups +duplicity remove-all-but-n-full 12 --force "$target_url" + +# keep 3 months of incremental backups +duplicity remove-all-inc-of-but-n-full 3 --force "$target_url" + +# cleanup +duplicity cleanup --force "$target_url" + +# show collection status +duplicity collection-status "$target_url" diff --git a/stow/duplicity/.local/share/systemd/user/backup.service b/stow/duplicity/.local/share/systemd/user/backup.service new file mode 100644 index 0000000..c1adfde --- /dev/null +++ b/stow/duplicity/.local/share/systemd/user/backup.service @@ -0,0 +1,7 @@ +[Unit] +Description=Backup with duplicity +After=network.target + +[Service] +Type=oneshot +ExecStart=bash ${HOME}/.local/bin/backup diff --git a/stow/duplicity/.local/share/systemd/user/backup.timer b/stow/duplicity/.local/share/systemd/user/backup.timer new file mode 100644 index 0000000..b7815d6 --- /dev/null +++ b/stow/duplicity/.local/share/systemd/user/backup.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run backup every four hours + +[Timer] +OnCalendar=*-*-* 0/4:15 +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/stow/git/.config/git/config b/stow/git/.config/git/config new file mode 100644 index 0000000..71bf668 --- /dev/null +++ b/stow/git/.config/git/config @@ -0,0 +1,49 @@ +[user] + name = Matt Singleton + email = matt@xcolour.net + +[alias] + st = status + ci = commit + br = branch + co = checkout + df = diff + lg = log -p + +[core] + whitespace = trailing-space,space-before-tab,cr-at-eol + editor = vim + autocrlf = input + excludesfile = ~/.config/git/ignore + pager = less -+$LESS -RSX + +[push] + default = nothing + +[color] + ui = true + +[mergetool] + keepTemporaries = false + prompt = false + +[mergetool "vimdiff"] + layout = "LOCAL,BASE,REMOTE / MERGED + BASE,LOCAL + BASE,REMOTE" + +[merge] + tool = vimdiff + conflictstyle = zdiff3 + +[diff] + tool = vimdiff + colorMoved = default + algorithm = histogram + +[init] + defaultBranch = main + +[pull] + ff = only + +[include] + path = config-local diff --git a/stow/git/.config/git/ignore b/stow/git/.config/git/ignore new file mode 100644 index 0000000..57dd8e6 --- /dev/null +++ b/stow/git/.config/git/ignore @@ -0,0 +1,11 @@ +*.class +*.pyc +*.swo +*.swp +.svn +.swo +*#* +# +.#* +doc/tags +.DS_STORE diff --git a/stow/vim/.vim/autoload/airline/themes/tempus.vim b/stow/vim/.vim/autoload/airline/themes/tempus.vim new file mode 100644 index 0000000..e24f167 --- /dev/null +++ b/stow/vim/.vim/autoload/airline/themes/tempus.vim @@ -0,0 +1,35 @@ +" Color sets: +" guigfg guibg ctermfg ctermbg +let s:dark = [ '#eff0f2' , '#676364' , 15 , 8 ] +let s:light = [ '#676364' , '#dee2e0' , 0 , 7 ] +let s:blue = [ '#eff0f2' , '#4b529a' , 15 , 12 ] +let s:yellow = [ '#eff0f2' , '#8b590a' , 15 , 11 ] +let s:red = [ '#eff0f2' , '#a64822' , 15 , 9 ] +let s:green = [ '#eff0f2' , '#187408' , 15 , 10 ] + +let g:airline#themes#tempus#palette = {} + +let g:airline#themes#tempus#palette.accents = { + \ 'red': [ '#a64822' , '' , 9 , '' ], + \ } + +" Normal Mode: +let g:airline#themes#tempus#palette.normal = airline#themes#generate_color_map(s:blue, s:dark, s:light) + +" Insert Mode: +let g:airline#themes#tempus#palette.insert = copy(g:airline#themes#tempus#palette.normal) +let g:airline#themes#tempus#palette.insert.airline_a = s:yellow +let g:airline#themes#tempus#palette.insert.airline_z = s:yellow + +" Replace Mode: +let g:airline#themes#tempus#palette.replace = copy(g:airline#themes#tempus#palette.normal) +let g:airline#themes#tempus#palette.replace.airline_a = s:red +let g:airline#themes#tempus#palette.replace.airline_z = s:red + +" Visual Mode: +let g:airline#themes#tempus#palette.visual = copy(g:airline#themes#tempus#palette.normal) +let g:airline#themes#tempus#palette.visual.airline_a = s:green +let g:airline#themes#tempus#palette.visual.airline_z = s:green + +" Inactive: +let g:airline#themes#tempus#palette.inactive = airline#themes#generate_color_map(s:light, s:light, s:light) diff --git a/stow/vim/.vim/pack/my-plugins/start/ale b/stow/vim/.vim/pack/my-plugins/start/ale new file mode 160000 index 0000000..6db58b3 --- /dev/null +++ b/stow/vim/.vim/pack/my-plugins/start/ale @@ -0,0 +1 @@ +Subproject commit 6db58b33795430a6165f27c7f796c420c0e098e4 diff --git a/stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip b/stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip new file mode 160000 index 0000000..08b0100 --- /dev/null +++ b/stow/vim/.vim/pack/my-plugins/start/bufexplorer.zip @@ -0,0 +1 @@ +Subproject commit 08b0100f5242e1de07bce40dc6376a4996791c33 diff --git a/stow/vim/.vim/pack/my-plugins/start/ctrlp.vim b/stow/vim/.vim/pack/my-plugins/start/ctrlp.vim new file mode 160000 index 0000000..7c972cb --- /dev/null +++ b/stow/vim/.vim/pack/my-plugins/start/ctrlp.vim @@ -0,0 +1 @@ +Subproject commit 7c972cb19c8544c681ca345c64ec39e04f4651cc diff --git a/stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim b/stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim new file mode 160000 index 0000000..b720ee2 --- /dev/null +++ b/stow/vim/.vim/pack/my-plugins/start/tempus-themes-vim @@ -0,0 +1 @@ +Subproject commit b720ee2d4c5588b5a27bb3544d3ded5ee1acab45 diff --git a/stow/vim/.vim/pack/my-plugins/start/vim-airline b/stow/vim/.vim/pack/my-plugins/start/vim-airline new file mode 160000 index 0000000..d9f42cb --- /dev/null +++ b/stow/vim/.vim/pack/my-plugins/start/vim-airline @@ -0,0 +1 @@ +Subproject commit d9f42cb46710e31962a9609939ddfeb0685dd779 diff --git a/stow/vim/.vim/pack/my-plugins/start/vim-dirvish b/stow/vim/.vim/pack/my-plugins/start/vim-dirvish new file mode 160000 index 0000000..3851bed --- /dev/null +++ b/stow/vim/.vim/pack/my-plugins/start/vim-dirvish @@ -0,0 +1 @@ +Subproject commit 3851bedb7f191b9a4a5531000b6fc0a8795cc9bb diff --git a/stow/vim/.vim/pack/my-plugins/start/vim-eunuch b/stow/vim/.vim/pack/my-plugins/start/vim-eunuch new file mode 160000 index 0000000..8fb3904 --- /dev/null +++ b/stow/vim/.vim/pack/my-plugins/start/vim-eunuch @@ -0,0 +1 @@ +Subproject commit 8fb3904be27b6b60d086f87c2570085902414069 diff --git a/stow/vim/.vim/pack/my-plugins/start/vim-gitgutter b/stow/vim/.vim/pack/my-plugins/start/vim-gitgutter new file mode 160000 index 0000000..67ef116 --- /dev/null +++ b/stow/vim/.vim/pack/my-plugins/start/vim-gitgutter @@ -0,0 +1 @@ +Subproject commit 67ef116100b40f9ca128196504a2e0bc0a2753b0 diff --git a/stow/vim/.vim/pack/my-plugins/start/vim-sensible b/stow/vim/.vim/pack/my-plugins/start/vim-sensible new file mode 160000 index 0000000..3e878ab --- /dev/null +++ b/stow/vim/.vim/pack/my-plugins/start/vim-sensible @@ -0,0 +1 @@ +Subproject commit 3e878abfd6ddc6fb5dba48b41f2b72c3a2f8249f diff --git a/stow/vim/.vimrc b/stow/vim/.vimrc new file mode 100644 index 0000000..483adc6 --- /dev/null +++ b/stow/vim/.vimrc @@ -0,0 +1,115 @@ +" +" behavior +" + +set nocompatible " use vim, not vi settings +set wildignore=*.pyc,.git " ignore from autocomplete +set showcmd " display incomplete commands +set ignorecase " ignore case in search +set smartcase " respect case in search if uppercase is used +set nowrap " do not wrap lines +set vb t_vb= " no beeping + +" +" formatting +" + +set tabstop=2 +set softtabstop=2 +set shiftwidth=2 +set expandtab +set shiftround +set listchars=tab:»·,trail:· +set list + +" +" filetype-specific +" + +if has("autocmd") + au! + + " plain text + au FileType text setlocal tw=80 + au FileType markdown setlocal tw=80 + + " python + au FileType python setlocal ts=4 sw=4 sts=4 + + " makefiles + au FileType make setlocal nolist + + " When editing a file, always jump to the last known cursor position. + " Don't do it when the position is invalid or when inside an event handler + au BufReadPost * + \ if line("'\"") > 0 && line("'\"") <= line("$") | + \ exe "normal g`\"" | + \ endif +endif + +" +" bindings +" + +let mapleader = "," + +" convenience +nnoremap x :source ~/.vimrc +nnoremap +nnoremap j +nnoremap k +nnoremap h +nnoremap l + +" dirvish +nnoremap e :Dirvish + +" bufexplore +nnoremap fe :BufExplorer +nnoremap fs :BufExplorerHorizontalSplit +nnoremap fv :BufExplorerVerticalSplit + +" ctrlp +let g:ctrlp_map ='a' + +" ale +nnoremap r :ALEDetail +let g:ale_linters_ignore = {'python': ['mypy']} " mypy is too slow and doesn't support dmypy + +" +" visual +" + +set background=light +silent! colo tempus_totus +let g:airline_theme='tempus' +set hlsearch +syntax enable + +" don't mess up gutter highlight with gitgutter +highlight clear SignColumn +hi! link SignColumn Background + +" Highlight non-ascii characters as the theme highlights errors +hi clear nonascii +hi link nonascii Error +if has("autocmd") + au BufReadPost * syntax match nonascii /[^\d0-\d127]/ +endif + +" highlight trailing space and tab as the theme highlights errors +hi clear SpecialKey +hi link SpecialKey Error + +let g:airline_powerline_fonts = 1 +let g:airline_left_sep="" +let g:airline_right_sep = "" +let g:airline_skip_empty_sections = 1 + +" +" local additions +" + +if filereadable($HOME."/.vimrc-local") + source ~/.vimrc-local +endif diff --git a/stow/zsh/.config/zsh/.zprofile b/stow/zsh/.config/zsh/.zprofile new file mode 100644 index 0000000..68b0ec4 --- /dev/null +++ b/stow/zsh/.config/zsh/.zprofile @@ -0,0 +1,4 @@ +if [ "$(uname)" = "Darwin" ]; then + # disable Apple Terminal's annoying session restore feature + SHELL_SESSIONS_DISABLE=1 +fi diff --git a/stow/zsh/.config/zsh/.zshrc b/stow/zsh/.config/zsh/.zshrc new file mode 100644 index 0000000..f33ca44 --- /dev/null +++ b/stow/zsh/.config/zsh/.zshrc @@ -0,0 +1,4 @@ +for f in $ZDOTDIR/*.zsh +do + source "${f}" +done diff --git a/stow/zsh/.config/zsh/20-appearance.zsh b/stow/zsh/.config/zsh/20-appearance.zsh new file mode 100644 index 0000000..fa3c3cc --- /dev/null +++ b/stow/zsh/.config/zsh/20-appearance.zsh @@ -0,0 +1,79 @@ +# +# colorize shell programs + +if ls -Z . &>/dev/null 2>&1; then + # gnu coreutils? + alias ls='ls --color=auto' + eval `dircolors ${XDG_CONFIG_HOME:-${HOME}/.config}/dircolors.conf` +elif (( $+commands[gls] )); then + # prefixed gnu coreutils? + alias ls='gls --color=auto' + eval `gdircolors ${XDG_CONFIG_HOME:-${HOME}/.config}/dircolors.conf` +else + # assume bsd ls + alias ls='ls -G' + export LSCOLORS="exgxbxdxcxegedxbxgxcxd" +fi + +# grep +alias grep='grep --color=auto' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' + +# less +export LESS_TERMCAP_mb=$'\e[1;31m' # begin blinking - bold red +export LESS_TERMCAP_md=$'\e[1;36m' # begin bold - bold cyan +export LESS_TERMCAP_me=$'\e[0m' # end mode +export LESS_TERMCAP_so=$'\e[33;47m' # begin standout mode - yellow on light gray ("white") +export LESS_TERMCAP_se=$'\e[0m' # end standout mode +export LESS_TERMCAP_us=$'\e[4;35m' # begin underline - magenta underline +export LESS_TERMCAP_ue=$'\e[0m' # end underline +export MANROFFOPT="-c" + +# +# make a sweet prompt + +autoload colors; colors; +setopt prompt_subst # expansion of color codes, etc. in the prompt + +# print the fully resolved shell command with time stamp +# to be run from zsh's builtin 'preexec' with all arguments passed through ($*) +function theme_preexec () { + echo "($fg[magenta]`date +%r`$reset_color) $fg[cyan]$3$reset_color" +} + +# print the prompt char in red if the last command exited non-zero +function prompt_char { + echo "%(?.$.%{$fg[red]%}$%{$reset_color%})" +} + +function repo_prompt_info { + # git + ref=$(git symbolic-ref HEAD 2> /dev/null || git rev-parse --short HEAD 2> /dev/null) + if [ $? -eq 0 ]; then + #repo=$(basename $(git rev-parse --show-toplevel)) + echo "%{$fg[cyan]%}${ref#refs/heads/}%{$reset_color%}" + return + fi +} + +function workspace_prompt_info { + repo=$(repo_prompt_info) + if [ "$repo" ]; then + echo "[$repo] " + return + fi +} + +# print the hostname in green if local, else red +function hostname_info { + if [[ $ZSH_LOCAL_ENV == "true" ]]; then + echo "%{$fg[green]%}%{$ZSH_HOST_PREFIX%}%m%{$ZSH_HOST_SUFFIX%}%{$reset_color%}" + else + echo "%{$fg[red]%}%{$ZSH_HOST_PREFIX%}%m%{$ZSH_HOST_SUFFIX%}%{$reset_color%}" + fi +} + +# a colorful multiline prompt using the above defined functions +PROMPT=$'%{$fg[yellow]%}%n%{$reset_color%}@$(hostname_info):%{$fg[blue]%}%~%{$reset_color%} +$(workspace_prompt_info)$(prompt_char)%{$reset_color%} ' diff --git a/stow/zsh/.config/zsh/30-behavior.zsh b/stow/zsh/.config/zsh/30-behavior.zsh new file mode 100644 index 0000000..6b2b2c2 --- /dev/null +++ b/stow/zsh/.config/zsh/30-behavior.zsh @@ -0,0 +1,54 @@ +# +# execution + +setopt rm_star_wait # wait 10 seconds before accepting 'rm *' confirmation +export REPORTTIME=5 # report timing for any command longer than 5 seconds +unsetopt flowcontrol # disable ^s from freezing the terminal + +# +# history + +HISTFILE="${XDG_DATA_HOME:-${HOME}/.local/share}/zsh/history" +HISTSIZE=10000 +SAVEHIST=10000 + +setopt hist_ignore_all_dups # ignore dups including non-sequential ones +setopt share_history # share command history data between sessions +setopt hist_verify # load hist into command buffer rather than exec immediately + +# +# term support + +# make sure $TERM is installed +# if not, fall back on xterm-256color +infocmp "$TERM" > /dev/null 2>&1 || export TERM=xterm-256color + +# set term title appropriately based on term type +# user@host:current_dir (current_command) +case "$TERM" in + xterm*|rxvt*|screen*|alacritty*|foot) + term_preexec () { + printf '\e]0;%s (%s)\a' ${(%):-'%n@%m:%~'} "$1" + } + term_precmd () { + printf '\e]0;%s\a' ${(%):-'%n@%m:%~'} + } + ;; +esac + +# +# draw a horizontal separator + +function hr { + printf "$bg[red]${(l:$COLUMNS:: :)}$reset_color\n" + printf "$bg[yellow]${(l:$COLUMNS:: :)}\n" + printf "$bg[green]${(l:$COLUMNS:: :)}\n" + printf "$bg[cyan]${(l:$COLUMNS:: :)}\n" + printf "$bg[blue]${(l:$COLUMNS:: :)}\n" + printf "$bg[magenta]${(l:$COLUMNS:: :)}$reset_color\n" +} + +# +# less + +export LESS=-i diff --git a/stow/zsh/.config/zsh/40-key-bindings.zsh b/stow/zsh/.config/zsh/40-key-bindings.zsh new file mode 100644 index 0000000..4deac62 --- /dev/null +++ b/stow/zsh/.config/zsh/40-key-bindings.zsh @@ -0,0 +1,6 @@ +bindkey -e # use emacs mode +bindkey '^r' history-incremental-search-backward # ctrl-r +bindkey '^[[Z' reverse-menu-complete # shift-tab + +bindkey '\e[3~' delete-char # make sure delete key works +bindkey ' ' magic-space # also do history expansion on space diff --git a/stow/zsh/.config/zsh/50-completion.zsh b/stow/zsh/.config/zsh/50-completion.zsh new file mode 100644 index 0000000..23cb052 --- /dev/null +++ b/stow/zsh/.config/zsh/50-completion.zsh @@ -0,0 +1,27 @@ +# initialize the completion system +autoload -U compinit +compinit -d "${XDG_CACHE_HOME:-${HOME}/.cache}/zsh/zcompdump" +zmodload zsh/complist + +# complete only after the second consecutive tab +setopt auto_menu + +# use GNU ls color specification for completion menu +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} + +# use menu selection by default +zstyle ':completion:*:default' menu select + +# disable named-directories autocompletion +zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories +cdpath=(.) + +# don't autocomplete local users for (ssh|ftp|scp|rsync) +zstyle ':completion:*:*:(ssh|ftp|scp|rsync):*' users + +# Use caching so that commands like apt and dpkg complete are useable +zstyle ':completion::complete:*' use-cache 1 +zstyle ':completion:*' cache-path "${XDG_CACHE_HOME:-${HOME}/.cache}/zsh/zcompcache" + +# always rehash commands list +zstyle ':completion:*:commands' rehash 1 diff --git a/stow/zsh/.config/zsh/60-graphical-session.zsh b/stow/zsh/.config/zsh/60-graphical-session.zsh new file mode 100644 index 0000000..3d4b53a --- /dev/null +++ b/stow/zsh/.config/zsh/60-graphical-session.zsh @@ -0,0 +1,8 @@ +if [ -n "$XDG_SESSION_DESKTOP" ] && command -v gnome-keyring-daemon > /dev/null; then + # load the keyring daemon into the environment if: + # - we're in a graphical session + # - the daemon is installed + # starts the daemon if it hasn't been started already, + # otherwise just exports the auth socket of the existing daemon + export $(gnome-keyring-daemon --start 2> /dev/null) +fi diff --git a/stow/zsh/.config/zsh/99-function-overrides.zsh b/stow/zsh/.config/zsh/99-function-overrides.zsh new file mode 100644 index 0000000..8b233e5 --- /dev/null +++ b/stow/zsh/.config/zsh/99-function-overrides.zsh @@ -0,0 +1,8 @@ +preexec () { + type term_preexec &> /dev/null && term_preexec $* + type theme_preexec &> /dev/null && theme_preexec $* +} + +precmd () { + type term_precmd &> /dev/null && term_precmd +} diff --git a/stow/zsh/.zshenv b/stow/zsh/.zshenv new file mode 100644 index 0000000..a573065 --- /dev/null +++ b/stow/zsh/.zshenv @@ -0,0 +1 @@ +export ZDOTDIR="${XDG_CONFIG_HOME:-${HOME}/.config}/zsh" diff --git a/systemd/linux/backup.service b/systemd/linux/backup.service deleted file mode 100644 index c1adfde..0000000 --- a/systemd/linux/backup.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Backup with duplicity -After=network.target - -[Service] -Type=oneshot -ExecStart=bash ${HOME}/.local/bin/backup diff --git a/systemd/linux/backup.timer b/systemd/linux/backup.timer deleted file mode 100644 index b7815d6..0000000 --- a/systemd/linux/backup.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Run backup every four hours - -[Timer] -OnCalendar=*-*-* 0/4:15 -Persistent=true - -[Install] -WantedBy=timers.target diff --git a/vim/airline/themes/tempus.vim b/vim/airline/themes/tempus.vim deleted file mode 100644 index e24f167..0000000 --- a/vim/airline/themes/tempus.vim +++ /dev/null @@ -1,35 +0,0 @@ -" Color sets: -" guigfg guibg ctermfg ctermbg -let s:dark = [ '#eff0f2' , '#676364' , 15 , 8 ] -let s:light = [ '#676364' , '#dee2e0' , 0 , 7 ] -let s:blue = [ '#eff0f2' , '#4b529a' , 15 , 12 ] -let s:yellow = [ '#eff0f2' , '#8b590a' , 15 , 11 ] -let s:red = [ '#eff0f2' , '#a64822' , 15 , 9 ] -let s:green = [ '#eff0f2' , '#187408' , 15 , 10 ] - -let g:airline#themes#tempus#palette = {} - -let g:airline#themes#tempus#palette.accents = { - \ 'red': [ '#a64822' , '' , 9 , '' ], - \ } - -" Normal Mode: -let g:airline#themes#tempus#palette.normal = airline#themes#generate_color_map(s:blue, s:dark, s:light) - -" Insert Mode: -let g:airline#themes#tempus#palette.insert = copy(g:airline#themes#tempus#palette.normal) -let g:airline#themes#tempus#palette.insert.airline_a = s:yellow -let g:airline#themes#tempus#palette.insert.airline_z = s:yellow - -" Replace Mode: -let g:airline#themes#tempus#palette.replace = copy(g:airline#themes#tempus#palette.normal) -let g:airline#themes#tempus#palette.replace.airline_a = s:red -let g:airline#themes#tempus#palette.replace.airline_z = s:red - -" Visual Mode: -let g:airline#themes#tempus#palette.visual = copy(g:airline#themes#tempus#palette.normal) -let g:airline#themes#tempus#palette.visual.airline_a = s:green -let g:airline#themes#tempus#palette.visual.airline_z = s:green - -" Inactive: -let g:airline#themes#tempus#palette.inactive = airline#themes#generate_color_map(s:light, s:light, s:light) -- cgit v1.2.3