Re: [STUMP] Drop the generation of stumpwm.texi

David Bjergaard <[email protected]>
Newsgroups gmane.comp.window-managers.stumpwm.devel
Message-ID <[email protected]>
"Diogo F. S. Ramos" <[email protected]> writes:

>> Actually this would be very useful to me, I currently use a very hackish
>> way of controlling pulse audio's volume with these in my stumpwmrc:
>> (defcommand vol-up () ()
>>   "Increase the volume from the shell"
>>   (run-shell-command 
>>    "pacmd set-sink-volume 0 $(printf '0x%x' $(( $(pacmd dump|grep set-sink-volume|cut -f3 -d' ') + 0xf00)) ) &> /dev/null"))
>> (defcommand vol-down () () 
>>   "Decrease the volume  from the shell"
>>   (run-shell-command 
>>    "pacmd set-sink-volume 0 $(printf '0x%x' $(( $(pacmd dump|grep set-sink-volume|cut -f3 -d' ') - 0xf00)) ) &> /dev/null"))
>
> Nice.
>
>> A more lispy solution would be really awesome!
>
> It is "more lispy" just because it uses more lisp expressions.  In the
> end, it calls `pacmd' and parses its output, just like yours.
This is still an improvement over my kludge.  I can't even really
mentally parse what my code does anymore... I just know that when I
press the vol-up key, the volume goes up :).

    Dave
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.