Update 2024-10-03 11:05 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id 2024-10-03 11:05:23 +02:00
parent 99f54afeba
commit 83c6edbe33
16 changed files with 1 additions and 1084 deletions

View File

@ -1,123 +0,0 @@
########################################################################
# ALIASES
########################################################################
# configuration files
alias kshrc="vim ~/.kshrc"
alias muttrc="vim ~/.mutt/rc-common"
alias vimrc="vim ~/.vim/vimrc"
alias hlconf="vim ~/.config/herbstluftwm/autostart"
alias hc="herbstclient"
alias bspwmrc="vim ~/.config/bspwm/bspwmrc"
alias sxhkdrc="vim ~/.config/bspwm/sxhkdrc"
alias vimbrc="vim ~/.config/vimb/config"
alias exrc="vim ~/.exrc"
# translation
alias trans-en="trans -l de -s en -t de --no-ansi"
alias trans-de="trans -l en -s de -t en --no-ansi"
alias g="ugrep -In --break --sort"
alias gf="g -F"
# taskwarrior
alias t=task
alias tall="task rc.context:"
alias ta="task add"
alias ta-work="task rc.context:work add"
alias ta-home="task rc.context:home add"
alias ta-uugrn="task rc.context:uugrn add"
alias ta-openbsd="task rc.context:openbsd add"
alias tm="task mod"
# gopher bookmarks
alias fefe="sacc gopher://codevoid.de/1/fefe"
alias hn="sacc gopher://codevoid.de/1/hn"
alias cv="sacc gopher://codevoid.de"
# pim
alias notes="vim ~/Documents/notes/notes.txt"
alias events="vim ~/Documents/notes/events.txt"
alias caly="ncal -Cy"
alias calm="ncal -3C"
alias sendnote="mail sh@codevoid.de"
# music
alias music_psychedelik="mpg123 -b 1024 http://62.210.114.63:8000"
alias music_progressive="mpg123 -b 1024 http://62.210.114.63:8010"
alias music_drum-n-bass="mpg123 -b 1024 http://62.210.114.63:8030"
alias music_ambient="mpg123 http://62.210.114.63:8002/listen.mp3"
alias music_tilderadio="ogg123 https://tilderadio.org/listen"
alias music_bitreich="mpv gopher://bitreich.org/9/radio/listen"
alias flac_encode="flac -e --best --delete-input-file"
# IRC
alias irc-uugrn="catgirl UUGRN"
alias irc-bitreich="catgirl Bitreich"
alias irc-efnet="catgirl EfNet"
alias irc-hackint="catgirl HackInt"
alias irc-ircnow="catgirl IRCNOW"
alias irc-ircnet="catgirl IRCNet"
alias irc-liberachat="catgirl LiberaChat"
alias irc-oftc="catgirl OFTC"
alias irc-robustirc="catgirl RobustIRC"
# security
alias htpasswd-openssl="openssl passwd -apr1"
alias inssh="ssh -o HostKeyAlgorithms=+ssh-rsa \
-o KexAlgorithms=+diffie-hellman-group1-sha1 \
-o Ciphers=+aes256-cbc"
alias my-ssh-pubkey="pass Keystore/ssh-private | head -n1"
alias my-ssh-seckey="pass Keystore/ssh-private | tail -n7"
alias my-gpg-pubkey="gpg --export-options export-minimal --export -a 52BE43BA"
alias my-gpg-seckey="gpg --export-options export-minimal --export-secret-keys -a 52BE43BA"
# backup
alias tarsnap="doas \tarsnap"
# archives
alias innoextract="\innoextract -g"
alias wget-mirror="wget --mirror --page-requisites --html-extension --convert-links"
# games
alias quake="\vkquake +game id1"
alias quake-mp1-scourge_of_armagon="\vkquake +game hipnotic"
alias quake-mp2-dissolution_of_eternity="\vkquake +game rogue"
alias quake2="\quake2 +game baseq2"
alias quake2-mp1-the_reconning="\quake2 +game xatrix"
alias quake2-mp2-ground_zero="\quake2 +game rogue"
alias quake2-ex1-jaggernaut="\quake2 +game jaggernaut"
alias quake2-ex2-zaero="\quake2 +game zaero"
alias doom3="dhewm3 +set r_fullscreen 1 +set com_fixedtic -1"
alias steam-list="steamctl --user sdk82 apps list"
alias steam-download="steamctl --user sdk82 depot download -os linux64 -a"
# terminal internet stuff
alias terminal_map="telnet mapscii.me"
alias terminal_bofh="telnet towel.blinkenlights.nl 666"
alias terminal_starwars="telnet towel.blinkenlights.nl 23"
alias terminal_cnn="links http://lite.cnn.io/en"
alias terminal_8ball="lynx -width=300 --dump https://codevoid.de/8Ball"
alias terminal_weather="curl wttr.in/Hockenheim"
alias terminal_bbs="telnet gopher.su 1234"
alias terminal_unix50="ssh unix50@unix50.org"
# bookmarks
alias uug-mastodon="firefox https://chaos.social/@uugrn"
alias uug-twitter="firefox https://twitter.com/@uugrn"
alias discord-me="firefox https://discord.com/channels/@me"
alias discord-immortals="firefox https://discord.com/channels/991041843871502366/1000826654974812160"
alias cups-config="firefox http://localhost:631"
alias bbs='ssh -t sdk@home.codevoid.de "LANG=de_DE.UTF-8 syncterm -iC localhost:2323"'
# mastodon
alias toot-sh="toot-wrapper sh@bsd.network"
alias toot-uug="toot-wrapper uugrn@chaos.social"
alias tuta="tut -u 'sh@bsd.network uugrn@chaos.social'"
# reddit
alias reddit-spectrwm="tuir -s spectrwm"
alias reddit-openbsd="tuir -s openbsd"
alias reddit-c="tuir -s C_programming"

