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:
|
|
|
|
- cmake
|
|
|
|
- libcairo2-dev
|
|
|
|
- libcurl4-openssl-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-07 08:39:18 +00:00
|
|
|
- libuv1-dev
|
2023-08-26 21:57:26 +00:00
|
|
|
when: ansible_distribution == "Ubuntu"
|
|
|
|
|
|
|
|
- name: "polybar: install required packages"
|
|
|
|
become: yes
|
|
|
|
community.general.pacman:
|
|
|
|
name:
|
|
|
|
- cmake
|
|
|
|
- cairo
|
|
|
|
- dbus-python
|
|
|
|
- libcurl-compat
|
|
|
|
- libxcb
|
|
|
|
- xcb-proto
|
|
|
|
- xcb-util-cursor
|
|
|
|
- xcb-util-image
|
|
|
|
- xcb-util-wm
|
|
|
|
- python-sphinx
|
|
|
|
- jsoncpp
|
|
|
|
- libuv
|
|
|
|
when: ansible_distribution == "Archlinux"
|
2023-08-04 22:49:37 +00:00
|
|
|
|
2023-08-06 09:00:43 +00:00
|
|
|
- name: "polybar: create src dir"
|
2023-08-04 22:49:37 +00:00
|
|
|
file:
|
2023-08-08 21:09:36 +00:00
|
|
|
path: "{{ desktop_src_dir }}"
|
2023-08-04 22:49:37 +00:00
|
|
|
|
2023-08-06 09:00:43 +00:00
|
|
|
- name: "polybar: checkout"
|
2023-08-04 22:49:37 +00:00
|
|
|
git:
|
|
|
|
repo: "{{ polybar.repo }}"
|
2023-08-08 21:09:36 +00:00
|
|
|
dest: "{{ desktop_src_dir }}/polybar"
|
2023-08-04 22:49:37 +00:00
|
|
|
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
|
2023-08-08 21:09:36 +00:00
|
|
|
path: "{{ desktop_src_dir }}/polybar/build"
|
2023-08-04 22:49:37 +00:00
|
|
|
|
2023-08-06 09:00:43 +00:00
|
|
|
- name: "polybar: run cmake"
|
2023-08-04 22:49:37 +00:00
|
|
|
shell:
|
|
|
|
cmd: "cmake ../"
|
2023-08-08 21:09:36 +00:00
|
|
|
chdir: "{{ desktop_src_dir }}/polybar/build"
|
2023-08-04 22:49:37 +00:00
|
|
|
|
2023-08-06 09:00:43 +00:00
|
|
|
- name: "polybar: build"
|
2023-08-04 22:49:37 +00:00
|
|
|
make:
|
2023-08-08 21:09:36 +00:00
|
|
|
chdir: "{{ desktop_src_dir }}/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:
|
2023-08-08 21:09:36 +00:00
|
|
|
chdir: "{{ desktop_src_dir }}/polybar/build"
|
2023-08-04 22:49:37 +00:00
|
|
|
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'
|