dots

git clone git://mattcarlson.org/repos/dots.git
Log | Files | Refs

commit 21c88dda99070af62b90c90b9e0ef5d934720144
Author: Matthew Carlson <matt@mcarlson.xyz>
Date:   Sat, 10 Jul 2021 02:25:12 +0000

dots

Diffstat:
A.config/ash/ashrc | 9+++++++++
A.config/fontconfig/fonts.conf | 14++++++++++++++
A.config/git/config | 6++++++
A.config/mimeapps.list | 39+++++++++++++++++++++++++++++++++++++++
A.config/sh/aliasrc | 71+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/sh/functionrc | 5+++++
A.config/sh/profile | 75+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/vim/vimrc | 182+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/x/xinitrc | 7+++++++
A.config/x/xprofile | 6++++++
A.config/x/xresources | 126+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.local/bin/dwm.sh | 3+++
A.local/bin/shfm.sh | 58++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.local/share/applications/audio.desktop | 4++++
A.local/share/applications/doc.desktop | 4++++
A.local/share/applications/gif.desktop | 4++++
A.local/share/applications/img.desktop | 4++++
A.local/share/applications/txt.desktop | 4++++
A.local/share/applications/vid.desktop | 4++++
A.local/share/applications/web.desktop | 3+++
A.local/share/fonts/font-awesome/font-awesome-5-pro-solid-900.ttf | 0
A.local/share/fonts/gnu-freefont/free-mono.otf | 0
A.local/share/fonts/gnu-freefont/free-sans.otf | 0
A.local/share/fonts/gnu-freefont/free-serif.otf | 0
A.profile | 2++
A.xprofile | 2++
26 files changed, 632 insertions(+), 0 deletions(-)

