From 828a6cd2fc3f8a0769215241a3c68d07f954ab43 Mon Sep 17 00:00:00 2001
From: Yaroslav <contact@yaroslavps.com>
Date: Tue, 28 Jul 2020 21:49:44 +0300
Subject: webcam float: correctly check for available camera devices

---
 dotfiles/.local/bin/camtoggle | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'dotfiles/.local/bin/camtoggle')

diff --git a/dotfiles/.local/bin/camtoggle b/dotfiles/.local/bin/camtoggle
index 8f3de0e..00fd201 100755
--- a/dotfiles/.local/bin/camtoggle
+++ b/dotfiles/.local/bin/camtoggle
@@ -3,7 +3,7 @@
 # I have two cameras on my laptop and the first one is an IR camera (video0)
 # If a second camera is present, use the second one
 camera="/dev/video0"
-[ -f /dev/video2 ] && camera="/dev/video2"
+[ -e /dev/video2 ] && camera="/dev/video2"
 
 pkill -f /dev/video || mpv \
   --gpu-context=wayland \
-- 
cgit v1.2.3