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. # list of directories.
# #
# default: /usr/share/aerc/stylesets/ # 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. # 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 # 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 # 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 which contains "text". Use header,~regex to match against a regex.
subject,~^\[PATCH=awk -f /usr/share/aerc/filters/hldiff subject,~^\[PATCH=awk -f ~/local/share/aerc/filters/hldiff
#text/html=/usr/share/aerc/filters/html text/html=~/local/share/aerc/filters/html
text/*=awk -f /usr/share/aerc/filters/plaintext text/*=awk -f ~/local/share/aerc/filters/plaintext
#image/*=catimg -w $(tput cols) - #image/*=catimg -w $(tput cols) -
[triggers] [triggers]
@ -187,7 +187,7 @@ new-email=
# list of directories. # list of directories.
# #
# default: /usr/share/aerc/templates/ # 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. # 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!) 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 " 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 " gemtext syntax highlighting; I know there are more popular alternatives but
" this is the best IMO " this is the best IMO
Plug 'https://git.sr.ht/~torresjrjr/gemini.vim' Plug 'https://git.sr.ht/~torresjrjr/gemini.vim'
@ -55,6 +55,7 @@ Plug 'cespare/vim-toml'
Plug 'blankname/vim-fish' Plug 'blankname/vim-fish'
Plug 'hedyhli/vim-bun' Plug 'hedyhli/vim-bun'
Plug 'https://git.rawtext.club/slope-lang/slope-vim-syntax' Plug 'https://git.rawtext.club/slope-lang/slope-vim-syntax'
Plug 'mzlogin/vim-markdown-toc'
call plug#end() call plug#end()
" Plugin declarations ends here " Plugin declarations ends here

View File

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

View File

@ -10,26 +10,27 @@ cross-platform as possible.
Mirrors: [tildegit (gitea)](https://tildegit.org/hedy/dotfiles) | Mirrors: [tildegit (gitea)](https://tildegit.org/hedy/dotfiles) |
[GitHub](https://github.com/hedyhli/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** **Table of Contents**
- [Overview](#overview) <!-- vim-markdown-toc GFM -->
- [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)
<!-- 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 ## Overview
@ -62,9 +63,12 @@ These are more like "what I tend to do" in this repo
## Installation ## Installation
1. Install yadm 1. Install yadm
2. Clone the repo with yadm 1. Clone the repo with yadm
3. Fix conflicts as you please 1. 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. Reload sessions
- fish
- `tmux source ~/.tmux.conf`
1. Selectively run scripts in [`dotscripts`](./dotscripts/) using `dot <type> <target>` such as `dot setup fish`
## Details ## 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 #!/usr/bin/env bash
echo "installing vim-plug for nvim" DEST=${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim"
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' 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" echo "installing nvim plugins"
nvim +PlugInstall nvim +PlugInstall