diff --git a/localhost.yml b/localhost.yml new file mode 100644 index 0000000..d01775a --- /dev/null +++ b/localhost.yml @@ -0,0 +1,4 @@ +--- +- hosts: localhost + roles: + - desktop diff --git a/roles/desktop/files/usr/share/icons/dwm.png b/roles/desktop/files/usr/share/icons/dwm.png new file mode 100644 index 0000000..21603d2 Binary files /dev/null and b/roles/desktop/files/usr/share/icons/dwm.png differ diff --git a/roles/desktop/files/usr/share/xsessions/dwm.desktop b/roles/desktop/files/usr/share/xsessions/dwm.desktop new file mode 100644 index 0000000..b0c3354 --- /dev/null +++ b/roles/desktop/files/usr/share/xsessions/dwm.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Dwm +Comment=Dynamic window manager +Exec=dwm +Icon=dwm +Type=XSession diff --git a/roles/desktop/tasks/dwm.yml b/roles/desktop/tasks/dwm.yml new file mode 100644 index 0000000..33fbc56 --- /dev/null +++ b/roles/desktop/tasks/dwm.yml @@ -0,0 +1,39 @@ +--- +- name: install required packages + apt: + update_cache: yes + pkg: + - git + - make + - libx11-dev + - libxft-dev + - libxinerama-dev + +- name: checkout + shell: + cmd: | + mkdir -p ~/src + cd ~/src + git clone {{ dwm-repo }} + +- name: build dwm + make: + chdir: ~/src/dwm + +- name: copy xsession + become: yes + copy: + src: usr/share/xsessions/dwm.desktop + dest: /usr/share/xsessions/dwm.desktop + +- name: copy icon + become: yes + copy: + src: usr/share/icons/dwm.png + dest: /usr/share/icons/dwm.png + +- name: install dwm + become: yes + make: + chdir: ~/src/dwm + target: install diff --git a/roles/desktop/tasks/main.yml b/roles/desktop/tasks/main.yml new file mode 100644 index 0000000..ad57c3e --- /dev/null +++ b/roles/desktop/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- import_tasks: setup.yml + +- import_tasks: dwm.yml diff --git a/roles/desktop/tasks/setup.yml b/roles/desktop/tasks/setup.yml new file mode 100644 index 0000000..5376553 --- /dev/null +++ b/roles/desktop/tasks/setup.yml @@ -0,0 +1,9 @@ +--- +- block: + become: yes + - name: install git and make + apt: + update_cache: yes + pkg: + - git + - make diff --git a/roles/desktop/vars/main.yml b/roles/desktop/vars/main.yml new file mode 100644 index 0000000..093d896 --- /dev/null +++ b/roles/desktop/vars/main.yml @@ -0,0 +1,3 @@ +--- +dwm-repo: https://github.com/pgrondek/dwm.git +st-repo: https://github.com/pgrondek/stterm.git