mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-07-22 16:21:09 +02:00
Optimized desk-copyq draft and implemented server to use in gnome
This commit is contained in:
parent
be675d5f9e
commit
e84c7e5612
@ -1,4 +1,4 @@
|
|||||||
# CopyQ Role for Ansible
|
# CopyQ
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
This role installs the CopyQ clipboard manager on Pacman-based systems (e.g. Arch Linux) and ensures it is started automatically for the current user.
|
This role installs the CopyQ clipboard manager on Pacman-based systems (e.g. Arch Linux) and ensures it is started automatically for the current user.
|
||||||
@ -8,20 +8,6 @@ This role installs the CopyQ clipboard manager on Pacman-based systems (e.g. Arc
|
|||||||
- Pacman package manager (Arch Linux or derivative)
|
- Pacman package manager (Arch Linux or derivative)
|
||||||
- X11/Wayland desktop environment (for GUI)
|
- X11/Wayland desktop environment (for GUI)
|
||||||
|
|
||||||
## Role Variables
|
|
||||||
No additional role variables are required.
|
|
||||||
|
|
||||||
## Dependencies
|
|
||||||
No external dependencies.
|
|
||||||
|
|
||||||
## Example Playbook
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- hosts: all
|
|
||||||
roles:
|
|
||||||
- desk-copyq
|
|
||||||
```
|
|
||||||
|
|
||||||
## Further Resources
|
## Further Resources
|
||||||
|
|
||||||
- [CopyQ official site](https://hluk.github.io/CopyQ/)
|
- [CopyQ official site](https://hluk.github.io/CopyQ/)
|
||||||
|
2
roles/desk-copyq/config/main.yml
Normal file
2
roles/desk-copyq/config/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Set to true to install and start the CopyQ server as a systemd user service
|
||||||
|
server_enabled: true
|
@ -1,7 +1,6 @@
|
|||||||
- name: Install CopyQ clipboard manager
|
- name: Install CopyQ clipboard manager
|
||||||
community.general.pacman:
|
community.general.pacman:
|
||||||
name:
|
name: copyq
|
||||||
- copyq
|
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Ensure autostart directory exists
|
- name: Ensure autostart directory exists
|
||||||
@ -25,3 +24,7 @@
|
|||||||
Comment=Advanced clipboard manager with searchable and editable history
|
Comment=Advanced clipboard manager with searchable and editable history
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
become: false
|
become: false
|
||||||
|
|
||||||
|
- name: Include CopyQ server systemd‑user service setup
|
||||||
|
import_tasks: server.yml
|
||||||
|
when: copyq_server_enabled | bool
|
||||||
|
36
roles/desk-copyq/tasks/server.yml
Normal file
36
roles/desk-copyq/tasks/server.yml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
- name: Ensure systemd user unit directory exists
|
||||||
|
file:
|
||||||
|
path: "{{ ansible_env.HOME }}/.config/systemd/user"
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
become: false
|
||||||
|
|
||||||
|
- name: Install CopyQ user service unit
|
||||||
|
copy:
|
||||||
|
dest: "{{ ansible_env.HOME }}/.config/systemd/user/copyq.service"
|
||||||
|
content: |
|
||||||
|
[Unit]
|
||||||
|
Description=CopyQ Clipboard Manager Server
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/copyq --start-server
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
||||||
|
mode: '0644'
|
||||||
|
become: false
|
||||||
|
|
||||||
|
- name: Reload systemd user daemon
|
||||||
|
systemd:
|
||||||
|
user: true
|
||||||
|
daemon_reload: yes
|
||||||
|
become: false
|
||||||
|
|
||||||
|
- name: Enable and start CopyQ user service
|
||||||
|
systemd:
|
||||||
|
name: copyq.service
|
||||||
|
user: true
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
|
become: false
|
@ -1 +1,2 @@
|
|||||||
application_id: desk-copyq
|
application_id: desk-copyq
|
||||||
|
copyq_server_enabled: "{{ applications | get_app_conf(application_id, 'server_enabled') }}"
|
Loading…
x
Reference in New Issue
Block a user