Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Commit

Permalink
Merged release/0.6.0 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
aacebedo committed Nov 5, 2016
2 parents 88af3be + 90de4fa commit 1a7ab92
Show file tree
Hide file tree
Showing 42 changed files with 916 additions and 599 deletions.
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,32 @@ It has been successfully tested with ubuntu 15.04/15.10/16.04 and xubuntu 15.04/

### Dependencies
- *Ubuntu 15.04/15.10/16.04
- Ansible >=1.9.0 (www.ansible.com)
- Python2 >=2.7.0
- Python3 >=3.0.0
- Python-yaml
- Python-progressbar
- python-yaml
- python-progressbar
- python-ansible
- python-pathlib


### Install dependencies
Installl pip and python using the package manager tool of your distribution.
For ubuntu the command to execute is:
```
$> apt install python python-pip
```

Then install the i3-xfce dependencies:
```
$> pip install -r ./requirements.txt
```

### Install and configure
```
$> ./setup.py install -prefix=<install path>
```
or
```
$> pip3 install i3-xfce
$> pip install i3-xfce
```

### Usage
Expand All @@ -41,7 +54,7 @@ $> i3-xfce uninstall
```
##### Uninstall parts
```
$> i3-xfce uninstall -p <parts>
$> i3-xfce uninstall -p <part1> -p <part2> ...
```
##### Uninstall help
```
Expand Down
6 changes: 6 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pyyaml>=3.10
progressbar2>=2.0.0
pathlib>=1.0.0
ansible>=2.2.0
enum>=0.4.6
colorlog>=2.7.0
23 changes: 0 additions & 23 deletions resources/roles/i3/tasks/install.yml

This file was deleted.

4 changes: 0 additions & 4 deletions resources/roles/i3/tasks/main.yml

This file was deleted.

11 changes: 0 additions & 11 deletions resources/roles/i3/tasks/uninstall.yml

This file was deleted.

51 changes: 51 additions & 0 deletions resources/roles/install/base/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
- name: Add PPA repositories
apt_repository: repo='{{item}}' state=present update_cache=true
with_items:
- ppa:aacebedo/libi3ipc-glib
- ppa:aacebedo/xfce4-i3-workspaces-plugin

- name: Install i3-wm package using apt
apt: pkg={{item}} force=yes state=installed
with_items:
- i3-wm
- libi3ipc-glib
- xfce4-i3-workspaces-plugin
- libqt5libqgtk2
- libqt5svg5
- compton

- name: Copy the autostart scripts
copy: src={{item}} dest=/home/{{remote_user}}/.config/autostart/ owner={{remote_user}} group={{remote_user}} mode='u=rw'
with_items:
- autostart/compton.desktop
- autostart/i3.desktop
- autostart/xfce4-panel.desktop

- name: Remove previous xfce4 sessions
file: path=/home/{{remote_user}}/.cache/sessions state=absent

- name: Create xfce4 configuration directory in user home
file: path=/home/{{remote_user}}/.config/xfce4/xfconf/xfce-perchannel-xml state=directory owner={{remote_user}} group={{remote_user}} mode='u=rw'

- name: Copy new xfce4 configuration file
shell: cp /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml /home/{{remote_user}}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml

- name: Changing xfce4 configuration file ownership
file: path=/home/{{remote_user}}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml owner={{remote_user}} group={{remote_user}} mode='u=rw'

- name: Create tmp folder
file: path=/tmp state=directory

- name: Copy xfce4 configuration file patch
copy: src=xfce/xfce4-session.xml.patch dest=/tmp/ owner={{remote_user}} group={{remote_user}} mode='u=rw'

- name: Apply patch on xfce4 configuration file
patch: remote_src=True
src=/tmp/xfce4-session.xml.patch
dest=/home/{{remote_user}}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml

- name: Hide xfce-wm settings shortcut
lineinfile: dest=/usr/share/applications/xfce-wm-settings.desktop state=present line="Hidden=true"

