---
- name: Install rofi
  aur:
    name: rofi
    skip_installed: yes

- name: Create rofi conf dir
  file:
    path: ~/.config/rofi
    state: directory

- name: Copy powermenu script
  template:
    src: powermenu.j2
    dest: ~/.config/rofi/powermenu.sh
    mode: 0755

- name: Create .Xresources.d dir
  file:
    path: ~/.Xresources.d
    state: directory

- name: Copy Xresources.d rofi file
  copy:
    src: rofi
    dest: ~/.Xresources.d/rofi

- name: Init rofi in Xresources
  lineinfile:
    path: ~/.Xresources
    create: yes
    state: present
    line: '#include ".Xresources.d/rofi"'
