- name: Install packages
  package:
    name:
      - xeyes
      - xauth # for ssh x11 forwarding
      # - wev # For debugging input
      - wlogout # Log out prompt
      - xhost # to launch gparted with root permissions
      - wlvncc
      - wl-screenrec # screen recording
    state: present

- name: Install service configuration
  copy:
    src: "files/{{ item }}_rc.conf"
    dest: "/etc/rc.conf.d/{{ item }}"
    mode: 0644
    owner: root
    group: wheel
  loop:
    - seatd
    - dbus

- name: Install scripts
  copy:
    src: "files/{{ item.src }}"
    dest: "{{ item.dest }}"
    mode: 0755
    owner: root
    group: wheel
  loop:
    - src: launch_sway_freebsd.bash
      dest: /usr/local/bin/launch_sway
