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/deskutils/soundboard:"
|
||||||
set -gx PATH "$PATH:$HOME/.local/bin/minrss-scripts:"
|
set -gx PATH "$PATH:$HOME/.local/bin/minrss-scripts:"
|
||||||
|
|
||||||
|
set -gx PATH "$PATH:$XDG_DATA_HOME/npm/bin"
|
||||||
|
|
||||||
# Disable fish greeting
|
# Disable fish greeting
|
||||||
set fish_greeting ""
|
set fish_greeting ""
|
||||||
|
|
||||||
|
@ -22,10 +22,6 @@ super + grave
|
|||||||
ln -sr $SB_DIR $SB_DIR/cur;\
|
ln -sr $SB_DIR $SB_DIR/cur;\
|
||||||
sb-ls.sh
|
sb-ls.sh
|
||||||
|
|
||||||
# list currently playing + volume
|
|
||||||
KP_Enter
|
|
||||||
find $SB_DIR/ -name "sb-socket*" | sb-vol
|
|
||||||
|
|
||||||
# list current directory contents
|
# list current directory contents
|
||||||
# super + shift + `
|
# super + shift + `
|
||||||
super + asciitilde
|
super + asciitilde
|
||||||
@ -33,25 +29,27 @@ super + asciitilde
|
|||||||
|
|
||||||
# start sound
|
# 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 \
|
sb-play "{0-9}"
|
||||||
notify-send -u critical -a "soundboard" '$SB_DIR is unset!';\
|
# use a0, a1, a2 instead of 10, 11, 12
|
||||||
exit 1;\
|
# prevents globbing issues
|
||||||
fi;\
|
KP_{Divide,Multiply,Delete}
|
||||||
snd_id="{0-9}";\
|
sb-play "a{0-2}"
|
||||||
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"
|
|
||||||
|
|
||||||
# stop specific sound
|
# 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 $SB_DIR/cur/sb-socket$snd_id-* | sb-msg "stop"
|
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
|
# loop specific sound
|
||||||
ctrl + shift + KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
ctrl + shift + KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
||||||
snd_id="{0-9}";\
|
snd_id="{0-9}";\
|
||||||
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-msg "set loop inf"
|
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
|
# reduce volume of current dir
|
||||||
ctrl + shift + KP_Subtract
|
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}";\
|
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-msg "add volume -10";\
|
||||||
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-vol
|
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
|
# increase volume of specific sound
|
||||||
ctrl + KP_Add; KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
ctrl + KP_Add; KP_{Insert,End,Down,Next,Left,Begin,Right,Home,Up,Prior}
|
||||||
snd_id="{0-9}";\
|
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-msg "add volume +10";\
|
||||||
ls $SB_DIR/cur/sb-socket$snd_id-* | sb-vol
|
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
|
# stop all sounds
|
||||||
shift + KP_Delete
|
KP_Enter
|
||||||
find $SB_DIR/ -name "sb-socket*" | sb-msg "stop";\
|
find $SB_DIR/ -name "sb-socket*" | sb-msg "stop";\
|
||||||
find $SB_DIR/ -name "sb-socket*" | xargs rm
|
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
|
export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo
|
||||||
# go
|
# go
|
||||||
export GOPATH="$HOME"/.local/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
|
# Set default programs
|
||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user