Compare commits

..

No commits in common. "48302bf947760f3eee61ae61490f288fd364665a" and "64ccfcb88b40f3a3117b8be9b056f4102300ff29" have entirely different histories.

7 changed files with 38 additions and 123 deletions

1
.gitignore vendored
View file

@ -1 +0,0 @@
node_modules

View file

@ -1,11 +0,0 @@
[Unit]
Description=Disable Keyboard and Mouse Input
After=graphical-session.target
[Service]
Type=oneshot
ExecStartPre=/bin/sleep 60
ExecStart=%h/disable_input.sh
[Install]
WantedBy=default.target

View file

@ -1,8 +0,0 @@
#!/bin/bash
echo "Disabling input devices"
for id in $(xinput --list | grep -Eo 'id=[0-9]+' | cut -d= -f2); do
xinput --disable "$id"
echo "Disabled device ID $id"
done
echo "All devices disabled."

View file

@ -4,8 +4,7 @@
.subject,
.atlaskit-portal-container,
.atlaskit-portal,
#notifications-container,
.stage-participant-label {
#notifications-container {
display: none !important;
}

View file

@ -1,12 +0,0 @@
[Unit]
Description=Parsifal Player
After=lightdm.service
[Service]
ExecStartPre=/bin/sh -c 'for i in {1..10}; do xset q && break || sleep 2; done'
ExecStart=/usr/bin/mpv --fs --no-osc --loop-file=inf %h/main.mov
Restart=always
Environment=DISPLAY=:0
[Install]
WantedBy=default.target

View file

@ -57,32 +57,48 @@
owner: "{{ ansible_user }}"
mode: "0755"
- name: Symlink all service files
- name: Symlink parsifal.service to systemd user directory
file:
src: "/home/{{ ansible_user }}/parsifal/{{ item }}"
dest: "/home/{{ ansible_user }}/.config/systemd/user/{{ item }}"
src: "/home/{{ ansible_user }}/parsifal/parsifal.service"
dest: "/home/{{ ansible_user }}/.config/systemd/user/parsifal.service"
state: link
loop:
- parsifal.service
- unclutter.service
- x11vnc.service
- name: Reload systemd user service
- name: Symlink unclutter.service to systemd user directory
file:
src: "/home/{{ ansible_user }}/parsifal/unclutter.service"
dest: "/home/{{ ansible_user }}/.config/systemd/user/unclutter.service"
state: link
- name: Symlink x11vnc.service to systemd user directory
file:
src: "/home/{{ ansible_user }}/parsifal/x11vnc.service"
dest: "/home/{{ ansible_user }}/.config/systemd/user/x11vnc.service"
state: link
- name: Reload systemd for the current user
command: systemctl --user daemon-reload
become: yes
become_user: "{{ ansible_user }}"
systemd:
daemon_reload: yes
scope: user
environment:
XDG_RUNTIME_DIR: "/run/user/{{ ansible_user_uid }}" # Needed for running systemctl --user
- name: Enable and start all services
- name: Enable and start the Parsifal service
command: systemctl --user enable --now parsifal
become: yes
become_user: "{{ ansible_user }}"
systemd:
name: "{{ item }}"
enabled: yes
state: started
scope: user
loop:
- parsifal
- unclutter
- x11vnc
environment:
XDG_RUNTIME_DIR: "/run/user/{{ ansible_user_uid }}" # Needed for running systemctl --user
- name: Enable and start the Unclutter service
command: systemctl --user enable --now unclutter
become: yes
become_user: "{{ ansible_user }}"
environment:
XDG_RUNTIME_DIR: "/run/user/{{ ansible_user_uid }}" # Needed for running systemctl --user
- name: Enable and start the x11vnc service
command: systemctl --user enable --now x11vnc
become: yes
become_user: "{{ ansible_user }}"
environment:
XDG_RUNTIME_DIR: "/run/user/{{ ansible_user_uid }}" # Needed for running systemctl --user

View file

@ -1,68 +0,0 @@
---
- hosts: players
become: yes
tasks:
- name: Install mpv, unclutter
apt:
name: "{{ item }}"
state: present
update_cache: yes
loop:
- mpv
- unclutter
- name: Copy disable-input script
copy:
src: disable_input.sh
dest: "/home/{{ ansible_user }}/disable_input.sh"
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
mode: "0755"
- name: Ensure systemd user directory exists
file:
path: "/home/{{ ansible_user }}/.config/systemd/user"
state: directory
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
mode: "0755"
- name: Copy all service files
copy:
src: "{{ item }}"
dest: "/home/{{ ansible_user }}/.config/systemd/user/{{ item }}"
owner: "{{ ansible_user }}"
group: "{{ ansible_user }}"
mode: "0644"
loop:
- parsifal-player.service
- disable-input.service
- unclutter.service
- name: Reload systemd user service
become: yes
become_user: "{{ ansible_user }}"
systemd:
daemon_reload: yes
scope: user
- name: Enable input disable service
become: yes
become_user: "{{ ansible_user }}"
systemd:
name: disable-input
enabled: yes
scope: user
- name: Enable and start all services
become: yes
become_user: "{{ ansible_user }}"
systemd:
name: "{{ item }}"
enabled: yes
state: started
scope: user
loop:
- parsifal-player
- unclutter