Created
October 18, 2012 02:55
-
-
Save lichray/3909622 to your computer and use it in GitHub Desktop.
A tcsh alias to control Kindle on FreeBSD
This file contains hidden or 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
# usage: kindle eject|start | |
# The 'start' command works for Kindle, but I saw an error message. | |
# However, I'm not silencing it here. | |
alias kindle 'camcontrol devlist | grep Kindle |'\ | |
'sed -nE '\''s/^.*(pass[[:digit:]]+).*$/\1/p'\'' |'\ | |
'xargs -J% camcontrol \!:1 % -E' | |
# Any brief command of camcontrol(8) is supported actually; 'eject' | |
# and 'start' are enough. | |
complete kindle 'p/1/(eject start)/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment