Add .local/bin/fix-loopback
Add .local/bin/niri-event-handler
This commit is contained in:
parent
0d865d0f44
commit
589c4444a0
2 changed files with 19 additions and 0 deletions
3
private_dot_local/bin/executable_fix-loopback
Normal file
3
private_dot_local/bin/executable_fix-loopback
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
sudo modprobe v4l2loopback devices=1 video_nr=2 card_label="OBS Virtual Camera" exclusive_caps=1
|
||||||
|
sudo chmod 666 /dev/video*
|
||||||
|
sudo usermod -aG video $USER
|
||||||
16
private_dot_local/bin/executable_niri-event-handler
Normal file
16
private_dot_local/bin/executable_niri-event-handler
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
niri msg --json event-stream | while read -r event; do
|
||||||
|
event_type=$(echo "$event" | jq -r 'keys[0]')
|
||||||
|
if [[ "$event_type" == "OverviewOpenedOrClosed" ]]; then
|
||||||
|
is_open=$(echo "$event" | jq -r '.OverviewOpenedOrClosed.is_open')
|
||||||
|
|
||||||
|
case "$is_open" in
|
||||||
|
"true")
|
||||||
|
pkill -SIGUSR1 waybar
|
||||||
|
;;
|
||||||
|
"false")
|
||||||
|
pkill -SIGUSR2 waybar
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
Loading…
Add table
Add a link
Reference in a new issue