Update 2023-12-31 21:59 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id 2023-12-31 21:59:50 +01:00
parent 62360d0f1d
commit 0f34c8ba99
14 changed files with 415 additions and 387 deletions

View File

@ -170,7 +170,7 @@ xterm*color15: #eee8d5
! -- XCONSOLE -- !
XConsole*foreground: #D6D5D3
XConsole*background: #121212
!XConsole*font: Terminus:pixelsize=11
XConsole*font: fixed
XConsole*borderWidth: 0
XConsole*scrollVertical: Never
XConsole*scrollHorizontal: Never

BIN
.bin/cbar

Binary file not shown.

View File

@ -9,6 +9,7 @@
--disable-client-side-phishing-detection \
--disable-component-cloud-policy \
--disable-component-update \
--disable-chrome-browser-cloud-management \
--disable-crash-reporter \
--disable-device-discovery-notifications \
--disable-features=WebAssembly,AsmJsToWebAssembly,WebAssemblyStreaming \
@ -23,26 +24,22 @@
--disable-field-trial-config \
--disable-cookie-encryption \
--disable-cloud-print-proxy \
--enable-early-process-singleton \
--dbus-stub \
--cros-disks-fake \
--disable-stack-profiler \
--disable-touch-drag-drop \
--disable-usb-keyboard-detect \
--disable-wayland-ime \
--disable-windows10-custom-titlebar \
--disable-default-apps \
--disable-dev-shm-usage \
--disable-gaia-services \
--disable-gpu-early-init \
--disable-gpu-process-for-dx12-info-collection \
--disable-histogram-customizer \
--disable-in-process-stack-traces \
--disable-ios-password-suggestions \
--no-service-autorun \
--no-experiments \
--enable-low-end-device-mode \
--use-gl=swiftshader \
--use-gl=egl \
--disable-wayland-ime \
--enable-features=RunVideoCaptureServiceInBrowserProcess,WebUIDarkMode \
--force-dark-mode \
@ -54,7 +51,7 @@
--password-store=basic \
--structured-metrics-disabled \
--wm-window-animations-disabled \
--new-window --app="$@"
--new-window "$@"
#--use-gl=egl \
# --disable-yuv-image-decoding \

View File

@ -23,7 +23,7 @@ WID=$(wmctrl -x -l scratchpad | fgrep '.scratchpad' | cut -d" " -f1)
if [ -z "$WID" ]
then
# start terminal (sterm is st.suckless.org)
sterm -c scratchpad -g 134x29+$GAP+$GAP &
sterm -c scratchpad -g 159x42+$GAP+$GAP &
# XXX we cannot resize with wmctrl here, because the window is not
# mapped yet. Adding a sleep here and resize then is visually
# unpleasant. Therefore st is started with hardcoded dimensions

View File

@ -199,8 +199,8 @@ bind[xpick] = MOD+Print
program[lock] = /usr/bin/false
autorun = ws[11]:xconsole
autorun = ws[11]:scratchpad
autorun = ws[1]:xconsole
autorun = ws[1]:scratchpad
# +--------------------------------------------------
# | KEYBOARD MAPPING

View File

@ -217,8 +217,8 @@ floating_maximum_size 5000 x 5000
# show where the next window will be created
hide_edge_borders none
new_window pixel 1
new_float pixel 1
#new_window pixel 1
#new_float pixel 1
# read alert for WS activity
force_display_urgency_hint 2000 ms
@ -275,7 +275,7 @@ bindsym $mod+minus scratchpad show
bindsym $mod+Shift+minus move scratchpad, scratchpad show
# start dmenu (a program launcher)
bindsym $mod+Return fullscreen disable, exec sterm
bindsym $mod+Return fullscreen disable, exec st
bindsym $mod+Shift+Return fullscreen disable, exec bterm
bindsym $mod+Control Return fullscreen disable, exec hterm
bindsym $mod+End exec i3lock -c "#000000"

106
.ksh/aliases.ksh Normal file
View File

