ansible-desktop/roles/dwm/tasks/polybar.yml
2023-08-07 10:39:18 +02:00

65 lines
1.4 KiB
YAML

---
- name: "polybar: install required packages"
become: yes
apt:
update_cache: yes
pkg:
- git
- make
- cmake
- libcairo2-dev
- libcurl4-openssl-dev
- libmpdclient-dev
- libiw-dev
- libxcb-composite0-dev
- libxcb-randr0-dev
- xcb-proto
- libxcb-icccm4-dev
- libxcb-ewmh-dev
- libxcb-util-dev
- libxcb-image0-dev
- python3-xcbgen
- python3-sphinx
- libjsoncpp-dev
- libuv1-dev
- name: "polybar: create src dir"
file:
path: "{{ ansible_user_dir }}/src"
- name: "polybar: checkout"
git:
repo: "{{ polybar.repo }}"
dest: "{{ ansible_user_dir }}/src/polybar"
clone: yes
update: yes
- name: "polybar: create directory for build"
file:
state: directory
path: "{{ ansible_user_dir }}/src/polybar/build"
- name: "polybar: run cmake"
shell:
cmd: "cmake ../"
chdir: "{{ ansible_user_dir }}/src/polybar/build"
- name: "polybar: build"
make:
chdir: "{{ ansible_user_dir }}/src/polybar/build"
params:
NUM_THREADS: "{{ ansible_processor_vcpus }}"
- name: "polybar: install"
become: yes
make:
chdir: "{{ ansible_user_dir }}/src/polybar/build"
target: install
- name: "polybar: copy run script"
become: yes
copy:
src: usr/local/bin/launch-polybar
dest: /usr/local/bin/launch-polybar
mode: '0755'