Compare commits
No commits in common. "18ce390cc66c093a2d23dc49f7b7f03bcf441bb6" and "d905bc801159cea66524a7a725845b64137fbdec" have entirely different histories.
18ce390cc6
...
d905bc8011
@ -12,7 +12,6 @@ gpgt
|
||||
# Add .local/bin to path
|
||||
set -gx PATH "$PATH:$HOME/.local/bin:"
|
||||
set -gx PATH "$PATH:$HOME/.local/bin/deskutils:"
|
||||
set -gx PATH "$PATH:$HOME/.local/bin/deskutils/soundboard:"
|
||||
set -gx PATH "$PATH:$HOME/.local/bin/minrss-scripts:"
|
||||
|
||||
# Disable fish greeting
|
||||
|
@ -1 +0,0 @@
|
||||
CTRL+p script-message osc-playlist
|
@ -1,2 +1 @@
|
||||
osd-status-msg=${playback-time/full} / ${duration} (${percent-pos}%)\nframe: ${estimated-frame-number} / ${estimated-frame-count}
|
||||
input-ipc-server="/tmp/mpv-socket"
|
||||
|
@ -39,12 +39,11 @@ set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?'
|
||||
set charset = "utf-8"
|
||||
|
||||
mailboxes =Inbox
|
||||
mailboxes =Archive =Sent =Drafts =Junk =Trash =../arc
|
||||
mailboxes =Archive =Sent =Drafts =Junk =Trash
|
||||
|
||||
set sendmail="/usr/bin/msmtp -a mail"
|
||||
|
||||
macro index O "<shell-escape>mbsync -c \"$XDG_CONFIG_HOME\"/isync/mbsyncrc disroot <enter>" "run offlineimap to sync all mail"
|
||||
macro index,pager A "<save-message>=../arc<enter>" "Archive Message"
|
||||
bind index,pager \CP sidebar-prev
|
||||
# Ctrl-P – Previous Mailbox
|
||||
bind index,pager \CN sidebar-next
|
||||
|
@ -21,7 +21,6 @@ c.scrolling.smooth = False
|
||||
c.url.default_page = "about:blank"
|
||||
c.url.start_pages = "about:blank"
|
||||
c.url.searchengines = {"DEFAULT":"https://searx.be/search?q={}"}
|
||||
c.downloads.location.directory = "~/quar/"
|
||||
|
||||
# Downloads
|
||||
|
||||
|
@ -1,83 +1,22 @@
|
||||
# Soundboard
|
||||
# Soundboard setup
|
||||
# "Boxes" labelled 0-9 in ~/med/sb2/
|
||||
# Each one has files/symlinks 0-9
|
||||
|
||||
# Directory tree under $SB_DIR
|
||||
# Play sounds in current dir using numpad 0-9 keys
|
||||
# Navigate to a dir under current one with super + 0-9
|
||||
# Navigate back to root with super + `
|
||||
|
||||
|
||||
# change dir
|
||||
super + {0-9}
|
||||
if [ ! -h $SB_DIR/cur ]; then \
|
||||
ln -sr $SB_DIR $SB_DIR/cur;\
|
||||
fi;\
|
||||
ln -sr $SB_DIR/$(readlink $SB_DIR/cur)/{0-9}* $SB_DIR/cur_n;\
|
||||
unlink $SB_DIR/cur;\
|
||||
mv $SB_DIR/cur_n $SB_DIR/cur;\
|
||||
sb-ls.sh
|
||||
unlink ~/med/sb/cur;\
|
||||
ln -sr ~/med/sb/{0-9} ~/med/sb/cur;\
|
||||
rm /tmp/sb-socket*
|
||||
|
||||
# set current directory to $SB_DIR
|
||||
super + grave
|
||||
unlink $SB_DIR/cur;\
|
||||
ln -sr $SB_DIR $SB_DIR/cur;\
|
||||
sb-ls.sh
|
||||
|
||||
# list currently playing + volume
|
||||
KP_Enter
|
||||
find $SB_DIR/ -name "sb-socket*" | sb-vol
|
||||
|
||||
# list current directory contents
|
||||
# super + shift + `
|
||||
super + asciitilde
|
||||
sb-ls.sh
|
||||
|
||||
# start sound
|
||||
KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
||||
if [ -z "$SB_DIR" ]; then \
|
||||
notify-send -u critical -a "soundboard" '$SB_DIR is unset!';\
|
||||
exit 1;\
|
||||
fi;\
|
||||
snd_id="{0-9}";\
|
||||
id=$(cat /dev/random | base32 | head -c 5);\
|
||||
socket="$SB_DIR/cur/sb-socket$snd_id-$id";\
|
||||
mpv --input-ipc-server=$socket $SB_DIR/cur/$snd_id*;\
|
||||
rm -f "$socket"
|
||||
socket="/tmp/sb-socket$snd_id-$id";\
|
||||
mpv --input-ipc-server=$socket ~/med/sb/cur/$snd_id*;\
|
||||
rm $socket
|
||||
|
||||
# stop specific sound
|
||||
shift + KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
||||
snd_id="{0-9}";\
|
||||
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-msg "stop"
|
||||
|
||||
# loop specific sound
|
||||
ctrl + shift + KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
||||
snd_id="{0-9}";\
|
||||
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-msg "set loop inf"
|
||||
|
||||
# reduce volume of current dir
|
||||
ctrl + shift + KP_Subtract
|
||||
snd_id="{0-9}";\
|
||||
ls $SB_DIR/cur/sb-socket* | sb-msg "add volume -5";\
|
||||
ls $SB_DIR/cur/sb-socket* | sb-vol
|
||||
|
||||
# increase volume of current dir
|
||||
ctrl + shift + KP_Add
|
||||
snd_id="{0-9}";\
|
||||
ls $SB_DIR/cur/sb-socket* | sb-msg "add volume +5";\
|
||||
ls $SB_DIR/cur/sb-socket* | sb-vol
|
||||
|
||||
# reduce volume of specific sound
|
||||
ctrl + KP_Subtract; KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
||||
snd_id="{0-9}";\
|
||||
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-msg "add volume -10";\
|
||||
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-vol
|
||||
|
||||
# increase volume of specific sound
|
||||
ctrl + KP_Add; KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
||||
snd_id="{0-9}";\
|
||||
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-msg "add volume +10";\
|
||||
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-vol
|
||||
|
||||
# stop all sounds
|
||||
shift + KP_Delete
|
||||
find $SB_DIR/ -name "sb-socket*" | sb-msg "stop";\
|
||||
find $SB_DIR/ -name "sb-socket*" | xargs rm
|
||||
ls /tmp/sb-socket$snd_id-* |\
|
||||
while read -r socket; do \
|
||||
echo {"stop"} | socat - $socket;\
|
||||
done
|
||||
|
@ -19,14 +19,11 @@ then
|
||||
--chown=dogeystamp:sftpr \
|
||||
--exclude=med/mus \
|
||||
--exclude=med/gv \
|
||||
--exclude=sb-socket \
|
||||
--exclude=med/sb/cur \
|
||||
--exclude=dox/dow \
|
||||
--exclude=dox/rss \
|
||||
--exclude=dox/rem \
|
||||
--exclude=dox/proj \
|
||||
--exclude=dox/vms \
|
||||
--exclude=dox/mail/disroot \
|
||||
--exclude=med/pix/hdri \
|
||||
--exclude=med/memes/woof/quar \
|
||||
--exclude=BL_proxy \
|
||||
|
@ -2,10 +2,6 @@
|
||||
|
||||
# Dunst notification sound script.
|
||||
|
||||
if [ "$DUNST_APP_NAME" = "soundboard" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
if pactl list short sinks | grep -q virtual_mic; then
|
||||
mpv ~/.local/bin/deskutils/notif.wav --audio-device=pulse/c1_out
|
||||
else
|
||||
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
# List current soundboard directory as a notification.
|
||||
|
||||
if [ -z "$SB_DIR" ]; then
|
||||
notify-send -u critical -a "soundboard" '$SB_DIR is unset!'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CUR_DIR="$SB_DIR"/"$(readlink $SB_DIR/cur)"
|
||||
|
||||
list () {
|
||||
find "$CUR_DIR" -mindepth 1 -maxdepth 1 \( -type l -o -type d -o -type f \) -print0 |\
|
||||
xargs -0 -i{} basename {} | sort
|
||||
}
|
||||
|
||||
notify-send \
|
||||
-a "soundboard" \
|
||||
-r 13371337 \
|
||||
"$(printf "$(basename "$CUR_DIR")\n$(list)")"
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Given a list of mpv sockets through stdin, send a message to all of them
|
||||
|
||||
while read -r socket; do
|
||||
printf "$1\n" | socat - $socket | grep "{.*"
|
||||
done
|
@ -1,39 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Get volumes of mpv sockets piped through stdin
|
||||
|
||||
SOCKETS=""
|
||||
|
||||
while read x; do
|
||||
SOCKETS=$(printf "%s\n%s" "$SOCKETS" "$x")
|
||||
done
|
||||
SOCKETS=$(printf %s "$SOCKETS" | sed "/^$/d")
|
||||
|
||||
VOLS=$(echo "$SOCKETS" |\
|
||||
sb-msg '{ "command": ["get_property", "volume"], "request_id": 1336 }' |\
|
||||
jq .data | awk '{ printf("%.0f\n", $0) }')
|
||||
|
||||
PATHS=$(echo "$SOCKETS" |\
|
||||
sb-msg '{ "command": ["get_property", "path"], "request_id": 1337 }' |\
|
||||
jq -r .data)
|
||||
NAMES=""
|
||||
for x in $PATHS; do
|
||||
NAMES="$NAMES $(basename $x)"
|
||||
done
|
||||
|
||||
CNT=$(echo $PATHS | wc -w)
|
||||
if [ "$CNT" = 0 ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
CUR_DIR="$(basename $(readlink $SB_DIR/cur))"
|
||||
|
||||
zip () {
|
||||
awk '{for(i=1; i<=NF/2; i++) {j=NF/2+i; printf "%s %s%\n",$i,$j;}}'
|
||||
}
|
||||
|
||||
PROMPT=$(printf '%s\n%s' "$CUR_DIR" "$(echo "$NAMES" $VOLS | zip | column --table --output-width 20)")
|
||||
|
||||
notify-send \
|
||||
-a "soundboard" \
|
||||
-r 13371337 \
|
||||
"$(printf "%s" "$PROMPT")"
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Append link from clipboard to mpv playlist
|
||||
|
||||
path="$(xsel -b)"
|
||||
echo "{ command: [ \"loadfile\", \"$path\", \"append-play\" ] }" | socat - /tmp/mpv-socket
|
@ -4,7 +4,6 @@
|
||||
export XDG_CONFIG_HOME="$HOME"/.config
|
||||
export XDG_CACHE_HOME="$HOME"/.cache
|
||||
export XDG_DATA_HOME="$HOME"/.local/share
|
||||
export XDG_DOWNLOAD_DIR="$HOME"/quar/
|
||||
|
||||
# Clean up home directory dotfiles
|
||||
|
||||
@ -36,8 +35,6 @@ export BROWSER="qutebrowser"
|
||||
export MANPAGER='nvim +Man!'
|
||||
export MANWIDTH=999
|
||||
|
||||
# Soundboard
|
||||
export SB_DIR="$HOME"/med/sb
|
||||
export SXHKD_SHELL='/bin/sh'
|
||||
|
||||
# Variables for passphrase2pgp
|
||||
|
Loading…
x
Reference in New Issue
Block a user