@ -0,0 +1,106 @@
########################################################################
# 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"
alias web-ebay="chrome https://www.kleinanzeigen.de/m-nachrichten.html &"
alias web-scottsbasslessons="chrome https://scottsbasslessons.com &"
alias vmctl="doas /usr/sbin/vmctl"
# 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"
# 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/events.txt"
alias caly="ncal -Cy"
alias calm="ncal -3C"
# 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"'

51
.ksh/email.ksh Normal file
View File

@ -0,0 +1,51 @@
########################################################################
# 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"

38
.ksh/environment.ksh Normal file
View File

@ -0,0 +1,38 @@
########################################################################
# 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:-!mpv "$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

110
.ksh/porttools.ksh Normal file
View File

@ -0,0 +1,110 @@
########################################################################
# PORT TOOLS
########################################################################
case $(hostname -s) in
x13) PKGOPT="-Dsnap"; ;;
openbsd) PKGOPT="-Dsnap"; ;;
esac
MAKE_JOBS=$(sysctl -n hw.ncpuonline)
alias refake="rm -f pkg/*.orig; make clean=fake && make fake"
alias reinstall="remake && make reinstall"
make-install() {
make install \
&& doas pkg_add -aa "$(make show=FULLPKGNAME)"
}
make-reinstall() {
remake \
&& doas pkg_add -aa "$(make show=FULLPKGNAME)"
}
########################################################################
# OPENBSD PORT TOOLS
########################################################################
# CVS
export CVSROOT=sdk@cvs.openbsd.org:/cvs
alias cvs-diff="doas -u sdk cvs -d $CVSROOT diff -uNp"
alias cvs-commit="doas -u sdk cvs -d $CVSROOT commit"
alias cvs-update="doas -u sdk cvs -z1 -d $CVSROOT -q up -Pd -A"
cvs-update-all() {(
set -x
cd /usr/src && cvs-update
cd /usr/xenocara && cvs-update
cd /usr/ports && cvs-update
cd /usr/www && cvs-update
)}
alias cvs-release="doas -u sdk cvs -d $CVSROOT release"
alias cvs-checkout="doas -u sdk cvs -z 1 -qd $CVSROOT checkout -P"
cvs-import-simulate() {
doas -u sdk cvs -d sdk@cvs.openbsd.org:/cvs \
-n import ports/$(dirname $PWD)/$(basename $PWD) sdk sdk_$(date +"%Y%m%d")
}
cvs-sync-sunny() {
rsync -arv --delete /usr/ports/ root@sunny:/usr/ports/
rsync -arv --delete /usr/src/ root@sunny:/usr/src/
rsync -arv --delete /usr/xenocara/ root@sunny:/usr/xenocara/
}
full-update() {(
set -x
pkg_add -u
cvs-update-all
doas sysupgrade -sn
)}
set_autoconf() {
set -x
export AUTOMAKE_VERSION=1.16
export AUTOCONF_VERSION=2.69
set +x
}
# PORTS
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
)}
pmark() { pwd > /var/cache/pmark; }
p() { cd "$(</var/cache/pmark)"; }
pj() { cd "/usr/ports/$(portjump $1)"; }
po() { cd "$(</var/cache/pmark)" && cd "$(make show=WRKSRC)"; }
alias portsweep='doas find . \( -name "*.orig" -or -empty \) -delete'
pdiff() {(
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
doas -u sdk cvs -d sdk@cvs.openbsd.org:/cvs diff -uNp "${PD}" \
> "/home/sdk/diffs/${PN}.diff"
echo "/home/sdk/diffs/${PN}.diff"
)}
alias port-modgo-update='make MODGO_VERSION=latest modgo-gen-modules > modules.inc'
# DPB
proot-rebuild() {
doas proot -c /etc/proot.conf
doas chroot /home/dpb pkg_add -Dsnap ccache
}
alias proot-do="doas chroot /home/dpb/"
alias dpb-control="ssh openbsd.codevoid.de \"doas nc -U /usr/ports/logs/amd64/control-openbsd-*\""
dpb-log() {
ssh openbsd.codevoid.de "tail -n 500 /usr/ports/logs/amd64/paths/$1.log"
}
dpb-logf() {
ssh openbsd.codevoid.de "tail -n 500 -f /usr/ports/logs/amd64/paths/$1.log"
}

