Enable and disable notifications during screen casting.
This commit is contained in:
parent
7039857b95
commit
d6c2e72009
8
ansible/roles/sway/files/disable_notifications.bash
Normal file
8
ansible/roles/sway/files/disable_notifications.bash
Normal 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
|
8
ansible/roles/sway/files/enable_notifications.bash
Normal file
8
ansible/roles/sway/files/enable_notifications.bash
Normal 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
|
@ -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
|
||||
|
@ -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"'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user