main.ymlΒΆ

---
- name: βœ… Ensure autostart directory exists
  file:
    path: "{{ ansible_facts['env']['HOME'] }}/.config/autostart"
    state: directory
    mode: "0755"
  become: false

- name: βž• Add CopyQ to user autostart
  copy:
    dest: "{{ ansible_facts['env']['HOME'] }}/.config/autostart/copyq.desktop"
    content: |
      [Desktop Entry]
      Type=Application
      Exec=copyq
      Hidden=false
      NoDisplay=false
      X-GNOME-Autostart-enabled=true
      Name=CopyQ Clipboard Manager
      Comment=Advanced clipboard manager with searchable and editable history
    mode: "0644"
  become: false

- name: πŸ“‚ Include CopyQ server systemd‑user service setup
  import_tasks: server.yml
  when: copyq_server_enabled | bool