- name: Change ownership of ~/.config directory
file: path=/home/{{remote_user}}/.config recurse='yes' state='directory' owner={{remote_user}} group={{remote_user}} mode='u=rwX'
95 changes: 95 additions & 0 deletions resources/roles/install/themes/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
- name: Add Numix PPA
apt_repository: repo='{{item}}' state=present update_cache=true
with_items:
- ppa:numix/ppa

- name: Install packages using apt
apt: pkg={{item}} force=yes state=installed
with_items:
- xfce4
- lightdm-gtk-greeter
- fonts-powerline
- numix-gtk-theme
- numix-icon-theme-circle
- numix-plymouth-theme
- conky
- feh
- xfce4-terminal

- name: Check presence of i3 configuration directory
file: path=/home/{{remote_user}}/.i3 state=directory

- name: Copy i3 configuration files
copy: src=i3/{{item}} dest=/home/{{remote_user}}/.i3/ owner={{remote_user}} group={{remote_user}} mode='u=rw'
with_items:
- config

- name: Change i3 configuration directory ownership
file: path=/home/{{remote_user}}/.i3 recurse='yes' owner={{remote_user}} group={{remote_user}} mode='u=rwX'

- name: Create conky configuration directory
file: path=/home/{{remote_user}}/.conky state=directory

- name: Copy conky configuration files
copy: src=conky/{{item}} dest=/home/{{remote_user}}/.conky/ owner={{remote_user}} group={{remote_user}} mode='u=rw'
with_items:
- conkyrc_left
- conkyrc_right

- name: Change conky configuration directory ownership
file: path=/home/{{remote_user}}/.conky recurse='yes' owner={{remote_user}} group={{remote_user}} mode='u=rwX'

- name: Copy compton configuration file
copy: src=compton/compton.conf dest=/home/{{remote_user}}/.compton.conf owner={{remote_user}} group={{remote_user}} mode='u=rw'

- name: Change conky configuration directory ownership
file: path=/home/{{remote_user}}/.config/xfce4/xfconf/xfce-perchannel-xml state=directory owner={{remote_user}} group={{remote_user}} mode='u=rw'

- name: Copy default xfce4 xsettings file
shell: cp -n /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml /home/{{remote_user}}/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml

- name: Change ownership of xfce4 xsettings file
file: path=/home/{{remote_user}}/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml owner={{remote_user}} group={{remote_user}} mode='u=rw'

- name: Change xfce4 theme
lineinfile: dest=/home/{{remote_user}}/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml regexp=".*name=\"ThemeName\".*" line="<property name=\"ThemeName\" type=\"string\" value=\"Numix\"/>"

- name: Change xfce icon theme
lineinfile: dest=/home/{{remote_user}}/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml regexp=".*name=\"IconThemeName\".*" line="<property name=\"IconThemeName\" type=\"string\" value=\"Numix-Circle\"/>"

- name: Change xfce notification theme
copy: src=xfce/xfce4-notifyd.xml dest=/home/{{remote_user}}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-notifyd.xml owner={{remote_user}} group={{remote_user}} mode='u=rw'

- name: Change lightdm theme (1/2)
lineinfile: dest=/etc/lightdm/lightdm-gtk-greeter.conf line='[greeter]'

- name: Change lightdm theme (2/2)
lineinfile: dest=/etc/lightdm/lightdm-gtk-greeter.conf regexp="^theme-name.*" line='theme-name=Numix' insertafter="[greeter]" state=present

- name: Change lightdm icon theme
lineinfile: dest=/etc/lightdm/lightdm-gtk-greeter.conf regexp="^icon-theme-name.*" line='icon-theme-name=Numix-Circle' insertafter="[greeter]" state=present

- name: Change lightdm background (1/2)
lineinfile: dest=/etc/lightdm/lightdm-gtk-greeter.conf regexp="^background.*" line='background=/usr/share/backgrounds/Numix_Lightbulb.png' insertafter="[greeter]" state=present