View File

@ -1,27 +0,0 @@
########################################################################
# AMUSED
########################################################################
alias amused-next="_amused_cmd next"
alias amused-prev="_amused_cmd prev"
alias amused-play="_amused_cmd play"
alias amused-stop="_amused_cmd stop"
alias amused+="_amused_cmd seek +15"
alias amused-="_amused_cmd seek -15"
alias amused-jump="_amused_jump"
alias amused-shuffle="amused show | sort -R | amused load"
alias amused-sort="amused show | sort -h | amused load"
_amused_cmd() {
. ~/.bin/_config
amused "${@}" 2>&1 > /dev/null
STATUS="$(amused status | head -1 | cut -d'/' -f5-)"
NOTIFY_CMD "$STATUS"
echo "$@: $STATUS"
}
_amused_jump() {
S="$(echo "$(amused show | cut -d'/' -f5-)" | sort -h | fzf -i -e)"
[ ! -z "$S" ] \
&& _amused_cmd jump "$S"
}

View File

@ -1,367 +0,0 @@
#!/bin/sh
echo {build,run,all,test}-dir-depends
echo full-{build,run,all,test}-depends
echo {build,lib,test,run}-depends-list
echo print-{build,run}-depends
echo {pre,do,post}-{build,configure,distpatch,extract,fake,gen,install,patch,test}
echo all-lib-depends-args
echo build
echo all
echo check-register
echo check-register-all
echo checkpatch
echo checksum
echo clean
echo clean={work,bulk,build,depends,dist,fake,flavors,install,package,plist,test,sub,packages,all}
echo clean-depends
echo configure
echo distclean
echo distpatch
echo dump-vars
echo extract
echo fake
echo fake-wantlib-args
echo fetch
echo fetch-all
echo fix-permissions
echo gen
echo generate-readmes
echo install
echo install-{all,depends}
echo lib-depends-args
echo lib-depends-check
echo license-check
echo lock
echo makesum
echo no-lib-depends-args
echo no-wantlib-args
echo package
echo patch
echo peek-ftp
echo pkglocatedb
echo port-lib-depends-check
echo port-wantlib-args
echo prepare
echo print-package-args
echo print-update-signature
echo print-plist
echo print-plist-{all,all-with-depends,contents,libs,all-libs,libs-with-depends,with-depends}
echo rebuild
echo regen
echo reinstall
echo repackage
echo run-depends-args
echo reprepare
echo retest
echo show-{debug-info,fake-size,indexed,list,prepare-results,prepare-test-results,required-by,run-depends,size}
echo subpackage
echo test
echo test-depends
echo unlock
echo update-{patches,update-or-install,update-or-install-all,plist}
echo update
echo verbose-show
echo wantlib-args
# echo show=ALL_DISTFILES
# echo show=ALL_FAKE_FLAGS
# echo show=ALL_PATCHFILES
# echo show=ALL_SUPDISTFILES
# echo show=ALL_TEST_ENV
# echo show=ALL_TEST_FLAGS
# echo show=ALL_TARGET
# echo show=APM_ARCHS
# echo show=ARCH
# echo show=AUTOCONF
# echo show=AUTOCONF_DIR
# echo show=AUTOCONF_ENV
# echo show=AUTOCONF_VERSION
# echo show=AUTOHEADER
# echo show=AUTOMAKE_VERSION
# echo show=AUTORECONF
# echo show=BASE_PKGPATH
# echo show=BASELOCALSTATEDIR
# echo show=BASESYSCONFDIR
# echo show=BATCH
# echo show=BE_ARCHS
# echo show=BUILD_DEPENDS
# echo show=BUILD_ONCE
# echo show=BUILD_PKGPATH
# echo show=BUILD_PACKAGES
# echo show=BROKEN
# echo show=BUILD_UNLINKED
# echo show=BUILD_USER
# echo show=BROKEN-arch
# echo show=BSD_INSTALL_{PROGRAM,SCRIPT,DATA,MAN}{,_DIR}
# echo show=BULK
# echo show=BULK_COOKIES_DIR
# echo show=BULK_DO
# echo show=BULK_FLAGS
# echo show=BULK_TARGETS
# echo show=BZIP2
# echo show=CATEGORIES
# echo show=CCACHE_DIR
# echo show=CCACHE_ENV
# echo show=CDIAGFLAGS
# echo show=CFLAGS
# echo show=CFLAGS_{base-clang,ports-gcc}
# echo show=CHECK_LIB_DEPENDS
# echo show=CHECK_LIB_DEPENDS_ARGS
# echo show=CHECKSUMFILES
# echo show=CHECKSUM_FILE
# echo show=CHECKSUM_PACKAGES
# echo show=CHOSEN_COMPILER
# echo show=CLEANDEPENDS
# echo show=COMMENT
# echo show=COMMENT-foo
# echo show=COMMENT-vanilla
# echo show=COMMENT-foo-vanilla
# echo show=COMES_WITH
# echo show=COMPILER
# echo show=COMPILER_LANGS
# echo show=COMPILER_LINKS
# echo show=COMPILER_WRAPPER
# echo show=CONFIG_SITE_LIST
# echo show=CLANG_ARCHS
# echo show=GCC3_ARCHS
# echo show=GCC4_ARCHS
# echo show=CONFIGURE_ARGS
# echo show=CONFIGURE_ENV
# echo show=CONFIGURE_SCRIPT
# echo show=CONFIGURE_STYLE
# echo show=COPTS
# echo show=CXXDIAGFLAGS
# echo show=CXXFLAGS
# echo show=CXXFLAGS_{base-clang,ports-gcc}
# echo show=CXXOPTS
# echo show=DEBUG_CONFIGURE_ARGS
# echo show=DEBUG_PACKAGES
# echo show=DEBUGINFO_ARCHS
# echo show=DESCR
# echo show=DESTDIR
# echo show=DESTDIRNAME
# echo show=DIST_TUPLE
# echo show=DISTDIR
# echo show=DISTFILES*
# echo show=DISTNAME
# echo show=DISTORIG
# echo show=DIST_SUBDIR
# echo show=DPB
# echo show=DPB_LOCKNAME
# echo show=DPB_PROPERTIES
# echo show=DUMMY_PACKAGE
# echo show=ECHO_MSG
# echo show=ECHO_REORDER
# echo show=EDIT_PATCHES
# echo show=EPOCH
# echo show=ERRORS
# echo show=EXTRACT_CASES
# echo show=EXTRACT_ONLY
# echo show=EXTRACT_SUFX
# echo show=EXTRACT_SUFX.name
# echo show=EXTRACT_FILES
# echo show=FAKE_FLAGS
# echo show=FAKE_SETUP
# echo show=FAKE_TARGET
# echo show=FAKEOBJDIR
# echo show=FETCH_CMD
# echo show=FETCH_MANUALLY
# echo show=FETCH_PACKAGES
# echo show=FILESDIR
# echo show=FETCH_USER
# echo show=FIX_CLEANUP_PERMISSIONS
# echo show=FIX_CRLF_FILES
# echo show=FIX_EXTRACT_PERMISSIONS
# echo show=FLAVOR
# echo show=FLAVORS
# echo show=FLAVOR_EXT
# echo show=FORCE_UPDATE
# echo show=FULLDISTDIR
# echo show=FULLPKGNAME
# echo show=FULLPKGPATH
# echo show=GH_ACCOUNT
# echo show=GH_COMMIT
# echo show=GH_DISTFILE
# echo show=GH_PROJECT
# echo show=GH_TAGNAME
# echo show=GMAKE
# echo show=HOMEPAGE
# echo show=IGNORE
# echo show=IGNORE_IS_FATAL
# echo show=IGNORE_SILENT
# echo show=INSTALL_DEBUG_PACKAGES
# echo show=INSTALL_{PROGRAM,SCRIPT,DATA,MAN}{,_DIR}
# echo show=INSTALL_TARGET
# echo show=INTERACTIVE
# echo show=IS_INTERACTIVE
# echo show=LE_ARCHS
# echo show=LIB_DEPENDS
# echo show=lib_depends_args
# echo show=LIBCXX
# echo show=LIBTOOL
# echo show=LIBTOOL_FLAGS
# echo show=LLD_EMUL
# echo show=LLVM_ARCHS
# echo show=LOCALBASE
# echo show=LOCALSTATEDIR
# echo show=LOCKDIR
# echo show=LOCK_CMD
# echo show=LOCK_VERBOSE
# echo show=LP64_ARCHS
# echo show=MAINTAINER
# echo show=MAKE_ENV
# echo show=MAKE_FLAGS
# echo show=MAKE_FILE
# echo show=MAKE_JOBS
# echo show=MAKE_PROGRAM
# echo show=MAKEFILE_LIST
# echo show=MAKESUMFILES
# echo show=MESSAGE
# echo show=MISSING_FILES
# echo show=MODGNU_CONFIG_GUESS_DIRS
# echo show=MODPERL_ADJ_FILES
# echo show=MODPERL_BIN_ADJ
# echo show=MODPERL_BUILD_TARGET
# echo show=MODPERL_INSTALL_TARGET
# echo show=MODPERL_TEST_TARGET
# echo show=MODPERL_REGEN_PPPORT
# echo show=MODULES
# echo show=MULTI_PACKAGES
# echo show=NO_ARCH
# echo show=NOT_FOR_ARCHS
# echo show=NO_BUILD
# echo show=NO_CCACHE
# echo show=NO_CHECKSUM
# echo show=NO_DEPENDS
# echo show=NO_IGNORE
# echo show=NO_SCCACHE
# echo show=NO_TEST
# echo show=ONLY_FOR_ARCHS
# echo show=OSREV
# echo show=PACKAGE_REPOSITORY
# echo show=PARALLEL_MAKE_FLAGS
# echo show=PARALLEL_MAKE_JOBS
# echo show=PATCH
# echo show=PATCHORIG
# echo show=PATCH_CASES
# echo show=PATCHDIR
# echo show=PATCHFILES*
# echo show=PATCH_ARGS
# echo show=PATCH_CHECK_ONLY
# echo show=PATCH_DIST_ARGS
# echo show=PATCH_DIST_STRIP
# echo show=PATCH_LIST
# echo show=PATCH_STRIP
# echo show=PERMIT_DISTFILES
# echo show=PERMIT_PACKAGE
# echo show=PKG_ADD
# echo show=PKG_ARCH
# echo show=PKG_ARGS
# echo show=PKG_CREATE
# echo show=PKG_CREATE_NO_CHECKS
# echo show=PKG_DBDIR
# echo show=PKG_DELETE
# echo show=PKG_INFO
# echo show=PKG_TMPDIR
# echo show=PORTHOME
# echo show=PORTPATH
# echo show=PORTSDIR
# echo show=PORTSDIR_PATH
# echo show=PORTS_PRIVSEP
# echo show=PKGDIR
# echo show=PKGFILE
# echo show=PKGFILES
# echo show=PKGNAME
# echo show=PKGNAMES
# echo show=PKGNAME-foo
# echo show=PKGPATH
# echo show=PKGPATHS
# echo show=PKGSPEC
# echo show=PKGSTEM
# echo show=PLIST
# echo show=PLIST_DB
# echo show=PLIST_REPOSITORY
# echo show=PORTROACH
# echo show=PREFIX
# echo show=PREPARE_CHECK_ONLY
# echo show=PROGRESS_METER
# echo show=PROPERTIES
# echo show=PSEUDO_FLAVOR
# echo show=PSEUDO_FLAVORS
# echo show=RANDOMIZE_SUBDIRS
# echo show=RCDIR
# echo show=REFETCH
# echo show=REGISTER_PLIST_OPTS
# echo show=REORDER_DEPENDENCIES
# echo show=REPORT_PROBLEM
# echo show=REPORT_PROBLEM_LOGFILE
# echo show=REVISION
# echo show=ROACH_SITES
# echo show=ROACH_URL
# echo show=RUN_DEPENDS
# echo show=SCCACHE_DIR
# echo show=SCCACHE_ENV
# echo show=SEPARATE_BUILD
# echo show=SETENV
# echo show=SHARED_LIBS
# echo show=SITE_BACKUP
# echo show=SITES
# echo show=SKIPDIR
# echo show=STATIC_PLIST
# echo show=STARTAFTER
# echo show=STARTDIR
# echo show=SUBPACKAGE
# echo show=SUBST_CMD
# echo show=SUBST_CMD-sub
# echo show=SUBST_DATA
# echo show=SUBST_MAN
# echo show=SUBST_PROGRAM
# echo show=SUBST_VARS
# echo show=SUDO
# echo show=SUPDISTFILES
# echo show=SYSCONFDIR
# echo show=TAR
# echo show=TARGETS
# echo show=TEMPLATE_DISTFILES.name
# echo show=TEMPLATE_HOMEPAGE.name
# echo show=TEST_DEPENDS
# echo show=TEST_ENV
# echo show=TEST_FLAGS
# echo show=TEST_IS_INTERACTIVE
# echo show=TEST_LOG
# echo show=TEST_LOGFILE
# echo show=TEST_TARGET
# echo show=TRUEPREFIX
# echo show=TRY_BROKEN
# echo show=UNLOCK_CMD
# echo show=UNLINKED
# echo show=UNMESSAGE
# echo show=UNZIP
# echo show=UPDATE_COOKIES_DIR
# echo show=UPDATE_PLIST_ARGS
# echo show=UPDATE_PLIST_OPTS
# echo show=USE_CCACHE
# echo show=USE_GMAKE
# echo show=USE_GROFF
# echo show=USE_LIBTOOL
# echo show=USE_LLD
# echo show=USE_MFS
# echo show=USE_NOBTCFI
# echo show=USE_NOEXECONLY
# echo show=USE_SCCACHE
# echo show=USE_WXNEEDED
# echo show=USE_X11
# echo show=VARBASE
# echo show=WANTLIB
# echo show=WARNINGS
# echo show=WRKBUILD
# echo show=WRKCONF
# echo show=WRKDIR
# echo show=WRKDIST
# echo show=WRKSRC
# echo show=WRKINST
# echo show=WRKOBJDIR
# echo show=WRKOBJDIR_MFS
# echo show=X11BASE
# echo show=XAUTHORITY
# echo show=XMKMF
# echo show=YACC

