Squashing commits to fix history ugh

nvim: Setup script install plug only if isn't installed

Part of my effort to make the scripts able to be run >once

--

README: Installation stuff and modify ToC

--

nvim: Add markdown ToC plugin

--

git: Config file tabs to spaces

--

aerc: Use ~/local/share/aerc and add setup script
This commit is contained in:
Hedy Li 2021-09-22 17:42:45 +08:00
parent dac2b6d154
commit 8f514dd679
Signed by: hedy
GPG Key ID: B51B5A8D1B176372
6 changed files with 102 additions and 70 deletions

View File

@ -71,7 +71,7 @@ next-message-on-delete=true
# list of directories.
#
# default: /usr/share/aerc/stylesets/
#stylesets-dirs=/usr/share/aerc/stylesets/
stylesets-dirs=~/local/share/aerc/stylesets/
# Sets the styleset to use for the aerc ui elements.
#
@ -163,9 +163,9 @@ address-book-cmd=
# You can also match on non-mimetypes, by prefixing with the header to match
# against (non-case-sensitive) and a comma, e.g. subject,text will match a
# subject which contains "text". Use header,~regex to match against a regex.
subject,~^\[PATCH=awk -f /usr/share/aerc/filters/hldiff
#text/html=/usr/share/aerc/filters/html
text/*=awk -f /usr/share/aerc/filters/plaintext
subject,~^\[PATCH=awk -f ~/local/share/aerc/filters/hldiff
text/html=~/local/share/aerc/filters/html
text/*=awk -f ~/local/share/aerc/filters/plaintext
#image/*=catimg -w $(tput cols) -
[triggers]
@ -187,7 +187,7 @@ new-email=
# list of directories.
#
# default: /usr/share/aerc/templates/
#template-dirs=/usr/share/aerc/templates/
template-dirs=~/local/share/aerc/templates/
# The template to be used for quoted replies.
#

View File

@ -47,7 +47,7 @@ Plug 'airblade/vim-gitgutter' " Show git diff overview stuff in the left colum
Plug 'majutsushi/tagbar' " Quickly jump to a symbol in buffer (one of my most used omg!)
" TODO: Figure out a way of using both endwise and auto pair
" === File type or syntax plugins ===
" === File type, syntax, or language helper plugins ===
" gemtext syntax highlighting; I know there are more popular alternatives but
" this is the best IMO
Plug 'https://git.sr.ht/~torresjrjr/gemini.vim'
@ -55,6 +55,7 @@ Plug 'cespare/vim-toml'
Plug 'blankname/vim-fish'
Plug 'hedyhli/vim-bun'
Plug 'https://git.rawtext.club/slope-lang/slope-vim-syntax'
Plug 'mzlogin/vim-markdown-toc'
call plug#end()
" Plugin declarations ends here

View File

@ -1,68 +1,70 @@
[core]
editor = nv
autocrlf = input
excludesfile = /home/hedy/.gitignore_global
pager = diff-so-fancy | less --tabs=4 -RFX
editor = nv
autocrlf = input
excludesfile = /home/hedy/.gitignore_global
pager = diff-so-fancy | less --tabs=4 -RFX
[user]
name = Hedy Li
email = hedy@tilde.cafe # email overidden in [include]
signingkey = B51B5A8D1B176372 # and this
name = Hedy Li
email = hedy@tilde.cafe # email overidden in [include]
signingkey = B51B5A8D1B176372 # and this
[init]
# I don't want people to complain and main is shorter to type so yeah
defaultBranch = main
[alias]
s = status
c = commit
b = branch
ls-alias = config --get-regexp alias
l = log --oneline
ll = log
ss = status -s
ch = checkout
chb = checkout -b
mylog = log --pretty=format:'%C(yellow)%h %C(bold blue)%an, %C(green)%ar: %C(white)"%s"'
lgraph = log --oneline --graph --decorate --all
brd = branch -d
fame = !python3 -m gitfame
p = push
cmam = commit -am
pushall = !git remote | xargs -L1 git push --all
s = status
c = commit
b = branch
ls-alias = config --get-regexp alias
l = log --oneline
ll = log
ss = status -s
ch = checkout
chb = checkout -b
mylog = log --pretty=format:'%C(yellow)%h %C(bold blue)%an, %C(green)%ar: %C(white)"%s"'
lgraph = log --oneline --graph --decorate --all
brd = branch -d
fame = !python3 -m gitfame
p = push
cmam = commit -am
pushall = !git remote | xargs -L1 git push --all
# Same as pushall but not for all branches
pall = !git remote | xargs -L1 git push
[credential]
helper = store --file="$HOME/.git_creds"
helper = cache --timeout 90000
helper = store --file="$HOME/.git_creds"
helper = cache --timeout 90000
[help]
autocorrect = 30
autocorrect = 30
[pull]
rebase = false
rebase = false
[commit]
gpgsign = true
gpgsign = true
# sendmail conig in [include]
[include]
path = ~/.gitconfig-local
path = ~/.gitconfig-local
# diff-so-fancy
[color]
ui = true
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = 11
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
meta = 11
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[push]
followTags = true
followTags = true

View File

@ -10,26 +10,27 @@ cross-platform as possible.
Mirrors: [tildegit (gitea)](https://tildegit.org/hedy/dotfiles) |
[GitHub](https://github.com/hedyhli/dotfiles)
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
**Table of Contents**
- [Overview](#overview)
- [Features](#features)
- [Installation](#installation)
- [Details](#details)
- [Shell](#shell)
- [oh my fish](#oh-my-fish)
- [fish functions](#fish-functions)
- [local](#local)
- [editor](#editor)
- [vim and nvim](#vim-and-nvim)
- [emacs](#emacs)
- [Vanilla emacs](#vanilla-emacs)
- [Doom emacs](#doom-emacs)
- [Gemini and Spartan client](#gemini-and-spartan-client)
- [TODO](#todo)
<!-- vim-markdown-toc GFM -->
<!-- markdown-toc end -->
* [Overview](#overview)
* [Features](#features)
* [Installation](#installation)
* [Details](#details)
* [Shell](#shell)
* [oh my fish](#oh-my-fish)
* [fish functions](#fish-functions)
* [local](#local)
* [editor](#editor)
* [vim and nvim](#vim-and-nvim)
* [emacs](#emacs)
* [Vanilla emacs](#vanilla-emacs)
* [Doom emacs](#doom-emacs)
* [Gemini and Spartan client](#gemini-and-spartan-client)
* [TODO](#todo)
<!-- vim-markdown-toc -->
## Overview
@ -62,9 +63,12 @@ These are more like "what I tend to do" in this repo
## Installation
1. Install yadm
2. Clone the repo with yadm
3. Fix conflicts as you please
4. Selectively run scripts in [`dotscripts`](./dotscripts/) (in the future, you'll be able to use the `bin/dot` utility)
1. Clone the repo with yadm
1. Fix conflicts as you please
1. Reload sessions
- fish
- `tmux source ~/.tmux.conf`
1. Selectively run scripts in [`dotscripts`](./dotscripts/) using `dot <type> <target>` such as `dot setup fish`
## Details

21
dotscripts/setup/aerc Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
if ! command -v aerc &> /dev/null; then
echo aerc isnt installed!
echo you should install go, scdoc, clone the repo, make, make install
exit 1
fi
if [[ -d ~/local/share/aerc ]]; then
echo local/share/aerc already exists, youre all good
exit
else
if ! [[ -d /usr/share/aerc ]]; then
echo Neither ~/local/share/aerc nor /use/share/aerc exists!
echo Perhaps aerc wasnt installed properly. Please figure out where aerc share folder is
echo then ln -s manually
exit 1
fi
fi
mkdir -vp ~/local/share
ln -vs /usr/share/aerc ~/local/share/aerc

View File

@ -1,7 +1,11 @@
#!/usr/bin/env bash
echo "installing vim-plug for nvim"
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
DEST=${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim"
if ! [[ -f "$DEST" ]]; then
echo "installing vim-plug for nvim"
sh -c 'curl -fLo "$DEST" --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
fi
echo "installing nvim plugins"
nvim +PlugInstall