From 310c76b161e680a698995d61b2a741a05b384fbe Mon Sep 17 00:00:00 2001 From: ensa Date: Sat, 30 May 2020 02:01:43 -0700 Subject: new functionality, themes, man page bin/ bar.sh: pipes spoon into dzen2 lh: added gemini/gopher handling with bombadillo shortened (no loss of functionality) opener: shortened (no loss of functionality) config/ X11/xprofile: added bar.sh aliasrc: just read it color/colors.sh: color environment variables, like wal's cwmrc: font specified as otb swapped oxbar with bar.sh ksh/ completions.ksh: added completions for shortcut functions diraliases: redone with self-references, more complete functions/ pcl: copies password for $1 to selection uses clip if two arguments pct: copies totp for $1 to selection uses clip if two arguments pkg_complete: uses cache diralias kshrc: added functions command fixed ensuring existence of HISTFILE's dir nvim/init.vim: deleted, no longer used vis/ themes/causalagency.lua: good colorscheme for vis themes/fake256.lua: scrapped visrc.lua: removed change-256color disable added cul nu ai youtube-dl/ config, config-music: fixed output dir zathura/zathurarc: specified cozette otb data/ applications/text.desktop now uses xterm and vis man/man7/user-hier.7 based off hier(7), describes structure of .. home directory --- DEPENDENCIES.md | 43 +++++----- bin/bar.sh | 4 + bin/lh | 19 ++++- bin/opener | 16 +--- config/X11/xprofile | 2 + config/aliasrc | 47 +++++++++++ config/color/colors.sh | 22 +++++ config/cwmrc | 6 +- config/ksh/completions.ksh | 2 + config/ksh/diraliases | 27 +++--- config/ksh/functions/pcl | 8 ++ config/ksh/functions/pct | 8 ++ config/ksh/functions/pkg_complete | 2 +- config/ksh/kshrc | 10 +-- config/nvim/init.vim | 107 ----------------------- config/vis/themes/causalagency.lua | 63 ++++++++++++++ config/vis/themes/fake256.lua | 64 -------------- config/vis/visrc.lua | 7 +- config/youtube-dl/config | 2 +- config/youtube-dl/config-music | 2 +- config/zathura/zathurarc | 2 +- data/applications/text.desktop | 2 +- data/man/man7/user-hier.7 | 169 +++++++++++++++++++++++++++++++++++++ 23 files changed, 400 insertions(+), 234 deletions(-) create mode 100755 bin/bar.sh create mode 100644 config/aliasrc create mode 100755 config/color/colors.sh create mode 100644 config/ksh/functions/pcl create mode 100644 config/ksh/functions/pct delete mode 100644 config/nvim/init.vim create mode 100644 config/vis/themes/causalagency.lua delete mode 100644 config/vis/themes/fake256.lua create mode 100644 data/man/man7/user-hier.7 diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index eef05a1..478b4eb 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -7,12 +7,12 @@ each and every file in this repository can be altered by anyone with any goal, i * `path/item`: one of the files in this repo * `$variable`: a shell variable set somewhere like shrc or .profile * more specifically: - * `$TERMINAL`: value is the user's terminal of choice, e.g [st](https://st.suckless.org) - * `$EDITOR`: value is the user's terminal editor of choice, e.g [neovim](https://neovim.io) + * `$TERMINAL`: value is the user's terminal of choice, e.g [xterm](https://invisible-island.net/xterm) + * `$EDITOR`: value is the user's terminal editor of choice, e.g [vis](https://github.com/martanne/vis) * `$READER`: value is the user's ebook reader of choice, e.g [zathura](https://pwmt.org/projects/zathura) * `$BROWSER`: value is the user's (non-terminal) web browser of choice, e.g [firefox](https://mozilla.org/firefox) - * `$XDG_CONFIG_HOME`: value is the user's config directory according to the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables), usually `$HOME/.config` - * `$XDG_DATA_HOME`: value is the user's data directory according to the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables), usually `$HOME/.local/share` + * `$HOME_ETC`: value is the user's config directory, usually `$HOME/.config` + * `$HOME_DATA`: value is the user's data directory, usually `$HOME/.local/share` * `opt: any of the previous bullets`: same meaning as before but optional * `(description)`: explains why it's necessary/what optional feature it enables if present # bin/ @@ -41,6 +41,7 @@ each and every file in this repository can be altered by anyone with any goal, i * [dmenu](https://dmenu.suckless.org) (used to pick stream quality when handling livestream URLs) * [sxiv](https://github.com/muennich/sxiv) (used to view images) * [curl](https://curl.haxx.se) (images, audio files, ebook files) + * [bombadillo](https://tildegit.org/sloum/bombadillo) (gemini, gopher) * `$TERMINAL` * `$READER` * `$EDITOR` @@ -62,10 +63,14 @@ each and every file in this repository can be altered by anyone with any goal, i * xbg: sets the background or changes the picture used for the background * opt: xdg-user-dir (lets you change the directory bg.png has to be in) * xwallpaper (sets the wallpaper) +* bar.sh: spawns a dzen status bar + * config/color/colors.sh + * [spoon](https://git.2f30.org/spoon) + * [dzen2](https://github.com/robm/dzen) # config/ * cwmrc: config for [cwm](https://man.openbsd.org/cwm) * [Cozette](https://github.com/slavfox/cozette) font - * st + * xterm * slock * `$TERMINAL` * `$ALTSCR` @@ -88,15 +93,15 @@ each and every file in this repository can be altered by anyone with any goal, i * xbacklight * bin/prompt * [doas](https://man.openbsd.org/doas) - * [oxbar](https://github.com/ryanflannery/oxbar) + * bin/bar.sh * xdotool * lf/lfrc: configuration file for [lf](https://github.com/gokcehan/lf) * opt: bin/opener (for opening files) * opt: curl (for uploading temporary content to the [ttm.sh](https://ttm.sh) site) * shrc: shell environment, particularly for bin/shenv - * neovim (`$EDITOR`) + * vis (`$EDITOR`) * lf (`$FILE`) - * st (`$TERMINAL`) + * xterm (`$TERMINAL`) * st-altscreen (`$ALTSCR`) * firefox (`$BROWSER`) * bin/comm-sel (`$COMM`) @@ -108,27 +113,25 @@ each and every file in this repository can be altered by anyone with any goal, i * config/ksh (`$ENV`) * maim (`$SCR`) * slock (`$LOCK`) - * opt: [todo](https://tildegit.org/tomasino/todo) + * opt: [todo](https://git.tilde.institute/ensa/todo) * opt: go (`$GOPATH`) * opt: cargo (`$CARGO_HOME`) + * opt: python (`$PYTHONUSERBASE`) * opt: mednafen (`$MEDNAFEN_HOME`) +* dunst/dunstrc + * [Cozette](https://github.com/slavfox/cozette) font +* zathura/zathurarc + * [Cozette](https://github.com/slavfox/cozette) font ## ksh/ configuration files for ksh * kshrc * config/shrc (for the majority of variables set) + * opt: pfetch (`$PF_INFO`) * functions.ksh * mpv (for mpvpin() to work) -* exports.ksh - * opt: pfetch (`$PF_INFO`) * completions.ksh * `$XDG_CACHE_HOME` -## wal -config templates for [wal](https://github.com/dylanaraps/pywal) -* templates/ - * dunstrc - * [Cozette](https://github.com/slavfox/cozette) font - * zathurarc - * [Cozette](https://github.com/slavfox/cozette) font + * [pass](https://rgz.ee/pass.html) # data/ * mailcap: helps neomutt figure out what to do with particular MIME types * `$EDITOR` @@ -143,7 +146,7 @@ config templates for [wal](https://github.com/dylanaraps/pywal) * rss.desktop * bin/rsschk * text.desktop - * [st](https://st.suckless.org) - * [neovim](https://neovim.io) + * [xterm](https://invisible-island.net/xterm) + * [vis](https://github.com/martanne/vis) * weblight.desktop * [surf](https://surf.suckless.org) diff --git a/bin/bar.sh b/bin/bar.sh new file mode 100755 index 0000000..49500ee --- /dev/null +++ b/bin/bar.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# loads color envs, pipes spoon to dzen +. $HOME_ETC/color/colors.sh +spoon -t|dzen2 -ta r -fg "$color0" -bg "$color1" -fn "Terminus:style=Regular:pixelsize=12" -u -h 13 -w 1366 -l 0 -p diff --git a/bin/lh b/bin/lh index 25a2f62..016b37f 100755 --- a/bin/lh +++ b/bin/lh @@ -4,14 +4,27 @@ # if $1 isn't provided, spawn $BROWSER and exit. this allows lh to be used as a pseudo-browser. [ -z "$1" ] && exec "$BROWSER" +#from pure-sh-bible +split() { + set -f + old_ifs=$IFS + IFS=$2 + set -- $1 + printf '%s\n' "$@" + IFS=$old_ifs + set +f +} + case "$1" in + gemini://*|gopher://*) + $TERMINAL -e bombadillo "$1" ;; *mkv|*webm|*mp4) mpv "$1" >/dev/null 2>&1 & ;; *youtube.com/watch*|*youtube.com/playlist*|*youtu.be*|*hooktube.com*|*bitchute.com*|*twitch.tv/videos/*|*twitch.tv/*/v/*) mpv --ytdl "$1" >/dev/null 2>&1 & ;; *twitch.tv/*) - STREAMQUAL="$(streamlink "$1"|\ - grep "Available streams"|tr " " "\n"|grep -E "[0-9]"|tr -d ,|\ + STREAMQUAL="$(split "$(streamlink "$1"|grep 'Available streams')" ", "|\ + grep -E "[0-9]"|\ dmenu -p "choose stream quality for $1")" streamlink -p mpv $1 $STREAMQUAL >/dev/null 2>&1 & ;; *png|*jpg|*jpe|*jpeg|*gif) @@ -28,7 +41,7 @@ case "$1" in fi ;; *) if [ -f "$1" ]; then - $TERMINAL -e "$EDITOR $1" + $TERMINAL -e "${EDITOR:-vi} $1" else $BROWSER "$1" >/dev/null 2>&1 & fi ;; diff --git a/bin/opener b/bin/opener index 755da51..4ae3446 100755 --- a/bin/opener +++ b/bin/opener @@ -13,27 +13,19 @@ echo() { case "$FILEMIME" in #ebooks application/epub*|application/pdf|application/postscript|image/vnd.djvu) - if [ -n "$READER" ]; then - $READER "$FILEPATH">/dev/null 2>&1 & - else - zathura "$FILEPATH" & - fi ;; + ${READER:-zathura} "$FILEPATH">/dev/null 2>&1 & ;; #videos video/*) - mpv --input-ipc-server=/tmp/mpv-socket$(date +%s) --quiet "$FILEPATH" >/dev/null 2>&1 & ;; + mpv --quiet "$FILEPATH" >/dev/null 2>&1 & ;; #images image/*) sxiv -a "$FILEPATH">/dev/null 2>&1 & ;; #audio audio/*) - mpv --input-ipc-server=/tmp/mpv-socket$(date +%s) "$FILEPATH" >/dev/null 2>&1 & ;; + mpv "$FILEPATH" >/dev/null 2>&1 & ;; #text text/*) - if [ -n "$EDITOR" ]; then - $EDITOR "$FILEPATH">/dev/null 2>&1 & - else - vi "$FILEPATH" & - fi ;; + ${EDITOR:-vi} "$FILEPATH">/dev/null 2>&1 & ;; #catchall *) echo "file $(basename "$FILEPATH") could not be opened. its type is $FILEMIME, go tell ensa that opener didn't work" >/dev/stderr diff --git a/config/X11/xprofile b/config/X11/xprofile index 224386b..f376afa 100644 --- a/config/X11/xprofile +++ b/config/X11/xprofile @@ -19,5 +19,7 @@ unclutter -noevents & mpd & # and its scrobbler mpdas -c $HOME_ETC/mpdasrc & +# status bar +bar.sh & # remind user of important tasks bother & diff --git a/config/aliasrc b/config/aliasrc new file mode 100644 index 0000000..88d0ba7 --- /dev/null +++ b/config/aliasrc @@ -0,0 +1,47 @@ +#!/bin/sh +# a file containing POSIX shell-compliant aliases so aliases can be consistent between shells. +alias \ + l="/bin/ls"\ + ls="exa -Fb"\ + ll='exa -Fbl'\ + lg='exa -Fbl --git'\ + la='exa -Fba'\ + lynx='lynx -cookies-'\ + df='df -h'\ + du='du -h'\ + gs='git status --short --branch || ls'\ + gsh='git show'\ + gd='git diff'\ + gl='git log --graph --pretty=log'\ + gco='git checkout'\ + gb='git branch'\ + gm='git merge'\ + gst='git stash'\ + ga='git add'\ + gmv='git mv'\ + grm='git rm'\ + gc='git commit'\ + gca='gc --amend'\ + gt='git tag'\ + gp='git push'\ + gu='git pull'\ + gf='git fetch'\ + gr='git rebase'\ + gra='gr --abort'\ + grc='gr --continue'\ + grs='gr --skip'\ + cp='cp -v' \ + mv='mv -v'\ + sl='streamlink -p mpv'\ + pa='doas pkg_add -D snap'\ + pd='doas pkg_delete'\ + pi='pkg_info -D snap'\ + pl='pkglocate'\ + f="\$FILE"\ + e="\$EDITOR"\ + v="\$EDITOR"\ + yt='youtube-dl'\ + ya="youtube-dl --config-location \$XDG_CONFIG_HOME/youtube-dl/config-music" \ + unwww='bombadillo'\ + masto="tootstream -c $XDG_CONFIG_HOME/tootstream/tootstream.conf"\ + logout='clear&&exit' diff --git a/config/color/colors.sh b/config/color/colors.sh new file mode 100755 index 0000000..22116a1 --- /dev/null +++ b/config/color/colors.sh @@ -0,0 +1,22 @@ +#!/bin/sh +TMP=$(mktemp) +xrdb -query>$TMP +foreground=$(fgrep '*foreground:' < $TMP | cut -f 2) +background=$(fgrep '*background:' < $TMP | cut -f 2) +color0=$(fgrep '*color0:' < $TMP | cut -f 2) +color1=$(fgrep '*color1:' < $TMP | cut -f 2) +color2=$(fgrep '*color2:' < $TMP | cut -f 2) +color3=$(fgrep '*color3:' < $TMP | cut -f 2) +color4=$(fgrep '*color4:' < $TMP | cut -f 2) +color5=$(fgrep '*color5:' < $TMP | cut -f 2) +color6=$(fgrep '*color6:' < $TMP | cut -f 2) +color7=$(fgrep '*color7:' < $TMP | cut -f 2) +color8=$(fgrep '*color8:' < $TMP | cut -f 2) +color9=$(fgrep '*color9:' < $TMP | cut -f 2) +color10=$(fgrep '*color10:' < $TMP | cut -f 2) +color11=$(fgrep '*color11:' < $TMP | cut -f 2) +color12=$(fgrep '*color12:' < $TMP | cut -f 2) +color13=$(fgrep '*color13:' < $TMP | cut -f 2) +color14=$(fgrep '*color14:' < $TMP | cut -f 2) +color15=$(fgrep '*color15:' < $TMP | cut -f 2) +rm $TMP diff --git a/config/cwmrc b/config/cwmrc index 0ad3a5a..8539b13 100644 --- a/config/cwmrc +++ b/config/cwmrc @@ -12,7 +12,7 @@ autogroup 5 mpv autogroup 8 tabbed autogroup 9 pass #aesthetics -fontname "Cozette:pixelsize=11" +fontname "Cozette:style=Medium:pixelsize=11" borderwidth 1 color activeborder "#6b996b" color inactiveborder "#4c4635" @@ -37,7 +37,7 @@ bind-key 4C-d menu-window-hidden bind-key 4-Return terminal #bind-key 4S-Return "sh -c \"$TERMINAL -c popup" bind-key 4-e "sh -c \"$TERMINAL -e $EDITOR\"" -#bind-key 4S-e "sh -c \"$TERMINAL -t nvim -c popup -e env TERM=stterm-16color $EDITOR" +#bind-key 4S-e "sh -c \"$TERMINAL -c popup -e $EDITOR\"" bind-key 4-w "sh -c \"$BROWSER $HOMEPAGE\"" bind-key 4S-c "sh -c \"$COMM\"" bind-key 4-a "sh -c \"$TERMINAL -c pass -e kpcli --kdb=$XDG_DATA_HOME/KeePass/database.kdbx\"" @@ -71,7 +71,7 @@ bind-key 4CS-minus "xbacklight -dec 15" bind-key 4-x lock bind-key 4S-x "sh -c \"prompt 'shutdown computer?' 'doas shutdown -p now'\"" bind-key 4S-BackSpace "sh -c \"prompt 'reboot computer?' 'doas shutdown -r now'\"" -bind-key 4-b "sh -c \"pkill oxbar||oxbar -F $XDG_CONFIG_HOME/oxbar.conf\"" +bind-key 4-b "sh -c \"pkill dzen2||bar.sh\"" #window nav bind-key 4-j window-cycle bind-key 4-k window-rcycle diff --git a/config/ksh/completions.ksh b/config/ksh/completions.ksh index d241be8..d186615 100644 --- a/config/ksh/completions.ksh +++ b/config/ksh/completions.ksh @@ -36,6 +36,8 @@ update_complete_pass() { pass_list=$(pass ls) set -A complete_pass_1 -- init passphrase add import show export ls set -A complete_pass_2 -- $pass_list + set -A complete_pcl_1 -- $pass_list + set -A complete_pct_1 -- $pass_list } update_complete_pass pass_export() { pass export "$1" && update_complete_pass; } diff --git a/config/ksh/diraliases b/config/ksh/diraliases index 99f710d..4b469d6 100644 --- a/config/ksh/diraliases +++ b/config/ksh/diraliases @@ -1,12 +1,17 @@ #!/bin/ksh -alias -d "src=$HOME/src"\ - "vcs=$HOME/src/vcs"\ - "me=$HOME/src/me"\ - "ports=/usr/ports"\ - "conf=$XDG_CONFIG_HOME"\ - "data=$XDG_DATA_HOME"\ - "write=$HOME/doc/writing"\ - "crit=$HOME/doc/writing/critique"\ - "bin=$HOME/.local/bin"\ - "ksh=$HOME/.config/ksh"\ - "pass=$HOME/.local/share/pass" +alias -d src=~/src +alias -d git=~src/vcs +alias -d vcs=~/local/src +alias -d conf=$XDG_CONFIG_HOME +alias -d data=$XDG_DATA_HOME +alias -d cache=$XDG_CACHE_HOME +alias -d vis=~conf/vis +alias -d ksh=~conf/ksh +alias -d xdg=~/share/xdg +alias -d doc=~xdg/doc +alias -d pic=~xdg/pic +alias -d mus=~xdg/mus +alias -d vid=~xdg/vid +alias -d dl=~xdg/dl +alias -d bin=~/bin +alias -d pass=~data/pass diff --git a/config/ksh/functions/pcl b/config/ksh/functions/pcl new file mode 100644 index 0000000..42ad224 --- /dev/null +++ b/config/ksh/functions/pcl @@ -0,0 +1,8 @@ +#!/bin/ksh +function pcl { + if [ -z "$2" ]; then + pass show "$1"|head -1|xclip -l 1 -r + else + pass show "$1"|head -1|xclip -sel c -l 1 -r + fi +} diff --git a/config/ksh/functions/pct b/config/ksh/functions/pct new file mode 100644 index 0000000..b80abff --- /dev/null +++ b/config/ksh/functions/pct @@ -0,0 +1,8 @@ +#!/bin/ksh +function pct { + if [ -z "$2" ]; then + pass show "$1"|tail -1|xclip -l 1 -r + else + pass show "$1"|tail -1|xclip -sel c -l 1 -r + fi +} diff --git a/config/ksh/functions/pkg_complete b/config/ksh/functions/pkg_complete index ee1b9fb..2664527 100644 --- a/config/ksh/functions/pkg_complete +++ b/config/ksh/functions/pkg_complete @@ -1,5 +1,5 @@ #!/bin/ksh pkg_complete() { - set -A complete_pa -- $(<$HOME/.cache/ksh/precompletions/packages) + set -A complete_pa -- $(<~cache/ksh/precompletions/packages) set -A complete_pi -- $complete_pa } diff --git a/config/ksh/kshrc b/config/ksh/kshrc index 36350d0..e81bd97 100644 --- a/config/ksh/kshrc +++ b/config/ksh/kshrc @@ -1,14 +1,12 @@ #!/bin/ksh -. $HOME/.config/shrc +. $HOME/etc/shrc KSHCONFIG="$XDG_CONFIG_HOME/ksh" -if ! echo "$PATH"|grep -q ".local/bin"; then - export PATH="$HOME/.local/bin:$PATH" -fi FPATH=$XDG_CONFIG_HOME/ksh/functions +alias functions="cat \$FPATH/*|grep -vF '#!/bin/ksh'" HISTFILE=$XDG_DATA_HOME/ksh/histfile -if ! [[ -d $HISTFILE ]]; then - mkdir -p $HISTFILE; +if ! [[ -d $(dirname $HISTFILE) ]]; then + mkdir -p $(dirname $HISTFILE); fi HISTSIZE=5000 HISTCONTROL="ignoredups" diff --git a/config/nvim/init.vim b/config/nvim/init.vim deleted file mode 100644 index 64e6dfe..0000000 --- a/config/nvim/init.vim +++ /dev/null @@ -1,107 +0,0 @@ -" PLUGINS -" we plug now, babey -if ! filereadable(expand('~/.config/nvim/autoload/plug.vim')) - echo "Downloading junegunn/vim-plug to manage plugins..." - silent !mkdir -p ~/.config/nvim/autoload/ - silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ~/.config/nvim/autoload/plug.vim -endif -call plug#begin('~/.local/share/nvim/plugged') -" MatchTag -Plug 'gregsexton/matchtag' -" lightline.vim -Plug 'itchyny/lightline.vim' -" vim-fugitive -Plug 'tpope/vim-fugitive' -" vim-gitgutter -Plug 'airblade/vim-gitgutter' -" vim-surround -Plug 'tpope/vim-surround' -" JsBeautify -Plug 'maksimr/vim-jsbeautify' -" syntax checking -Plug 'vim-syntastic/syntastic' -" lf integration -Plug 'ptzz/lf.vim' -" req for lf.vim -Plug 'rbgrouleff/bclose.vim' -"""plugin graveyard -" END PLUGINS -"" recognize color tags -"Plug 'lilydjwg/colorizer' -"" VimCompletesMe -"Plug 'ajh17/VimCompletesMe' -call plug#end() - -" end of vim-plug related lines - -colo zellner - -" productivity binds - -" unbind arrow keys like some kind of neurotic chucklefuck -noremap -noremap -noremap -noremap -inoremap -inoremap -inoremap -inoremap - -"" JsBeautify binds -autocmd FileType javascript noremap :call JsBeautify() -" for json -autocmd FileType json noremap :call JsonBeautify() -" for jsx -autocmd FileType jsx noremap :call JsxBeautify() -" for html -autocmd FileType html noremap :call HtmlBeautify() -" for css or scss -autocmd FileType css noremap :call CSSBeautify() -"" and for visual mode: -autocmd FileType javascript vnoremap :call RangeJsBeautify() -" for json -autocmd FileType json vnoremap :call RangeJsonBeautify() -" for jsx -autocmd FileType jsx vnoremap :call RangeJsxBeautify() -" for html -autocmd FileType html vnoremap :call RangeHtmlBeautify() -" for css or scss -autocmd FileType css vnoremap :call RangeCSSBeautify() - -" syntastic config -set statusline+=%#warningmsg# -set statusline+=%{SyntasticStatuslineFlag()} -set statusline+=%* - -let g:syntastic_always_populate_loc_list = 1 -let g:syntastic_auto_loc_list = 1 -let g:syntastic_check_on_open = 1 -let g:syntastic_check_on_wq = 0 - -let g:syntastic_aggregate_errors = 1 -let g:syntastic_c_compiler = "cc" - -" lightline config -set noshowmode -let g:lightline = { - \ 'colorscheme': 'selenized_dark', - \ } - -" lf config -let g:lf_replace_netrw = 1 - -" betterize -set path+=** - -cno w!! exe 'sil! w !doas tee % >/dev/null' e! -nno :noh -" add a ctags shortcut like a shitty goblin -com! MakeTags !ctags ./* -" calcurse notes should be treated as markdown -autocmd BufRead,BufNewFile /tmp/calcurse* set filetype=markdown -autocmd BufRead,BufNewFile ~/.local/share/calcurse/notes/* set filetype=markdown -" ksh should work -autocmd FileType ksh let g:is_kornshell = 1 -" good folds -set foldmethod=marker diff --git a/config/vis/themes/causalagency.lua b/config/vis/themes/causalagency.lua new file mode 100644 index 0000000..723328a --- /dev/null +++ b/config/vis/themes/causalagency.lua @@ -0,0 +1,63 @@ +-- uses 24-bit color values, based off causalagency's scheme +local lexers = vis.lexers + +local colors = { + ['black'] = '#16150e', + ['red'] = '#a32810', + ['green'] = '#727a18', + ['brown'] = '#a37720', + ['blue'] = '#3d6266', + ['purp'] = '#7a4955', + ['cyan'] = '#557a55', + ['ligrey'] = '#8e8463', + ['dagrey'] = '#4c4635', + ['lired'] = '#cc3214', + ['ligreen'] = '#8e991e', + ['yellow'] = '#cc9528', + ['liblue'] = '#4c7b7f', + ['lipurp'] = '#995b6b', + ['licyan'] = '#6b996b', + ['white'] = '#ccbc8e', + ['back'] = '#14130e', + ['fore'] = '#b7a980', + ['sel'] = '#a34110', + ['curs'] = '#72694f', +} + +local fg = ',fore:'..colors.fore..',' +local bg = ',back:'..colors.back..',' + +lexers.STYLE_DEFAULT = bg..fg +lexers.STYLE_NOTHING = bg +lexers.STYLE_CLASS = 'fore:'..colors.yellow +lexers.STYLE_COMMENT = 'fore:'..colors.ligrey..',italics' +lexers.STYLE_CONSTANT = 'fore:'..colors.cyan +lexers.STYLE_DEFINITION = 'fore:'..colors.blue +lexers.STYLE_ERROR = 'back:'..colors.lired..fg..',italics' +lexers.STYLE_FUNCTION = 'fore:'..colors.cyan +lexers.STYLE_KEYWORD = 'fore:'..colors.liblue +lexers.STYLE_LABEL = 'fore:'..colors.yellow +lexers.STYLE_NUMBER = 'fore:'..colors.cyan +lexers.STYLE_OPERATOR = 'fore:'..colors.ligrey +lexers.STYLE_REGEX = 'fore:'..colors.ligreen +lexers.STYLE_STRING = 'fore:'..colors.cyan +lexers.STYLE_PREPROCESSOR = 'fore:'..colors.green +lexers.STYLE_TAG = 'fore:'..colors.green +lexers.STYLE_TYPE = 'fore:'..colors.licyan +lexers.STYLE_VARIABLE = 'fore:'..colors.licyan +lexers.STYLE_WHITESPACE = 'fore:'..colors.dagrey +lexers.STYLE_EMBEDDED = 'back:'..colors.lipurp +lexers.STYLE_IDENTIFIER = 'fore:'..colors.green + +lexers.STYLE_LINENUMBER = 'fore:'..colors.dagrey +lexers.STYLE_LINENUMBER_CURSOR = 'back:'..colors.back..',fore:'..colors.ligrey +lexers.STYLE_CURSOR = 'fore:'..colors.curs..',reverse' +lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',bold' +lexers.STYLE_CURSOR_LINE = 'fore:'..colors.dagrey +lexers.STYLE_COLOR_COLUMN = 'back:'..colors.dagrey +lexers.STYLE_SELECTION = 'back:'..colors.sel +lexers.STYLE_STATUS = 'fore:'..colors.ligrey..',back:'..colors.black +lexers.STYLE_STATUS_FOCUSED = 'fore:'..colors.dagrey..',back:'..colors.white +lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT +lexers.STYLE_INFO = lexers.STYLE_DEFAULT..',bold' +lexers.STYLE_EOF = '' diff --git a/config/vis/themes/fake256.lua b/config/vis/themes/fake256.lua deleted file mode 100644 index 7ed8f71..0000000 --- a/config/vis/themes/fake256.lua +++ /dev/null @@ -1,64 +0,0 @@ --- uses 24-bit color values to "trick" vis into using correct colors, based off vim's "zellner" -local lexers = vis.lexers - -local colors = { - ['col0'] = '#16150e', - ['col1'] = '#a32810', - ['col2'] = '#727a18', - ['col3'] = '#a37720', - ['col4'] = '#3d6266', - ['col5'] = '#7a4955', - ['col6'] = '#557a55', - ['col7'] = '#8e8463', - ['col8'] = '#4c4635', - ['col9'] = '#cc3214', - ['col10'] = '#8e991e', - ['col11'] = '#cc9528', - ['col12'] = '#4c7b7f', - ['col13'] = '#995b6b', - ['col14'] = '#6b996b', - ['col15'] = '#ccbc8e', -} --- dark -lexers.STYLE_DEFAULT ='back:default,fore:default' -- hi Normal -- correct -lexers.STYLE_COMMENT = 'fore:'..colors.col9 -- hi Comment -- correct -lexers.STYLE_CONSTANT = 'fore:'..colors.col13 -- hi Constant -- correct -lexers.STYLE_SPECIAL = 'back:'..colors.col5 -- hi Special -lexers.STYLE_IDENTIFIER = 'fore:default' -- hi Identifier -- correct -lexers.STYLE_STATEMENT = 'fore:'..colors.col1 -- hi Statementa -- correct -lexers.STYLE_PREPROCESSOR = 'fore:'..colors.col5 -- hi PreProc -lexers.STYLE_TYPE = 'fore:'..colors.col12 -- hi Type -- correct -lexers.STYLE_SELECTION = 'reverse' -- hi Visual -lexers.STYLE_TAG = 'fore:'..colors.col2 -- hi Tag -lexers.STYLE_ERROR = 'back:'..colors.col1..',fore:default,italics' -- hi Error -lexers.STYLE_STATUS = 'back:default,fore:'..colors.col4..',reverse' -- hi StatusLineNC -lexers.STYLE_STATUS_FOCUSED = lexers.STYLE_STATUS..',bold' -- hi StatusLine -lexers.STYLE_NOTHING = 'back:default' -- hi Ignore -lexers.STYLE_DEFINITION = 'fore:'..colors.col4 -- -lexers.STYLE_REGEX = 'fore:'..colors.col2 -- -lexers.STYLE_WHITESPACE = '' -- hi Whitespace -lexers.STYLE_OPERATOR = lexers.STYLE_DEFAULT - -lexers.STYLE_FUNCTION = lexers.STYLE_DEFAULT -lexers.STYLE_LINENUMBER = 'fore:default' -- hi LineNr -lexers.STYLE_LINENUMBER_CURSOR = lexers.STYLE_LINENUMBER -- hi CursorLineNr -lexers.STYLE_CURSOR = 'reverse' -- hi Cursor -lexers.STYLE_CURSOR_PRIMARY = lexers.STYLE_CURSOR..',fore:yellow' -- -lexers.STYLE_CURSOR_LINE = 'underlined' -- hi CursorLine -lexers.STYLE_COLOR_COLUMN = 'back:'..colors.col1 -- hi CursorColumn -lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT -- -lexers.STYLE_INFO = lexers.STYLE_DEFAULT..',bold' -- -lexers.STYLE_EOF = '' -- - --- links -lexers.STYLE_STRING = lexers.STYLE_CONSTANT -lexers.STYLE_NUMBER = lexers.STYLE_CONSTANT - -lexers.STYLE_VARIABLE = lexers.STYLE_IDENTIFIER - -lexers.STYLE_LABEL = lexers.STYLE_STATEMENT -lexers.STYLE_KEYWORD = lexers.STYLE_STATEMENT - -lexers.STYLE_EMBEDDED = lexers.STYLE_SPECIAL - -lexers.STYLE_CLASS = lexers.STYLE_TYPE diff --git a/config/vis/visrc.lua b/config/vis/visrc.lua index b194feb..d153cab 100644 --- a/config/vis/visrc.lua +++ b/config/vis/visrc.lua @@ -3,11 +3,12 @@ require('vis') vis.events.subscribe(vis.events.INIT, function() -- Your global configuration options - vis:command('set change-256colors off') - vis:command('set theme fake256') + vis:command('set theme causalagency') end) vis.events.subscribe(vis.events.WIN_OPEN, function(win) -- Your per window configuration options e.g. - -- vis:command('set number') + vis:command('set cul') + vis:command('set nu') + vis:command('set ai') end) diff --git a/config/youtube-dl/config b/config/youtube-dl/config index 0b55e08..b9ec27f 100644 --- a/config/youtube-dl/config +++ b/config/youtube-dl/config @@ -2,7 +2,7 @@ # always use axel --external-downloader axel # coherent output format ---output ~/vid/%(uploader)s/%(title)s.%(ext)s +--output ~/share/xdg/vid/%(uploader)s/%(title)s.%(ext)s # always merge into mkv --merge-output-format mkv # embed subtitles if they are to be written diff --git a/config/youtube-dl/config-music b/config/youtube-dl/config-music index 5860766..1396246 100644 --- a/config/youtube-dl/config-music +++ b/config/youtube-dl/config-music @@ -3,4 +3,4 @@ # always use axel #--external-downloader axel # coherent output format ---output ~/mus/%(uploader)s/%(album)s/S%(track_number)02d-%(track)s.%(ext)s +--output ~/share/xdg/mus/%(uploader)s/%(album)s/S%(track_number)02d-%(track)s.%(ext)s diff --git a/config/zathura/zathurarc b/config/zathura/zathurarc index 65f0c55..1b370d2 100644 --- a/config/zathura/zathurarc +++ b/config/zathura/zathurarc @@ -32,4 +32,4 @@ set render-loading-fg "#ccbc8e" set window-title-home-tilde true set statusbar-basename true set selection-clipboard clipboard -set font "Cozette 10" +set font "Cozette Medium 11" diff --git a/data/applications/text.desktop b/data/applications/text.desktop index 44afc9a..39b1e3e 100644 --- a/data/applications/text.desktop +++ b/data/applications/text.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=Text editor -Exec=/usr/bin/env st -e nvim %u +Exec=/usr/bin/env xterm -e vis %u diff --git a/data/man/man7/user-hier.7 b/data/man/man7/user-hier.7 new file mode 100644 index 0000000..0c6e092 --- /dev/null +++ b/data/man/man7/user-hier.7 @@ -0,0 +1,169 @@ +.\" $dots: user-hier.7,v 1.0 2020/05/10 20:00:07 ensa Exp $ +.\" $OpenBSD: hier.7,v 1.165 2020/02/06 05:40:02 jsg Exp $ +.\" $NetBSD: hier.7,v 1.7 1994/11/30 19:07:10 jtc Exp $ +.\" +.\" Copyright (c) 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 3. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)hier.7 8.1 (Berkeley) 6/5/93 +.\" +.Dd $Mdocdate: May 10 2020 $ +.Dt USER-HIER 7 +.Os +.Sh NAME +.Nm user-hier +.Nd layout of user directory +.Sh DESCRIPTION +A sketch of the home directory. +.Bl -tag -width "share/" +.It bin/ +User-written utilities. +.It etc/ +User configuration files and scripts. +.Pp +.Bl -tag -width "aliasrc" -compact +.It aliasrc +aliases for +.Xr ksh 1 . +.It cwmrc +config for +.Xr cwm 1 . +.It shrc +.Xr sh 1 +general +.Xr environ 7 +variables. +.It X11/ +Configuration files for the X11 window system. +.Pp +.Bl -tag -width "xresources" -compact +.It xprofile +system-agnostic setup commands and daemons. +.It xresources +file with +.Xr xrdb 1 +resources, consists of colors, xterm config, some font config. +.It xsession +system-specific X11 setup +.El +.It color/ +.Xr sh 1 +sourceable environment variables containing colors. +.El +.It share/ +Architecture independent data/arbitrary files. +.Pp +.Bl -tag -width "terminfo/" -compact +.It home.html +"home page" for web browsers. +.It archives/ +Compressed +.Xr tar 1 +archives. +.It bmarks/ +Local bookmarks directory. +.It doc/ +Miscellaneous documentation. +.It games/ +ASCII text files used by various games. +.It man/ +Manual pages. +.Pp +.Bl -tag -width man1/ -compact +.It man1/ +General commands (tools and utilities). +.\".It man2/ +.\"System calls and error numbers. +.\".It man3/ +.\"Libraries. +.\".It man4/ +.\"Special files and hardware support. +.It man5/ +File formats. +.\".It man6/ +.\"Games. +.It man7/ +Miscellaneous. +.\".It man8/ +.\"System maintenance and operation commands. +.\".It man9/ +.\"Kernel internals. +.El +.Pp +.It mail/ +Contains mail for various IMAP email accounts. +.It terminfo/ +Compiled terminal characteristic files (see +.Xr terminfo 5 ) . +.El +.It games/ +Recreational programs. +.It local/ +Files for particular programming languages and external sources. +.Bl -tag -width "python/" -compact +.It bin/ +Binaries/scripts not written by the user but not available in the package manager. +.It go/ +Local files related to the Go programming language. +.It python/ +Local files related to the +.Xr python 1 +programming language. +.It rust/ +Local files related to the +.Xr rustc 1 +programming language. +.It src/ +Sources not written by the user. +.El +.It src/ +Sources written by the user. +.Bl -tag -width "vcs/" -compact +.It vcs/ +Sources written by the user, set up to push to a Version Control System. +.El +.Pp +.It var/ +Multi-purpose log, temporary, and transient files. +.Pp +.Bl -tag -width "backups/" -compact +.It backups/ +Miscellaneous backup files. +.It cache/ +Data cached for programs. +.It log/ +Miscellaneous log files. +.El +.El +.Sh SEE ALSO +.Xr apropos 1 , +.Xr find 1 , +.Xr locate 1 , +.Xr whatis 1 , +.Xr whereis 1 , +.Xr which 1 , +.Xr shrc 5 -- cgit 1.4.1-2-gfad0