Update 2024-01-08 23:06 OpenBSD/amd64-x13
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user