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

82 lines
1.7 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:
- 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
2023-10-23 22:14:11 +00:00
- alsa-lib
2023-08-26 21:57:26 +00:00
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:
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 }}"
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
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 ../"
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:
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:
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'