Skip to content

Instantly share code, notes, and snippets.

@bboa

bboa/rc.xml Secret

Last active August 16, 2016 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bboa/d9a144bc7736c5ba5ed74d4fa94aa5cc to your computer and use it in GitHub Desktop.
Save bboa/d9a144bc7736c5ba5ed74d4fa94aa5cc to your computer and use it in GitHub Desktop.
Openbox AudioNotes hotkey
<keybind key="W-n">
<action name="Execute">
<command>sh -c &quot;DIR=`xdg-user-dir MUSIC`; if [ -z $DIR ]; then DIR=~/AudioNotes; else DIR=\&quot;$DIR/AudioNotes\&quot;; fi; NOW=`date +&#37;F_&#37;T`; if pgrep arecord; then pkill arecord; notify-send -i media-record Аудиозаметка 'Запись завершена'; sleep 2 &amp;&amp; pkill notify-osd &amp; exit; fi; [ ! -d \&quot;$DIR\&quot; ] &amp;&amp; mkdir -p \&quot;$DIR\&quot;; amixer -c 0 set 'Mic Boost',0 3; arecord -f dat -d 600 -D hw:0,0 | lame --preset voice - \&quot;$DIR/$NOW.mp3\&quot; &amp; notify-send -i media-record Аудиозаметка $NOW; sleep 2 &amp;&amp; pkill notify-osd &amp;&quot;</command>
</action>
</keybind>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment