Update 2024-01-08 23:06 OpenBSD/amd64-x13
This commit is contained in:
parent
4f7fbeabec
commit
085bc227ad
@ -36,6 +36,7 @@ DMENUOPTS="-fn Terminus:pixelsize=20 \
|
||||
-f"
|
||||
|
||||
DMENU_CMD="dmenu $DMENUOPTS"
|
||||
#DMENU_CMD="rofi -dmenu"
|
||||
DMENURUN_CMD="dmenu_run $DMENUOPTS"
|
||||
|
||||
#
|
||||
|
@ -25,21 +25,27 @@ amused_shuffle() {(
|
||||
amused show | sort -R | amused load;
|
||||
NOTIFY_CMD "shuffle finished";
|
||||
)&}
|
||||
|
||||
amused_sort() {(
|
||||
NOTIFY_CMD "sorting started in background"
|
||||
amused show | sort -u | amused load
|
||||
NOTIFY_CMD "sorting finished"
|
||||
)&}
|
||||
|
||||
amused_load_tank() {(
|
||||
NOTIFY_CMD "loading started in background"
|
||||
ssh 192.168.1.20 "find /tank/pub/Audio_* -type f" | grep -Ev "jpg|jpeg|png|gif|/[Cc]over\." | amused load
|
||||
NOTIFY_CMD "loading finished"
|
||||
amused_cmd play
|
||||
)&}
|
||||
|
||||
amused_load_local() {(
|
||||
NOTIFY_CMD "loading started in background"
|
||||
find /home/sdk/Music -type f | grep -Ev "jpg|jpeg|png|gif|/[Cc]over\." | amused load
|
||||
NOTIFY_CMD "loading finished"
|
||||
amused_cmd play
|
||||
)&}
|
||||
|
||||
amused_cmd() {
|
||||
amused "${@}"
|
||||
NOTIFY_CMD "$(amused status | head -1 | cut -d'/' -f5-)"
|
||||
|
@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# needs: jq, curl, ffplay, notify-send
|
||||
|
||||
# https://codevoid.de/1/git/dotfiles/file/.bin/_config.gph
|
||||
. ~/.bin/_config
|
||||
PLAYER="ffplay -loglevel error"
|
||||
JSON="https://streaming.media.ccc.de/streams/v2.json"
|
||||
|
||||
QUALITY="hd-native"
|
||||
FORMAT="webm"
|
||||
|
||||
SLUG=$(curl -s "$JSON" | jq -crM '.[].groups[].rooms[].slug' | $DMENU_CMD -p Stream )
|
||||
if [ ! -z "$SLUG" ];
|
||||
then
|
||||
URL=$(curl -s "$JSON" | jq -Mcr ".[].groups[].rooms[] | select(.slug==\"$SLUG\") | .streams[] | select(.slug==\"$QUALITY\").urls.$FORMAT.url")
|
||||
|
||||
ERR="$($PLAYER "$URL" 2>&1 > /dev/null)"
|
||||
[ ! -z "$ERR" ] && notify-send "$ERR"
|
||||
fi
|
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
. $HOME/.bin/_config
|
||||
texec "tmux new-session -A -s irrsi irssi"
|
||||
texec "ksh -ic x"
|
||||
|
@ -1,13 +1,7 @@
|
||||
#!/bin/sh
|
||||
. $HOME/.bin/_config
|
||||
|
||||
|
||||
audio_devlist() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
SEL=$(printf "BACKLIGHT\nAUDIODEVICE\nLIDACTION\nSCREEN\nCONFIGFILES" \
|
||||
SEL=$(printf "BACKLIGHT\nAUDIODEVICE\nVOLUME\nLIDACTION\nSCREEN\nCONFIGFILES" \
|
||||
| $DMENU_CMD -p Mailbox)
|
||||
|
||||
case $SEL in
|
||||
@ -15,11 +9,6 @@ case $SEL in
|
||||
S=$(printf "10\n20\n30\n40\n50\n60\n70\n80\n90\n100" | $DMENU_CMD -p Backlight)
|
||||
doas wsconsctl display.brightness=$S
|
||||
;;
|
||||
"AUDIODEVICE")
|
||||
L=audio_devlist
|
||||
D=$(printf "0\n1\n2\n3\n4\n5" | $DMENU_CMD -p AudioDevice)
|
||||
sndioctl server.device=$D
|
||||
;;
|
||||
"LIDACTION")
|
||||
A=$(printf "enable\ndisable" | $DMENU_CMD -p Lidaction)
|
||||
case $A in
|
||||
@ -27,6 +16,10 @@ case $SEL in
|
||||
"disable") doas sysctl machdep.lidaction=0; ;;
|
||||
esac
|
||||
;;
|
||||
"VOLUME")
|
||||
S=$(printf "10\n20\n30\n40\n50\n60\n70\n80\n90\n100" | $DMENU_CMD -p Volume)
|
||||
sndioctl output.level=$(echo "scale=3;$S/100" | bc)
|
||||
;;
|
||||
"CONFIGFILES")
|
||||
C=$(printf "cwmrc\nvimrc\nkshrc\nvimb\nmuttrc\nspectrwm" | sort | $DMENU_CMD -p File)
|
||||
case $C in
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
. $HOME/.bin/_config
|
||||
sndioctl -q server.device=$(setaudio | $DMENU_CMD -p "Device" -l 10 | cut -b3)
|
@ -126,6 +126,7 @@ choose_browser() {
|
||||
case "${URI}" in
|
||||
gopher://*) DEFAULT="Lagrange (default)"; ;;
|
||||
gemini://*) DEFAULT="Lagrange (default)"; ;;
|
||||
*console.hetzner.cloud*) DEFAULT="Firefox (default)"; ;;
|
||||
*youtube.com/watch*) DEFAULT="Mpv (default)"; ;;
|
||||
*media.ccc.de/v/*) DEFAULT="Mpv (default)"; ;;
|
||||
*.pdf|*.cb|*.ps) DEFAULT="Zathura (default)"; ;;
|
||||
|
@ -1,27 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# ALIASES=$(ksh -ic alias | grep ^mutt- | cut -d= -f1)
|
||||
#
|
||||
# MAILBOX="imaps://mail.codevoid.de"
|
||||
#
|
||||
# SEL=$(printf "$ALIASES" | $DMENU_CMD -p Mutt)
|
||||
#
|
||||
# [ -z "$SEL" ] || texec $SEL
|
||||
|
||||
. $HOME/.bin/_config
|
||||
# MAILBOXES=$(cd ~/.emails && find Mailboxes/*/ \
|
||||
# -mindepth 1 -maxdepth 1 -type d \
|
||||
# -not -path "*/tmp*" \
|
||||
# -not -path "*/cur*" \
|
||||
# -not -path "*/new*")
|
||||
|
||||
MAILBOXES="$(print "t1 login sdk $(pass Internet/mail.codevoid.de | head -1)\nt1 list \"\" \"*\"\nt1 logout" \
|
||||
| openssl s_client -quiet -connect mail.codevoid.de:993 -crlf - 2>/dev/null \
|
||||
| grep "^\* LIST" | awk '{ print $NF }' | sort | dos2unix)"
|
||||
|
||||
|
||||
HOST="imaps://mail.codevoid.de"
|
||||
|
||||
SEL=$(echo "$MAILBOXES" | $DMENU_CMD -l 12 -p Mailbox)
|
||||
|
||||
[ -z "$SEL" ] || texec "mutt -F $HOME/.mutt/rc-account-private -f $HOST/$SEL"
|
@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# provides DMENU_CMD (dmenu + color parameter)
|
||||
. $HOME/.bin/_config
|
||||
|
||||
cd /usr/ports
|
||||
DIR=$( ls -1d */* mystuff/*/* | egrep -v '^pobj|^distfiles|^log|^plist|^packages|CVS|Makefile|\.tgz$' | $DMENU_CMD -p "Port" -l 20);
|
||||
if [ ! -z "$DIR" ]; then
|
||||
cd /usr/ports/$DIR
|
||||
DIR2=$(printf "%s\n\n%s\n%s\n%s\n\nCVS %s\n" \
|
||||
"/usr/ports/$DIR" \
|
||||
"Package: $(make show=FULLPKGNAME)" \
|
||||
"Maintainer: $(make show=MAINTAINER)" \
|
||||
"Homepage: $(make show=HOMEPAGE)" \
|
||||
"$(cvs log -Nl -rHEAD 2>&1 | awk '{ if ($0 ~ /^===/) p++; if (p == 1) print $0; if ($0 ~ /^---/) p++; }')" \
|
||||
| $DMENU_CMD -p "Info" -l 20)
|
||||
if [ ! -z "$DIR2" ]; then
|
||||
case "$DIR2" in
|
||||
Homepage*) firefox "$(make show=HOMEPAGE)" & ;;
|
||||
Package*) make show=FULLPKGNAME | xclip -r ;;
|
||||
Maintainer*) make show=MAINTAINER | xclip -r ;;
|
||||
*) cd "$DIR2"; port mark; dterm & ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
@ -7,6 +7,8 @@ SEL="$(print "$LIST\ndeactivate\nhome" | cut -d' ' -f1 | $DMENU_CMD -l 20 -p "VP
|
||||
|
||||
[ -z "$SEL" ] && exit 0
|
||||
|
||||
needs wireguard-tools--
|
||||
|
||||
if [ "$SEL" == "deactivate" ]
|
||||
then
|
||||
ACTIVE=$(ifconfig | grep wg-quick | cut -d: -f3 | tr -d " ")
|
||||
@ -18,6 +20,7 @@ then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
HOST="$(echo "$LIST" | fgrep "$SEL" | cut -d' ' -f2)"
|
||||
|
||||
cat /etc/wireguard/template.conf | sed "s/XXXXXX/$HOST/g" > /tmp/vpn.conf
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
RPATH=/home/sdk/make-web/src/paste
|
||||
SSH="sdk@home.codevoid.de"
|
||||
WEB="https://home.codevoid.de/paste"
|
||||
WEB="https://ptrace.org"
|
||||
|
||||
f="$1"
|
||||
if [ "$1" = "-h" ]; then
|
||||
|
@ -66,6 +66,7 @@ case "$EXT" in
|
||||
txt) vim "$f"; ;;
|
||||
m2ts) mpv "$f"; ;;
|
||||
flv) mpv "$f"; ;;
|
||||
mp3) aplay "$f"; ;;
|
||||
aiff) mpva "$f"; ;;
|
||||
sid) sidplay "$f"; ;;
|
||||
out) kdump -RTf "$f" | less; ;;
|
||||
|
2
.bin/sp
2
.bin/sp
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# read resolution from xrandr: "1920x1080 60.03*+"
|
||||
RES=$(xrandr | grep "*+" | awk '{print $1}')
|
||||
RES=$(xrandr | grep "*+" | awk '{print $1}' | head -1)
|
||||
|
||||
# parse xrandr output
|
||||
RESH=${RES%x*}
|
||||
|
@ -40,7 +40,6 @@ bar_font_color_free = rgb:99/99/99
|
||||
bar_font_color_selected = rgb:ff/ff/ff
|
||||
|
||||
bar_font = Terminess Nerd Font:pixelsize=18
|
||||
#bar_font_pua = PowerlineExtraSymbols:pixelsize=18
|
||||
bar_action = cbar
|
||||
bar_action_expand = 0
|
||||
bar_at_bottom = 0
|
||||
@ -65,7 +64,7 @@ bar_at_bottom = 0
|
||||
# ++ A literal ‘+’
|
||||
# +@ Prefix for text markup sequences
|
||||
|
||||
bar_format = +S +@bg=2;+L+@bg=0; +W +|1R +A
|
||||
bar_format = +S +@bg=2;+L+@bg=0; +W +|R +A
|
||||
|
||||
|
||||
# +--------------------------------------------------
|
||||
@ -109,7 +108,7 @@ urgent_enabled = 1
|
||||
# +--------------------------------------------------
|
||||
|
||||
workspace_clamp = 1
|
||||
workspace_autorotate = 0
|
||||
workspace_autorotate = 1
|
||||
warp_focus = 0
|
||||
warp_pointer = 0
|
||||
cycle_visible = 0
|
||||
@ -146,35 +145,26 @@ bind[bterm] = MOD+Shift+Return
|
||||
program[hterm] = hterm
|
||||
bind[hterm] = MOD+Control+Return
|
||||
|
||||
program[irssi] = texec x
|
||||
bind[irssi] = MOD+Shift+X
|
||||
program[mcorner] = move-to-corner
|
||||
bind[mcorner] = MOD+Shift+X
|
||||
|
||||
program[man] = dexec_mail
|
||||
bind[man] = MOD+Shift+M
|
||||
program[mixer] = texec cmixer
|
||||
bind[mixer] = MOD+Shift+M
|
||||
|
||||
program[vpn] = dexec_vpn
|
||||
bind[vpn] = MOD+V
|
||||
|
||||
program[omutt] = texec mutt-openbsd-all
|
||||
bind[omutt] = MOD+Shift+O
|
||||
|
||||
program[exec] = dexec
|
||||
bind[exec] = MOD+D
|
||||
|
||||
program[ssh] = dexec_ssh
|
||||
bind[ssh] = MOD+S
|
||||
|
||||
program[ports] = dexec_port
|
||||
bind[ports] = MOD+Shift+S
|
||||
|
||||
program[audio] = dexec_audio
|
||||
bind[audio] = MOD+O
|
||||
|
||||
program[scratchpad] = sp
|
||||
bind[scratchpad] = MOD+minus
|
||||
|
||||
program[xconsole] = xcons
|
||||
bind[xconsole] = MOD+Shift+minus
|
||||
program[xconsole] = xcons
|
||||
bind[xconsole] = MOD+Shift+minus
|
||||
|
||||
program[apps] = dexec_apps
|
||||
bind[apps] = MOD+A
|
||||
|
@ -108,3 +108,8 @@ alias bbs='ssh -t sdk@home.codevoid.de "LANG=de_DE.UTF-8 syncterm -iC localhost:
|
||||
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"
|
||||
|
@ -6,18 +6,22 @@ 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-seek="_amused_cmd seek 30"
|
||||
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 "${@}"
|
||||
amused "${@}" 2>&1 > /dev/null
|
||||
STATUS="$(amused status | head -1 | cut -d'/' -f5-)"
|
||||
NOTIFY_CMD "$STATUS"
|
||||
echo "now playing: $STATUS"
|
||||
echo "$@: $STATUS"
|
||||
}
|
||||
|
||||
_amused_jump() {
|
||||
_amused_cmd jump \
|
||||
"$(echo "$(amused show | cut -d'/' -f5-)" | fzf -i -e)"
|
||||
S="$(echo "$(amused show | cut -d'/' -f5-)" | sort -h | fzf -i -e)"
|
||||
[ ! -z "$S" ] \
|
||||
&& _amused_cmd jump "$S"
|
||||
}
|
||||
|
@ -11,4 +11,15 @@ then
|
||||
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
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ alias dpb-make="_dpbmake"
|
||||
alias port-roach="portroach-cli -m codevoid"
|
||||
alias developers="_listdevs"
|
||||
alias port-patch="_patchvim"
|
||||
alias port-repology="_repology &"
|
||||
|
||||
|
||||
#
|
||||
@ -230,3 +231,9 @@ _listdevs() {
|
||||
| fzf -i -e
|
||||
}
|
||||
|
||||
_repology() {
|
||||
$BROWSER \
|
||||
"https://repology.org/projects/?search=&maintainer=sh%2Bports%40codevoid.de&category=&inrepo=openbsd" \
|
||||
>/dev/null 2>&1
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user