vimrc zshrc
This commit is contained in:
@@ -9,251 +9,5 @@ It essentially contains the minimal set of deviations from "Devuan
|
|||||||
with LXDE" defaults that I require in order to not find the computer
|
with LXDE" defaults that I require in order to not find the computer
|
||||||
to be an active hindrance to my productivity:
|
to be an active hindrance to my productivity:
|
||||||
|
|
||||||
# new system config
|
For new machine setup see [New Machine
|
||||||
|
Setup](https://git.harpending.org/pharpend/wiki/wiki/New-Machine-Setup)
|
||||||
terminology:
|
|
||||||
|
|
||||||
- being-set-up machine = mark
|
|
||||||
- already-set-up machine = pilot
|
|
||||||
|
|
||||||
## devuan
|
|
||||||
|
|
||||||
|
|
||||||
### SSHD config
|
|
||||||
|
|
||||||
- copy `id_rsa.pub` from laptop
|
|
||||||
- edit `/etc/ssh/sshd_config` to sane defaults
|
|
||||||
|
|
||||||
in particular:
|
|
||||||
|
|
||||||
1. **disable root login**
|
|
||||||
2. **disable password login**
|
|
||||||
|
|
||||||
### sudo
|
|
||||||
|
|
||||||
- add `pharpend` to `sudo` group:
|
|
||||||
|
|
||||||
```
|
|
||||||
# apt install sudo
|
|
||||||
# usermod -aG pharpend sudo
|
|
||||||
```
|
|
||||||
|
|
||||||
### firefox
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
% sudo apt install firefox
|
|
||||||
```
|
|
||||||
|
|
||||||
- rsync firefox passwords
|
|
||||||
- add to firefox
|
|
||||||
|
|
||||||
### git
|
|
||||||
|
|
||||||
```
|
|
||||||
% sudo apt install git
|
|
||||||
% git config --global init.defaultBranch master
|
|
||||||
% git config --global user.name "Peter Harpending"
|
|
||||||
% git config --global user.email "peter@harpending.org"
|
|
||||||
```
|
|
||||||
|
|
||||||
### `git.harpending.org`
|
|
||||||
|
|
||||||
- ssh keygen
|
|
||||||
|
|
||||||
```
|
|
||||||
% ssh-keygen
|
|
||||||
% cat ~/.ssh/id_ed25519.pub
|
|
||||||
```
|
|
||||||
|
|
||||||
- go to `git.harpending.org` on pilot machine, add ssh key to user
|
|
||||||
profile
|
|
||||||
|
|
||||||
|
|
||||||
### dotfiles
|
|
||||||
|
|
||||||
```
|
|
||||||
% mkdir ~/gho
|
|
||||||
% cd ~/gho
|
|
||||||
% git clone https://git.harpending.org/pharpend/dotfiles-ii.git
|
|
||||||
```
|
|
||||||
|
|
||||||
### tmux
|
|
||||||
|
|
||||||
```
|
|
||||||
% sudo apt install tmux
|
|
||||||
% cp ~/gho/dotfiles-ii/tmux.conf ~/.tmux.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
### zsh
|
|
||||||
|
|
||||||
```
|
|
||||||
% sudo apt install zsh zsh-syntax-highlighting
|
|
||||||
% cp ~/gho/dotfiles-ii/zshrc ~/.zshrc
|
|
||||||
% chsh -s /usr/bin/zsh
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### vim
|
|
||||||
|
|
||||||
```
|
|
||||||
% sudo apt install vim vim-pathogen
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
% cp -rv ~/gho/dotfiles-ii/vimrc ~/.vimrc
|
|
||||||
% cp -rv ~/gho/dotfiles-ii/vim ~/.vim
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### i3
|
|
||||||
|
|
||||||
pulls in i3wm, i3lock, i3status, dunst:
|
|
||||||
|
|
||||||
```
|
|
||||||
% sudo apt install i3
|
|
||||||
% mkdir ~/.i3
|
|
||||||
% cp -rv ~/gho/dotfiles-ii/i3/config ~/.i3/config
|
|
||||||
% cp -rv ~/gho/dotfiles-ii/i3status.conf ~/.i3status.conf
|
|
||||||
```
|
|
||||||
|
|
||||||
### fonts
|
|
||||||
|
|
||||||
```
|
|
||||||
% sudo apt install fonts-liberation fonts-fantasque-sans font-manager
|
|
||||||
```
|
|
||||||
|
|
||||||
to refresh font cache:
|
|
||||||
|
|
||||||
```
|
|
||||||
% fc-cache -fv
|
|
||||||
```
|
|
||||||
|
|
||||||
### terminator
|
|
||||||
|
|
||||||
```
|
|
||||||
% sudo apt install terminator
|
|
||||||
% rsync -avn ~/gho/dotfiles-ii/config/ ~/.config
|
|
||||||
```
|
|
||||||
|
|
||||||
### terminator
|
|
||||||
|
|
||||||
### music
|
|
||||||
|
|
||||||
music
|
|
||||||
|
|
||||||
- dry run (for making sure didn't fuck up confusing af slash syntax):
|
|
||||||
|
|
||||||
```
|
|
||||||
% rsync -avn Music/ pharpend@mark:/home/pharpend/Music
|
|
||||||
```
|
|
||||||
|
|
||||||
- wet run:
|
|
||||||
|
|
||||||
```
|
|
||||||
% rsync -av Music/ pharpend@mark:/home/pharpend/Music
|
|
||||||
```
|
|
||||||
|
|
||||||
### `apt install` shell utilities
|
|
||||||
|
|
||||||
exhaustive-ish
|
|
||||||
|
|
||||||
```
|
|
||||||
# apt install\
|
|
||||||
build-essential \
|
|
||||||
gcc \
|
|
||||||
git \
|
|
||||||
rsync \
|
|
||||||
sudo \
|
|
||||||
tmux \
|
|
||||||
tree \
|
|
||||||
vim \
|
|
||||||
vim-pathogen \
|
|
||||||
zsh \
|
|
||||||
zsh-syntax-highlighting \
|
|
||||||
```
|
|
||||||
|
|
||||||
### `apt install` desktop utilities
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
# apt install\
|
|
||||||
blueman \
|
|
||||||
emacs \
|
|
||||||
firefox \
|
|
||||||
i3 \
|
|
||||||
gthumb \
|
|
||||||
guake \
|
|
||||||
kde-spectacle \
|
|
||||||
mpc \
|
|
||||||
mpd \
|
|
||||||
ncmpcpp \
|
|
||||||
nitrogen \
|
|
||||||
redshift \
|
|
||||||
rxvt-unicode \
|
|
||||||
terminator \
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## freebsd
|
|
||||||
|
|
||||||
- copy `id_rsa.pub`
|
|
||||||
- enable ssh sysadmin:
|
|
||||||
|
|
||||||
# pw groupmod wheel -m pharpend
|
|
||||||
|
|
||||||
- basic shell utilities
|
|
||||||
|
|
||||||
# pkg install tmux zsh vim rsync git lynx tree bash
|
|
||||||
|
|
||||||
- basic graphical environment
|
|
||||||
|
|
||||||
# pkg install \
|
|
||||||
xorg i3 terminator rxvt-unicode dmenu \
|
|
||||||
liberation-fonts-ttf pulseaudio parcellite dunst \
|
|
||||||
nitrogen redshift firefox-esr fantasque-sans-mono \
|
|
||||||
emacs pcmanfm pavucontrol spectacle plasma6-spectacle \
|
|
||||||
scrot vlc viewnior gthumb \
|
|
||||||
|
|
||||||
linux-brave
|
|
||||||
chromium
|
|
||||||
iridium
|
|
||||||
|
|
||||||
- Erlang/zx
|
|
||||||
|
|
||||||
# pkg install \
|
|
||||||
erlang erlang-wx
|
|
||||||
|
|
||||||
# context
|
|
||||||
|
|
||||||
- I set up new machines pretty frequently
|
|
||||||
- This has endowed me with a strong preference for low-maintenance
|
|
||||||
operating systems with sane defaults
|
|
||||||
- The idea here is to have the "minimal" set of dotfiles where I can
|
|
||||||
clone this repo and just copy everything to its location on the new
|
|
||||||
machine
|
|
||||||
- I have found that the system of directly symlinking my dotfiles
|
|
||||||
from the git repo to the local machine is more trouble than it's
|
|
||||||
worth, due to high volume of per-machine diffs.
|
|
||||||
- e.g. laptop needs battery charge info in i3status bar config,
|
|
||||||
desktop machine doesn't; there's a million little things like that
|
|
||||||
that differ from one machine to another
|
|
||||||
- like i said, this is the set of things that despite my best efforts
|
|
||||||
|
|
||||||
- In the past I used Gentoo and Arch Linux and and and and...
|
|
||||||
- That was fun and fulfilling when I was 17 and I had no serious
|
|
||||||
responsibilities in my life.
|
|
||||||
- to be clear, the "I use Arch BTW" phase was an extremely valuable
|
|
||||||
period in which I learned the skills on which I now rely on a day
|
|
||||||
to day basis.
|
|
||||||
- However I'm now in my 30s, and, for better or for worse, I have
|
|
||||||
aged out of finding Arch Linux interesting.
|
|
||||||
- I just can't bring myself to care about the operating system for
|
|
||||||
its own sake any more.
|
|
||||||
- I have converged on "Devuan for everything" because it annoys me
|
|
||||||
the least
|
|
||||||
- In the past it was "Ubuntu for everything" but replacing the GNU
|
|
||||||
coreutils with the Rust coreutils (why?) was the straw that broke
|
|
||||||
the camel's back for me.
|
|
||||||
- I don't know why systemd or snaps weren't that straw
|
|
||||||
|
|||||||
@@ -92,8 +92,9 @@ augroup foo
|
|||||||
" +c = autowrap in insert mode only in comments
|
" +c = autowrap in insert mode only in comments
|
||||||
autocmd FileType * setlocal formatoptions-=t formatoptions+=qnjc
|
autocmd FileType * setlocal formatoptions-=t formatoptions+=qnjc
|
||||||
autocmd FileType * setlocal textwidth=69
|
autocmd FileType * setlocal textwidth=69
|
||||||
" markdown paragraph wrap
|
" markdown: 2 space indent
|
||||||
autocmd FileType * setlocal formatoptions+=tn
|
autocmd FileType markdown setlocal shiftwidth=2
|
||||||
|
autocmd FileType markdown setlocal tabstop=2
|
||||||
" python: pep8 says best textwidth is 80 chars but fuck pep8
|
" python: pep8 says best textwidth is 80 chars but fuck pep8
|
||||||
" but only gently. we'll go with 79
|
" but only gently. we'll go with 79
|
||||||
autocmd FileType python setlocal textwidth=79
|
autocmd FileType python setlocal textwidth=79
|
||||||
@@ -101,7 +102,7 @@ augroup foo
|
|||||||
autocmd FileType xml setlocal formatoptions-=t
|
autocmd FileType xml setlocal formatoptions-=t
|
||||||
" Erlang handle comments beginning with %% | %%% etc
|
" Erlang handle comments beginning with %% | %%% etc
|
||||||
autocmd FileType erlang setlocal comments=:%%%%%,:%%%%,:%%%,:%%,:%
|
autocmd FileType erlang setlocal comments=:%%%%%,:%%%%,:%%%,:%%,:%
|
||||||
autocmd FileType erlang setlocal textwidth=55
|
"autocmd FileType erlang setlocal textwidth=55
|
||||||
autocmd FileType erlang setlocal formatoptions-=t
|
autocmd FileType erlang setlocal formatoptions-=t
|
||||||
" handle numbered lists properly in markdown
|
" handle numbered lists properly in markdown
|
||||||
"autocmd FileType markdown setlocal formatoptions+=n
|
"autocmd FileType markdown setlocal formatoptions+=n
|
||||||
|
|||||||
@@ -20,6 +20,19 @@ alias ls='ls -F -G'
|
|||||||
alias l='ls -l'
|
alias l='ls -l'
|
||||||
alias la='l -a'
|
alias la='l -a'
|
||||||
alias xv='vim -X'
|
alias xv='vim -X'
|
||||||
|
alias xcl='xclip -sel clip'
|
||||||
|
|
||||||
|
qwerty-nocaps() {
|
||||||
|
setxkbmap us -option terminate:ctrl_alt_bksp,compose:ralt,ctrl:nocaps
|
||||||
|
}
|
||||||
|
|
||||||
|
qwerty() {
|
||||||
|
setxkbmap us -option terminate:ctrl_alt_bksp,compose:ralt
|
||||||
|
}
|
||||||
|
|
||||||
|
QWERTY() {
|
||||||
|
setxkbmap us -option terminate:ctrl_alt_bksp,compose:ralt
|
||||||
|
}
|
||||||
|
|
||||||
genid () {
|
genid () {
|
||||||
date | sha1sum | sed -e 's/^\([0-9a-z]\{7\}\).\+/\1/'
|
date | sha1sum | sed -e 's/^\([0-9a-z]\{7\}\).\+/\1/'
|
||||||
@@ -139,3 +152,8 @@ twoln () { echo '2' }
|
|||||||
|
|
||||||
# syntax highlighting
|
# syntax highlighting
|
||||||
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
|
||||||
|
# this has multiple purposes:
|
||||||
|
# 1. sudo -e uses vim by default
|
||||||
|
# 2. codex/claude/git/etc use vim
|
||||||
|
export EDITOR='vim'
|
||||||
|
|||||||
Reference in New Issue
Block a user