View File

@ -1,18 +0,0 @@
########################################################################
# DOTFILES WITH GIT
########################################################################
alias config='git --git-dir=${HOME}/.cfg/ --work-tree=${HOME}'
dotfiles_autoupdate() {
config add -u && \
config commit -m "Update $(date +"%Y-%m-%d %H:%M") \
$(uname -s)/$(uname -m)-$(hostname -s)" && config push
}
dotfiles_init() {
git --no-replace-objects clone --bare --depth 1 \
_gitea@git.uugrn.org:sdk/dotfiles.git $HOME/.cfg;
config config --local status.showUntrackedFiles no;
config checkout -f
}

View File

@ -1,51 +0,0 @@
########################################################################
# EMAIL HANDLING
########################################################################
# mailboxes
MUTT_HOST="imaps://mail.codevoid.de"
# account aliases
alias mutt-acc-gmx="\mutt -F $HOME/.mutt/rc-account-gmx"
alias mutt-acc-priv="\mutt -F $HOME/.mutt/rc-account-private"
alias mutt-acc-work="\mutt -F $HOME/.mutt/rc-account-work"
alias mutt-acc-offl="\mutt -F $HOME/.mutt/rc-account-offline"
alias mutt-acc-mborg="\mutt -F $HOME/.mutt/rc-account-mborg"
alias mutt-acc-uugrn="\mutt -F $HOME/.mutt/rc-account-uugrn"
# default
alias mutt="mutt-acc-priv"
alias muttopen="\mutt -F ~/.mutt/rc-common -f"
# select mailbox
mutt-textmail() { mutt-acc-priv -f $MUTT_HOST/Mailboxes/textmail.me/$1; }
mutt-codevoid() { mutt-acc-priv -f $MUTT_HOST/Mailboxes/codevoid.de/sh+$1; }
# shortcuts
alias mutt-all="mutt -f $MUTT_HOST/Virtual/ALL"
alias mutt-amazon="mutt-textmail amazon"
alias mutt-ccc-intern="mutt-textmail ccc-intern"
alias mutt-last-day="mutt -f $MUTT_HOST/Virtual/LAST_DAY"
alias mutt-last-week="mutt -f $MUTT_HOST/Virtual/LAST_WEEK"
alias mutt-last-month="mutt -f $MUTT_HOST/Virtual/LAST_MONTH"
alias mutt-last-year="mutt -f $MUTT_HOST/Virtual/LAST_YEAR"
alias mutt-lieferando="mutt-textmail lieferando"
alias mutt-mutt-users="mutt-codevoid mutt-users"
alias mutt-openbsd-all="mutt -f $MUTT_HOST/Virtual/OpenBSD"
alias mutt-openbsd-bugs="mutt-codevoid openbsd-bugs"
alias mutt-got="mutt-codevoid got"
alias mutt-openbsd-hackers="mutt-codevoid openbsd-hackers"
alias mutt-openbsd-misc="mutt-codevoid openbsd-misc"
alias mutt-openbsd-ports-bugs="mutt-codevoid openbsd-ports-bugs"
alias mutt-openbsd-ports-cvs="mutt-codevoid openbsd-ports-cvs"
alias mutt-openbsd-ports="mutt-codevoid openbsd-ports"
alias mutt-openbsd-x11="mutt-codevoid openbsd-x11"
alias mutt-openbsd-sparc="mutt-codevoid openbsd-sparc"
alias mutt-openbsd-src-cvs="mutt-codevoid openbsd-src-cvs"
alias mutt-openbsd-tech="mutt-codevoid openbsd-tech"
alias mutt-paypal="mutt-textmail paypal"
alias mutt-uugrn="mutt-codevoid uugrn"
alias mutt-vorstand="mutt-codevoid vorstand"
alias otech="mutt -f $MUTT_HOST/Virtual/OpenBSD-tech"
alias oports="mutt -f $MUTT_HOST/Virtual/OpenBSD-ports"
alias omisc="mutt -f $MUTT_HOST/Virtual/OpenBSD-misc"

