Skip to content

Instantly share code, notes, and snippets.

@john-e
Created December 4, 2015 17:30
Show Gist options
  • Save john-e/c020bff4a7ddecd49a02 to your computer and use it in GitHub Desktop.
Save john-e/c020bff4a7ddecd49a02 to your computer and use it in GitHub Desktop.
script to enable/disable webcam, can be attached to keyboard shortcut
#!/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