Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/bin/sh -ux | |
# This is a small script to setup the PulseAudio equalizer as a desktop | |
# application that runs just when the 'qpaeq' GUI is open. | |
# This is free and unencumbered software released into the public domain. | |
# | |
# Anyone is free to copy, modify, publish, use, compile, sell, or distribute | |
# this software, either in source code form or as a compiled binary, for any | |
# purpose, commercial or non-commercial, and by any means. |
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
function man { | |
local CMD=${@: -1} | |
# Strangely, 'whatis' and even 'man -f' may fail to find the command. | |
if whatis $CMD &>/dev/null || [[ $(info -w $CMD) == '*manpages*' ]]; then | |
command man "$@" | |
elif info -w &>/dev/null; then | |
info "$@" | |
else | |
for HELP in --help -h -help --usage; do | |
if $CMD $HELP &>/dev/null; then |
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
function which { | |
local CMD=$1; | |
if alias $1 &>/dev/null; then | |
CMD=$(alias $1 | sed "s/^alias $1='\([^' ]*\).*$/\1/"); | |
if [[ "$CMD" != $1 ]]; then | |
type $1; | |
which "$CMD"; # recursive call for nested aliases | |
return; | |
fi; | |
fi; |