View File

@ -1,38 +0,0 @@
########################################################################
# ENVIRONMENT
########################################################################
# TUIR (reddit)
TUIR_BROWSER="$BROWSER"
export TUIR_BROWSER
# NNN
NNN_OPTS="cErxAJBRr"
NNN_OPENER="nnn.sh"
NNN_FIFO=/tmp/nnn.fifo
NNN_PLUG='c:!readlink -f $nnn | xclip -f;o:-!tmpv "$nnn";u:!upload "$nnn";,:!copyto "$nnn";x:!imagesort;p:!pdfarranger "$nnn" > /dev/null 2>&1 &'
NNN_ARCHIVE="\\.(7z|bz2|gz|tar|tgz|zip)$"
NNN_COLORS='#0a1b2c3d;1234'
NNN_FCOLORS='c1e2272e006033f7c6d6abc4'
export NNN_OPTS NNN_OPENER NNN_PLUG NNN_ARCHIVE
export NNN_COLORS NNN_FCOLORS NNN_FIFO
# SLNR
SLRNPULL_ROOT=$HOME/.slrnpull
NNTPSERVER=read.news.tnib.de
export SLRNPULL_ROOT NNTPSERVER
# GOT
GOT_AUTHOR="Stefan Hagen <sh+got@codevoid.de>"
TOG_COLORS=1
export GOT_AUTHOR TOG_COLORS
# BUPSTASH
BUPSTASH_REPOSITORY=ssh://sdk@storage.bupstash.io
BUPSTASH_KEY_COMMAND="pass Internet/bupstash-key"
export BUPSTASH_REPOSITORY BUPSTASH_KEY_COMMAND
# PASSWORD-STORE
PASSWORD_STORE_ENABLE_EXTENSIONS=true
export PASSWORD_STORE_ENABLE_EXTENSIONS

