-
-
Save bboa/d9a144bc7736c5ba5ed74d4fa94aa5cc to your computer and use it in GitHub Desktop.
Openbox AudioNotes hotkey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<keybind key="W-n"> | |
<action name="Execute"> | |
<command>sh -c "DIR=`xdg-user-dir MUSIC`; if [ -z $DIR ]; then DIR=~/AudioNotes; else DIR=\"$DIR/AudioNotes\"; fi; NOW=`date +%F_%T`; if pgrep arecord; then pkill arecord; notify-send -i media-record Аудиозаметка 'Запись завершена'; sleep 2 && pkill notify-osd & exit; fi; [ ! -d \"$DIR\" ] && mkdir -p \"$DIR\"; amixer -c 0 set 'Mic Boost',0 3; arecord -f dat -d 600 -D hw:0,0 | lame --preset voice - \"$DIR/$NOW.mp3\" & notify-send -i media-record Аудиозаметка $NOW; sleep 2 && pkill notify-osd &"</command> | |
</action> | |
</keybind> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment