ansible-desktop/roles/dwm/tasks/polybar.yml

64 lines
1.3 KiB
YAML
Raw Normal View History

2023-08-04 22:49:37 +00:00
---
2023-08-06 09:00:43 +00:00
- name: "polybar: install required packages"
2023-08-04 22:49:37 +00:00
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
2023-08-06 09:00:43 +00:00
- python3-sphinx
2023-08-04 22:49:37 +00:00
- libjsoncpp-dev
2023-08-06 09:00:43 +00:00
- name: "polybar: create src dir"
2023-08-04 22:49:37 +00:00
file:
path: "{{ ansible_user_dir }}/src"
2023-08-06 09:00:43 +00:00
- name: "polybar: checkout"
2023-08-04 22:49:37 +00:00
git:
repo: "{{ polybar.repo }}"
dest: "{{ ansible_user_dir }}/src/polybar"
clone: yes
update: yes
2023-08-06 09:00:43 +00:00
- name: "polybar: create directory for build"
2023-08-04 22:49:37 +00:00
file:
state: directory
path: "{{ ansible_user_dir }}/src/polybar/build"
2023-08-06 09:00:43 +00:00
- name: "polybar: run cmake"
2023-08-04 22:49:37 +00:00
shell:
cmd: "cmake ../"
chdir: "{{ ansible_user_dir }}/src/polybar/build"
2023-08-06 09:00:43 +00:00
- name: "polybar: build"
2023-08-04 22:49:37 +00:00
make:
chdir: "{{ ansible_user_dir }}/src/polybar/build"
2023-08-06 09:00:43 +00:00
params:
NUM_THREADS: "{{ ansible_processor_vcpus }}"
2023-08-04 22:49:37 +00:00
2023-08-06 09:00:43 +00:00
- name: "polybar: install"
2023-08-04 22:49:37 +00:00
become: yes
make:
chdir: "{{ ansible_user_dir }}/src/polybar/build"
target: install
2023-08-06 09:00:43 +00:00
- name: "polybar: copy run script"
2023-08-04 22:49:37 +00:00
become: yes
copy:
src: usr/local/bin/launch-polybar
dest: /usr/local/bin/launch-polybar
mode: '0755'