summaryrefslogtreecommitdiffstats
path: root/roles/tofi/tasks/main.yml
blob: 552745d17f226483b3a3fc8c01ca676fcf7fd208 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
- name: "Ensure tofi is installed"
  become: true
  become_user: "aur_builder"
  kewlfft.aur.aur:
    name: "tofi-git"
    state: "present"
    use: "yay"

- name: "Create config directories"
  become: true
  ansible.builtin.file:
    path: "{{ item }}"
    state: "directory"
    mode: "0755"
  loop:
    - "/etc/xdg/tofi"
    - "{{ ansible_facts['env']['HOME'] }}/.config/tofi"
    - "/usr/local/share/applications"

- name: "Configure system defaults"
  become: true
  ansible.builtin.copy:
    src: "config"
    dest: "/etc/xdg/tofi/config"
    mode: "0644"

- name: "Configure user defaults"
  ansible.builtin.blockinfile:
    path: "{{ ansible_facts['env']['HOME'] }}/.config/tofi/config"
    state: "present"
    prepend_newline: true
    append_newline: true
    marker: "# ==== {mark} ANSIBLE TOFI CONFIG"
    block: |
      # System defaults
      include = /etc/xdg/tofi/config
      # Load Theme
      include = ../hyprtheme/current/tofi.config

- name: "Configure hidden applications"
  become: true
  ansible.builtin.copy:
    dest: "/usr/local/share/applications/{{ item }}.desktop"
    mode: "0644"
    content: |
      [Desktop Entry]
      Hidden=true
  loop:
    - "avahi-discover"
    - "bssh"
    - "bvnc"
    - "gscriptor"
    - "gvim"
    - "qv4l2"
    - "qvidcap"
    - "uuctl"
    - "xgps"
    - "xgpsspeed"