From 75ee668954833ab6ba9287ed5eb16a9957edcac2 Mon Sep 17 00:00:00 2001 From: ensa <@> Date: Sat, 4 Feb 2023 20:03:47 -0800 Subject: restructure, cleanups, greener pastures, new additions config and data are now etc and share, to better match my homedir bin: generally, shellcheck errors (where there's actually a problem) have been fixed bother now includes alternate support for libnotify as well as my notif comm-sel now loops, so spawning programs doesn't require multiple runs fcard: my flashcard script accepts a tsv's path on $1, expecting: the word on column 1 the defintion on column 2 (optional) the section on column 3 if $2 is specified, only runs through lines with that string as its section fl: added aesgcm to the url detector string, because of profanity cleaned up urlparse now outputs the urls, one per line, making it more unixy flc: a quick script. uses fl's output to do what fl once did on its own. kbsetup now lacks escape xcape magic, qmk does that for me now. lh: general cleanup. added and removed a site for the video extract section metamv: gives arguments self-describing names based off metadata. mainly just for sorting FLACs off bandcamp this might not be entirely safe. use your own discretion. notif: xnotify wasn't happy with the previous design. it was sending notifications in pieces. this new one's an absolute mess but it works well, is smaller, and faster op: changed the pdf bit to allow variants smv: file is self-explanatory applies the pipeline specified in "$1" to every file name specified after it xbg: contains a fallback if xwallpaper isn't downloaded or its path is empty. yw: just a quick and dirty line for watching things in mpv using yt-dlp. etc: X11/: xprofile now includes the latest xnotify initialization. xresources prevents a variable collision also updates new xnotify resource names and changes which program to pipe the screen to. mpd/mpd.conf just updates to path structure. yt-dlp/* too many changes to describe. should be fairly self-explanatory. ksh/: prompt.ksh: the $ is green now. hooray! lf/lfrc: removed ttmsh function. i use my server for that now. newsboat/config: external-url-viewer is now non-python. zathura/zathurarc: font is now hermit. aliasrc: exa is no more. vis is also no more. youtube-dl is dead. long live yt-dlp. shrc: locale vars changed to ones than glibc is ok with --- bin/bother | 23 +- bin/comm-sel | 13 +- bin/fcard | 45 ++ bin/fl | 30 +- bin/flc | 4 + bin/kbsetup | 2 - bin/lh | 19 +- bin/metamv | 8 + bin/notif | 17 +- bin/op | 2 +- bin/smv | 10 + bin/xbg | 2 +- bin/yw | 4 + config/X11/xprofile | 32 -- config/X11/xresources | 97 ---- config/aliasrc | 47 -- config/betteresc | 2 - config/color/colors.sh | 22 - config/ksh/completions.ksh | 46 -- config/ksh/diraliases | 17 - config/ksh/functions/l. | 10 - config/ksh/functions/man_complete | 4 - config/ksh/functions/mc | 4 - config/ksh/functions/mpvpin | 4 - config/ksh/functions/pcl | 8 - config/ksh/functions/pct | 8 - config/ksh/functions/pkg_complete | 5 - config/ksh/functions/update_completion_manpages | 8 - .../ksh/functions/update_completion_packages_obsd | 8 - .../ksh/functions/update_completion_pkg_inst_obsd | 4 - config/ksh/functions/update_completions | 6 - config/ksh/kshrc | 36 -- config/ksh/prompt.ksh | 20 - config/lf/lfrc | 26 - config/mpd/mpd.conf | 9 - config/ncmpcpp/bindings | 70 --- config/ncmpcpp/config | 532 --------------------- config/newsboat/config | 38 -- config/shrc | 56 --- config/user-dirs.dirs | 14 - config/vis/themes/causalagency.lua | 63 --- config/vis/visrc.lua | 16 - config/youtube-dl/config | 9 - config/youtube-dl/config-music | 6 - config/zathura/zathurarc | 35 -- data/mailcap | 2 - data/man/man7/user-hier.7 | 169 ------- etc/X11/xprofile | 32 ++ etc/X11/xresources | 98 ++++ etc/aliasrc | 44 ++ etc/color/colors.sh | 22 + etc/ksh/completions.ksh | 40 ++ etc/ksh/diraliases | 17 + etc/ksh/functions/l. | 10 + etc/ksh/functions/man_complete | 4 + etc/ksh/functions/mc | 4 + etc/ksh/functions/mpvpin | 4 + etc/ksh/functions/pcl | 8 + etc/ksh/functions/pct | 8 + etc/ksh/functions/pkg_complete | 5 + etc/ksh/functions/update_completion_manpages | 8 + etc/ksh/functions/update_completion_packages_obsd | 8 + etc/ksh/functions/update_completion_pkg_inst_obsd | 4 + etc/ksh/functions/update_completions | 6 + etc/ksh/kshrc | 36 ++ etc/ksh/prompt.ksh | 20 + etc/lf/lfrc | 18 + etc/mpd/mpd.conf | 18 + etc/ncmpcpp/bindings | 70 +++ etc/ncmpcpp/config | 532 +++++++++++++++++++++ etc/newsboat/config | 38 ++ etc/shrc | 62 +++ etc/user-dirs.dirs | 14 + etc/yt-dlp/config | 16 + etc/yt-dlp/config-music | 7 + etc/zathura/zathurarc | 35 ++ share/mailcap | 2 + share/man/man7/user-hier.7 | 169 +++++++ 78 files changed, 1484 insertions(+), 1487 deletions(-) create mode 100755 bin/fcard create mode 100644 bin/flc create mode 100755 bin/metamv create mode 100755 bin/smv create mode 100755 bin/yw delete mode 100644 config/X11/xprofile delete mode 100644 config/X11/xresources delete mode 100644 config/aliasrc delete mode 100644 config/betteresc delete mode 100755 config/color/colors.sh delete mode 100644 config/ksh/completions.ksh delete mode 100644 config/ksh/diraliases delete mode 100644 config/ksh/functions/l. delete mode 100644 config/ksh/functions/man_complete delete mode 100644 config/ksh/functions/mc delete mode 100644 config/ksh/functions/mpvpin delete mode 100644 config/ksh/functions/pcl delete mode 100644 config/ksh/functions/pct delete mode 100644 config/ksh/functions/pkg_complete delete mode 100644 config/ksh/functions/update_completion_manpages delete mode 100644 config/ksh/functions/update_completion_packages_obsd delete mode 100644 config/ksh/functions/update_completion_pkg_inst_obsd delete mode 100644 config/ksh/functions/update_completions delete mode 100644 config/ksh/kshrc delete mode 100644 config/ksh/prompt.ksh delete mode 100644 config/lf/lfrc delete mode 100644 config/mpd/mpd.conf delete mode 100644 config/ncmpcpp/bindings delete mode 100644 config/ncmpcpp/config delete mode 100644 config/newsboat/config delete mode 100644 config/shrc delete mode 100644 config/user-dirs.dirs delete mode 100644 config/vis/themes/causalagency.lua delete mode 100644 config/vis/visrc.lua delete mode 100644 config/youtube-dl/config delete mode 100644 config/youtube-dl/config-music delete mode 100644 config/zathura/zathurarc delete mode 100644 data/mailcap delete mode 100644 data/man/man7/user-hier.7 create mode 100644 etc/X11/xprofile create mode 100644 etc/X11/xresources create mode 100644 etc/aliasrc create mode 100755 etc/color/colors.sh create mode 100644 etc/ksh/completions.ksh create mode 100644 etc/ksh/diraliases create mode 100644 etc/ksh/functions/l. create mode 100644 etc/ksh/functions/man_complete create mode 100644 etc/ksh/functions/mc create mode 100644 etc/ksh/functions/mpvpin create mode 100644 etc/ksh/functions/pcl create mode 100644 etc/ksh/functions/pct create mode 100644 etc/ksh/functions/pkg_complete create mode 100644 etc/ksh/functions/update_completion_manpages create mode 100644 etc/ksh/functions/update_completion_packages_obsd create mode 100644 etc/ksh/functions/update_completion_pkg_inst_obsd create mode 100644 etc/ksh/functions/update_completions create mode 100644 etc/ksh/kshrc create mode 100644 etc/ksh/prompt.ksh create mode 100644 etc/lf/lfrc create mode 100644 etc/mpd/mpd.conf create mode 100644 etc/ncmpcpp/bindings create mode 100644 etc/ncmpcpp/config create mode 100644 etc/newsboat/config create mode 100644 etc/shrc create mode 100644 etc/user-dirs.dirs create mode 100644 etc/yt-dlp/config create mode 100644 etc/yt-dlp/config-music create mode 100644 etc/zathura/zathurarc create mode 100644 share/mailcap create mode 100644 share/man/man7/user-hier.7 diff --git a/bin/bother b/bin/bother index d3f5be9..be6de1c 100755 --- a/bin/bother +++ b/bin/bother @@ -1,24 +1,27 @@ #!/bin/sh # puts up a critical notification if $HOME/today exists, containing the contents of that file. if [ -z "$XFILE" ]; then -if [ -f $HOME/.xsession ]; then - XFILE=$HOME/.xsession -elif [ -f $HOME/.xinitrc ]; then - XFILE=$HOME/.xinitrc +if [ -f "$HOME"/.xsession ]; then + XFILE="$HOME"/.xsession +elif [ -f "$HOME"/.xinitrc ]; then + XFILE="$HOME"/.xinitrc fi fi -if grep -q "dwm" $XFILE; then +if grep -q "dwm" "$XFILE"; then WM=dwm -elif grep -q 'exec' $XFILE; then - WM=$(grep 'exec' $XFILE|cut -f 2 -d ' ' -) +elif grep -q 'exec' "$XFILE"; then + WM=$(grep 'exec' "$XFILE"|cut -f 2 -d ' ') +elif grep -q wm "$XFILE"; then + WM=$(grep wm "$XFILE"|cut -f 2 -d ' ') else - WM=$(tail -1 $XFILE) + WM=$(tail -1 "$XFILE") fi if [ -f "$HOME"/today ]; then - until pgrep $WM>/dev/null + until pgrep "$WM">/dev/null do : done sleep 0.5 - notif "DO TODAY:" "$(tr '\n' '\t'<"$HOME"/today)" + notif -s 0 "DO TODAY:" "$(tr '\n' '\t'<"$HOME"/today)" +# notify-send -t 0 "DO TODAY:" "$(cat<"$HOME"/today)" fi diff --git a/bin/comm-sel b/bin/comm-sel index 3dc1527..70c2e77 100755 --- a/bin/comm-sel +++ b/bin/comm-sel @@ -6,8 +6,11 @@ case "$TERMINAL" in urxvt) CLASS='-name';; alacritty|kitty) CLASS='--class';; esac -case "$(dmenu_path|grep -E "catgirl$|scli$"|dmenu -p "choose chat app:")" in - catgirl) catgirl-open.sh &;; - scli) $TERMINAL $CLASS comm -e scli&;; - *) return;; -esac +while + case "$(dmenu_path|(grep -E 'catgirl$|profanity$';printf 'exit\n')|dmenu -p 'choose chat app:')" in + catgirl) catgirl-open.sh &;; + profanity) "$TERMINAL" "$CLASS" comm -e profanity&;; + *) return 1;; + esac +do : +done diff --git a/bin/fcard b/bin/fcard new file mode 100755 index 0000000..e4a851d --- /dev/null +++ b/bin/fcard @@ -0,0 +1,45 @@ +#!/bin/sh +# flash card substitute +# usage: fcard dict.tsv section +# the -z code is extremely wip, don't use it + +while getopts z: opt +do + case $opt in + z) RAND="|grabbag" ;; + ?) printf '%s\n' "idiot" 1>&2 && exit 2 ;; + esac +done +shift $((OPTIND - 1)) + +rand() { + tr -cd '[:digit:]'/dev/null 2>&1 & ;; - *.png*|*.jpg*|*.jpe*|*.jpeg*|*.gif*) + streamlink -p mpv "$URL" "$STREAMQUAL" >/dev/null 2>&1 & ;; + *.png*|*.jp[eg]*|*.gif*) IMGPATH="/tmp/$(lstrip "$URL" "*/")" - curl -sL "$URL" >"$IMGPATH"&&sxiv -pqa "$IMGPATH" & ;; - *.mp3*|*.m4a*|*.flac*|*.aiff*|*.opus*|*.ogg*|*.mp3?source*|*.wav*) + curl -sL "$URL" > "$IMGPATH" && + sxiv -pqa "$IMGPATH" & ;; + *.mp3*|*.m4a*|*.flac*|*.aiff*|*.opus*|*.ogg*|*.wav*) $TERMINAL -e mpv "$URL"& ;; *.epub*|*.pdf*|*.djvu*) BOOKPATH="/tmp/$(lstrip "$URL" "*/")" @@ -86,7 +87,7 @@ case "$URL" in if [ -f "$URL" ]; then op "$URL" else - $BROWSER "$URL" >/dev/null 2>&1 & + "$BROWSER" "$URL" >/dev/null 2>&1 & fi ;; esac shift diff --git a/bin/metamv b/bin/metamv new file mode 100755 index 0000000..3a2d8ba --- /dev/null +++ b/bin/metamv @@ -0,0 +1,8 @@ +#!/bin/sh +# usage: metamv FILE ... +# e.g: metamv *.flac +for file; do + num="$(exiftool -m -p '$tracknumber$track' -- "$file")" + [ "$num" -lt 10 ] && num=0"$num" + mv -- "$file" "$num-$(exiftool -p '$artist-$title.$filetypeextension' -- "$file")" +done diff --git a/bin/notif b/bin/notif index 5e75fd8..ad1b625 100755 --- a/bin/notif +++ b/bin/notif @@ -1,7 +1,7 @@ #!/bin/sh # sends xnotify a notification unset TAG SEC -exec > ${XNOTIFY_FIFO:=$HOME_CACHE/xnotify$DISPLAY.fifo} +exec > "${XNOTIFY_FIFO:=$HOME_CACHE/xnotify.fifo}" ug_err() { echo "${1}" 1>&2 && return "${2:-1}" @@ -20,16 +20,5 @@ while getopts s:t: arg; do *) usage;; esac done -if [ -n "$SEC" ]; then - printf 'SEC:%s\t' "$SEC" - shift 2 -fi -if [ -n "$TAG" ]; then - printf 'TAG:%s\t' "$TAG" - shift 2 -fi -case "$#" in - 1) printf '%s\n' "$1";; - 2) printf '%s\t%s\n' "$1" "$2";; - *) exit;; -esac +shift $((OPTIND - 1)) +printf ${SEC+SEC:%s"\t"}${TAG+TAG:%s"\t"}${2+%s"\t"}'%s\n' $SEC $TAG "$1" "$2" diff --git a/bin/op b/bin/op index 688912b..7d426fc 100755 --- a/bin/op +++ b/bin/op @@ -12,7 +12,7 @@ echo() { } case "$FILEMIME" in #ebooks - application/epub*|application/pdf|application/postscript|image/vnd.djvu) + application/epub*|application/pdf*|application/postscript|image/vnd.djvu) ${READER:-zathura} "$FILEPATH">/dev/null 2>&1 & ;; #videos video/*) diff --git a/bin/smv b/bin/smv new file mode 100755 index 0000000..742d1d3 --- /dev/null +++ b/bin/smv @@ -0,0 +1,10 @@ +#!/bin/sh +# smv: special move +# smv pipeline file1 file2 file3 ... +# $1 is the pipeline to apply to the filenames of the files listed +CMD="$1" +shift +for file +do + mv "$file" "$(printf "$file"|sh -c "$CMD")" +done diff --git a/bin/xbg b/bin/xbg index 339ed69..a94ae67 100755 --- a/bin/xbg +++ b/bin/xbg @@ -8,4 +8,4 @@ else PICPATH=${PICPATH:="$HOME/Pictures/bg.png"} fi [ -n "$1" ]&&ln -sf "$1" "$PICPATH" -xwallpaper --zoom "$PICPATH" +xwallpaper --zoom "$PICPATH"||xsetroot -solid '#14130e' diff --git a/bin/yw b/bin/yw new file mode 100755 index 0000000..4e0337f --- /dev/null +++ b/bin/yw @@ -0,0 +1,4 @@ +#!/bin/sh +# for streaming things from yt-dlp to mpv. $1 is the url +yt-dlp -f b/bv*+ba --external-downloader curl -o - "$1" 2> $HOME_LOG/ytdl.log | mpv - > /dev/null +rm -f -- -.*.vtt diff --git a/config/X11/xprofile b/config/X11/xprofile deleted file mode 100644 index 058f55b..0000000 --- a/config/X11/xprofile +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -. $HOME/etc/shrc -# set caps to escape when pressed and super when held -# also sets dvorak programmer layout -kbsetup -## detect if laptop has other display connected, kills builtin if so -#[ $(xrandr -q|grep -cE '^(DP|VGA|HDMI)-[[:digit:]] connected') -gt 0 ] && monitor -# disables the beeper -xset b off -# enables x colorscheme -xrdb -load $HOME_ETC/X11/xresources - -# set background -xbg & -# notification daemon -# setup xnotify -export XNOTIFY_FIFO="$HOME_CACHE/xnotify$DISPLAY.fifo" -rm -f $XNOTIFY_FIFO -mkfifo $XNOTIFY_FIFO -xnotify 0<>$XNOTIFY_FIFO & -# start tiramisu -tiramisu -j | jq --raw-output --unbuffered '.summary + "\t" + .body' > $XNOTIFY_FIFO & -# status bar -bar.sh & -# mouse vanishes when typing -xbanish & -# activate mpd scrobbler -mpdas -c $HOME_ETC/mpdasrc & -# remind user of important tasks -bother & -# cleanup tabbed -rm $HOME_CACHE/catgirl/tabbed-catgirl.xid diff --git a/config/X11/xresources b/config/X11/xresources deleted file mode 100644 index e7a69b2..0000000 --- a/config/X11/xresources +++ /dev/null @@ -1,97 +0,0 @@ -! X colors. -#define bg #14130e -#define fg #b7a980 -#define sel #a34110 -#define curs #72694f -#define bold #CCBC8E - -#define black #161510 -#define red #a32810 -#define green #727a18 -#define brown #a37720 -#define blue #3d6266 -#define purp #7a4955 -#define cyan #557a55 -#define ligrey #8e8463 - -#define dagrey #4c4635 -#define lired #cc3214 -#define ligreen #8e991e -#define yellow #cc9528 -#define liblue #4c7b7f -#define lipurp #995b6b -#define licyan #6b996b -#define white #ccbc8e - - -! X colors. -*foreground: fg -*background: bg - -! Colors 0-15. -*color0: black -*color1: red -*color2: green -*color3: brown -*color4: blue -*color5: purp -*color6: cyan -*color7: ligrey -*color8: dagrey -*color9: lired -*color10: ligreen -*color11: yellow -*color12: liblue -*color13: lipurp -*color14: licyan -*color15: white -*color66: black - -! XTerm config. -xterm*termName: xterm-16color -xterm*metaSendsEscape: true -xterm*font: -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1 -xterm*faceName: Hermit:style=regular:size=10 -xterm*cursorColor: curs -xterm*boldMode: false -xterm*colorBD: bold -xterm*colorBDMode: true -xterm*highlightColorMode: true -xterm*highlightReverse: false -xterm*highlightColor: sel -xterm*scrollBar: false -xterm*dynamicColors: false -xterm*vt100.Translations: #override \ - Alt Shift L: exec-selectable("fl %r",page) \n\ - Alt Shift Y: insert-selection(PRIMARY) \n\ - Alt Shift V: insert-selection(CLIPBOARD) \n\ - Alt Shift C: copy-selection(CLIPBOARD) \n\ - Alt K: scroll-back(1,line) \n\ - Alt J: scroll-forw(1,line) \n\ - Alt U: scroll-back(1,halfpage) \n\ - Alt D: scroll-forw(1,halfpage) \n -xterm*allowMouseOps: false - -! Xclock colors. -XClock*majorColor: rgba:cc/bc/8e/ff -XClock*minorColor: rgba:cc/bc/8e/ff -XClock*hourColor: rgba:cc/bc/8e/ff -XClock*minuteColor: rgba:cc/bc/8e/ff -XClock*secondColor: rgba:cc/bc/8e/ff - -! sxiv -Sxiv*font: Cozette:style=Medium:pixelsize=11 -Sxiv*background: bg -Sxiv*foreground: fg - -! xlock settings -XLock.mode: random -XLock.font: -*-terminus-medium-r-*--12-*-*-*-*-*-iso10646-1 - -! xnotify settings -xnotify.title.font: Hermit:style=bold:size=10 -xnotify.body.font: Hermit:style=regular:size=10 -xnotify.border: ligreen -xnotify.geometry: -10+23 -xnotify.gravity: NE -xnotify.alignment: right diff --git a/config/aliasrc b/config/aliasrc deleted file mode 100644 index 0250b8a..0000000 --- a/config/aliasrc +++ /dev/null @@ -1,47 +0,0 @@ -#!/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- -vikeys'\ - 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="TERM=xterm-256color \$EDITOR"\ - v="TERM=xterm-256color \$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/betteresc b/config/betteresc deleted file mode 100644 index 3c84ed1..0000000 --- a/config/betteresc +++ /dev/null @@ -1,2 +0,0 @@ -keycode 9 = Hyper_L -keycode any = Escape diff --git a/config/color/colors.sh b/config/color/colors.sh deleted file mode 100755 index dd8c49a..0000000 --- a/config/color/colors.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -TMP=$(mktemp) -xrdb -query>$TMP -foreground=$(grep -F -m 1 '*foreground:' < $TMP | cut -f 2) -background=$(grep -F -m 1 '*background:' < $TMP | cut -f 2) -color0=$(grep -F -m 1 '*color0:' < $TMP | cut -f 2) -color1=$(grep -F -m 1 '*color1:' < $TMP | cut -f 2) -color2=$(grep -F -m 1 '*color2:' < $TMP | cut -f 2) -color3=$(grep -F -m 1 '*color3:' < $TMP | cut -f 2) -color4=$(grep -F -m 1 '*color4:' < $TMP | cut -f 2) -color5=$(grep -F -m 1 '*color5:' < $TMP | cut -f 2) -color6=$(grep -F -m 1 '*color6:' < $TMP | cut -f 2) -color7=$(grep -F -m 1 '*color7:' < $TMP | cut -f 2) -color8=$(grep -F -m 1 '*color8:' < $TMP | cut -f 2) -color9=$(grep -F -m 1 '*color9:' < $TMP | cut -f 2) -color10=$(grep -F -m 1 '*color10:' < $TMP | cut -f 2) -color11=$(grep -F -m 1 '*color11:' < $TMP | cut -f 2) -color12=$(grep -F -m 1 '*color12:' < $TMP | cut -f 2) -color13=$(grep -F -m 1 '*color13:' < $TMP | cut -f 2) -color14=$(grep -F -m 1 '*color14:' < $TMP | cut -f 2) -color15=$(grep -F -m 1 '*color15:' < $TMP | cut -f 2) -rm $TMP diff --git a/config/ksh/completions.ksh b/config/ksh/completions.ksh deleted file mode 100644 index d186615..0000000 --- a/config/ksh/completions.ksh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/ksh - -COMPLETIONFILES="$XDG_CACHE_HOME/ksh/precompletions" -if ! [[ -d $COMPLETIONFILES ]]; then - mkdir -p $COMPLETIONFILES; -fi -#pkg_* completions {{{1 -if ! [[ -e $COMPLETIONFILES/packages ]]; then - update_completion_packages -fi - -#set -A complete_pa -- $(<$COMPLETIONFILES/packages) -set -A complete_pd -- $(ls -1 /var/db/pkg) -#set -A complete_pi -- $complete_pa - -# }}} - -#man completions {{{2 -if ! [[ -e $COMPLETIONFILES/manpages ]]; then - update_completion_manpages -fi - -#set -A complete_man -- $(<$COMPLETIONFILES/manpages) - - -# }}} - -# pip completions {{{3 - -set -A complete_pip_1 -- install download uninstall freeze list show check config search wheel hash help -set -A complete_pip_2 -- --user -set -A complete_pip_3 -- --upgrade - -# pass completions -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; } -pass_show() { pass show "$1" && update_complete_pass; } - -# }}} diff --git a/config/ksh/diraliases b/config/ksh/diraliases deleted file mode 100644 index 4b469d6..0000000 --- a/config/ksh/diraliases +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/ksh -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/l. b/config/ksh/functions/l. deleted file mode 100644 index e4a759e..0000000 --- a/config/ksh/functions/l. +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/ksh -function l. { - if [[ -n "$1" ]]; then - ( cd "$1" 2>/dev/null ||\ - { echo "$0: $1 - No such directory" >&2 ; exit; } - ls -d .* ) - else - ls -d .* - fi -} diff --git a/config/ksh/functions/man_complete b/config/ksh/functions/man_complete deleted file mode 100644 index bab26dd..0000000 --- a/config/ksh/functions/man_complete +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/ksh -man_complete() { - set -A complete_man -- $(<~cache/ksh/precompletions/manpages) -} diff --git a/config/ksh/functions/mc b/config/ksh/functions/mc deleted file mode 100644 index db8a46f..0000000 --- a/config/ksh/functions/mc +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/ksh -mc() { - mkdir "$1" && cd "$1"; -} diff --git a/config/ksh/functions/mpvpin b/config/ksh/functions/mpvpin deleted file mode 100644 index 7fabc6c..0000000 --- a/config/ksh/functions/mpvpin +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/ksh -mpvpin() { - mpv --no-terminal --title "PIN" "$1" >/dev/null 2>&1 & -} diff --git a/config/ksh/functions/pcl b/config/ksh/functions/pcl deleted file mode 100644 index 42ad224..0000000 --- a/config/ksh/functions/pcl +++ /dev/null @@ -1,8 +0,0 @@ -#!/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 deleted file mode 100644 index b80abff..0000000 --- a/config/ksh/functions/pct +++ /dev/null @@ -1,8 +0,0 @@ -#!/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 deleted file mode 100644 index 2664527..0000000 --- a/config/ksh/functions/pkg_complete +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/ksh -pkg_complete() { - set -A complete_pa -- $(<~cache/ksh/precompletions/packages) - set -A complete_pi -- $complete_pa -} diff --git a/config/ksh/functions/update_completion_manpages b/config/ksh/functions/update_completion_manpages deleted file mode 100644 index dc4e77a..0000000 --- a/config/ksh/functions/update_completion_manpages +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/ksh -update_completion_manpages() { - rm $XDG_CACHE_HOME/ksh/precompletions/manpages - for manpage in $(man -kw Nm~.); - do - basename $manpage|sed 's/\..*//'>>$XDG_CACHE_HOME/ksh/precompletions/manpages - done -} diff --git a/config/ksh/functions/update_completion_packages_obsd b/config/ksh/functions/update_completion_packages_obsd deleted file mode 100644 index 2de477f..0000000 --- a/config/ksh/functions/update_completion_packages_obsd +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/ksh -update_completion_packages() { - if [[ -e /usr/local/share/ports-INDEX ]]; then - sed 's/|.*$//' /usr/local/share/ports-INDEX>$XDG_CACHE_HOME/ksh/precompletions/packages - else - echo "install portslist if you want the completions for pkg_add and pkg_info" > /dev/stderr - fi -} diff --git a/config/ksh/functions/update_completion_pkg_inst_obsd b/config/ksh/functions/update_completion_pkg_inst_obsd deleted file mode 100644 index 0442a77..0000000 --- a/config/ksh/functions/update_completion_pkg_inst_obsd +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/ksh -update_completion_pkg_inst() { - ls -1 /var/db/pkg>$XDG_CACHE_HOME/ksh/precompletions/pkg_inst -} diff --git a/config/ksh/functions/update_completions b/config/ksh/functions/update_completions deleted file mode 100644 index cc1e82b..0000000 --- a/config/ksh/functions/update_completions +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/ksh -update_completions() { - update_completion_packages& - update_completion_pkg_inst& - update_completion_manpages& -} diff --git a/config/ksh/kshrc b/config/ksh/kshrc deleted file mode 100644 index a5b48e0..0000000 --- a/config/ksh/kshrc +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/ksh -. $HOME/etc/shrc -KSHCONFIG="$XDG_CONFIG_HOME/ksh" -FPATH=$XDG_CONFIG_HOME/ksh/functions -alias functions="cat \$FPATH/*|grep -vF '#!/bin/ksh'" - -HISTFILE=$XDG_DATA_HOME/ksh/histfile -if ! [[ -d $(dirname $HISTFILE) ]]; then - mkdir -p $(dirname $HISTFILE); -fi -HISTSIZE=5000 -HISTCONTROL="ignoredups" -FCEDIT="$EDITOR" -TMPDIR=$XDG_CACHE_HOME/ksh -if ! [[ -d $TMPDIR ]]; then - mkdir -p $TMPDIR; -fi -# shortcut for cloning -GITHUB="https://github.com" -# make pfetch show what i want -export PF_INFO="ascii title os host shell editor wm pkgs palette" -# fix manpath so local man pages work -# crude *bsd detection -if [[ -d /usr/X11R6 ]]; then -export MANPATH="/usr/share/man:/usr/X11R6/man:/usr/local/man:$XDG_DATA_HOME/man" -else -export MANPATH="/usr/share/man:/usr/local/share/man:$XDG_DATA_HOME/man" -fi -set -o vi - -#load ksh external configs -[[ -f "$XDG_CONFIG_HOME/lf/lfcd.sh" ]] && . "$XDG_CONFIG_HOME/lf/lfcd.sh" -[[ -f "$KSHCONFIG/diraliases" ]] && . "$KSHCONFIG/diraliases" -[[ -f "$XDG_CONFIG_HOME/aliasrc" ]] && . "$XDG_CONFIG_HOME/aliasrc" -[[ -f "$KSHCONFIG/completions.ksh" ]] && . "$KSHCONFIG/completions.ksh" -[[ -f "$KSHCONFIG/prompt.ksh" ]] && . "$KSHCONFIG/prompt.ksh" diff --git a/config/ksh/prompt.ksh b/config/ksh/prompt.ksh deleted file mode 100644 index 80de942..0000000 --- a/config/ksh/prompt.ksh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/ksh -SEP="▍" -RSEP="▐" -#_PS1='\[\033['; -#_END='m\]'; -#_CLEAR=0; _FG_BLACK=30; _BG_BLACK=40 -#_BRIGHT=1; _FG_RED=31; _BG_RED=41 -#_DIM=2; _FG_GREEN=32; _BG_GREEN=42 -#_UNDER=4; _FG_YELLOW=33; _BG_YELLOW=43 -#_BLINK=5; _FG_BLUE=34; _BG_BLUE=44 -#_REVERSE=7; _FG_MAGENTA=35; _BG_MAGENTA=45 -#_HIDDEN=8; _FG_CYAN=36; _BG_CYAN=46 -# _FG_WHITE=37; _BG_WHITE=47 -vcs() { - if git status >/dev/null 2>&1; then - _GIT_BRANCH="$(git branch|grep -F '*'|sed 's/* //')" - printf ' %s' "$_GIT_BRANCH" - fi -} -PS1='\[\033[0;7;32m\]$?\[\033[0;32;45m\]$SEP\[\033[0;7;35m\]\A\[\033[0;35m\]$SEP\[\033[0;1;31m\]\u\[\033[0;32m\]@\[\033[1;34m\]\h\[\033[0;36m\]$RSEP\[\033[7m\]\w\[\033[0;36m\]$SEP\[\033[0;32m\]$(vcs)\n\$\[\033[0m\] ' diff --git a/config/lf/lfrc b/config/lf/lfrc deleted file mode 100644 index 2b2ff1f..0000000 --- a/config/lf/lfrc +++ /dev/null @@ -1,26 +0,0 @@ -# sets -set shell sh -set shellopts '-eu' -set ifs "\n" - -set promptfmt "\033[1;31m%u\033[0;32m@\033[1;34m%h\033[0m\033[0;36m▐\033[7m%w/%f\033[0;36m▍\033[0m" -# cmds -cmd ttmsh ${{ - TTMURL="$(curl -F 'file=@'$f https://ttm.sh)" - if [ -n "$TTMURL" ]; then - echo "$TTMURL"|tee "$HOME/ttmsh"|xclip -r - notif 'successfully uploaded to ttm!' 'link copied to selection, backup is in $HOME/ttmsh' - fi -}} - -cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1 - -# binds -map D delete -map a push %mkdir -map r push :rename -map shell -map R reload -map x $$f -map X !$f -map t ttmsh diff --git a/config/mpd/mpd.conf b/config/mpd/mpd.conf deleted file mode 100644 index 59a1215..0000000 --- a/config/mpd/mpd.conf +++ /dev/null @@ -1,9 +0,0 @@ -playlist_directory "~/.local/share/mpd/playlists" # playlist data -db_file "~/.local/share/mpd/database" # database file -pid_file "~/.local/share/mpd/pid" # tracks MPD's pid -state_file "~/.local/share/mpd/state" # tracks MPD's state while it's down -sticker_file "~/.local/share/mpd/sticker.sql" # auxillary stats - -bind_to_address "localhost" # local daemon -restore_paused "yes" # starts paused if MPD is paused when it closes -auto_update "yes" # updates the database when the directory changes diff --git a/config/ncmpcpp/bindings b/config/ncmpcpp/bindings deleted file mode 100644 index 76f6796..0000000 --- a/config/ncmpcpp/bindings +++ /dev/null @@ -1,70 +0,0 @@ -def_key "+" - show_clock -def_key "=" - volume_up - -def_key "j" - scroll_down -def_key "k" - scroll_up - -def_key "ctrl-u" - page_up -def_key "ctrl-d" - page_down -def_key "u" - page_up -def_key "d" - page_down -def_key "h" - previous_column -def_key "l" - next_column - -def_key "." - show_lyrics - -def_key "n" - next_found_item -def_key "N" - previous_found_item - -def_key "J" - move_sort_order_down -def_key "K" - move_sort_order_up -def_key "h" - jump_to_parent_directory -def_key "l" - enter_directory -def_key "l" - run_action -def_key "l" - play_item -def_key "m" - show_media_library -def_key "m" - toggle_media_library_columns_mode -def_key "t" - show_tag_editor -def_key "v" - show_visualizer -def_key "G" - move_end -def_key "g" - move_home -#jump_to_position_in_song -def_key "U" - update_database -def_key "s" - reset_search_engine -def_key "s" - show_search_engine -def_key "f" - show_browser -def_key "f" - change_browse_mode -def_key "x" - delete_playlist_items -def_key "P" - show_playlist diff --git a/config/ncmpcpp/config b/config/ncmpcpp/config deleted file mode 100644 index de62252..0000000 --- a/config/ncmpcpp/config +++ /dev/null @@ -1,532 +0,0 @@ -ncmpcpp_directory = ~/etc/ncmpcpp -# -## -## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other -## MPD clients (eg. ncmpc) also use that location. -## -# -lyrics_directory = ~/share/lyrics -# -##### connection settings ##### -# -mpd_host = 127.0.0.1 -# -#mpd_port = 6600 -# -#mpd_connection_timeout = 5 -# -## Needed for tag editor and file operations to work. -## -mpd_music_dir = "~/share/xdg/mus" -# -#mpd_crossfade_time = 5 -# -##### music visualizer ##### -## -## Note: In order to make music visualizer work you'll need to use mpd fifo -## output, whose format parameter has to be set to 44100:16:1 for mono -## visualization or 44100:16:2 for stereo visualization. Example configuration -## (it has to be put into mpd.conf): -## -## audio_output { -## type "fifo" -## name "Visualizer feed" -## path "/tmp/mpd.fifo" -## format "44100:16:2" -## } -## -# -#visualizer_fifo_path = /tmp/mpd.fifo -# -## -## Note: Below parameter is needed for ncmpcpp to determine which output -## provides data for visualizer and thus allow syncing between visualization and -## sound as currently there are some problems with it. -## -# -#visualizer_output_name = Visualizer feed -# -## -## If you set format to 44100:16:2, make it 'yes'. -## -#visualizer_in_stereo = yes -# -## -## Note: Below parameter defines how often ncmpcpp has to "synchronize" -## visualizer and audio outputs. 30 seconds is optimal value, but if you -## experience synchronization problems, set it to lower value. Keep in mind -## that sane values start with >=10. -## -# -#visualizer_sync_interval = 30 -# -## -## Note: To enable spectrum frequency visualization you need to compile ncmpcpp -## with fftw3 support. -## -# -## Available values: spectrum, wave, wave_filled, ellipse. -## -#visualizer_type = wave -# -#visualizer_look = ●卐 -#visualizer_look = 卐 -# -#visualizer_color = blue, cyan, green, yellow, magenta, red -# -## Alternative subset of 256 colors for terminals that support it. -## -#visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161 -# -##### system encoding ##### -## -## ncmpcpp should detect your charset encoding but if it failed to do so, you -## can specify charset encoding you are using here. -## -## Note: You can see whether your ncmpcpp build supports charset detection by -## checking output of `ncmpcpp --version`. -## -## Note: Since MPD uses UTF-8 by default, setting this option makes sense only -## if your encoding is different. -## -# -#system_encoding = "" -# -##### delays ##### -# -## Time of inactivity (in seconds) after playlist highlighting will be disabled -## (0 = always on). -## -#playlist_disable_highlight_delay = 5 -# -## Defines how long messages are supposed to be visible. -## -message_delay_time = 1 -# -##### song format ##### -## -## For a song format you can use: -## -## %l - length -## %f - filename -## %D - directory -## %a - artist -## %A - album artist -## %t - title -## %b - album -## %y - date -## %n - track number (01/12 -> 01) -## %N - full track info (01/12 -> 01/12) -## %g - genre -## %c - composer -## %p - performer -## %d - disc -## %C - comment -## %P - priority -## $R - begin right alignment -## -## If you want to make sure that a part of the format is displayed only when -## certain tags are present, you can archieve it by grouping them with brackets, -## e.g. '{%a - %t}' will be evaluated to 'ARTIST - TITLE' if both tags are -## present or '' otherwise. It is also possible to define a list of -## alternatives by providing several groups and separating them with '|', -## e.g. '{%t}|{%f}' will be evaluated to 'TITLE' or 'FILENAME' if the former is -## not present. -## -## Note: If you want to set limit on maximal length of a tag, just put the -## appropriate number between % and character that defines tag type, e.g. to -## make album take max. 20 terminal cells, use '%20b'. -## -## In addition, formats support markers used for text attributes. They are -## followed by character '$'. After that you can put: -## -## - 0 - default window color (discards all other colors) -## - 1 - black -## - 2 - red -## - 3 - green -## - 4 - yellow -## - 5 - blue -## - 6 - magenta -## - 7 - cyan -## - 8 - white -## - 9 - end of current color -## - b - bold text -## - u - underline text -## - r - reverse colors -## - a - use alternative character set -## -## If you don't want to use a non-color attribute anymore, just put it again, -## but this time insert character '/' between '$' and attribute character, -## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename with -## reversed colors. -## -## If you want to use 256 colors and/or background colors in formats (the naming -## scheme is described below in section about color definitions), it can be done -## with the syntax $(COLOR), e.g. to set the artist tag to one of the -## non-standard colors and make it have yellow background, you need to write -## $(197_yellow)%a$(end). Note that for standard colors this is interchangable -## with attributes listed above. -## -## Note: colors can be nested. -## -# -song_list_format = {$4%a - }{%t}|{$8%f$9}$R{$3(%l)$9} -# -song_status_format = $b{{$8"%t"}} $3by {$4%a{ $3in $7%b{ (%y)}} $3}|{$8%f} -# -song_library_format = {%n - }{%t}|{%f} -# -alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b -# -alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} -# -current_item_prefix = $(cyan)$r$b -# -current_item_suffix = $/r$(end)$/b -# -current_item_inactive_column_prefix = $(magenta)$r -# -current_item_inactive_column_suffix = $/r$(end) -# -#now_playing_prefix = $b -# -#now_playing_suffix = $/b -# -#browser_playlist_prefix = "$2playlist$9 " -# -#selected_item_prefix = $6 -# -#selected_item_suffix = $9 -# -#modified_item_prefix = $3> $9 -# -## -## Note: attributes are not supported for the following variables. -## -#song_window_title_format = {%a - }{%t}|{%f} -## -## Note: Below variables are used for sorting songs in browser. The sort mode -## determines how songs are sorted, and can be used in combination with a sort -## format to specify a custom sorting format. Available values for -## browser_sort_mode are "name", "mtime", "format" and "noop". -## -# -#browser_sort_mode = name -# -#browser_sort_format = {%a - }{%t}|{%f} {(%l)} -# -##### columns settings ##### -## -## syntax of song columns list format is "column column etc." -## -## - syntax for each column is: -## -## (width of the column)[color of the column]{displayed tag} -## -## Note: Width is by default in %, if you want a column to have fixed size, add -## 'f' after the value, e.g. (10)[white]{a} will be the column that take 10% of -## screen (so the real width will depend on actual screen size), whereas -## (10f)[white]{a} will take 10 terminal cells, no matter how wide the screen -## is. -## -## - color is optional (if you want the default one, leave the field empty). -## -## Note: You can give a column additional attributes by putting appropriate -## character after displayed tag character. Available attributes are: -## -## - r - column will be right aligned -## - E - if tag is empty, empty tag marker won't be displayed -## -## You can also: -## -## - give a column custom name by putting it after attributes, separated with -## character ':', e.g. {lr:Length} gives you right aligned column of lengths -## named "Length". -## -## - define sequence of tags, that have to be displayed in case predecessor is -## empty in a way similar to the one in classic song format, i.e. using '|' -## character, e.g. {a|c|p:Owner} creates column named "Owner" that tries to -## display artist tag and then composer and performer if previous ones are not -## available. -## -# -#song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l} -# -##### various settings ##### -# -## -## Note: Custom command that will be executed each time song changes. Useful for -## notifications etc. -## -execute_on_song_change = "notif -t mpd -s 3 "MPD: Now Playing" "$(mpc current)"" -# -## -## Note: Custom command that will be executed each time player state -## changes. The environment variable MPD_PLAYER_STATE is set to the current -## state (either unknown, play, pause, or stop) for its duration. -## -# -#execute_on_player_state_change = -# -#playlist_show_mpd_host = no -# -#playlist_show_remaining_time = no -# -#playlist_shorten_total_times = no -# -#playlist_separate_albums = no -# -## -## Note: Possible display modes: classic, columns. -## -playlist_display_mode = columns -# -browser_display_mode = columns -# -#search_engine_display_mode = classic -# -#playlist_editor_display_mode = classic -# -#discard_colors_if_item_is_selected = yes -# -#show_duplicate_tags = true -# -#incremental_seeking = yes -# -#seek_time = 1 -# -#volume_change_step = 2 -# -#autocenter_mode = no -# -#centered_cursor = no -# -## -## Note: You can specify third character which will be used to build 'empty' -## part of progressbar. -## -progressbar_look = -> -# -## Available values: database, playlist. -## -#default_place_to_search_in = database -# -## Available values: classic, alternative. -## -#user_interface = classic -# -#data_fetching_delay = yes -# -## Available values: artist, album_artist, date, genre, composer, performer. -## -media_library_primary_tag = album_artist -# -media_library_albums_split_by_date = yes -# -## Available values: wrapped, normal. -## -#default_find_mode = wrapped -# -#default_tag_editor_pattern = %n - %t -# -#header_visibility = yes -# -#statusbar_visibility = yes -# -#titles_visibility = yes -# -#header_text_scrolling = yes -# -#cyclic_scrolling = no -# -#lines_scrolled = 2 -# -#lyrics_fetchers = lyricwiki, azlyrics, genius, sing365, lyricsmania, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, internet -# -#follow_now_playing_lyrics = no -# -#fetch_lyrics_for_current_song_in_background = no -# -#store_lyrics_in_song_dir = no -# -#generate_win32_compatible_filenames = yes -# -#allow_for_physical_item_deletion = no -# -## -## Note: If you set this variable, ncmpcpp will try to get info from last.fm in -## language you set and if it fails, it will fall back to english. Otherwise it -## will use english the first time. -## -## Note: Language has to be expressed as an ISO 639 alpha-2 code. -## -#lastfm_preferred_language = en -# -#space_add_mode = add_remove -# -#show_hidden_files_in_local_browser = no -# -## -## How shall screen switcher work? -## -## - "previous" - switch between the current and previous screen. -## - "screen1,...,screenN" - switch between given sequence of screens. -## -## Screens available for use: help, playlist, browser, search_engine, -## media_library, playlist_editor, tag_editor, outputs, visualizer, clock, -## lyrics, last_fm. -## -#screen_switcher_mode = playlist, browser -# -## -## Note: You can define startup screen by choosing screen from the list above. -## -startup_screen = media_library -# -## -## Note: You can define startup slave screen by choosing screen from the list -## above or an empty value for no slave screen. -## -#startup_slave_screen = "" -# -#startup_slave_screen_focus = no -# -## -## Default width of locked screen (in %). Acceptable values are from 20 to 80. -## -# -#locked_screen_width_part = 50 -# -#ask_for_locked_screen_width_part = yes -# -#jump_to_now_playing_song_at_start = yes -# -#ask_before_clearing_playlists = yes -# -#clock_display_seconds = no -# -display_volume_level = no -# -#display_bitrate = no -# -#display_remaining_time = no -# -## Available values: none, basic, extended, perl. -## -#regular_expressions = perl -# -## -## Note: if below is enabled, ncmpcpp will ignore leading "The" word while -## sorting items in browser, tags in media library, etc. -## -ignore_leading_the = yes -# -## -## Note: if below is enabled, ncmpcpp will ignore diacritics while searching and -## filtering lists. This takes an effect only if boost was compiled with ICU -## support. -## -#ignore_diacritics = no -# -#block_search_constraints_change_if_items_found = yes -# -mouse_support = no -# -#mouse_list_scroll_whole_page = yes -# -#empty_tag_marker = -# -#tags_separator = " | " -# -#tag_editor_extended_numeration = no -# -#media_library_sort_by_mtime = no -# -#enable_window_title = yes -# -## -## Note: You can choose default search mode for search engine. Available modes -## are: -## -## - 1 - use mpd built-in searching (no regexes, pattern matching) -## -## - 2 - use ncmpcpp searching (pattern matching with support for regexes, but -## if your mpd is on a remote machine, downloading big database to process -## it can take a while -## -## - 3 - match only exact values (this mode uses mpd function for searching in -## database and local one for searching in current playlist) -## -# -#search_engine_default_search_mode = 1 -# -external_editor = nvim -# -## Note: set to yes if external editor is a console application. -## -use_console_editor = yes -# -##### colors definitions ##### -## -## It is possible to set a background color by setting a color value -## "_", e.g. red_black will set foregound color to red -## and background color to black. -## -## In addition, for terminals that support 256 colors it is possible to set one -## of them by using a number in range [1, 256] instead of color name, -## e.g. numerical value corresponding to red_black is 2_1. To find out if the -## terminal supports 256 colors, run ncmpcpp and check out the bottom of the -## help screen for list of available colors and their numerical values. -## -## What is more, there are two special values for the background color: -## "transparent" and "current". The first one explicitly sets the background to -## be transparent, while the second one allows you to preserve current -## background color and change only the foreground one. It's used implicitly -## when background color is not specified. -## -## Moreover, it is possible to attach format information to selected color -## variables by appending to their end a colon followed by one or more format -## flags, e.g. black:b or red:ur. The following variables support this syntax: -## visualizer_color, color1, color2, empty_tag_color, volume_color, -## state_line_color, state_flags_color, progressbar_color, -## progressbar_elapsed_color, player_state_color, statusbar_time_color, -## alternative_ui_separator_color. -## -## Note: due to technical limitations of older ncurses version, if 256 colors -## are used there is a possibility that you'll be able to use only colors with -## transparent background. -# -#colors_enabled = yes -# -empty_tag_color = magenta -# -#header_window_color = magenta -# -#volume_color = default -# -#state_line_color = default -# -#state_flags_color = default:b -# -main_window_color = white -# -#color1 = white -# -#color2 = green -# -progressbar_color = black:b -# -progressbar_elapsed_color = blue:b -# -statusbar_color = red -# -statusbar_time_color = cyan:b -# -#player_state_color = default:b -# -#alternative_ui_separator_color = black:b -# -#window_border_color = green -# -#active_window_border = red -# diff --git a/config/newsboat/config b/config/newsboat/config deleted file mode 100644 index 05513ae..0000000 --- a/config/newsboat/config +++ /dev/null @@ -1,38 +0,0 @@ -#show-read-feeds no -auto-reload yes - -external-url-viewer "urlscan -dc -r 'lh {}'" - -bind-key j down -bind-key k up -bind-key j next articlelist -bind-key k prev articlelist -bind-key J next-feed articlelist -bind-key K prev-feed articlelist -bind-key G end -bind-key g home -bind-key d pagedown -bind-key u pageup -bind-key l open -bind-key h quit -bind-key a toggle-article-read -bind-key n next-unread -bind-key N prev-unread -bind-key D pb-download -bind-key U show-urls -bind-key x pb-delete -bind-key ^t next-unread - -color listnormal cyan default -color listfocus black yellow standout bold -color listnormal_unread blue default -color listfocus_unread yellow default bold -color info red black bold -color article cyan default - -browser lh -macro , open-in-browser -macro t set browser "youtube-dl --add-metadata -ic"; open-in-browser ; set browser lh -macro a set browser "youtube-dl --add-metadata -ic --config-location ~/etc/youtube-dl/config-music"; open-in-browser ; set browser lh -macro v set browser "mpv"; open-in-browser ; set browser lh -macro w set browser "w3m"; open-in-browser ; set browser lh diff --git a/config/shrc b/config/shrc deleted file mode 100644 index d3b05fb..0000000 --- a/config/shrc +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# cleaner shell environment than .profile, used with shenv -export HOME_ETC="$HOME/etc" -export HOME_DATA="$HOME/share" -export HOME_LOG="$HOME/var/log" -export HOME_CACHE="$HOME/var/cache" -export HOME_BIN="$HOME/bin" -export HOME_EXT="$HOME/local" -export HOME_EXT_BIN="$HOME_EXT/bin" -export HOME_EXT_SRC="$HOME_EXT/src" - -export XDG_CACHE_HOME="${HOME_CACHE:=$HOME/.cache}" -export XDG_CONFIG_HOME="${HOME_ETC:=$HOME/.config}" -export XDG_DATA_HOME="${HOME_DATA:=$HOME/.local/share}" - -export PATH="$HOME_BIN:$HOME_EXT_BIN:$PATH" - -export LAUNCHER="dmenu_run" -export EDITOR="vise" -export FILE="lf" -export PAGER="less" -export TERMINAL="xterm" -export OPENER="op" -export BROWSER="firefox" -export COMM="comm-sel" -export READER="zathura" -export MAILER="neomutt" -export MUSIC="ncmpcpp" -export RSS="newsboat" -export SCR="maim" -export LOCK="xlock" -#less args -export LESS='-iFMRX~ -x2' -#locale info -export LANGUAGE="en" -export LANG="POSIX.UTF-8" -export LC_ALL="POSIX.UTF-8" -#lscolor -export CLICOLOR=1 -#todo(1) -export TODO="$HOME_DATA/xdg/doc/todo" -#ksh -export ENV="$HOME_ETC/ksh/kshrc" - -#cleanup paths -export GTK2_RC_FILES="$HOME_ETC/gtk-2.0/gtkrc-2.0" -export LESSHISTFILE="-" -export GOPATH="$HOME_EXT/go" -export GOCACHE="$HOME_CACHE/go" -export GOBIN="$HOME_EXT_BIN" -export CARGO_HOME="$HOME_EXT/rust" -export PYTHONUSERBASE="$HOME_EXT/python" -export MEDNAFEN_HOME="$HOME_EXT/mednafen" -export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=$HOME_ETC/java" -export TERMINFO="$HOME_DATA/terminfo" -export MAILCAPS="$HOME_ETC/mailcap" diff --git a/config/user-dirs.dirs b/config/user-dirs.dirs deleted file mode 100644 index b2cefc6..0000000 --- a/config/user-dirs.dirs +++ /dev/null @@ -1,14 +0,0 @@ -# If you want to change or add directories, just edit the line you're -# interested in. All local changes will be retained on the next run -# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped -# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an -# absolute path. No other format is supported. -# -XDG_DESKTOP_DIR="$HOME/share/xdg/dktp" -XDG_DOWNLOAD_DIR="$HOME/share/xdg/dl" -XDG_TEMPLATES_DIR="$HOME/share/xdg/tpl" -XDG_PUBLICSHARE_DIR="$HOME/share/xdg/pub" -XDG_DOCUMENTS_DIR="$HOME/share/xdg/doc" -XDG_MUSIC_DIR="$HOME/share/xdg/mus" -XDG_PICTURES_DIR="$HOME/share/xdg/pic" -XDG_VIDEOS_DIR="$HOME/share/xdg/vid" diff --git a/config/vis/themes/causalagency.lua b/config/vis/themes/causalagency.lua deleted file mode 100644 index 723328a..0000000 --- a/config/vis/themes/causalagency.lua +++ /dev/null @@ -1,63 +0,0 @@ --- 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/visrc.lua b/config/vis/visrc.lua deleted file mode 100644 index 569e482..0000000 --- a/config/vis/visrc.lua +++ /dev/null @@ -1,16 +0,0 @@ --- load standard vis module, providing parts of the Lua API -require('vis') -require('ctags') - -vis.events.subscribe(vis.events.INIT, function() - -- Your global configuration options - vis:command('set theme causalagency') - vis:command('map insert ') -end) - -vis.events.subscribe(vis.events.WIN_OPEN, function(win) - -- Your per window configuration options e.g. - 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 deleted file mode 100644 index b9ec27f..0000000 --- a/config/youtube-dl/config +++ /dev/null @@ -1,9 +0,0 @@ ---prefer-free-formats -# always use axel ---external-downloader axel -# coherent output format ---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 ---embed-subs diff --git a/config/youtube-dl/config-music b/config/youtube-dl/config-music deleted file mode 100644 index 1396246..0000000 --- a/config/youtube-dl/config-music +++ /dev/null @@ -1,6 +0,0 @@ -# only download audio stream ---format bestaudio -# always use axel -#--external-downloader axel -# coherent output format ---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 deleted file mode 100644 index 1b370d2..0000000 --- a/config/zathura/zathurarc +++ /dev/null @@ -1,35 +0,0 @@ -# actual zathura config -set recolor "true" - -set completion-bg "#161510" -set completion-fg "#ccbc8e" -set completion-group-bg "#161510" -set completion-group-fg "#727a18" -set completion-highlight-bg "#ccbc8e" -set completion-highlight-fg "#161510" - -set recolor-lightcolor "#161510" -set recolor-darkcolor "#ccbc8e" -set default-bg "#161510" - -set inputbar-bg "#161510" -set inputbar-fg "#ccbc8e" -set notification-bg "#161510" -set notification-fg "#ccbc8e" -set notification-error-bg "#a32810" -set notification-error-fg "#ccbc8e" -set notification-warning-bg "#a32810" -set notification-warning-fg "#ccbc8e" -set statusbar-bg "#161510" -set statusbar-fg "#ccbc8e" -set index-bg "#161510" -set index-fg "#ccbc8e" -set index-active-bg "#ccbc8e" -set index-active-fg "#161510" -set render-loading-bg "#161510" -set render-loading-fg "#ccbc8e" - -set window-title-home-tilde true -set statusbar-basename true -set selection-clipboard clipboard -set font "Cozette Medium 11" diff --git a/data/mailcap b/data/mailcap deleted file mode 100644 index c8e0061..0000000 --- a/data/mailcap +++ /dev/null @@ -1,2 +0,0 @@ -text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput; -*/*; op %s diff --git a/data/man/man7/user-hier.7 b/data/man/man7/user-hier.7 deleted file mode 100644 index 0c6e092..0000000 --- a/data/man/man7/user-hier.7 +++ /dev/null @@ -1,169 +0,0 @@ -.\" $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 diff --git a/etc/X11/xprofile b/etc/X11/xprofile new file mode 100644 index 0000000..9c9dc74 --- /dev/null +++ b/etc/X11/xprofile @@ -0,0 +1,32 @@ +#!/bin/sh +. $HOME/etc/shrc +# sets dvorak programmer layout +# also increases autorepeat rate +kbsetup +## detect if laptop has other display connected, kills builtin if so +#[ $(xrandr -q|grep -cE '^(DP|VGA|HDMI)-[[:digit:]] connected') -gt 0 ] && monitor +# disables the beeper +xset b off +# enables x colorscheme +xrdb -load "$HOME_ETC"/X11/xresources + +# set background +xbg & +# notification daemon +# setup xnotify +export XNOTIFY_FIFO="$HOME_CACHE/xnotify.fifo" +rm -f "$XNOTIFY_FIFO" +mkfifo "$XNOTIFY_FIFO" +xnotify 0<>"$XNOTIFY_FIFO" & +# start tiramisu +tiramisu -o "$(printf '#summary\t#body\n')" > "$XNOTIFY_FIFO" & +# status bar +bar.sh & +# mouse vanishes when typing +xbanish & +# activate mpd scrobbler +mpdas -c $HOME_ETC/mpdasrc & +# remind user of important tasks +XFILE="$HOME_ETC/X11/xsession" bother & +# cleanup tabbed +rm $HOME_CACHE/catgirl/tabbed-catgirl.xid diff --git a/etc/X11/xresources b/etc/X11/xresources new file mode 100644 index 0000000..2a3d39c --- /dev/null +++ b/etc/X11/xresources @@ -0,0 +1,98 @@ +! X colors. +#define bg #14130e +#define fg #b7a980 +#define sel #a34110 +#define curs #72694f +#define boldc #CCBC8E + +#define black #161510 +#define red #a32810 +#define green #727a18 +#define brown #a37720 +#define blue #3d6266 +#define purp #7a4955 +#define cyan #557a55 +#define ligrey #8e8463 + +#define dagrey #4c4635 +#define lired #cc3214 +#define ligreen #8e991e +#define yellow #cc9528 +#define liblue #4c7b7f +#define lipurp #995b6b +#define licyan #6b996b +#define white #ccbc8e + + +! X colors. +*foreground: fg +*background: bg + +! Colors 0-15. +*color0: black +*color1: red +*color2: green +*color3: brown +*color4: blue +*color5: purp +*color6: cyan +*color7: ligrey +*color8: dagrey +*color9: lired +*color10: ligreen +*color11: yellow +*color12: liblue +*color13: lipurp +*color14: licyan +*color15: white +*color66: black + +! XTerm config. +xterm*termName: xterm-16color +xterm*metaSendsEscape: true +xterm*font: -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1 +xterm*faceName: Hermit:style=regular:size=11 +xterm*cursorColor: curs +xterm*boldMode: false +xterm*colorBD: boldc +xterm*colorBDMode: true +xterm*highlightColorMode: true +xterm*highlightReverse: false +xterm*highlightColor: sel +xterm*scrollBar: false +xterm*dynamicColors: false +xterm*vt100.Translations: #override \ + Alt Shift L: exec-selectable("flc %t",page) \n\ + Alt Shift Y: insert-selection(PRIMARY) \n\ + Alt Shift V: insert-selection(CLIPBOARD) \n\ + Alt Shift C: copy-selection(CLIPBOARD) \n\ + Alt K: scroll-back(1,line) \n\ + Alt J: scroll-forw(1,line) \n\ + Alt U: scroll-back(1,halfpage) \n\ + Alt D: scroll-forw(1,halfpage) \n +xterm*allowMouseOps: false + +! Xclock colors. +XClock*majorColor: rgba:cc/bc/8e/ff +XClock*minorColor: rgba:cc/bc/8e/ff +XClock*hourColor: rgba:cc/bc/8e/ff +XClock*minuteColor: rgba:cc/bc/8e/ff +XClock*secondColor: rgba:cc/bc/8e/ff + +! sxiv +Sxiv*font: Cozette:style=Medium:pixelsize=11 +Sxiv*background: bg +Sxiv*foreground: fg + +! xlock settings +XLock.mode: blank +XLock.font: -*-terminus-medium-r-*--12-*-*-*-*-*-iso10646-1 + +! xnotify settings +xnotify.title.faceName: Hermit:style=bold:size=11 +xnotify.body.faceName: Hermit:style=regular:size=11 +xnotify.border: ligreen +xnotify.geometry: -10+23 +xnotify.alignment: right +xnotify.wrap: true +!xnotify.shrink: true ! shrink + wrap is broken diff --git a/etc/aliasrc b/etc/aliasrc new file mode 100644 index 0000000..43eb733 --- /dev/null +++ b/etc/aliasrc @@ -0,0 +1,44 @@ +#!/bin/sh +# a file containing POSIX shell-compliant aliases so aliases can be consistent between shells. +alias \ + ls='ls -Fh'\ + ll='ls -Fhl'\ + la='ls -Fha'\ + lynx='lynx -cookies- -vikeys'\ + 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'\ + e="\$EDITOR"\ + yt='yt-dlp'\ + ya="yt-dlp --config-location \$HOME_ETC/yt-dlp/config-music"\ + dl="ftp"\ + unwww='bombadillo'\ + loveread="ssh mic 'tail ~char/love.txt'"\ + logout='clear&&exit' diff --git a/etc/color/colors.sh b/etc/color/colors.sh new file mode 100755 index 0000000..dd8c49a --- /dev/null +++ b/etc/color/colors.sh @@ -0,0 +1,22 @@ +#!/bin/sh +TMP=$(mktemp) +xrdb -query>$TMP +foreground=$(grep -F -m 1 '*foreground:' < $TMP | cut -f 2) +background=$(grep -F -m 1 '*background:' < $TMP | cut -f 2) +color0=$(grep -F -m 1 '*color0:' < $TMP | cut -f 2) +color1=$(grep -F -m 1 '*color1:' < $TMP | cut -f 2) +color2=$(grep -F -m 1 '*color2:' < $TMP | cut -f 2) +color3=$(grep -F -m 1 '*color3:' < $TMP | cut -f 2) +color4=$(grep -F -m 1 '*color4:' < $TMP | cut -f 2) +color5=$(grep -F -m 1 '*color5:' < $TMP | cut -f 2) +color6=$(grep -F -m 1 '*color6:' < $TMP | cut -f 2) +color7=$(grep -F -m 1 '*color7:' < $TMP | cut -f 2) +color8=$(grep -F -m 1 '*color8:' < $TMP | cut -f 2) +color9=$(grep -F -m 1 '*color9:' < $TMP | cut -f 2) +color10=$(grep -F -m 1 '*color10:' < $TMP | cut -f 2) +color11=$(grep -F -m 1 '*color11:' < $TMP | cut -f 2) +color12=$(grep -F -m 1 '*color12:' < $TMP | cut -f 2) +color13=$(grep -F -m 1 '*color13:' < $TMP | cut -f 2) +color14=$(grep -F -m 1 '*color14:' < $TMP | cut -f 2) +color15=$(grep -F -m 1 '*color15:' < $TMP | cut -f 2) +rm $TMP diff --git a/etc/ksh/completions.ksh b/etc/ksh/completions.ksh new file mode 100644 index 0000000..11e0b10 --- /dev/null +++ b/etc/ksh/completions.ksh @@ -0,0 +1,40 @@ +#!/bin/ksh + +COMPLETIONFILES="$HOME_CACHE/ksh/precompletions" +if ! [[ -d $COMPLETIONFILES ]]; then + mkdir -p $COMPLETIONFILES; +fi +#pkg_* completions +if ! [[ -e $COMPLETIONFILES/packages ]]; then + update_completion_packages +fi + +#set -A complete_pa -- $(<$COMPLETIONFILES/packages) +set -A complete_pd -- $(ls -1 /var/db/pkg) +#set -A complete_pi -- $complete_pa + +#man completions +if ! [[ -e $COMPLETIONFILES/manpages ]]; then + update_completion_manpages +fi + +#set -A complete_man -- $(<$COMPLETIONFILES/manpages) + + +# pip completions + +set -A complete_pip_1 -- install download uninstall freeze list show check config search wheel hash help +set -A complete_pip_2 -- --user +set -A complete_pip_3 -- --upgrade + +# pass completions +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; } +pass_show() { pass show "$1" && update_complete_pass; } diff --git a/etc/ksh/diraliases b/etc/ksh/diraliases new file mode 100644 index 0000000..f926827 --- /dev/null +++ b/etc/ksh/diraliases @@ -0,0 +1,17 @@ +#!/bin/ksh +alias -d src=~/src +alias -d git=~src/vcs +alias -d vcs=~/local/src +alias -d conf="$HOME_ETC" +alias -d data="$HOME_DATA" +alias -d cache="$HOME_CACHE" +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/etc/ksh/functions/l. b/etc/ksh/functions/l. new file mode 100644 index 0000000..e4a759e --- /dev/null +++ b/etc/ksh/functions/l. @@ -0,0 +1,10 @@ +#!/bin/ksh +function l. { + if [[ -n "$1" ]]; then + ( cd "$1" 2>/dev/null ||\ + { echo "$0: $1 - No such directory" >&2 ; exit; } + ls -d .* ) + else + ls -d .* + fi +} diff --git a/etc/ksh/functions/man_complete b/etc/ksh/functions/man_complete new file mode 100644 index 0000000..bab26dd --- /dev/null +++ b/etc/ksh/functions/man_complete @@ -0,0 +1,4 @@ +#!/bin/ksh +man_complete() { + set -A complete_man -- $(<~cache/ksh/precompletions/manpages) +} diff --git a/etc/ksh/functions/mc b/etc/ksh/functions/mc new file mode 100644 index 0000000..db8a46f --- /dev/null +++ b/etc/ksh/functions/mc @@ -0,0 +1,4 @@ +#!/bin/ksh +mc() { + mkdir "$1" && cd "$1"; +} diff --git a/etc/ksh/functions/mpvpin b/etc/ksh/functions/mpvpin new file mode 100644 index 0000000..7fabc6c --- /dev/null +++ b/etc/ksh/functions/mpvpin @@ -0,0 +1,4 @@ +#!/bin/ksh +mpvpin() { + mpv --no-terminal --title "PIN" "$1" >/dev/null 2>&1 & +} diff --git a/etc/ksh/functions/pcl b/etc/ksh/functions/pcl new file mode 100644 index 0000000..42ad224 --- /dev/null +++ b/etc/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/etc/ksh/functions/pct b/etc/ksh/functions/pct new file mode 100644 index 0000000..b80abff --- /dev/null +++ b/etc/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/etc/ksh/functions/pkg_complete b/etc/ksh/functions/pkg_complete new file mode 100644 index 0000000..2664527 --- /dev/null +++ b/etc/ksh/functions/pkg_complete @@ -0,0 +1,5 @@ +#!/bin/ksh +pkg_complete() { + set -A complete_pa -- $(<~cache/ksh/precompletions/packages) + set -A complete_pi -- $complete_pa +} diff --git a/etc/ksh/functions/update_completion_manpages b/etc/ksh/functions/update_completion_manpages new file mode 100644 index 0000000..dc4e77a --- /dev/null +++ b/etc/ksh/functions/update_completion_manpages @@ -0,0 +1,8 @@ +#!/bin/ksh +update_completion_manpages() { + rm $XDG_CACHE_HOME/ksh/precompletions/manpages + for manpage in $(man -kw Nm~.); + do + basename $manpage|sed 's/\..*//'>>$XDG_CACHE_HOME/ksh/precompletions/manpages + done +} diff --git a/etc/ksh/functions/update_completion_packages_obsd b/etc/ksh/functions/update_completion_packages_obsd new file mode 100644 index 0000000..2de477f --- /dev/null +++ b/etc/ksh/functions/update_completion_packages_obsd @@ -0,0 +1,8 @@ +#!/bin/ksh +update_completion_packages() { + if [[ -e /usr/local/share/ports-INDEX ]]; then + sed 's/|.*$//' /usr/local/share/ports-INDEX>$XDG_CACHE_HOME/ksh/precompletions/packages + else + echo "install portslist if you want the completions for pkg_add and pkg_info" > /dev/stderr + fi +} diff --git a/etc/ksh/functions/update_completion_pkg_inst_obsd b/etc/ksh/functions/update_completion_pkg_inst_obsd new file mode 100644 index 0000000..0442a77 --- /dev/null +++ b/etc/ksh/functions/update_completion_pkg_inst_obsd @@ -0,0 +1,4 @@ +#!/bin/ksh +update_completion_pkg_inst() { + ls -1 /var/db/pkg>$XDG_CACHE_HOME/ksh/precompletions/pkg_inst +} diff --git a/etc/ksh/functions/update_completions b/etc/ksh/functions/update_completions new file mode 100644 index 0000000..cc1e82b --- /dev/null +++ b/etc/ksh/functions/update_completions @@ -0,0 +1,6 @@ +#!/bin/ksh +update_completions() { + update_completion_packages& + update_completion_pkg_inst& + update_completion_manpages& +} diff --git a/etc/ksh/kshrc b/etc/ksh/kshrc new file mode 100644 index 0000000..28b3c0c --- /dev/null +++ b/etc/ksh/kshrc @@ -0,0 +1,36 @@ +#!/bin/ksh +. $HOME/etc/shrc +KSHCONFIG="$HOME_ETC/ksh" +FPATH="$HOME_ETC/ksh/functions" +alias functions="cat \$FPATH/*|grep -vF '#!/bin/ksh'" + +HISTFILE="$HOME_DATA/ksh/histfile" +if ! [[ -d $(dirname "$HISTFILE") ]]; then + mkdir -p $(dirname "$HISTFILE"); +fi +HISTSIZE=5000 +HISTCONTROL="ignoredups" +FCEDIT="$EDITOR" +TMPDIR="$HOME_CACHE/ksh" +if ! [[ -d "$TMPDIR" ]]; then + mkdir -p "$TMPDIR"; +fi +# shortcut for cloning +GITHUB="https://github.com" +# make pfetch show what i want +export PF_INFO="ascii title os host shell editor wm pkgs palette" +# fix manpath so local man pages work +# crude *bsd detection +if [[ -d /usr/X11R6 ]]; then +export MANPATH="/usr/share/man:/usr/X11R6/man:/usr/local/man:$HOME_DATA/man" +else +export MANPATH="/usr/share/man:/usr/local/share/man:$HOME_DATA/man" +fi +set -o vi + +#load ksh external configs +[[ -f "$HOME_ETC/lf/lfcd.sh" ]] && . "$HOME_ETC/lf/lfcd.sh" +[[ -f "$KSHCONFIG/diraliases" ]] && . "$KSHCONFIG/diraliases" +[[ -f "$HOME_ETC/aliasrc" ]] && . "$HOME_ETC/aliasrc" +[[ -f "$KSHCONFIG/completions.ksh" ]] && . "$KSHCONFIG/completions.ksh" +[[ -f "$KSHCONFIG/prompt.ksh" ]] && . "$KSHCONFIG/prompt.ksh" diff --git a/etc/ksh/prompt.ksh b/etc/ksh/prompt.ksh new file mode 100644 index 0000000..070d394 --- /dev/null +++ b/etc/ksh/prompt.ksh @@ -0,0 +1,20 @@ +#!/bin/ksh +SEP="▍" +RSEP="▐" +#_PS1='\[\033['; +#_END='m\]'; +#_CLEAR=0; _FG_BLACK=30; _BG_BLACK=40 +#_BRIGHT=1; _FG_RED=31; _BG_RED=41 +#_DIM=2; _FG_GREEN=32; _BG_GREEN=42 +#_UNDER=4; _FG_YELLOW=33; _BG_YELLOW=43 +#_BLINK=5; _FG_BLUE=34; _BG_BLUE=44 +#_REVERSE=7; _FG_MAGENTA=35; _BG_MAGENTA=45 +#_HIDDEN=8; _FG_CYAN=36; _BG_CYAN=46 +# _FG_WHITE=37; _BG_WHITE=47 +vcs() { + if git status >/dev/null 2>&1; then + _GIT_BRANCH="$(git branch|grep -F '*'|sed 's/* //')" + printf ' %s' "$_GIT_BRANCH" + fi +} +PS1='\[\033[0;7;32m\]$?\[\033[0;32;45m\]$SEP\[\033[0;7;35m\]\A\[\033[0;35m\]$SEP\[\033[0;1;31m\]\u\[\033[0;32m\]@\[\033[1;34m\]\h\[\033[0;36m\]$RSEP\[\033[7m\]\w\[\033[0;36m\]$SEP\[\033[0;32m\]$(vcs)\n\[\033[0;32m\]\$\[\033[0m\] ' diff --git a/etc/lf/lfrc b/etc/lf/lfrc new file mode 100644 index 0000000..aa3ec00 --- /dev/null +++ b/etc/lf/lfrc @@ -0,0 +1,18 @@ +# sets +set shell sh +set shellopts '-eu' +set ifs "\n" + +set promptfmt "\033[1;31m%u\033[0;32m@\033[1;34m%h\033[0m\033[0;36m▐\033[7m%w/%f\033[0;36m▍\033[0m" +# cmds +cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1 + +# binds +map D delete +map a push %mkdir +map r push :rename +map shell +map R reload +map x $$f +map X !$f +map t ttmsh diff --git a/etc/mpd/mpd.conf b/etc/mpd/mpd.conf new file mode 100644 index 0000000..2117584 --- /dev/null +++ b/etc/mpd/mpd.conf @@ -0,0 +1,18 @@ +music_directory "~/share/xdg/mus" +playlist_directory "~/share/mpd/playlists" +db_file "~/share/mpd/database" +log_file "~/var/log/mpd.log" +pid_file "~/share/mpd/pid" +state_file "~/share/mpd/state" +sticker_file "~/share/mpd/sticker.sql" # auxillary stats + +bind_to_address "~/share/mpd/socket" # socket +restore_paused "yes" # starts paused if MPD is paused when it closes +auto_update "yes" # updates the database when the directory changes + +audio_output { + type "alsa" + name "mpd-mic" +# device "hw:2" #monopolizes the sound device :( + mixer_type "software" +} diff --git a/etc/ncmpcpp/bindings b/etc/ncmpcpp/bindings new file mode 100644 index 0000000..76f6796 --- /dev/null +++ b/etc/ncmpcpp/bindings @@ -0,0 +1,70 @@ +def_key "+" + show_clock +def_key "=" + volume_up + +def_key "j" + scroll_down +def_key "k" + scroll_up + +def_key "ctrl-u" + page_up +def_key "ctrl-d" + page_down +def_key "u" + page_up +def_key "d" + page_down +def_key "h" + previous_column +def_key "l" + next_column + +def_key "." + show_lyrics + +def_key "n" + next_found_item +def_key "N" + previous_found_item + +def_key "J" + move_sort_order_down +def_key "K" + move_sort_order_up +def_key "h" + jump_to_parent_directory +def_key "l" + enter_directory +def_key "l" + run_action +def_key "l" + play_item +def_key "m" + show_media_library +def_key "m" + toggle_media_library_columns_mode +def_key "t" + show_tag_editor +def_key "v" + show_visualizer +def_key "G" + move_end +def_key "g" + move_home +#jump_to_position_in_song +def_key "U" + update_database +def_key "s" + reset_search_engine +def_key "s" + show_search_engine +def_key "f" + show_browser +def_key "f" + change_browse_mode +def_key "x" + delete_playlist_items +def_key "P" + show_playlist diff --git a/etc/ncmpcpp/config b/etc/ncmpcpp/config new file mode 100644 index 0000000..cb689a8 --- /dev/null +++ b/etc/ncmpcpp/config @@ -0,0 +1,532 @@ +ncmpcpp_directory = ~/etc/ncmpcpp +# +## +## Directory for storing downloaded lyrics. It defaults to ~/.lyrics since other +## MPD clients (eg. ncmpc) also use that location. +## +# +lyrics_directory = ~/share/lyrics +# +##### connection settings ##### +# +#mpd_host = 127.0.0.1 +# +#mpd_port = 6600 +# +#mpd_connection_timeout = 5 +# +## Needed for tag editor and file operations to work. +## +mpd_music_dir = "~/share/xdg/mus" +# +#mpd_crossfade_time = 5 +# +##### music visualizer ##### +## +## Note: In order to make music visualizer work you'll need to use mpd fifo +## output, whose format parameter has to be set to 44100:16:1 for mono +## visualization or 44100:16:2 for stereo visualization. Example configuration +## (it has to be put into mpd.conf): +## +## audio_output { +## type "fifo" +## name "Visualizer feed" +## path "/tmp/mpd.fifo" +## format "44100:16:2" +## } +## +# +#visualizer_fifo_path = /tmp/mpd.fifo +# +## +## Note: Below parameter is needed for ncmpcpp to determine which output +## provides data for visualizer and thus allow syncing between visualization and +## sound as currently there are some problems with it. +## +# +#visualizer_output_name = Visualizer feed +# +## +## If you set format to 44100:16:2, make it 'yes'. +## +#visualizer_in_stereo = yes +# +## +## Note: Below parameter defines how often ncmpcpp has to "synchronize" +## visualizer and audio outputs. 30 seconds is optimal value, but if you +## experience synchronization problems, set it to lower value. Keep in mind +## that sane values start with >=10. +## +# +#visualizer_sync_interval = 30 +# +## +## Note: To enable spectrum frequency visualization you need to compile ncmpcpp +## with fftw3 support. +## +# +## Available values: spectrum, wave, wave_filled, ellipse. +## +#visualizer_type = wave +# +#visualizer_look = ●卐 +#visualizer_look = 卐 +# +#visualizer_color = blue, cyan, green, yellow, magenta, red +# +## Alternative subset of 256 colors for terminals that support it. +## +#visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161 +# +##### system encoding ##### +## +## ncmpcpp should detect your charset encoding but if it failed to do so, you +## can specify charset encoding you are using here. +## +## Note: You can see whether your ncmpcpp build supports charset detection by +## checking output of `ncmpcpp --version`. +## +## Note: Since MPD uses UTF-8 by default, setting this option makes sense only +## if your encoding is different. +## +# +#system_encoding = "" +# +##### delays ##### +# +## Time of inactivity (in seconds) after playlist highlighting will be disabled +## (0 = always on). +## +#playlist_disable_highlight_delay = 5 +# +## Defines how long messages are supposed to be visible. +## +message_delay_time = 1 +# +##### song format ##### +## +## For a song format you can use: +## +## %l - length +## %f - filename +## %D - directory +## %a - artist +## %A - album artist +## %t - title +## %b - album +## %y - date +## %n - track number (01/12 -> 01) +## %N - full track info (01/12 -> 01/12) +## %g - genre +## %c - composer +## %p - performer +## %d - disc +## %C - comment +## %P - priority +## $R - begin right alignment +## +## If you want to make sure that a part of the format is displayed only when +## certain tags are present, you can archieve it by grouping them with brackets, +## e.g. '{%a - %t}' will be evaluated to 'ARTIST - TITLE' if both tags are +## present or '' otherwise. It is also possible to define a list of +## alternatives by providing several groups and separating them with '|', +## e.g. '{%t}|{%f}' will be evaluated to 'TITLE' or 'FILENAME' if the former is +## not present. +## +## Note: If you want to set limit on maximal length of a tag, just put the +## appropriate number between % and character that defines tag type, e.g. to +## make album take max. 20 terminal cells, use '%20b'. +## +## In addition, formats support markers used for text attributes. They are +## followed by character '$'. After that you can put: +## +## - 0 - default window color (discards all other colors) +## - 1 - black +## - 2 - red +## - 3 - green +## - 4 - yellow +## - 5 - blue +## - 6 - magenta +## - 7 - cyan +## - 8 - white +## - 9 - end of current color +## - b - bold text +## - u - underline text +## - r - reverse colors +## - a - use alternative character set +## +## If you don't want to use a non-color attribute anymore, just put it again, +## but this time insert character '/' between '$' and attribute character, +## e.g. {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename with +## reversed colors. +## +## If you want to use 256 colors and/or background colors in formats (the naming +## scheme is described below in section about color definitions), it can be done +## with the syntax $(COLOR), e.g. to set the artist tag to one of the +## non-standard colors and make it have yellow background, you need to write +## $(197_yellow)%a$(end). Note that for standard colors this is interchangable +## with attributes listed above. +## +## Note: colors can be nested. +## +# +song_list_format = {$4%a - }{%t}|{$8%f$9}$R{$3(%l)$9} +# +song_status_format = $b{{$8"%t"}} $3by {$4%a{ $3in $7%b{ (%y)}} $3}|{$8%f} +# +song_library_format = {%n - }{%t}|{%f} +# +alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b +# +alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} +# +current_item_prefix = $(cyan)$r$b +# +current_item_suffix = $/r$(end)$/b +# +current_item_inactive_column_prefix = $(magenta)$r +# +current_item_inactive_column_suffix = $/r$(end) +# +#now_playing_prefix = $b +# +#now_playing_suffix = $/b +# +#browser_playlist_prefix = "$2playlist$9 " +# +#selected_item_prefix = $6 +# +#selected_item_suffix = $9 +# +#modified_item_prefix = $3> $9 +# +## +## Note: attributes are not supported for the following variables. +## +#song_window_title_format = {%a - }{%t}|{%f} +## +## Note: Below variables are used for sorting songs in browser. The sort mode +## determines how songs are sorted, and can be used in combination with a sort +## format to specify a custom sorting format. Available values for +## browser_sort_mode are "name", "mtime", "format" and "noop". +## +# +#browser_sort_mode = name +# +#browser_sort_format = {%a - }{%t}|{%f} {(%l)} +# +##### columns settings ##### +## +## syntax of song columns list format is "column column etc." +## +## - syntax for each column is: +## +## (width of the column)[color of the column]{displayed tag} +## +## Note: Width is by default in %, if you want a column to have fixed size, add +## 'f' after the value, e.g. (10)[white]{a} will be the column that take 10% of +## screen (so the real width will depend on actual screen size), whereas +## (10f)[white]{a} will take 10 terminal cells, no matter how wide the screen +## is. +## +## - color is optional (if you want the default one, leave the field empty). +## +## Note: You can give a column additional attributes by putting appropriate +## character after displayed tag character. Available attributes are: +## +## - r - column will be right aligned +## - E - if tag is empty, empty tag marker won't be displayed +## +## You can also: +## +## - give a column custom name by putting it after attributes, separated with +## character ':', e.g. {lr:Length} gives you right aligned column of lengths +## named "Length". +## +## - define sequence of tags, that have to be displayed in case predecessor is +## empty in a way similar to the one in classic song format, i.e. using '|' +## character, e.g. {a|c|p:Owner} creates column named "Owner" that tries to +## display artist tag and then composer and performer if previous ones are not +## available. +## +# +#song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l} +# +##### various settings ##### +# +## +## Note: Custom command that will be executed each time song changes. Useful for +## notifications etc. +## +execute_on_song_change = "notif -t mpd -s 3 "MPD: Now Playing" "$(mpc current)"" +# +## +## Note: Custom command that will be executed each time player state +## changes. The environment variable MPD_PLAYER_STATE is set to the current +## state (either unknown, play, pause, or stop) for its duration. +## +# +#execute_on_player_state_change = +# +#playlist_show_mpd_host = no +# +#playlist_show_remaining_time = no +# +#playlist_shorten_total_times = no +# +#playlist_separate_albums = no +# +## +## Note: Possible display modes: classic, columns. +## +playlist_display_mode = columns +# +browser_display_mode = columns +# +#search_engine_display_mode = classic +# +#playlist_editor_display_mode = classic +# +#discard_colors_if_item_is_selected = yes +# +#show_duplicate_tags = true +# +#incremental_seeking = yes +# +#seek_time = 1 +# +#volume_change_step = 2 +# +#autocenter_mode = no +# +#centered_cursor = no +# +## +## Note: You can specify third character which will be used to build 'empty' +## part of progressbar. +## +progressbar_look = -> +# +## Available values: database, playlist. +## +#default_place_to_search_in = database +# +## Available values: classic, alternative. +## +#user_interface = classic +# +#data_fetching_delay = yes +# +## Available values: artist, album_artist, date, genre, composer, performer. +## +media_library_primary_tag = album_artist +# +media_library_albums_split_by_date = yes +# +## Available values: wrapped, normal. +## +#default_find_mode = wrapped +# +#default_tag_editor_pattern = %n - %t +# +#header_visibility = yes +# +#statusbar_visibility = yes +# +#titles_visibility = yes +# +#header_text_scrolling = yes +# +#cyclic_scrolling = no +# +#lines_scrolled = 2 +# +#lyrics_fetchers = lyricwiki, azlyrics, genius, sing365, lyricsmania, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, internet +# +#follow_now_playing_lyrics = no +# +#fetch_lyrics_for_current_song_in_background = no +# +#store_lyrics_in_song_dir = no +# +#generate_win32_compatible_filenames = yes +# +#allow_for_physical_item_deletion = no +# +## +## Note: If you set this variable, ncmpcpp will try to get info from last.fm in +## language you set and if it fails, it will fall back to english. Otherwise it +## will use english the first time. +## +## Note: Language has to be expressed as an ISO 639 alpha-2 code. +## +#lastfm_preferred_language = en +# +#space_add_mode = add_remove +# +#show_hidden_files_in_local_browser = no +# +## +## How shall screen switcher work? +## +## - "previous" - switch between the current and previous screen. +## - "screen1,...,screenN" - switch between given sequence of screens. +## +## Screens available for use: help, playlist, browser, search_engine, +## media_library, playlist_editor, tag_editor, outputs, visualizer, clock, +## lyrics, last_fm. +## +#screen_switcher_mode = playlist, browser +# +## +## Note: You can define startup screen by choosing screen from the list above. +## +startup_screen = media_library +# +## +## Note: You can define startup slave screen by choosing screen from the list +## above or an empty value for no slave screen. +## +#startup_slave_screen = "" +# +#startup_slave_screen_focus = no +# +## +## Default width of locked screen (in %). Acceptable values are from 20 to 80. +## +# +#locked_screen_width_part = 50 +# +#ask_for_locked_screen_width_part = yes +# +#jump_to_now_playing_song_at_start = yes +# +#ask_before_clearing_playlists = yes +# +#clock_display_seconds = no +# +display_volume_level = no +# +#display_bitrate = no +# +#display_remaining_time = no +# +## Available values: none, basic, extended, perl. +## +#regular_expressions = perl +# +## +## Note: if below is enabled, ncmpcpp will ignore leading "The" word while +## sorting items in browser, tags in media library, etc. +## +ignore_leading_the = yes +# +## +## Note: if below is enabled, ncmpcpp will ignore diacritics while searching and +## filtering lists. This takes an effect only if boost was compiled with ICU +## support. +## +#ignore_diacritics = no +# +#block_search_constraints_change_if_items_found = yes +# +mouse_support = no +# +#mouse_list_scroll_whole_page = yes +# +#empty_tag_marker = +# +#tags_separator = " | " +# +#tag_editor_extended_numeration = no +# +#media_library_sort_by_mtime = no +# +#enable_window_title = yes +# +## +## Note: You can choose default search mode for search engine. Available modes +## are: +## +## - 1 - use mpd built-in searching (no regexes, pattern matching) +## +## - 2 - use ncmpcpp searching (pattern matching with support for regexes, but +## if your mpd is on a remote machine, downloading big database to process +## it can take a while +## +## - 3 - match only exact values (this mode uses mpd function for searching in +## database and local one for searching in current playlist) +## +# +#search_engine_default_search_mode = 1 +# +external_editor = vi +# +## Note: set to yes if external editor is a console application. +## +use_console_editor = yes +# +##### colors definitions ##### +## +## It is possible to set a background color by setting a color value +## "_", e.g. red_black will set foregound color to red +## and background color to black. +## +## In addition, for terminals that support 256 colors it is possible to set one +## of them by using a number in range [1, 256] instead of color name, +## e.g. numerical value corresponding to red_black is 2_1. To find out if the +## terminal supports 256 colors, run ncmpcpp and check out the bottom of the +## help screen for list of available colors and their numerical values. +## +## What is more, there are two special values for the background color: +## "transparent" and "current". The first one explicitly sets the background to +## be transparent, while the second one allows you to preserve current +## background color and change only the foreground one. It's used implicitly +## when background color is not specified. +## +## Moreover, it is possible to attach format information to selected color +## variables by appending to their end a colon followed by one or more format +## flags, e.g. black:b or red:ur. The following variables support this syntax: +## visualizer_color, color1, color2, empty_tag_color, volume_color, +## state_line_color, state_flags_color, progressbar_color, +## progressbar_elapsed_color, player_state_color, statusbar_time_color, +## alternative_ui_separator_color. +## +## Note: due to technical limitations of older ncurses version, if 256 colors +## are used there is a possibility that you'll be able to use only colors with +## transparent background. +# +#colors_enabled = yes +# +empty_tag_color = magenta +# +#header_window_color = magenta +# +#volume_color = default +# +#state_line_color = default +# +#state_flags_color = default:b +# +main_window_color = white +# +#color1 = white +# +#color2 = green +# +progressbar_color = black:b +# +progressbar_elapsed_color = blue:b +# +statusbar_color = red +# +statusbar_time_color = cyan:b +# +#player_state_color = default:b +# +#alternative_ui_separator_color = black:b +# +#window_border_color = green +# +#active_window_border = red +# diff --git a/etc/newsboat/config b/etc/newsboat/config new file mode 100644 index 0000000..a6b49a9 --- /dev/null +++ b/etc/newsboat/config @@ -0,0 +1,38 @@ +#show-read-feeds no +auto-reload yes + +external-url-viewer "flc" + +bind-key j down +bind-key k up +bind-key j next articlelist +bind-key k prev articlelist +bind-key J next-feed articlelist +bind-key K prev-feed articlelist +bind-key G end +bind-key g home +bind-key d pagedown +bind-key u pageup +bind-key l open +bind-key h quit +bind-key a toggle-article-read +bind-key n next-unread +bind-key N prev-unread +bind-key D pb-download +bind-key U show-urls +bind-key x pb-delete +bind-key ^t next-unread + +color listnormal cyan default +color listfocus black yellow standout bold +color listnormal_unread blue default +color listfocus_unread yellow default bold +color info red black bold +color article cyan default + +browser lh +macro , open-in-browser +macro t set browser "yt-dlp --add-metadata -i"; open-in-browser ; set browser lh +macro a set browser "yt-dlp --add-metadata -i --config-location ~/etc/yt-dlp/config-music"; open-in-browser ; set browser lh +macro v set browser "mpv"; open-in-browser ; set browser lh +macro w set browser "lynx -cookies- -vikeys"; open-in-browser ; set browser lh diff --git a/etc/shrc b/etc/shrc new file mode 100644 index 0000000..9da8cef --- /dev/null +++ b/etc/shrc @@ -0,0 +1,62 @@ +#!/bin/sh +# cleaner shell environment than .profile, used with shenv +export HOME_ETC="$HOME/etc" +export HOME_DATA="$HOME/share" +export HOME_LOG="$HOME/var/log" +export HOME_CACHE="$HOME/var/cache" +export HOME_BIN="$HOME/bin" +export HOME_EXT="$HOME/local" +export HOME_EXT_DATA="$HOME_EXT/share" +export HOME_EXT_BIN="$HOME_EXT/bin" +export HOME_EXT_SRC="$HOME_EXT/src" + +export XDG_CACHE_HOME="$HOME_CACHE" +export XDG_CONFIG_HOME="$HOME_ETC" +export XDG_DATA_HOME="$HOME_DATA" + +export PATH="$HOME_BIN:$HOME_EXT_BIN:$PATH" + +export LAUNCHER="dmenu_run" +export EDITOR="vi" +export FILE="lf" +export PAGER="less" +export TERMINAL="xterm" +export OPENER="op" +export BROWSER="firefox" +export COMM="comm-sel" +export READER="zathura" +export MAILER="neomutt" +export MUSIC="ncmpcpp" +export RSS="newsboat" +export SCR="maim" +export LOCK="xlock" +#less args +export LESS='-iFMRX~ -x2' +#locale info +export LANGUAGE="en" +export LANG="C.UTF-8" +export LC_ALL="C.UTF-8" +#lscolor +export CLICOLOR=1 +#todo(1) +export TODO="$HOME_DATA/xdg/doc/todo" +#ksh +export ENV="$HOME_ETC/ksh/kshrc" +#vi +export EXINIT="set ai extended iclower sm sw=4 ts=4 smd +map gg 1G +map gx !'mxsel -b -i +map gp :r!xsel -b -o" + +#cleanup paths +export GTK2_RC_FILES="$HOME_ETC/gtk-2.0/gtkrc-2.0" +export LESSHISTFILE="-" +export GOPATH="$HOME_EXT/go" +export GOCACHE="$HOME_CACHE/go" +export GOBIN="$HOME_EXT_BIN" +export CARGO_HOME="$HOME_EXT/rust" +export PYTHONUSERBASE="$HOME_EXT/python" +export MEDNAFEN_HOME="$HOME_EXT/mednafen" +export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=$HOME_ETC/java" +export TERMINFO="$HOME_DATA/terminfo" +export MAILCAPS="$HOME_ETC/mailcap" diff --git a/etc/user-dirs.dirs b/etc/user-dirs.dirs new file mode 100644 index 0000000..b2cefc6 --- /dev/null +++ b/etc/user-dirs.dirs @@ -0,0 +1,14 @@ +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/share/xdg/dktp" +XDG_DOWNLOAD_DIR="$HOME/share/xdg/dl" +XDG_TEMPLATES_DIR="$HOME/share/xdg/tpl" +XDG_PUBLICSHARE_DIR="$HOME/share/xdg/pub" +XDG_DOCUMENTS_DIR="$HOME/share/xdg/doc" +XDG_MUSIC_DIR="$HOME/share/xdg/mus" +XDG_PICTURES_DIR="$HOME/share/xdg/pic" +XDG_VIDEOS_DIR="$HOME/share/xdg/vid" diff --git a/etc/yt-dlp/config b/etc/yt-dlp/config new file mode 100644 index 0000000..23171b9 --- /dev/null +++ b/etc/yt-dlp/config @@ -0,0 +1,16 @@ +--prefer-free-formats +# always use aria2 +--external-downloader aria2c +# format +--format bestvideo+bestaudio/best +# format definition +--format-sort "res:1080,fps:60,vcodec:av01" +# dl to ~vid +--paths ~/share/xdg/vid/ +--output %(uploader)s/%(title)s.%(ext)s +# english subs, no chat +--sub-langs "en.*,-live_chat" +# always merge into mkv +--merge-output-format mkv +# embed subtitles if they are to be written +--embed-subs diff --git a/etc/yt-dlp/config-music b/etc/yt-dlp/config-music new file mode 100644 index 0000000..b8109f8 --- /dev/null +++ b/etc/yt-dlp/config-music @@ -0,0 +1,7 @@ +# free formats +--prefer-free-formats +# only download audio stream +--format bestaudio +# dl to ~mus +--paths ~/share/xdg/mus +--output %(uploader_id,uploader,album_artist)s/%(release_year,release_date>%Y,upload_date>%Y|)s-%(album|singles)s/%(track_number,playlist_index|)02d%(track_number,playlist_index&-|)s%(track,title|title)s.%(ext)s diff --git a/etc/zathura/zathurarc b/etc/zathura/zathurarc new file mode 100644 index 0000000..e72220f --- /dev/null +++ b/etc/zathura/zathurarc @@ -0,0 +1,35 @@ +# actual zathura config +set recolor "true" + +set completion-bg "#161510" +set completion-fg "#ccbc8e" +set completion-group-bg "#161510" +set completion-group-fg "#727a18" +set completion-highlight-bg "#ccbc8e" +set completion-highlight-fg "#161510" + +set recolor-lightcolor "#161510" +set recolor-darkcolor "#ccbc8e" +set default-bg "#161510" + +set inputbar-bg "#161510" +set inputbar-fg "#ccbc8e" +set notification-bg "#161510" +set notification-fg "#ccbc8e" +set notification-error-bg "#a32810" +set notification-error-fg "#ccbc8e" +set notification-warning-bg "#a32810" +set notification-warning-fg "#ccbc8e" +set statusbar-bg "#161510" +set statusbar-fg "#ccbc8e" +set index-bg "#161510" +set index-fg "#ccbc8e" +set index-active-bg "#ccbc8e" +set index-active-fg "#161510" +set render-loading-bg "#161510" +set render-loading-fg "#ccbc8e" + +set window-title-home-tilde true +set statusbar-basename true +set selection-clipboard clipboard +set font "Hermit Regular 13" diff --git a/share/mailcap b/share/mailcap new file mode 100644 index 0000000..c8e0061 --- /dev/null +++ b/share/mailcap @@ -0,0 +1,2 @@ +text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput; +*/*; op %s diff --git a/share/man/man7/user-hier.7 b/share/man/man7/user-hier.7 new file mode 100644 index 0000000..0c6e092 --- /dev/null +++ b/share/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