Created
December 4, 2015 17:30
-
-
Save john-e/c020bff4a7ddecd49a02 to your computer and use it in GitHub Desktop.
script to enable/disable webcam, can be attached to keyboard shortcut
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 | |
# disable/enable integrated webcam | |
# working for Ubuntu 14.04 on Dell 3000/Lenovo G50-80 | |
# @author Engit | |
status="$(lsmod | grep uvcvideo)" | |
message='' | |
if [ -z "$status" ];then | |
modprobe uvcvideo | |
message="Enabled" | |
else | |
modprobe -r uvcvideo | |
message="Disabled" | |
fi | |
killall notify-osd | |
notify-send -u critical -t 50 "Webcam" $message | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment