127 lines
4.2 KiB
YAML
127 lines
4.2 KiB
YAML
---
|
|
- name: Install packages (Archlinux)
|
|
become: true
|
|
pacman:
|
|
name:
|
|
- noto-fonts
|
|
- i3-gaps
|
|
- dmenu
|
|
- picom
|
|
- xdg-user-dirs
|
|
- i3lock
|
|
- xsettingsd
|
|
- lxappearance
|
|
- scrot
|
|
- viewnior
|
|
- hsetroot
|
|
- python-feedparser
|
|
- python-matplotlib
|
|
- i3blocks
|
|
- sysstat
|
|
- upower
|
|
when: ansible_facts['distribution'] == 'Archlinux'
|
|
|
|
- name: Install packages (Debian)
|
|
become: true
|
|
apt:
|
|
name:
|
|
- fonts-noto
|
|
- i3-wm
|
|
- suckless-tools
|
|
- picom
|
|
- xdg-user-dirs
|
|
- i3lock
|
|
- xsettingsd
|
|
- lxappearance
|
|
- scrot
|
|
- viewnior
|
|
- hsetroot
|
|
- libstartup-notification0-dev # build dependency
|
|
- python3-matplotlib
|
|
- sysstat
|
|
- upower
|
|
when: ansible_facts['distribution'] == 'Debian'
|
|
|
|
- name: Clone repos
|
|
git: repo={{ item.repo }} dest={{ item.dest }} clone=yes update=no
|
|
with_items:
|
|
- {repo: 'https://github.com/addy-dclxvi/i3-starterpack.git', dest: '~/.git_clones/i3-starterpack'}
|
|
- {repo: 'https://github.com/vivien/i3blocks-contrib.git', dest: '~/.git_clones/i3blocks-contrib'}
|
|
|
|
- name: Copy i3 config
|
|
template:
|
|
src: i3config.j2
|
|
dest: ~/.config/i3/config
|
|
backup: true
|
|
|
|
- name: Copy files
|
|
copy: src={{ item.src }} dest={{ item.dest }} backup=true
|
|
with_items:
|
|
- {src: 'i3blocksconfig', dest: '~/.config/i3blocks/config'}
|
|
- {src: 'xinitrc', dest: '~/.xinitrc'}
|
|
- {src: 'xserverrc', dest: '~/.xserverrc'}
|
|
- {src: 'Xresources', dest: '~/.Xresources'}
|
|
- {src: 'xsettingsd', dest: '~/.xsettingsd'}
|
|
- {src: 'picom.conf', dest: '~/.config/picom.conf'}
|
|
|
|
- name: Symlink files (All)
|
|
file: src={{ item.src }} path={{ item.path }} state=link
|
|
with_items:
|
|
- {src: '~/.config/picom.conf', path: '~/.config/compton.conf'}
|
|
- {src: '~/.git_clones/i3-starterpack/.fonts/icomoon/feather.ttf', path: '~/.fonts/icomoon/feather.ttf'}
|
|
- {src: '~/.git_clones/i3blocks-contrib/temperature/temperature', path: '~/.config/i3blocks/scripts/temperature'}
|
|
- {src: '~/.git_clones/i3blocks-contrib/calendar/calendar', path: '~/.config/i3blocks/scripts/calendar'}
|
|
- {src: '~/.git_clones/i3blocks-contrib/cpu_usage/cpu_usage', path: '~/.config/i3blocks/scripts/cpu_usage'}
|
|
|
|
- name: Symlink files (Archlinux)
|
|
file: src={{ item.src }} path={{ item.path }} state=link
|
|
with_items:
|
|
- {src: '~/.git_clones/i3blocks-contrib/arch-update/arch-update', path: '~/.config/i3blocks/scripts/arch-update'}
|
|
when: ansible_facts['distribution'] == 'Archlinux'
|
|
|
|
- name: Symlink files (Debian)
|
|
file: src={{ item.src }} path={{ item.path }} state=link
|
|
with_items:
|
|
- {src: '~/.git_clones/i3blocks-contrib/apt-upgrades/apt-upgrades', path: '~/.config/i3blocks/scripts/apt-upgrades'}
|
|
when: ansible_facts['distribution'] == 'Debian'
|
|
|
|
- name: Copy scripts (All)
|
|
copy: src={{ item.src }} dest={{ item.dest }} mode=0755 backup=true
|
|
with_items:
|
|
- {src: 'nagstamon', dest: '~/.config/i3blocks/scripts/nagstamon'}
|
|
- {src: 'battery', dest: '~/.config/i3blocks/scripts/battery'}
|
|
- {src: 'free_disk_space', dest: '~/.config/i3blocks/scripts/free_disk_space'}
|
|
- {src: 'pub-ip', dest: '~/.config/i3blocks/scripts/pub-ip'}
|
|
- {src: 'clitip_wallpaper.sh', dest: '~/.local/bin/clitip_wallpaper.sh'}
|
|
- {src: 'xkcd_wallpaper.sh', dest: '~/.local/bin/xkcd_wallpaper.sh'}
|
|
|
|
- name: Copy scripts (Archlinux)
|
|
copy: src={{ item.src }} dest={{ item.dest }} mode=0755 backup=true
|
|
with_items:
|
|
- {src: 'arch_linux_news', dest: '~/.config/i3blocks/scripts/arch_linux_news'}
|
|
when: ansible_facts['distribution'] == 'Archlinux'
|
|
|
|
- name: Reload font cache
|
|
command: fc-cache -fv
|
|
|
|
- name: Update user dirs
|
|
command: xdg-user-dirs-update
|
|
|
|
- name: Build i3blocks for Debian
|
|
block:
|
|
- name: Clone
|
|
git:
|
|
repo: https://github.com/vivien/i3blocks.git
|
|
dest: ~/.git_clones/i3blocks
|
|
clone: true
|
|
update: false
|
|
- name: Build
|
|
shell:
|
|
cmd: ./autogen.sh && ./configure && make
|
|
chdir: ~/.git_clones/i3blocks
|
|
- name: Install
|
|
become: true
|
|
shell:
|
|
cmd: make install
|
|
chdir: "{{ ansible_facts.user_dir }}/.git_clones/i3blocks"
|
|
when: ansible_facts['distribution'] == 'Debian'
|