diff options
author | ensa <@> | 2023-02-04 20:03:47 -0800 |
---|---|---|
committer | ensa <@> | 2023-02-04 20:52:52 -0800 |
commit | 75ee668954833ab6ba9287ed5eb16a9957edcac2 (patch) | |
tree | 07d9f88939ab0fd93d93c6f4ddbbc7b548a812f0 /etc | |
parent | ebae3707b36e9a83014ef08271d75bd9826bb999 (diff) | |
download | cfg-75ee668954833ab6ba9287ed5eb16a9957edcac2.tar.gz |
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
Diffstat (limited to 'etc')
29 files changed, 1188 insertions, 0 deletions
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 <Key>L: exec-selectable("flc %t",page) \n\ + Alt Shift <Key>Y: insert-selection(PRIMARY) \n\ + Alt Shift <Key>V: insert-selection(CLIPBOARD) \n\ + Alt Shift <Key>C: copy-selection(CLIPBOARD) \n\ + Alt <Key> K: scroll-back(1,line) \n\ + Alt <Key> J: scroll-forw(1,line) \n\ + Alt <Key> U: scroll-back(1,halfpage) \n\ + Alt <Key> 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<space> +map r push :rename<space> +map <enter> 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 = <empty> +# +#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 +## "<foreground>_<background>", 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" |