42
.ksh/remind.ksh Normal file
View File

@ -0,0 +1,42 @@
########################################################################
# 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
)}

43
.ksh/ytdl.ksh Normal file
View File

@ -0,0 +1,43 @@
########################################################################
# YOUTUBE-DL
########################################################################
ytdl() {
yt-dlp "$@";
}
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() {
mkdir -p "$HOME/x/$1/"
cd "$HOME/x/$1/" && ytdl "$2"
}

385
.kshrc
View File

@ -44,61 +44,32 @@ export PRINTER
[[ $- != *i* ]] && return
########################################################################
# INTERACTIVE ENVIRONMENT
# MANDATORY ENVIRONMENT
########################################################################
case $(hostname -s) in
x13) PKGOPT="-Dsnap"; ;;
openbsd) PKGOPT="-Dsnap"; ;;
esac
### HISTORY
HISTCONTROL=ignoredups:ignorespace:erasedups
HISTFILE=$HOME/.ksh-history
HISTSIZE=2000
export HISTCONTROL HISTFILE HISTSIZE
### TUIR (reddit)
TUIR_BROWSER="$BROWSER"
export TUIR_BROWSER
### NNN
NNN_OPTS="cErxAJBR"
NNN_OPENER="nnn.sh"
NNN_FIFO=/tmp/nnn.fifo
NNN_PLUG='c:!readlink -f $nnn | xclip -f;o:-!mpv "$nnn";u:!upload "$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
# LESS
LESS="-giJmR--tilde"
LESSHISTFILE="$HOME/.less-history"
export LESS LESSHISTFILE
### SLNR
SLRNPULL_ROOT=$HOME/.slrnpull
NNTPSERVER=read.news.tnib.de
export SLRNPULL_ROOT NNTPSERVER
########################################################################
# MODULE LOADER
########################################################################
### GOT
GOT_AUTHOR="Stefan Hagen <sh+got@codevoid.de>"
TOG_COLORS=1
export GOT_AUTHOR TOG_COLORS
load() { [ -f ~/.ksh/$1 ] && . ~/.ksh/$1; }
### 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
# PORTS
MAKE_JOBS=$(sysctl -n hw.ncpuonline)
load environment.ksh
load aliases.ksh
load email.ksh
load porttools.ksh
load remind.ksh
load ytdl.ksh
########################################################################
# PROMPT (SIMPLE)
@ -119,74 +90,6 @@ set bell-style none
# 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"
alias web-ebay="chrome https://www.kleinanzeigen.de/m-nachrichten.html &"
alias web-scottsbasslessons="chrome https://scottsbasslessons.com &"
alias refake="rm -f pkg/*.orig; make clean=fake && make fake"
alias reinstall="remake && make reinstall"
make-install() {
make install \
&& doas pkg_add -aa "$(make show=FULLPKGNAME)"
}
make-reinstall() {
remake \
&& doas pkg_add -aa "$(make show=FULLPKGNAME)"
}
alias vmctl="doas /usr/sbin/vmctl"
# 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
)}
# mastodon
alias toot-sh="toot-wrapper sh@bsd.network"
alias toot-uug="toot-wrapper uugrn@chaos.social"
@ -198,10 +101,6 @@ tuta() {
alias sudo="doas"
alias su="doas su"
# 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"
# packages
alias pkg_add="doas \pkg_add ${PKGOPT}"
alias pkg_delete="doas \pkg_delete ${PKGOPT}"
@ -228,88 +127,8 @@ alias mount_msdos="doas \mount_msdos -o nodev,nosuid,noatime -u 1000 -g 1000"
mount_tank() { awk '$3=="nfs"{print $2}' /etc/fstab | xargs -n1 doas mount; }
umount_tank() { awk '$3=="nfs"{print $2}' /etc/fstab | xargs -n1 doas umount; }
# 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/events.txt"
alias caly="ncal -Cy"
alias calm="ncal -3C"
# 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"
pw() { pwgen -1 -y --remove-chars=\~\`\"\'{}\(\)\[\]\*.\;\|,\<\> 22; }
# 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"'
# monitoring
lr() {
[ -z "$1" ] && return 2
@ -334,145 +153,6 @@ setcam() {
doas ln -sf /dev/video${_dev:=0} /dev/video
}
########################################################################
# 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"
########################################################################
# OPENBSD PORT TOOLS
########################################################################
# CVS
export CVSROOT=sdk@cvs.openbsd.org:/cvs
alias cvs-diff="doas -u sdk cvs -d $CVSROOT diff -uNp"
alias cvs-commit="doas -u sdk cvs -d $CVSROOT commit"
alias cvs-update="doas -u sdk cvs -z1 -d $CVSROOT -q up -Pd -A"
cvs-update-all() {(
set -x
cd /usr/src && cvs-update
cd /usr/xenocara && cvs-update
cd /usr/ports && cvs-update
cd /usr/www && cvs-update
)}
alias cvs-release="doas -u sdk cvs -d $CVSROOT release"
alias cvs-checkout="doas -u sdk cvs -z 1 -qd $CVSROOT checkout -P"
cvs-import-simulate() {
doas -u sdk cvs -d sdk@cvs.openbsd.org:/cvs \
-n import ports/$(dirname $PWD)/$(basename $PWD) sdk sdk_$(date +"%Y%m%d")
}
cvs-sync-sunny() {
rsync -arv --delete /usr/ports/ root@sunny:/usr/ports/
rsync -arv --delete /usr/src/ root@sunny:/usr/src/
rsync -arv --delete /usr/xenocara/ root@sunny:/usr/xenocara/
}
full-update() {(
set -x
pkg_add -u
cvs-update-all
doas sysupgrade -sn
)}
set_autoconf() {
set -x
export AUTOMAKE_VERSION=1.16
export AUTOCONF_VERSION=2.69
set +x
}
# PORTS
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
)}
pmark() { pwd > /var/cache/pmark; }
p() { cd "$(</var/cache/pmark)"; }
pj() { cd "/usr/ports/$(portjump $1)"; }
po() { cd "$(</var/cache/pmark)" && cd "$(make show=WRKSRC)"; }
alias portsweep='doas find . \( -name "*.orig" -or -empty \) -delete'
pdiff() {(
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
doas -u sdk cvs -d sdk@cvs.openbsd.org:/cvs diff -uNp "${PD}" \
> "/home/sdk/diffs/${PN}.diff"
echo "/home/sdk/diffs/${PN}.diff"
)}
alias port-modgo-update='make MODGO_VERSION=latest modgo-gen-modules > modules.inc'
# DPB
proot-rebuild() {
doas proot -c /etc/proot.conf
doas chroot /home/dpb pkg_add -Dsnap ccache
}
alias proot-do="doas chroot /home/dpb/"
alias dpb-control="ssh openbsd.codevoid.de \"doas nc -U /usr/ports/logs/amd64/control-openbsd-*\""
dpb-log() {
ssh openbsd.codevoid.de "tail -n 500 /usr/ports/logs/amd64/paths/$1.log"
}
dpb-logf() {
ssh openbsd.codevoid.de "tail -n 500 -f /usr/ports/logs/amd64/paths/$1.log"
}
alias mypkg_add="PKG_PATH=http://openbsd.codevoid.de/pub/OpenBSD/snapshots/packages/amd64 pkg_add -Dsnap -Dunsigned"
alias mypkg_info="PKG_PATH=http://openbsd.codevoid.de/pub/OpenBSD/snapshots/packages/amd64 pkg_info -Dsnap -Dunsigned"
@ -564,49 +244,6 @@ doupload-gopher() {
echo "gopher://codevoid.de/$S/p/$_name";
}
########################################################################
# YOUTUBE-DL
########################################################################
ytdl() {
yt-dlp "$@";
}
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() {
mkdir -p "$HOME/x/$1/"
cd "$HOME/x/$1/" && ytdl "$2"
}
########################################################################
# KSH COMPLETIONS
########################################################################

View File

@ -26,6 +26,10 @@ let mapleader = ","
" nnoremap # #``
" nnoremap n <S-n>
" SMOOTH SCROLLING
set t_TI=[4?h
set t_TE=[4?l
" INDENTATION
set noautoindent
set nosmartindent