- name: Change lightdm background (2/2)
lineinfile: dest=/etc/lightdm/lightdm-gtk-greeter.conf regexp="^user-background.*" line='user-background = false' insertafter="[greeter]" state=present

- name: Add themed fonts
copy: src={{item}} dest=/home/{{remote_user}}/.fonts/ owner={{remote_user}} group={{remote_user}} mode='u=rw'
with_items:
- fonts/openlogos.ttf

- name: Change fonts ownership
file: path=/home/{{remote_user}}/.fonts recurse='yes' owner={{remote_user}} group={{remote_user}} mode='u=rwX'

- name: Change configuration directory ownership
file: path=/home/{{remote_user}}/.config recurse='yes' owner={{remote_user}} group={{remote_user}} mode='u=rwX'

- name: Copy desktop background
copy: src=xfce/Numix_Lightbulb.png dest=/usr/share/backgrounds/Numix_Lightbulb.png owner=root group=root mode='a=r'

- name: Change desktop background ownership
file: path=/usr/share/backgrounds/Numix_Lightbulb.png owner={{remote_user}} group={{remote_user}} mode='u=rw'


68 changes: 68 additions & 0 deletions resources/roles/install/utilities/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
- name: Add PPA repositories
apt_repository: repo='{{item}}' state=present update_cache=true
with_items:
- ppa:aacebedo/fasd
- ppa:nilarimogard/webupd8

- name: Install packages using apt
apt: pkg={{item}} force=yes state=installed
with_items:
- albert
- aptitude
- vim
- python-dev
- conky
- wget
- cmake
- build-essential
- python-pip
- dmenu
- git
- python-software-properties
- git-flow
- dtrx
- fasd
- zsh
- tree

- name: Download j4-desktop-menu
get_url: url=https://github.com/enkore/j4-dmenu-desktop/archive/r2.12.tar.gz dest=/tmp/j4-desktop-menu.tar.gz

- name: Extract j4-desktop-menu from archive
unarchive: src=/tmp/j4-desktop-menu.tar.gz dest=/tmp/

- name: Compile j4-desktop-menu and install
shell: cmake ./ && make install chdir=/tmp/j4-dmenu-desktop-r2.12

- name: Install python packages using pip
pip: name={{item}} state=present
with_items:
- pathlib
- psutil
- thefuck
- i3-py
- quickswitch-i3
- cheat

- name: Changing ownship of Albert configuraiton folder
file: dest=/home/{{remote_user}}/.config/albert owner={{remote_user}} group={{remote_user}} state=directory

- name: Copy Albert configuration file
copy: src=albert.conf dest=/home/{{remote_user}}/.config/albert/albert.conf owner={{remote_user}} group={{remote_user}} mode='u=rw'

- name: Changing file properties of user configuration folder
file: dest=/home/{{remote_user}}/.config recurse=true mode="u=rwX"

- name: Copy zshrc file
copy: src=zsh/zshrc dest=/home/{{remote_user}}/.zshrc owner={{remote_user}} group={{remote_user}} mode='u=rw'

- name: Change user's shell to zsh
shell: chsh {{remote_user}} -s /bin/zsh

- name: Install ohmyzsh (1/2)
git: repo=https://github.com/robbyrussell/oh-my-zsh.git dest=/home/{{remote_user}}/.oh-my-zsh

- name: Install ohmyzsh (2/2)
file: path=/home/{{remote_user}}/.oh-my-zsh recurse=true owner={{remote_user}} group={{remote_user}}


64 changes: 0 additions & 64 deletions resources/roles/themes/tasks/install.yml

This file was deleted.

4 changes: 0 additions & 4 deletions resources/roles/themes/tasks/main.yml

This file was deleted.

Loading

0 comments on commit 1a7ab92

Please sign in to comment.