commit e4083164637a0ec2a119a764e665f3683b7c3ae9
parent cd0df10a83f5d07052f2facd19389012e7439a19
Author: Bakar Chargeishvili <bakar@bcharge.de>
Date: Mon, 18 Dec 2023 12:36:06 +0100
Add batinfo and webcam
Diffstat:
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/batinfo b/batinfo
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+rem=$(sysctl hw.acpi.battery.life | awk {'print $2'})
+status=$(sysctl hw.acpi.battery.state | awk {'print $2'})
+time=$(acpiconf -i 0 | grep time | awk {'print $3'})
+
+if [ "$status" = "2" ]; then
+ echo "$rem% (charging)"
+fi
+
+if [ "$status" = "1" ]; then
+ echo "$rem% ($time hrs)"
+fi
diff --git a/webcam b/webcam
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+mpv av://v4l2:/dev/video0 --untimed --no-demuxer-thread --demuxer-lavf-format=video4linux2 --demuxer-lavf-o-set=input_format=mjpeg --no-osc --no-input-default-bindings