View File

@ -1,43 +0,0 @@
########################################################################
# FUNCTIONS
########################################################################
xtitle() {
printf '\033]0;%s\007' "$1";
}
xbell() {
tput bel
}
x() {
xtitle "$ ssh home.codevoid.de"
ssh -t home.codevoid.de 'tmux -u attach || tmux -u'
}
scr() {
[ -z "$1" ] \
&& doas wsconsctl -n display.brightness \
|| doas wsconsctl display.brightness="$1"
}
mktags() {
rm -f tags
fd --one-file-system \
-E .git \
-E CVS \
-E gnu \
-t f \
-e .c -e .h \
-e .cc -e .hh \
-e .cpp -e .hpp \
-e .vim -e .lua \
-e .sh -e .pl \
-e Makefile \
| ectags -L - \
--links=no \
--tag-relative \
--languages=C,C++,Lua,Make,Perl,Sh,Vim \
-R \
-f tags
}

View File

@ -1,2 +0,0 @@
export FZF_DEFAULT_COMMAND="fd --hidden --type f"
export FZF_DEFAULT_OPTS="--layout=reverse -i -e +s"

View File

@ -1,25 +0,0 @@
########################################################################
# GNUPG AGENT
########################################################################
if [ -z $GPG_AGENT_INFO ]
then
GPG_TTY=$(tty)
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
SSH_AUTH_SOCK_EXTRA=${SSH_AUTH_SOCK%%.ssh}.extra
export GPG_TTY SSH_AUTH_SOCK SSH_AUTH_SOCK_EXTRA
pgrep -qu sdk gpg-agent || gpg-connect-agent -q /bye
fi
DEFAULT_KEY=CBD3C46864B46517E8FBB90FB6BC2EC552BE43BA
gnupg-extend-default-key() {
gpg --quick-set-expire $DEFAULT_KEY 1y '*'
}
gnupg-export-default-key() {
gpg --export --armor --export-options export-minimal $DEFAULT_KEY > codevoid-gpg.key
}
gnupg-upload-default-key() {
gpg --export $DEFAULT_KEY | curl -T - https://keys.openpgp.org
}