diff --git a/.config/ash/ashrc b/.config/ash/ashrc @@ -0,0 +1,9 @@ +#!/bin/sh +# +# ashrc + +# aliasrc +[ -f "${XDG_CONFIG_HOME:-${HOME}/.config}/sh/aliasrc" ] && . "${XDG_CONFIG_HOME:-${HOME}/.config}/sh/aliasrc" + +# functionrc +[ -f "${XDG_CONFIG_HOME:-${HOME}/.config}/sh/functionrc" ] && . "${XDG_CONFIG_HOME:-${HOME}/.config}/sh/functionrc" diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf @@ -0,0 +1,14 @@ +<fontconfig> + <alias> + <family>serif</family> + <prefer><family>FreeSerif</family></prefer> + </alias> + <alias> + <family>sans-serif</family> + <prefer><family>FreeSans</family></prefer> + </alias> + <alias> + <family>monospace</family> + <prefer><family>FreeMono</family></prefer> + </alias> +</fontconfig> diff --git a/.config/git/config b/.config/git/config @@ -0,0 +1,6 @@ +[user] + name = Matthew Carlson + email = matt@mcarlson.xyz + signingkey = 9CC4E75365C16465FFE752C94DDBF97211D4EA31 +[commit] + gpgsign = true diff --git a/.config/mimeapps.list b/.config/mimeapps.list @@ -0,0 +1,39 @@ +[Default Applications] + +# application +application/epub+zip=doc.desktop +application/json=txt.desktop +application/pdf=doc.desktop +application/x-tex=txt.desktop + +# audio +audio/flac=audio.desktop +audio/m4a=audio.desktop +audio/mp3=audio.desktop +audio/ogg=audio.desktop +audio/wav=audio.desktop +audio/x-m4a=audio.desktop +audio/x-wav=audio.desktop + +# image +image/gif=gif.desktop +image/jpeg=img.desktop +image/png=img.desktop +image/vnd.djvu=doc.desktop +image/webp=img.desktop +image/x-targa=img.desktop +image/x-tga=img.desktop + +# text +text/css=txt.desktop +text/csv=txt.desktop +text/html=web.desktop +text/javascript=txt.desktop +text/plain=txt.desktop +text/x-shellscript=txt.desktop + +# video +video/mp4=vid.desktop +video/webm=vid.desktop +video/x-matroska=vid.desktop +video/x-msvideo=vid.desktop diff --git a/.config/sh/aliasrc b/.config/sh/aliasrc @@ -0,0 +1,71 @@ +#!/bin/sh +# +# aliasrc + +# unix commands +alias \ + bc='bc -lq' \ + cp='cp -iv' \ + df='df -hT' \ + diff='diff --color=auto' \ + du='du -h' \ + echo='echo -en' \ + egrep='egrep --color=auto' \ + fgrep='fgrep --color=auto' \ + grep='grep --color=auto' \ + ls='ls -ahls --color=auto --group-directories-first' \ + mkdir='mkdir -p' \ + more='less' \ + mv='mv -iv' \ + rmdir='rmdir -pv' \ + vi='vim' + +# gnu/linux +alias \ + free='free -m' + +# startx +[ -f "${XINITRC}" ] && alias startx="startx ${XINITRC}" + +# directories +alias \ + ...='cd ../../' \ + ....='cd ../../../' \ + .....='cd ../../../../' \ + ......='cd ../../../../../' + +# git +alias \ + ga='git add' \ + gb='git branch' \ + gba='git branch -a' \ + gbv='git branch -v' \ + gca='git commit --amend' \ + gch='git checkout $@' \ + gcm='git commit -m' \ + gd='git diff' \ + gdc='git diff --cached' \ + gf='git fetch' \ + gp='git push' \ + gpl='git pull' \ + gplo='git pull origin' \ + gpo='git push origin' \ + gpom='git push origin master' \ + gr='git rebase' \ + gs='git status' \ + gst='git stash' \ + gsta='git stash apply' \ + gstc='git stash clear' \ + gstl='git stash list' \ + gstp='git stash pop' + +# dotfiles +alias dots="/usr/bin/git --git-dir=${HOME}/.dots/ --work-tree=${HOME}" + +# youtube +alias \ + yt="youtube-dl -i -o \"${DOWNLOADS_DIR}/%(uploader)s/%(title)s.%(ext)s\" --add-metadata" \ + yta='yt -f bestaudio/best -x' \ + ytp="youtube-dl -i -o \"${DOWNLOADS_DIR}/%(uploader)s/%(playlist_index)s-%(title)s.%(ext)s\" --add-metadata" \ + ytpa='ytp -f bestaudio/best -x' \ + ytall='yt -cw -f best' diff --git a/.config/sh/functionrc b/.config/sh/functionrc @@ -0,0 +1,5 @@ +#!/bin/sh +# +# functionrc + +shfm() { cd "$(command shfm "${@}")" ; } diff --git a/.config/sh/profile b/.config/sh/profile @@ -0,0 +1,75 @@ +#!/bin/sh +# +# profile + +# kiss linux path for repos +export KISS_PATH='' +KISS_PATH="${KISS_PATH}:${HOME}/repos/repo/core/" +KISS_PATH="${KISS_PATH}:${HOME}/repos/repo/extra/" +KISS_PATH="${KISS_PATH}:${HOME}/repos/repo/xorg/" +KISS_PATH="${KISS_PATH}:${HOME}/repos/community/community/" +KISS_PATH="${KISS_PATH}:${HOME}/repos/bin/bin/" + +# add local scripts to path +export PATH="${PATH}:$(du "${HOME}/.local/bin/" | cut -f2 | tr '\n' ':' | sed 's/:*$//')" + +# programs +export WM='dwm' +export STATUS_BAR='dwmblocks' +export BROWSER='firefox' +export TERMINAL='st' +export FILE_VIEWER='shfm' +export EDITOR='vim' +export MUSIC_PLAYER='cmus' +export MAIL_CLIENT='mutt' +export MEDIA_PLAYER='mpv' +export READER='zathura' +export IMG_VIEWER='feh' + +# xdg base directories +export XDG_CONFIG_HOME="${HOME}/.config/" +export XDG_DATA_HOME="${HOME}/.local/share/" +export XDG_CACHE_HOME="${HOME}/.cache/" +export XDG_STATE_HOME="${HOME}/.local/state/" + +# xdg base directory support +export XINITRC="${XDG_CONFIG_HOME:-${HOME}/.config}/x/xinitrc" +export VIMINIT="source ${XDG_CONFIG_HOME:-${HOME}/.config}/vim/vimrc" +export GNUPGHOME="${XDG_DATA_HOME:-${HOME}/.local/share}/gnupg/" +export ENV="${XDG_CONFIG_HOME:-${HOME}/.config}/ash/ashrc" +export HISTFILE='' + +# folders +export DEV_DIR="${HOME}/dev/" +export DOWNLOADS_DIR="${HOME}/dl/" +export DOCUMENTS_DIR="${HOME}/dox/" +export MAIL_DIR="${HOME}/mail/" +export MUSIC_DIR="${HOME}/music/" +export PICTURES_DIR="${HOME}/pix/" +export VIDEOS_DIR="${HOME}/vids/" + +# gpg +export GNUPG="9CC4E75365C16465FFE752C94DDBF97211D4EA31" + +# colorful man pages +export LESS_TERMCAP_mb=$'\e[01;31m' +export LESS_TERMCAP_md=$'\e[01;38;5;74m' +export LESS_TERMCAP_me=$'\e[0m' +export LESS_TERMCAP_se=$'\e[0m' +export LESS_TERMCAP_so=$'\e[38;5;246m' +export LESS_TERMCAP_ue=$'\e[0m' +export LESS_TERMCAP_us=$'\e[04;38;5;146m' + +# shfm opener +export SHFM_OPENER="${HOME}/.local/bin/shfm.sh" + +# pash +export PASH_KEYID="${GNUPG}" +export PASH_LENGTH=16 +export PASH_PATTERN=_A-Z-a-z-0-9 +export PASH_DIR="${XDG_DATA_HOME:-${HOME}/.local/share}/pash/" +export PASH_CLIP='xclip -sel c' +export PASH_TIMEOUT=60 + +# startx +[ -z "${DISPLAY}" ] && [ "$(tty)" = /dev/tty1 ] && ssh-agent startx "${XINITRC}" &> /dev/null diff --git a/.config/vim/vimrc b/.config/vim/vimrc @@ -0,0 +1,182 @@ +" better safe than sorry +set nocompatible + +" xdg base directory support +set runtimepath^=${XDG_CONFIG_HOME}/vim +set runtimepath+=${XDG_DATA_HOME}/vim +set runtimepath+=${XDG_CONFIG_HOME}/vim/after +set packpath^=${XDG_DATA_HOME}/vim,${XDG_CONFIG_HOME}/vim +set packpath+=${XDG_CONFIG_HOME}/vim/after,${XDG_DATA_HOME}/vim/after +let g:netrw_home = $XDG_DATA_HOME."/vim" +call mkdir($XDG_DATA_HOME."/vim/spell", 'p') +set viewdir=${XDG_DATA_HOME}/vim/view | call mkdir(&viewdir, 'p') +set backupdir=${XDG_CACHE_HOME}/vim/backup | call mkdir(&backupdir, 'p') +set directory=${XDG_CACHE_HOME}/vim/swap | call mkdir(&directory, 'p') +set undodir=${XDG_CACHE_HOME}/vim/undo | call mkdir(&undodir, 'p') +if !has('nvim') | set viminfofile=${XDG_CACHE_HOME}/vim/viminfo | endif + +" enable detection, plugin, and indent +filetype plugin indent on + +" vim-plug: a minimalist vim plugin manager +call plug#begin('~/.config/vim/plugged') +Plug 'vim-airline/vim-airline' +Plug 'cormacrelf/vim-colors-github' +call plug#end() + +" proper colors in st +set t_Co=256 +set termguicolors +let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" +let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" + +" enable github color scheme (dark) +let g:github_colors_soft = 1 +set background=dark +let g:github_colors_block_diffmark = 0 +colorscheme github + +" enable github color scheme for airline +let g:airline_theme = "github" +let g:lightline = { 'colorscheme': 'github' } + +" transparent background if compositor is running +autocmd vimenter * hi Normal guibg=NONE ctermbg=NONE +autocmd vimenter * hi LineNr guibg=NONE ctermbg=NONE +autocmd vimenter * hi NonText guibg=NONE ctermbg=NONE +autocmd vimenter * hi EndOfBuffer guibg=NONE ctermbg=NONE +autocmd vimenter * hi Folded guibg=NONE ctermbg=NONE +autocmd vimenter * hi FoldColumn guibg=NONE ctermbg=NONE +autocmd vimenter * hi SpecialKey guibg=NONE ctermbg=NONE +autocmd vimenter * hi CursorLineNr guibg=NONE ctermbg=NONE + +" highlight current line and bold current line number +set cursorline +hi CursorLineNR cterm=bold + +" remove chars from split bar +highlight VertSplit cterm=NONE + +" recognize syntax +syntax on + +" useful information to display by default +set laststatus=2 +set title +set ruler +set showcmd +set cmdheight=1 + +" relative line numbers +set number relativenumber + +" use system clipboard +set clipboard+=unnamedplus + +" fix backspace not working in insert mode +set backspace=indent,eol,start + +" better searching +set incsearch +set hlsearch +set ignorecase smartcase + +" utf-8 encoding without bom +set encoding=utf-8 nobomb + +" use english (us) for spell checker +set spelllang=en_us + +" tabs +set tabstop=4 +set softtabstop=4 +set expandtab + +" wild menu +set wildmenu +set wildmode=list:longest +set wildignore=*.o + +" show matching brackets/parentheses +set showmatch + +" make splits open to the right +set splitbelow splitright + +" auto indent on new line +set autoindent + +" unsaved work that's not on screen +set hidden + +" disable annoying swap file +set noswapfile + +" disable backups +set nobackup +set nowritebackup + +" increase history and undo levels +set history=10000 +set undolevels=10000 + +" read file if changed outside vim +set autoread + +" disable modeline support +set nomodeline + +" remove trailing whitespace on save/exit +autocmd BufWritePre * %s/\s\+$//e + +" disable auto-commenting behaviour +autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o + +" regular expressions +set magic + +" default file systems +set ffs=unix,dos,mac + +" keep current line in middle of screen when navigating up/down +set scrolloff=1215752191 + +" some settings to improve performance +set lazyredraw +set ttyfast +set complete-=i + +" enable mouse support in vim +set mouse=a + +" set leader key to accessible Space +nnoremap <SPACE> <Nop> +let mapleader=" " + +" redo to just r +nnoremap r <C-R> + +" faster save and quit +nnoremap <leader>s :w!<CR> +nnoremap <leader>q :q!<CR> + +" replace all +nnoremap <leader>r :%s//g<Left><Left> + +" spell checker +map <leader>ss :setlocal spell!<cr> + +" navigate between splits using shift+hjkl +nnoremap <S-h> <C-w>h +nnoremap <S-j> <C-w>j +nnoremap <S-k> <C-w>k +nnoremap <S-l> <C-w>l + +" resize splits using shift+arrows +noremap <S-Left> :vertical resize +1<CR> +noremap <S-Right> :vertical resize -1<CR> +noremap <S-Up> :resize +1<CR> +noremap <S-Down> :resize -1<CR> + +" remove highlight from searched text +nnoremap <CR> :noh<CR><CR> diff --git a/.config/x/xinitrc b/.config/x/xinitrc @@ -0,0 +1,7 @@ +#!/bin/sh +# +# xinitrc + +. "${XDG_CONFIG_HOME:-${HOME}/.config}/x/xprofile" + +${HOME}/.local/bin/dwm.sh diff --git a/.config/x/xprofile b/.config/x/xprofile @@ -0,0 +1,6 @@ +#!/bin/sh +# +# xresources + +feh --no-fehbg --bg-scale "${HOME}/pix/wp/out-of-this-world.jpg" +xrdb "${XDG_CONFIG_HOME:-${HOME}/.config}/x/xresources" diff --git a/.config/x/xresources b/.config/x/xresources @@ -0,0 +1,126 @@ +! colors +#define col0 #282828 +#define col1 #cc241d +#define col2 #98971a +#define col3 #d79921 +#define col4 #458588 +#define col5 #b16286 +#define col6 #689d6a +#define col7 #a89984 +#define col8 #928374 +#define col9 #fb4934 +#define col10 #b8bb26 +#define col11 #fabd2f +#define col12 #83a598 +#define col13 #d3869b +#define col14 #8ec07c +#define col15 #ebdbb2 + +! dwm +dwm.font : monospace:size=18 +dwm.font2 : monospace:size=18 +dwm.normbgcolor : col0 +dwm.normbordercolor : col7 +dwm.normfgcolor : col7 +dwm.selbgcolor : col4 +dwm.selbordercolor : col4 +dwm.selfgcolor : col15 +dwm.borderpx : 3 +dwm.snap : 32 +dwm.topbar : 0 +dwm.showbar : 1 +dwm.nmaster : 1 +dwm.resizehints : 0 +dwm.mfact : 0.50 +dwm.swallowfloating : 0 +dwm.gappih : 15 +dwm.gappiv : 15 +dwm.gappoh : 15 +dwm.gappov : 15 +dwm.vertpad : 0 +dwm.sidepad : 0 +dwm.smartgaps : 0 +dwm.ulinepad : 5 +dwm.ulinestroke : 2 +dwm.ulinevoffset : 0 +dwm.ulineall : 0 + +! dmenu +dmenu.font : monospace:size=18 +dmenu.normfgcolor : col7 +dmenu.normbgcolor : col0 +dmenu.selfgcolor : col15 +dmenu.selbgcolor : col4 +dmenu.prompt : +dmenu.min_width : 500 +dmenu.colorprompt : 1 +dmenu.border_width : 3 + +! herbe +herbe.background_color : col0 +herbe.border_color : col4 +herbe.font_color : col7 +herbe.font_pattern : monospace:size=18 +herbe.line_spacing : 5 +herbe.padding : 5 +herbe.width : 350 +herbe.border_size : 3 +herbe.pos_x : 15 +herbe.pos_y : 42 +herbe.corner : 3 +herbe.duration : 5 + +! st +st.font : monospace:size=18 +st.font2 : monospace:size=18 +st.color0 : col0 +st.color1 : col1 +st.color2 : col2 +st.color3 : col3 +st.color4 : col4 +st.color5 : col5 +st.color6 : col6 +st.color7 : col7 +st.color8 : col8 +st.color9 : col9 +st.color10 : col10 +st.color11 : col11 +st.color12 : col12 +st.color13 : col13 +st.color14 : col14 +st.color15 : col15 +st.background : col0 +st.foreground : col7 +st.cursorColor : col7 +st.termname : st-256color +st.shell : '/bin/sh' +st.minlatency : 8 +st.maxlatency : 33 +st.blinktimeout : 800 +st.bellvolume : 0 +st.tabspaces : 8 +st.borderpx : 2 +st.cwscale : 1.0 +st.chscale : 1.0 +st.doubleclicktimeout : 300 +st.tripleclicktimeout : 600 +st.allowaltscreen : 1 +st.allowwindowops : 0 +st.cursorthickness : 2 +st.boxdraw : 1 +st.boxdraw_bold : 1 +st.boxdraw_braille : 1 +st.alpha : 0.8 +st.alphaUnfocused : 0.6 +st.defaultfg : 15 +st.defaultbg : 258 +st.defaultcs : 256 +st.defaultrcs : 257 +st.bg : 258 +st.bgUnfocused : 258 +st.cursorstyle : 1 +st.cols : 80 +st.rows : 24 +st.mousefg : 7 +st.mousebg : 0 +st.defaultattr : 11 diff --git a/.local/bin/dwm.sh b/.local/bin/dwm.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +while true; do dwm >/dev/null 2>&1; done diff --git a/.local/bin/shfm.sh b/.local/bin/shfm.sh @@ -0,0 +1,58 @@ +#!/bin/sh -e +# +# shfm + +case "${1}" in + # audio + *.flac \ + | *.m4a \ + | *.mp3 \ + | *.ogg \ + | *.opus \ + | *.wav) + "${MEDIA_PLAYER}" --no-video "${1}" + ;; + + # document + *.djvu \ + | *.epub \ + | *.pdf) + "${READER}" "${1}" + ;; + + # gif + *.gif) + "${MEDIA_PLAYER}" --loop "${1}" + ;; + + # image + *.jpeg \ + | *.jpg \ + | *.png \ + | *.tga \ + | *.webp) + "${IMG_VIEWER}" "${1}" + ;; + + # video + *.avi \ + | *.mkv \ + | *.mp4 \ + | *.webm) + "${MEDIA_PLAYER}" "${1}" + ;; + + # web/vector + *.htm \ + | *.html \ + | *.php \ + | *.svg \ + | *.xhtml) + "${BROWSER}" "${1}" + ;; + + # everything else + *) + "${EDITOR:-vi}" "${1}" + ;; +esac diff --git a/.local/share/applications/audio.desktop b/.local/share/applications/audio.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Audio Player +Exec=/usr/bin/mpv --no-video %f diff --git a/.local/share/applications/doc.desktop b/.local/share/applications/doc.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Document Viewer +Exec=/usr/bin/zathura %f diff --git a/.local/share/applications/gif.desktop b/.local/share/applications/gif.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Gif Viewer +Exec=/usr/bin/mpv --loop %f diff --git a/.local/share/applications/img.desktop b/.local/share/applications/img.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=application +Name=Image Viewer +Exec=/usr/bin/feh %f diff --git a/.local/share/applications/txt.desktop b/.local/share/applications/txt.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Text Viewer +Exec=/usr/bin/vim %f diff --git a/.local/share/applications/vid.desktop b/.local/share/applications/vid.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Video Player +Exec=/usr/bin/mpv %f diff --git a/.local/share/applications/web.desktop b/.local/share/applications/web.desktop @@ -0,0 +1,3 @@ +[Desktop Entry] +Type=Application +Exec=/usr/bin/firefox %u diff --git a/.local/share/fonts/font-awesome/font-awesome-5-pro-solid-900.ttf b/.local/share/fonts/font-awesome/font-awesome-5-pro-solid-900.ttf Binary files differ. diff --git a/.local/share/fonts/gnu-freefont/free-mono.otf b/.local/share/fonts/gnu-freefont/free-mono.otf Binary files differ. diff --git a/.local/share/fonts/gnu-freefont/free-sans.otf b/.local/share/fonts/gnu-freefont/free-sans.otf Binary files differ. diff --git a/.local/share/fonts/gnu-freefont/free-serif.otf b/.local/share/fonts/gnu-freefont/free-serif.otf Binary files differ. diff --git a/.profile b/.profile @@ -0,0 +1 @@ +.config/sh/profile +\ No newline at end of file diff --git a/.xprofile b/.xprofile @@ -0,0 +1 @@ +.config/x/xprofile +\ No newline at end of file