Add polybar to dwm role

This commit is contained in:
Przemek Grondek 2023-08-05 00:49:37 +02:00
parent 0f8e61efa4
commit af6beb0559
6 changed files with 90 additions and 15 deletions

View File

@ -1,19 +1,19 @@
---
- hosts: localhost
roles:
- dwm
- ubuntu
- firefox
- docker
- dotfiles
- java
- jetbrains
- signal
- virtual
- lutris
- ego
- laptop
- prusa-slicer
- intellij
# - dwm
# - ubuntu
# - firefox
# - docker
# - dotfiles
# - java
# - jetbrains
# - signal
# - virtual
# - lutris
# - ego
# - laptop
# - prusa-slicer
# - intellij
- chromium
- terraform

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -x
if type "xrandr"; then
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
MONITOR=$m polybar --reload dwm &
done
else
polybar --reload dwm &
fi

View File

@ -13,6 +13,7 @@
- libxinerama-dev
- libxcb-res0-dev
- libx11-xcb-dev
- libyajl-dev
- name: create src dir
file:

View File

@ -5,4 +5,4 @@
- import_tasks: st-term.yml
- import_tasks: dwmstatus.yml
- import_tasks: polybar.yml

View File

@ -0,0 +1,61 @@
---
- name: install required packages for polybar
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
- libjsoncpp-dev
- name: create src dir
file:
path: "{{ ansible_user_dir }}/src"
- name: checkout polybar
git:
repo: "{{ polybar.repo }}"
dest: "{{ ansible_user_dir }}/src/polybar"
version: "{{ looking_glass.branch }}"
clone: yes
update: yes
- name: create directory for build
file:
state: directory
path: "{{ ansible_user_dir }}/src/polybar/build"
- name: run cmake
shell:
cmd: "cmake ../"
chdir: "{{ ansible_user_dir }}/src/polybar/build"
- name: build
make:
chdir: "{{ ansible_user_dir }}/src/polybar/build"
- name: install
become: yes
make:
chdir: "{{ ansible_user_dir }}/src/polybar/build"
target: install
- name: copy run script
become: yes
copy:
src: usr/local/bin/launch-polybar
dest: /usr/local/bin/launch-polybar
mode: '0755'

View File

@ -5,3 +5,5 @@ st:
repo: https://github.com/pgrondek/stterm.git
dwmstatus:
repo: https://git.grondek.pl/pgrondek/dwmstatus.git
polybar:
repo: https://github.com/mihirlad55/polybar-dwm-module.git