Compare commits
9 Commits
d905bc8011
...
18ce390cc6
Author | SHA1 | Date | |
---|---|---|---|
18ce390cc6 | |||
e55fa54410 | |||
a80882c27e | |||
c34c81bde7 | |||
a17b721bbb | |||
e78cd1abd9 | |||
1f1c4439c0 | |||
eeaa748c07 | |||
7b95ce1ad0 |
@ -12,6 +12,7 @@ gpgt
|
|||||||
# Add .local/bin to path
|
# Add .local/bin to path
|
||||||
set -gx PATH "$PATH:$HOME/.local/bin:"
|
set -gx PATH "$PATH:$HOME/.local/bin:"
|
||||||
set -gx PATH "$PATH:$HOME/.local/bin/deskutils:"
|
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:"
|
set -gx PATH "$PATH:$HOME/.local/bin/minrss-scripts:"
|
||||||
|
|
||||||
# Disable fish greeting
|
# Disable fish greeting
|
||||||
|
1
src/.config/mpv/input.conf
Normal file
1
src/.config/mpv/input.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
CTRL+p script-message osc-playlist
|
@ -1 +1,2 @@
|
|||||||
osd-status-msg=${playback-time/full} / ${duration} (${percent-pos}%)\nframe: ${estimated-frame-number} / ${estimated-frame-count}
|
osd-status-msg=${playback-time/full} / ${duration} (${percent-pos}%)\nframe: ${estimated-frame-number} / ${estimated-frame-count}
|
||||||
|
input-ipc-server="/tmp/mpv-socket"
|
||||||
|
@ -39,11 +39,12 @@ set sidebar_format = '%B%?F? [%F]?%* %?N?%N/? %?S?%S?'
|
|||||||
set charset = "utf-8"
|
set charset = "utf-8"
|
||||||
|
|
||||||
mailboxes =Inbox
|
mailboxes =Inbox
|
||||||
mailboxes =Archive =Sent =Drafts =Junk =Trash
|
mailboxes =Archive =Sent =Drafts =Junk =Trash =../arc
|
||||||
|
|
||||||
set sendmail="/usr/bin/msmtp -a mail"
|
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 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
|
bind index,pager \CP sidebar-prev
|
||||||
# Ctrl-P – Previous Mailbox
|
# Ctrl-P – Previous Mailbox
|
||||||
bind index,pager \CN sidebar-next
|
bind index,pager \CN sidebar-next
|
||||||
|
@ -21,6 +21,7 @@ c.scrolling.smooth = False
|
|||||||
c.url.default_page = "about:blank"
|
c.url.default_page = "about:blank"
|
||||||
c.url.start_pages = "about:blank"
|
c.url.start_pages = "about:blank"
|
||||||
c.url.searchengines = {"DEFAULT":"https://searx.be/search?q={}"}
|
c.url.searchengines = {"DEFAULT":"https://searx.be/search?q={}"}
|
||||||
|
c.downloads.location.directory = "~/quar/"
|
||||||
|
|
||||||
# Downloads
|
# Downloads
|
||||||
|
|
||||||
|
@ -1,22 +1,83 @@
|
|||||||
# Soundboard setup
|
# Soundboard
|
||||||
# "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}
|
super + {0-9}
|
||||||
unlink ~/med/sb/cur;\
|
if [ ! -h $SB_DIR/cur ]; then \
|
||||||
ln -sr ~/med/sb/{0-9} ~/med/sb/cur;\
|
ln -sr $SB_DIR $SB_DIR/cur;\
|
||||||
rm /tmp/sb-socket*
|
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
|
||||||
|
|
||||||
|
# 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}
|
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}";\
|
snd_id="{0-9}";\
|
||||||
id=$(cat /dev/random | base32 | head -c 5);\
|
id=$(cat /dev/random | base32 | head -c 5);\
|
||||||
socket="/tmp/sb-socket$snd_id-$id";\
|
socket="$SB_DIR/cur/sb-socket$snd_id-$id";\
|
||||||
mpv --input-ipc-server=$socket ~/med/sb/cur/$snd_id*;\
|
mpv --input-ipc-server=$socket $SB_DIR/cur/$snd_id*;\
|
||||||
rm $socket
|
rm -f "$socket"
|
||||||
|
|
||||||
|
# stop specific sound
|
||||||
shift + KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
shift + KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
||||||
snd_id="{0-9}";\
|
snd_id="{0-9}";\
|
||||||
ls /tmp/sb-socket$snd_id-* |\
|
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-msg "stop"
|
||||||
while read -r socket; do \
|
|
||||||
echo {"stop"} | socat - $socket;\
|
# loop specific sound
|
||||||
done
|
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
|
||||||
|
@ -19,11 +19,14 @@ then
|
|||||||
--chown=dogeystamp:sftpr \
|
--chown=dogeystamp:sftpr \
|
||||||
--exclude=med/mus \
|
--exclude=med/mus \
|
||||||
--exclude=med/gv \
|
--exclude=med/gv \
|
||||||
|
--exclude=sb-socket \
|
||||||
|
--exclude=med/sb/cur \
|
||||||
--exclude=dox/dow \
|
--exclude=dox/dow \
|
||||||
--exclude=dox/rss \
|
--exclude=dox/rss \
|
||||||
--exclude=dox/rem \
|
--exclude=dox/rem \
|
||||||
--exclude=dox/proj \
|
--exclude=dox/proj \
|
||||||
--exclude=dox/vms \
|
--exclude=dox/vms \
|
||||||
|
--exclude=dox/mail/disroot \
|
||||||
--exclude=med/pix/hdri \
|
--exclude=med/pix/hdri \
|
||||||
--exclude=med/memes/woof/quar \
|
--exclude=med/memes/woof/quar \
|
||||||
--exclude=BL_proxy \
|
--exclude=BL_proxy \
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
|
|
||||||
# Dunst notification sound script.
|
# Dunst notification sound script.
|
||||||
|
|
||||||
|
if [ "$DUNST_APP_NAME" = "soundboard" ]; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
if pactl list short sinks | grep -q virtual_mic; then
|
if pactl list short sinks | grep -q virtual_mic; then
|
||||||
mpv ~/.local/bin/deskutils/notif.wav --audio-device=pulse/c1_out
|
mpv ~/.local/bin/deskutils/notif.wav --audio-device=pulse/c1_out
|
||||||
else
|
else
|
||||||
|
19
src/.local/bin/deskutils/soundboard/sb-ls.sh
Executable file
19
src/.local/bin/deskutils/soundboard/sb-ls.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/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)")"
|
6
src/.local/bin/deskutils/soundboard/sb-msg
Executable file
6
src/.local/bin/deskutils/soundboard/sb-msg
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/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
|
39
src/.local/bin/deskutils/soundboard/sb-vol
Executable file
39
src/.local/bin/deskutils/soundboard/sb-vol
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/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")"
|
5
src/.local/bin/mpvq
Executable file
5
src/.local/bin/mpvq
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Append link from clipboard to mpv playlist
|
||||||
|
|
||||||
|
path="$(xsel -b)"
|
||||||
|
echo "{ command: [ \"loadfile\", \"$path\", \"append-play\" ] }" | socat - /tmp/mpv-socket
|
@ -4,6 +4,7 @@
|
|||||||
export XDG_CONFIG_HOME="$HOME"/.config
|
export XDG_CONFIG_HOME="$HOME"/.config
|
||||||
export XDG_CACHE_HOME="$HOME"/.cache
|
export XDG_CACHE_HOME="$HOME"/.cache
|
||||||
export XDG_DATA_HOME="$HOME"/.local/share
|
export XDG_DATA_HOME="$HOME"/.local/share
|
||||||
|
export XDG_DOWNLOAD_DIR="$HOME"/quar/
|
||||||
|
|
||||||
# Clean up home directory dotfiles
|
# Clean up home directory dotfiles
|
||||||
|
|
||||||
@ -35,6 +36,8 @@ export BROWSER="qutebrowser"
|
|||||||
export MANPAGER='nvim +Man!'
|
export MANPAGER='nvim +Man!'
|
||||||
export MANWIDTH=999
|
export MANWIDTH=999
|
||||||
|
|
||||||
|
# Soundboard
|
||||||
|
export SB_DIR="$HOME"/med/sb
|
||||||
export SXHKD_SHELL='/bin/sh'
|
export SXHKD_SHELL='/bin/sh'
|
||||||
|
|
||||||
# Variables for passphrase2pgp
|
# Variables for passphrase2pgp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user