Compare commits
3 Commits
db1c355282
...
8518a61bdb
Author | SHA1 | Date | |
---|---|---|---|
8518a61bdb | |||
630db7f6c8 | |||
9fa0d6c1c0 |
@ -15,6 +15,8 @@ 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:$XDG_DATA_HOME/npm/bin"
|
||||
|
||||
# Disable fish greeting
|
||||
set fish_greeting ""
|
||||
|
||||
|
@ -22,10 +22,6 @@ super + grave
|
||||
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
|
||||
@ -33,25 +29,27 @@ super + asciitilde
|
||||
|
||||
# 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 --no-resume-playback --input-ipc-server=$socket $SB_DIR/cur/$snd_id*;\
|
||||
rm -f "$socket"
|
||||
sb-play "{0-9}"
|
||||
# use a0, a1, a2 instead of 10, 11, 12
|
||||
# prevents globbing issues
|
||||
KP_{Divide,Multiply,Delete}
|
||||
sb-play "a{0-2}"
|
||||
|
||||
# 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"
|
||||
shift + KP_{Divide,Multiply,Delete}
|
||||
snd_id="a{0-2}";\
|
||||
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"
|
||||
ctrl + shift + KP_{Divide,Multiply,Delete}
|
||||
snd_id="a{0-9}";\
|
||||
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-msg "set loop inf"
|
||||
|
||||
# reduce volume of current dir
|
||||
ctrl + shift + KP_Subtract
|
||||
@ -70,14 +68,22 @@ 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
|
||||
ctrl + KP_Subtract; KP_{Divide,Multiply,Delete}
|
||||
snd_id="a{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
|
||||
ctrl + KP_Add; KP_{Divide,Multiply,Delete}
|
||||
snd_id="a{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
|
||||
KP_Enter
|
||||
find $SB_DIR/ -name "sb-socket*" | sb-msg "stop";\
|
||||
find $SB_DIR/ -name "sb-socket*" | xargs rm
|
||||
|
11
src/.local/bin/deskutils/soundboard/sb-play
Executable file
11
src/.local/bin/deskutils/soundboard/sb-play
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$SB_DIR" ]; then
|
||||
notify-send -u critical -a "soundboard" '$SB_DIR is unset!';
|
||||
exit 1;
|
||||
fi;
|
||||
snd_id="$1"
|
||||
id=$(cat /dev/random | base32 | head -c 5);\
|
||||
socket="$SB_DIR/cur/sb-socket$snd_id-$id";\
|
||||
mpv --no-resume-playback --input-ipc-server=$socket $SB_DIR/cur/$snd_id*;\
|
||||
rm -f "$socket"
|
@ -28,6 +28,10 @@ export TERMINFO="$XDG_DATA_HOME"/terminfo
|
||||
export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo
|
||||
# go
|
||||
export GOPATH="$HOME"/.local/go
|
||||
# npm
|
||||
export npm_config_userconfig=$XDG_CONFIG_HOME/npm/config
|
||||
export npm_config_cache=$XDG_CACHE_HOME/npm
|
||||
export npm_config_prefix=$XDG_DATA_HOME/npm
|
||||
|
||||
# Set default programs
|
||||
export EDITOR="nvim"
|
||||
|
Loading…
x
Reference in New Issue
Block a user