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

101 lines
2.0 KiB
YAML
Raw Normal View History

2020-07-01 11:45:11 +00:00
---
2020-07-02 10:04:22 +00:00
- name: install required packages for dwm
2020-07-01 13:49:46 +00:00
become: yes
2020-07-01 11:45:11 +00:00
apt:
update_cache: yes
pkg:
2020-07-01 14:45:35 +00:00
- build-essential
- gcc
2020-07-01 11:45:11 +00:00
- libx11-dev
- libxft-dev
- libxinerama-dev
- libxcb-res0-dev
- libx11-xcb-dev
2023-08-04 22:49:37 +00:00
- libyajl-dev
2023-08-26 21:57:26 +00:00
when: ansible_distribution == "Ubuntu"
- name: install required packages for dwm
become: yes
community.general.pacman:
name:
- gcc
- base-devel
- libx11
- libxft
- libxinerama
- libxcb
- yajl
when: ansible_distribution == "Archlinux"
2020-07-01 11:45:11 +00:00
2020-07-02 10:04:22 +00:00
- name: checkout dwm
git:
repo: "{{ dwm.repo }}"
dest: "{{ desktop_src_dir }}/dwm"
2020-07-02 10:04:22 +00:00
clone: yes
update: yes
2020-07-01 11:45:11 +00:00
- name: build dwm
make:
chdir: "{{ desktop_src_dir }}/dwm"
2020-07-01 11:45:11 +00:00
2024-05-07 23:37:02 +00:00
- name: ensure that xsessions directory exists
file:
path: /usr/share/xsessions
state: directory
2020-07-01 11:45:11 +00:00
- name: copy xsession
become: yes
copy:
src: usr/share/xsessions/dwm.desktop
dest: /usr/share/xsessions/dwm.desktop
2023-10-25 08:24:04 +00:00
- name: Create xsession dir
file:
path: /usr/share/xsessions
state: directory
2023-04-29 13:47:14 +00:00
- name: copy xsession for gnome
become: yes
copy:
src: usr/share/xsessions/dwm-gnome.desktop
dest: /usr/share/xsessions/dwm-gnome.desktop
2023-10-25 08:24:04 +00:00
- name: Create gnome session dir
2024-05-07 23:37:02 +00:00
become: yes
2023-10-25 08:24:04 +00:00
file:
path: /usr/share/gnome-session/sessions
state: directory
2023-04-29 13:47:14 +00:00
- name: copy gnome session
become: yes
copy:
src: usr/share/gnome-session/sessions/dwm-gnome.session
dest: /usr/share/gnome-session/sessions/dwm-gnome.session
2020-07-01 11:45:11 +00:00
- name: copy icon
become: yes
copy:
src: usr/share/icons/dwm.png
dest: /usr/share/icons/dwm.png
- name: copy run script
become: yes
copy:
src: usr/local/bin/start-dwm
dest: /usr/local/bin/start-dwm
mode: '0755'
2023-04-29 13:47:14 +00:00
- name: copy run script
become: yes
copy:
src: usr/local/bin/dwm-gnome
dest: /usr/local/bin/dwm-gnome
mode: '0755'
2020-07-01 11:45:11 +00:00
- name: install dwm
become: yes
2020-07-02 10:04:22 +00:00
register: make
2020-07-01 11:45:11 +00:00
make:
chdir: "{{ desktop_src_dir }}/dwm"
2020-07-01 11:45:11 +00:00
target: install