View File

@ -1,243 +0,0 @@
########################################################################
# OPENBSD PORT TOOLS
########################################################################
#
# CONFIGURATION
#
ME=sdk
MAKE_JOBS=$(sysctl -n hw.ncpuonline)
FETCH_JOBS=12
CVSROOT=$ME@cvs.openbsd.org:/cvs
case $(hostname -s) in
x13) PKGOPT="-Dsnap"; ;;
openbsd) PKGOPT="-Dsnap"; ;;
esac
alias pkg_add="doas \pkg_add ${PKGOPT}"
alias pkg_delete="doas \pkg_delete ${PKGOPT}"
alias pkg_info="\pkg_info ${PKGOPT}"
#
# SUPER LAZY ALIASES FOR THE ALIASES
#
alias p=port-last
alias pj=port-jump
alias pmark=port-mark
alias po=port-out
alias pvim="port-patch"
#
# ALIASES
#
# navigation
alias port-jump="_portjump"
alias port-mark="_portmark"
alias port-last="_portlast"
alias port-out="_portout"
# cleaning
alias port-sweep="_portsweep"
alias port-clean="_portclean"
# making
alias port-refake="_refake"
alias port-reinstall="_reinstall"
alias port-repackage="_repackage"
alias port-remake="_remake"
# checking
alias port-check="_portcheck"
alias port-lib-depends-check="_portlibcheck"
alias port-homepage="_porthomepage"
# generating
alias port-modcargo-gen-crates="_portmodcargo_gen"
alias port-modcargo-gen-licenses="_portmodcargo_genlic"
alias port-modgo-gen-modules="_portmodgoupdate"
# source control
alias port-diff="_portgendiff"
alias cvs-update="_cvsupdate"
alias cvs-update-all="_cvsupdateall"
alias cvs-diff="_cvsdiff"
alias cvs-commit="_cvscommit"
alias cvs-release="_cvsrelease"
alias cvs-checkout="_cvscheckout"
# dpb
alias proot-rebuild="_prootrebuild"
alias proot-shell="_prootshell"
alias dpb-make="_dpbmake"
# other
alias port-roach="portroach-cli -m codevoid"
alias developers="_listdevs"
alias port-patch="_patchvim"
alias port-repology="_repology &"
#
# FUNCTIONS
#
_portsweep() {
find . \( -name "*.orig" \
-o -name "*.rej" \
-o -empty \
\) -delete
}
_portjump() {
[ -z $1 ] && return 1
cd /usr/ports
LIST=$( ls -d1 \
*$1* \
*/*$1* \
mystuff/*$1* \
mystuff/*/*$1* \
openbsd-wip/*$1* \
openbsd-wip/*/*$1* \
2>/dev/null \
| sort -u \
| grep -Ev "pobj|CVS|locks|packages|distfiles"
)
if [ $(echo "$LIST" | wc -l) -gt 1 ]
then
if [ -f /usr/local/bin/fzf ]
then
cd $(echo "$LIST" | fzf -e -i)
else
select dir in $LIST
do
cd $dir
return 0
done
fi
else
cd $LIST
fi
}
_remake() {
make clean=all
make -j$FETCH_JOBS fetch
make
}
_repackage() {
make clean=packages
doas -u _pbuild rm -f $(make show="PLIST_REPOSITORY ARCH FULLPKGNAME" | tr '\n' '/' | sed 's|/$||g')
FETCH_PACKAGES=No make package
}
_refake() {
rm -f pkg/*.orig
make clean=fake
make fake
}
_reinstall() { make reinstall; }
_portgendiff() {(
pwd | fgrep -q '/usr/ports/' || return 1
set -A N $(make show="PKGNAME EPOCH REVISION")
PN="${N[0]}${N[1]:+v${N[1]}}${N[2]:+p${N[2]}}"
PD=$(pwd | cut -d"/" -f4,5)
cd /usr/ports
cvs -d $CVSROOT diff -uNp "${PD}" > ~/diffs/${PN}.diff
echo ~/diffs/${PN}.diff
)}
_portclean() {(
set -x
cd /usr/ports
doas rm -rf pobj/* plist logs packages bulk update distfiles/*
mkdir -p plist logs packages bulk update
doas make fix-permissions
)}
_cvscommand() { doas -u $ME cvs -d $CVSROOT $@; }
_cvsupdate() { _cvscommand -z1 -q up -Pd -A $@; }
_cvsupdateall() {(
set -x
cd /usr/src && _cvsupdate
cd /usr/xenocara && _cvsupdate
cd /usr/ports && _cvsupdate
cd /usr/www && _cvsupdate
)}
_cvsdiff() { _cvscommand diff -uNp $@; }
_cvscommit() { _cvscommand commit $@; }
_cvsrelease() { _cvscommand release $@; }
_cvscheckout() { _cvscommand -q -z1 checkout -P $1; }
_portmark() { pwd > /var/cache/pmark; }
_portlast() { cd "$(</var/cache/pmark)"; }
_portout() {
cd "$(</var/cache/pmark)"
cd "$(make show=WRKSRC)"
}
_porthomepage() { $BROWSER "$(make show=HOMEPAGE)" > /dev/null 2>&1 & }
_portcheck() { /usr/ports/infrastructure/bin/portcheck; }
_portlibcheck() { make port-lib-depends-check; }
_portmodgoupdate() { make MODGO_VERSION=latest modgo-gen-modules; }
_portmodcargo_gen() { make modcargo-gen-crates; }
_portmodcargo_genlic() { make modcargo-gen-crates-licenses; }
_patchvim() {
if [ ! -f $1.orig.port ]
then
doas -u _pbuild cp $1 $1.orig.port
fi
doas -u _pbuild vim $1
}
_dpbmake() {(
set -xe
doas chroot /home/dpb /tmp/installdeps.sh $1
doas /usr/ports/infrastructure/bin/dpb -B /home/dpb -c -I $1
)}
_prootrebuild() {
doas proot -c /etc/proot.conf
doas chroot /home/dpb pkg_add -Dsnap ccache gmake cmake meson ninja go rust
{
echo '#!/bin/sh -ex'
echo 'cd /usr/ports/$1'
echo 'FETCH_PACKAGES=-Dsnap make install-depends'
} > /home/dpb/tmp/installdeps.sh
chmod +x /home/dpb/tmp/installdeps.sh
}
_prootshell() { doas chroot /home/dpb/ ksh -i; }
_listdevs() {
ssh $ME@cvs.openbsd.org 'fgrep -v ksh- /etc/passwd' \
| egrep 111\|122 \
| grep -v gitsync \
| cut -d: -f1,5 | tr -s ',' \
| sed 's/,/, /g;s/,[, ]*$//g' \
| column -s":" -t \
| fzf -i -e
}
_repology() {
$BROWSER \
"https://repology.org/projects/?search=&maintainer=sh%2Bports%40codevoid.de&category=&inrepo=openbsd" \
>/dev/null 2>&1
}

View File

@ -1,5 +0,0 @@
C1="\[$(tput setaf 241)\]" # gray
C2="\[$(tput setaf 37)\]" # green
C0="\[$(tput op)\]" # reset
PS1="${C1}[${C2}\h${C1}](${C2}${?}${C1})(${C2}\w${C1})\$ ${C0}"

View File

@ -1,21 +0,0 @@
########################################################################
# PROMPT
########################################################################
C1="\[$(tput setaf 241)\]" # gray
#C2="\[$(tput setaf 209)\]" # orange
C2="\[$(tput setaf 37)\]" # green
C0="\[$(tput op)\]" # reset
x=$(print \\001) # hack from ksh(1)
# accent
if [ $(id -u) -eq 0 ]
then
C2="\[$(tput setaf 160)\]" # red
else
#C2="\[$(tput setaf 209)\]" # orange
C2="\[$(tput setaf 37)\]" # green
fi
PS1="$x\${C1}[\${C2}\h\${C1}](\${C2}\${?}\${C1})(\${C2}\w\${C1})\\$ \${C0}$x"

View File

@ -1,10 +0,0 @@
########################################################################
# PROMPT
########################################################################
C1="\[$(tput setaf 241)\]" # gray
#C2="\[$(tput setaf 208)\]" # orange
C2="\[$(tput setaf 37)\]" # green
C0="\[$(tput op)\]" # reset
x=$(print \\001) # hack from ksh(1)
PS1="$x\${C1}[\${C2}\h\${C1}](\${C2}\${?}\${C1})(\${C2}\W\${C1})\\$ \${C0}$x"

View File

@ -1,52 +0,0 @@
########################################################################
# REMIND
########################################################################
# remind
alias rem="clear; remind -c+cu4 -wt ~/.reminders"
alias remy="clear; remind -cu12 -wt ~/.reminders | less -r"
rems() {
#echo "Reminders for $(date +%Y/%m/%d) (today)"
remind ~/.reminders
echo
echo "Next 10 Reminders:"
remind -n .reminders | sort -n | head -10
}
rem-sync() {(
set -xe
scp -q vorstand@vorstand.uugrn.org:private/Kalender/uugrn.rem sdk@home.codevoid.de:.reminders/uugrn.rem
scp -q sdk@home.codevoid.de:.reminders/\*.rem /home/sdk/.reminders/
)}
rem-uugrn() {(
set -xe
vim sftp://vorstand@vorstand.uugrn.org/private/Kalender/uugrn.rem
ssh -q sdk@vorstand.uugrn.org sh ~sdk/.bin/make_calendar.sh
rem-sync
)}
rem-personal() {(
set -xe
vim sftp://sdk@home.codevoid.de/.reminders/personal.rem
rem-sync
)}
rem-birthdays() {(
set -xe
vim sftp://home.codevoid.de/.reminders/birthdays.rem
rem-sync
)}
sync-ical2rem() {
# XXX can haz this in nice?
find ~/.isync -name "*.ics" -exec cat {} + \
| ical2rem --no-todos \
| fgrep -v "REM MSG" \
| sed 's,\\n, ,g' \
| tr -d '\' \
| sed 's/ / /g' \
> .reminders/import.rem
}

View File

@ -1,57 +0,0 @@
########################################################################
# YOUTUBE-DL
########################################################################
ytdl_playlist() {
yt-dlp \
-o '%(playlist_title)s/%(title)s.%(ext)s' \
"$@";
}
ytdl_channel() {
yt-dlp \
--download-archive ytdl_channel.txt \
-o '%(upload_date)s - %(title)s.%(ext)s' \
"$@";
}
ytdl_bandcamp() {
yt-dlp \
--extract-audio \
--audio-format mp3 \
--embed-thumbnail \
--add-metadata \
-o '%(artist)s/%(album)s/%(track_number)02d - %(track)s.%(ext)s' \
"$@";
}
ytdl_audio() {
yt-dlp \
-f bestaudio \
--extract-audio \
--embed-thumbnail \
--add-metadata \
-o "%(title)s-%(id)s.%(ext)s" \
"$@";
}
xdl() {
if [ ! -z $2 ]
then
mkdir -p "$HOME/x/$1/"
cd "$HOME/x/$1/" && yt-dlp "$2"
ksh-update-completions
else
echo "First argument should be a category."
fi
}
ytdl() {
if [ ! -z $2 ]
then
mkdir -p "$HOME/Videos/YouTube/$1/"
cd "$HOME/Videos/YouTube/$1/" \
&& yt-dlp -o '%(upload_date)s - %(title)s.%(ext)s' "$2"
ksh-update-completions
else
echo "First argument should be a category."
fi
}

3
.kshrc
View File

@ -37,7 +37,7 @@ export PRINTER
########################################################################
# LOAD LOCAL STUFF
########################################################################
[ -f ~/.ksh.local ] && . ~/.ksh.local
[ -f ~/.kshrc.local ] && . ~/.kshrc.local
########################################################################
# STOP HERE IF NON INTERACTIVE
@ -111,7 +111,6 @@ alias muttrc="vim ~/.mutt/rc-common"
alias vimrc="vim ~/.vim/vimrc"
alias luakitrc="vim ~/.config/luakit/rc.lua"
alias spectrwmrc="vim ~/.config/spectrwm/spectrwm.conf"
alias cwmrc="vim ~/.cwmrc"
alias vifmrc="vim ~/.config/vifm/vifmrc"
alias tmuxrc="vim ~/.tmux.conf"