dot

packages and services management
Log | Files | Refs | README

commit 6a67e3115143f1d3550cb585ed9d43f42d3ba86b
parent 5d24094fc570d651fba55167257497419a724438
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun,  5 Nov 2017 03:40:16 +0100

changing XDG_* breaks chrome and probably other too

Diffstat:
Mbin/edit | 1+
Mbin/io-cache | 26+++++++++++++++-----------
Abin/io-find | 3+++
Mbin/io-src | 4++--
Mbin/mblaze-filter | 6++++--
Mbin/package | 8++++----
Mbin/printree | 2+-
Mbin/store | 4++--
Mbin/xdg-open | 4++++
Mdot/bashrc | 2++
Mdot/gitconfig | 13++++++++-----
Mdot/profile | 22++--------------------
Mdot/vim/vimrc | 3++-
Mio/http | 1+
14 files changed, 51 insertions(+), 48 deletions(-)

diff --git a/bin/edit b/bin/edit @@ -1,3 +1,4 @@ #!/bin/sh +[ -d "$1" ] && exec io-src "$1" exec vim "$@" diff --git a/bin/io-cache b/bin/io-cache @@ -5,28 +5,32 @@ mkdir -p "$HOME/var/cache" exec 1> "$HOME/var/cache/io" echo '#rlwrap ii-client' -find "$HOME/var/irc" -maxdepth 1 -mindepth 1 -type d | sort +find "$HOME/var/irc" -maxdepth 1 -mindepth 1 -type d | +sort echo '#io-mail' -find "$HOME/var/mail" -maxdepth 1 -mindepth 1 -type d | sort | -xe -N1 -s 'printf "%-50s %4s\\n" "$1" "$(mlist -s "$1" | wc -l)"' - -echo '#io-src' -find "$HOME/src" "$HOME/git" -maxdepth 1 -mindepth 1 -type d | sort +mdirs "$HOME/var/mail" | while IFS='' read -r dir +do printf '%-50s %4s\n' "$dir" "$(mlist -s "$dir" | wc -l)" +done | sort echo '#play' -find "$HOME/lib/video" "$HOME/lib/music" | sort +find "$HOME/lib/video" "$HOME/lib/music" | +sort echo '#mandoc -a' IFS=: -find $MANPATH -name '*.[0-9]' -o -name '*.[0-9]p' -o -name '*.[0-9].gz' | sort +find $MANPATH -name '*.[0-9]' -o -name '*.[0-9]p' -o -name '*.[0-9].gz' | +sort unset IFS echo '#qemu-start' -find "$HOME/var/qemu" -type f | sort +find "$HOME/var/qemu" -type f | +sort echo '#mupdf' -find "$HOME/tmp" "$HOME/lib" -type f -name '*.pdf' | sort +find "$HOME/tmp" "$HOME/lib" -type f -name '*.pdf' | +sort echo "#$EDITOR" -find "$HOME" -name .git -prune -o -type f | sort +find "$HOME" -name .git -prune -o -print | +sort diff --git a/bin/io-find b/bin/io-find @@ -0,0 +1,3 @@ +#!/bin/sh + +find "$HOME" -name .git -prune -o -print | iomenu diff --git a/bin/io-src b/bin/io-src @@ -3,7 +3,7 @@ io "$( find "$1" -type f ! -path '*/.git/*' | sort | xargs -n 1 awk ' - FNR == 1 { printf("# %s\n", FILENAME); } + FNR == 1 { printf("#%s\n", FILENAME); } { printf("%7s\t%s\n", FNR, $0); } - ' | iomenu -# -p search | sed -e 's/^# //' -e 's/ .*//' + ' | iomenu -# -p search | sed 's/ .*//' )" diff --git a/bin/mblaze-filter b/bin/mblaze-filter @@ -11,10 +11,11 @@ do printf '%-25s ' "$dir" mlist "$MAIL" | mpick -t "$test" | xe mv {} "${MAIL%/*}/$dir/new" done << 'EOF' -actux.eu.org "To" ~~~ "*@actux.eu.org*" +actux.eu.org "Reply-To" ~~~ "*@actux.eu.org*" amazon.com "From" ~~~ "*@amazon.*" amnesty.org "From" ~~~ "*amnesty.*" bandcamp.com "From" ~~~ "*Cryo Chamber*" +bandcamp.com "From" ~~~ "*makeupandvanityset.com*" bandcamp.com "Reply-To" ~~~ "*bandcamp.com*" breizh-entropy.org "List-Id" ~~~ "*breizh-entropy.org*" coinbase.com "From" ~~~ "*coinbase.com*" @@ -33,7 +34,8 @@ google.com "From" ~~~ "*google.com*" keybase.io "From" ~~~ "*keybase.io*" lobste.rs "From" ~~~ "*@lobste.rs*" nixers.net "From" ~~~ "*@nixers.net*" -openbsd.org/tech "To" ~~~ "tech@openbsd.org" +openbsd.org/tech "To" ~~~ "*tech@openbsd.org*" +openbsd.org/tech "Cc" ~~~ "*tech@openbsd.org*" paypal.com "From" ~~~ "*paypal.*" reddit.com "From" ~~~ "*@reddit.*" repo.or.cz "Subject" ~~~ "*\[repo.or.cz\]*" diff --git a/bin/package b/bin/package @@ -2,10 +2,10 @@ : ${2:?Usage: ${0##*/} <command> <package>} -SYSROOT=$HOME/usr -PKG=$HOME/etc/package/$2 -SRC=$HOME/src/$2 -OPT=$HOME/opt/$2 +SYSROOT="$HOME/usr" +PKG="$HOME/etc/package/$2" +SRC="$HOME/src/$2" +OPT="$HOME/opt/$2" case "$1" in diff --git a/bin/printree b/bin/printree @@ -3,7 +3,7 @@ LC_COLLATE=C awk '{ do { print } while (sub("/[^/]*$", "")) }' | sort -u | -awk -v LINE='│ ' -v NODE='├── ' -v TAIL='└── ' -v VOID=' ' -v HTML="$1" ' +awk -v LINE='| ' -v NODE='|-- ' -v TAIL='`-- ' -v VOID=' ' -v HTML="$1" ' BEGIN { if (HTML) print "<pre>" diff --git a/bin/store b/bin/store @@ -1,14 +1,14 @@ #!/bin/sh # store a file into $HOME/lib/http -domain=$(printf %s "$1" | sed -r 's|(://)?([^/]+).*|\2|') +domain=$(printf %s "$1" | sed -r 's|^[^:]*(://)?([^/]+).*|\2|') filename=$(printf %s "$1" | sed -r 's|.*/||') mkdir -p "$HOME/lib/http/$domain" cd "$HOME/lib/http/$domain" || exit 1 case $1 in -(*vimeo.com/*|*youtube.com/*) +(*vimeo.com/*|*youtube.com/*|*.bandcamp.com/*) youtube-dl "$1" ;; (*://*.torrent) diff --git a/bin/xdg-open b/bin/xdg-open @@ -47,6 +47,10 @@ case $1 in mkdir -p "$dir" doas 9pfs "$address" "$dir" ;; +(git://*) + cd "$HOME/src" || exit 1 + exec git clone "$1" + ;; (mailto:*) mcom "${1#mailto:}" ;; diff --git a/dot/bashrc b/dot/bashrc @@ -14,6 +14,8 @@ alias blih="blih -u $BLIH" alias p='p=$(io-ps)' alias l='ls -Alp' alias s='git status -s --branch' +alias c='cd "$(find . -maxdepth 4 -name .git -prune -o -type d | iomenu)"' +alias f='f=$(io-find)' # --- functions ---------------------------------------------------------------- diff --git a/dot/gitconfig b/dot/gitconfig @@ -1,10 +1,13 @@ [user] - email = mail@josuah.net - name = Josuah Demangeon + email = mail@josuah.net + name = Josuah Demangeon [alias] - graph = log --graph --date=short --color=never --decorate --tags \ - --branches --remotes --format='%h %cd %cn <%ce>%d%n%s%n' + graph = log --format='%h %cd %cn <%ce>%d%n%s%n' \ + --graph --date=short --color=never --decorate --tags --branches \ + --remotes + + poule = pull [core] - editor = ex + editor = edit diff --git a/dot/profile b/dot/profile @@ -14,7 +14,7 @@ export MANPAGER="$PAGER" export ENV="$HOME/.bashrc" export MAIL="$HOME/var/mail/INBOX" export PATH="$HOME/etc/bin:$HOME/usr/bin:$PATH" -export MANPATH="/usr/share/man:/usr/local/man" +export MANPATH="$HOME/etc/man:/usr/share/man:/usr/local/man" export MANPATH="$HOME/usr/share/man:$MANPATH" export PYTHONPATH="$HOME/usr/lib/python2.7/site-packages" export GOPATH="$HOME/usr/lib/go" @@ -22,29 +22,11 @@ export C_INCLUDE_PATH="$HOME/usr/include" export LIBRARY_PATH="$HOME/usr/lib:/usr/local/lib/inotify" export LD_LIBRARY_PATH="$HOME/usr/lib:/usr/local/lib/inotify" -export XDG_DATA_DIRS="$HOME/usr/share" -export XDG_DATA_HOME="$HOME/usr/share" -export XDG_CONFIG_DIRS="$HOME/usr/etc" -export XDG_CONFIG_HOME="$HOME/usr/etc" - -export XDG_CACHE_HOME="$HOME/var/cache" -export XDG_RUNTIME_DIR="$HOME/var/run" - -export XDG_DOCUMENTS_DIR="$HOME/lib/document" -export XDG_PICTURES_DIR="$HOME/lib/image" -export XDG_VIDEOS_DIR="$HOME/lib/video" -export XDG_MUSIC_DIR="$HOME/lib/music" - -export XDG_DESKTOP_DIR="$HOME/tmp" -export XDG_DOWNLOAD_DIR="$HOME/tmp" -export XDG_PUBLICSHARE_DIR="$HOME/tmp" -export XDG_TEMPLATES_DIR="$HOME/tmp" - # --- programs ----------------------------------------------------------------- export ABDUCO_SOCKET_DIR="$HOME/var/run" -export LESS="-IRS" +export LESS="-IR" export LESSCHARSET="utf-8" export BLIH="josuah.demangeon@epitech.eu" diff --git a/dot/vim/vimrc b/dot/vim/vimrc @@ -9,6 +9,7 @@ set incsearch set noswapfile set viminfo+=n~/.vim/viminfo set titlestring="" +set showcmd highlight statusline ctermbg=none ctermfg=7 cterm=bold highlight statuslinenc ctermbg=none ctermfg=none cterm=bold @@ -16,7 +17,7 @@ highlight colorcolumn ctermbg=none ctermfg=1 cterm=none highlight search ctermbg=3 ctermfg=0 cterm=none highlight visual ctermbg=7 ctermfg=0 cterm=none highlight modemsg ctermbg=none ctermfg=7 cterm=bold -highlight linenr ctermbg=none ctermfg=238 cterm=none +highlight linenr ctermbg=none ctermfg=241 cterm=none highlight nontext ctermbg=none ctermfg=238 cterm=none highlight specialkey ctermbg=none ctermfg=238 cterm=none diff --git a/io/http b/io/http @@ -20,3 +20,4 @@ http://www.tldp.org/guides.html https://www.destroyallsoftware.com/compendium/network-protocols/ https://gxamjbnu7uknahng.onion.rip/wiki/index.php/Infornography:_The_Tao_of_Memetic_(Meta)Engineering http://calomel.org +http://www.3x6x.com/discography.html