Enable and disable notifications during screen casting.

This commit is contained in:
Tom Alexander 2022-11-29 01:48:42 -05:00
parent 7039857b95
commit d6c2e72009
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
4 changed files with 36 additions and 7 deletions

View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
#
# Disable displaying notifications. This is useful for video conference screen sharing.
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
makoctl set-mode do-not-disturb

View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
#
# Allow mako to show notifications again.
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
makoctl set-mode default

View File

@ -1,7 +1,7 @@
# [screencast]
# output_name=HDMI-A-1
# max_fps=30
# exec_before=disable_notifications.sh
# exec_after=enable_notifications.sh
# chooser_type=simple
# chooser_cmd=slurp -f %o -or
[screencast]
#output_name=HDMI-A-1
#max_fps=30
exec_before=/usr/local/bin/disable_notifications
exec_after=/usr/local/bin/enable_notifications
chooser_type=simple
chooser_cmd=slurp -f %o -or

View File

@ -1,3 +1,16 @@
- name: Install scripts
copy:
src: "files/{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0755
owner: root
group: wheel
loop:
- src: enable_notifications.bash
dest: /usr/local/bin/enable_notifications
- src: disable_notifications.bash
dest: /usr/local/bin/disable_notifications
- import_tasks: tasks/freebsd.yaml
when: 'os_flavor == "freebsd"'