Add polybar to dwm role
This commit is contained in:
parent
0f8e61efa4
commit
af6beb0559
@ -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
|
||||
|
11
roles/dwm/files/usr/local/bin/launch-polybar
Normal file
11
roles/dwm/files/usr/local/bin/launch-polybar
Normal 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
|
@ -13,6 +13,7 @@
|
||||
- libxinerama-dev
|
||||
- libxcb-res0-dev
|
||||
- libx11-xcb-dev
|
||||
- libyajl-dev
|
||||
|
||||
- name: create src dir
|
||||
file:
|
||||
|
@ -5,4 +5,4 @@
|
||||
|
||||
- import_tasks: st-term.yml
|
||||
|
||||
- import_tasks: dwmstatus.yml
|
||||
- import_tasks: polybar.yml
|
||||
|
61
roles/dwm/tasks/polybar.yml
Normal file
61
roles/dwm/tasks/polybar.yml
Normal 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'
|
@ -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
|
Loading…
Reference in New Issue
Block a user