1
0
mirror of https://github.com/eoli3n/dotfiles synced 2024-11-22 15:01:59 +01:00

major update

This commit is contained in:
eoli3n 2019-12-01 16:29:03 +01:00
parent aca325a731
commit 6f537bd04b
103 changed files with 1450 additions and 1445 deletions

1
.gitignore vendored

@ -1,2 +1,3 @@
.vagrant
*.swp
.hosts

219
README.md

@ -21,25 +21,112 @@
![alt tag](https://github.com/eoli3n/dotfiles/blob/master/screenshots/connman-gtk.png)
## How to
## Why using Ansible ?
Ansible allows to duplicate this Desktop Environment over multiple hosts with specific configuration (dualscreen, packages...).
All your nodes will have access to all configurations if
- your git repo is accessible from every nodes
- your current node ssh keys is authorized on all nodes
**Fork Me!** Please look at ``roles/*/README.md`` if exists for specific hosts configuration.
**!!! Use as is, you will add my SSH key in your authorized_keys !!!**
To disable that role, please run :
```
cd dotfiles
sed -i 's/^\(.*authorized_keys.*\)$/#\1/' install.yml
```
You should be able to edit and push from/to any managed hosts.
## Test VMs|Containers
Please check ``vagrant/*/README.md`` and ``docker/*/README.md``
## How to
** Use carefully** backup your home before using ! Ansible will backup any existing conf file before overriding.
# 1° Fork Me!
# 2° Clone your repo on a personnal host
```
git clone --recursive https://github.com/[your_repo]/dotfiles
cd dotfiles
```
# 3° Generate ssh keys
```
ssh-keygen -t rsa
```
# 4° Replace your ssh key in ``authorized_keys`` role
**!!! Use as is, you will add my SSH key in your authorized_keys !!!**
```
cp ~/.ssh/id_rsa.pub dotfiles/roles/authorized_keys/id_rsa.pub
```
# 5° Generate hosts file with your managed hosts
``hosts`` file is defaultly gitignored.
```
cd dotfiles
mv hosts.template hosts
```
Add your hosts in right sections
- server : install only cli tools
- desktop : install graphic environment
- laptop: install desktop + some extra packages
Please explicitly define an ``ansible_user`` which will receive configurations
```
[server]
server1 ansible_user=root
[laptop]
host1 ansible_user=user
[desktop]
host2 ansible_user=user2
```
Remove useless groups and hosts
# 6° Copy your SSH keys on all nodes : node per node if password differ between users
It add your public ssh keys on hosts
```
ansible-playbook install.yml -t init_ssh -l host1 -K
ansible-playbook install.yml -t init_ssh -l host2 -K
ansible-playbook install.yml -t init_ssh -l host3 -K
```
# 7° Run ansible-playbook
For runs on hosts configured with root user
You can use without providing extra passwords
```
ansible-playbook install.yml -l server
```
For hosts configured with non-root user
User needs to be in sudoers.
You need to use -K to ask sudo password, and -l <host> to limit to that host
```
ansible-playbook install.yml -l host1 -K
```
# Extra commands
To list tasks and tags
```
ansible-playbook install.yml --list-tasks
```
To limit to a tag
```
ansible-playbook install.yml -K -t <tag>
```
To dry-run and print files diff on all declared hosts
```
ansible-playbook install.yml -l host1 -CDK
```
# Local run
Add localhost line and user in right hosts file section
```
[server]
[laptop]
localhost ansible_connection=local ansible_user=user
[desktop]
```
# then
ansible-playbook install.yml -l localhost -K
```
Please look at ``roles/*/README.md`` if exists for specific hosts configuration.
## Desktop/Laptop Environment
Don't use as ``root``.
Should not be used as ``root``.
### Supported OS
@ -48,84 +135,34 @@ Don't use as ``root``.
### Dependencies
- ansible >= 2.4
- packer
```
sudo pacman -S jshon ansible
curl -o PKGBUILD https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=packer-git; makepkg PKGBUILD --install --needed --noconfirm
```
### Role list
- packages-common
- screen
- ssh-agent
- authorized_keys
- fish
- neovim
- terminfo
- vim
- zsh
- screen
- authorized_keys
- packages-desktop
- compton
- cursor
- gtk
- i3-wm
- neofetch
- picom
- polybar
- variety
- rofi
- neofetch
- termite
- weechat
- ssh-agent
- dpms
- packages-laptop [only laptop tag]
- xbindkeys [only laptop tag]
### Installation
[WARNING] Use carefully, backup your home before using !
Ansible will backup any existing conf file before erasing it (.zshrc, .i3/config, etc...)
```
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
# edit hosts, then add your hostnames in right section <server|desktop|laptop>
# test connectivity
ansible all -m ping
# To list tasks and tags
ansible-playbook install.yml --list-tasks
# To dry-run and print files diff on all declared hosts
ansible-playbook install.yml -CDK
# To run the whole playbook for all hosts
ansible-playbook install.yml -K
# To install 1 tag on 1 host
ansible-playbook install.yml -K -l <hostname> -t <tag>
# To install for a specific user on 1 host
ansible-playbook install.yml -u user -K -l <hostname>
# To run only locally, add your hostname in right hosts file section
# you can replace server with <desktop|laptop>
echo << EOF > hosts
[server]
localhost ansible_connection=local
EOF
# then
ansible-playbook install.yml
```
### Manual configurations
**Google chrome**
Open this link to set lighter scrollbar
```
chrome://flags/#overlay-scrollbars
```
To use dark theme, go to graphical configuration and click ``Use GTK+ Theme``
## Server Environment
``server`` tag limits to install/configure cli tools. It could be run as ``root``.
Only cli tools
It could be run as ``root``.
### Supported OS
@ -141,44 +178,12 @@ To use dark theme, go to graphical configuration and click ``Use GTK+ Theme``
### Role list
- packages-common
- screen
- fish
- neovim
- terminfo
- vim
- zsh
- screen
- authorized_keys
## Installation
```
git clone --recursive https://github.com/eoli3n/dotfiles
cd dotfiles
# edit hosts, then add your hostnames in right section <server|desktop|laptop>
# test connectivity
ansible all -m ping
# To list tasks and tags
ansible-playbook install.yml --list-tasks
# To dry-run and print files diff on all declared hosts
ansible-playbook install.yml -CDK
# To run the whole playbook for all hosts
ansible-playbook install.yml -K
# To install 1 tag on 1 host
ansible-playbook install.yml -K -l <hostname> -t <tag>
# To run only locally, add your hostname in right hosts file section
# you can replace server with <desktop|laptop>
echo << EOF > hosts
[server]
localhost ansible_connection=local
EOF
# then
ansible-playbook install.yml
```
# Previously
* [i3-gaps Dark Solarized](https://github.com/eoli3n/dotfiles/tree/zsh-agnoster-solarized)

11
hosts

@ -1,7 +1,10 @@
[server]
cesium ansible_user=root
neon ansible_user=root
prodpeda-cesium
tspeda-kvm
[laptop]
osz ansible_user=user
work ansible_user=userarch
osz become_user=user
localhost ansible_connection=local ansible_user=user
[desktop]
work become_user=user

3
hosts.template Normal file

@ -0,0 +1,3 @@
[server]
[laptop]
[desktop]

@ -1,4 +1,8 @@
---
- hosts: all
roles:
- { role: authorized_keys, tags: init_ssh }
- hosts: server
tags: limit
tasks:
@ -26,25 +30,26 @@
- hosts: server:desktop:laptop
roles:
- { role: packages-common, tags: packages-common }
- { role: zsh, tags: zsh }
- { role: vim, tags: vim }
- { role: fish, tags: fish }
- { role: neovim, tags: neovim }
- { role: terminfo, tags: terminfo }
- { role: screen, tags: screen }
- { role: authorized_keys, tags: authorized_keys }
- hosts: desktop:laptop
roles:
- { role: xprofile, tags: xprofile }
- { role: packages-desktop, tags: packages-desktop }
- { role: cursor, tags: cursor }
- { role: gtk, tags: gtk }
- { role: i3-wm, tags: i3-wm }
- { role: compton, tags: compton }
- { role: picom, tags: picom }
- { role: polybar, tags: polybar }
- { role: variety, tags: variety }
- { role: rofi, tags: rofi }
- { role: neofetch, tags: neofetch }
- { role: termite, tags: termite }
- { role: weechat, tags: weechat }
- { role: ssh-agent, tags: ssh-agent }
- { role: dpms, tags: dpms }
tasks:
- include_role:
name: vagrant

@ -1,5 +1,5 @@
---
- name: authorize eoli3n key
- name: authorize keys
authorized_key:
user: "{{ ansible_user_id }}"
state: present

@ -1,24 +0,0 @@
---
- name: Install compton
aur: name=compton-git use=makepkg
- name: Configure compton
copy: src=files/compton dest=~/.compton backup=yes
- name: Init compton in .xprofile
blockinfile:
path: ~/.xprofile
create: True
marker: "### {mark} DOTFILES compton ###"
content: |
compton --backend glx --vsync opengl-swc -GCb --config ~/.compton &
when: ansible_user_id != "vagrant"
- name: Init compton in .xprofile [Vagrant]
blockinfile:
path: ~/.xprofile
create: True
marker: "### {mark} DOTFILES compton ###"
content: |
compton -GCb --config ~/.compton &
when: ansible_user_id == "vagrant"

@ -1,13 +0,0 @@
---
- name: Install Cursors
aur: name=capitaine-cursors use=makepkg
- name: Create .Xresources.d dir
file: path=~/.Xresources.d state=directory
- name: Configure Cursors
copy: src=files/cursor dest=~/.Xresources.d/cursor
- name: Init Cursors in .Xresources
lineinfile: path=~/.Xresources create=yes state=present line='#include ".Xresources.d/cursor"'

3
roles/dpms/files/dpms.sh Normal file

@ -0,0 +1,3 @@
#dpms and screen saver 60s
xset s 60 60
xset dpms 60 60 60

@ -0,0 +1,5 @@
---
- name: configure dpms in xprofile
copy:
src: dpms.sh
dest: ~/.xprofile.d/

@ -0,0 +1,4 @@
set -x LANG 'fr_FR.UTF-8'
set -x EDITOR 'neovim'
set -x VISUAL 'neovim'
set -x PAGER 'most'

@ -0,0 +1,4 @@
set -gx PATH $HOME/bin $PATH
set -x BROWSER 'google-chrome-stable'
set -x VAGRANT_DEFAULT_PROVIDER 'libvirt'
set -x XDG_CURRENT_DESKTOP 'i3-gaps'

46
roles/fish/tasks/main.yml Normal file

@ -0,0 +1,46 @@
---
- name: Install fish
package:
name: fish
state: present
ignore_errors: True
become: yes
- name: Install oh-my-fish
shell: curl -L https://get.oh-my.fish | fish
args:
creates: ~/.config/fish/conf.d/omf.fish
- name: Install pureprompt plugin
shell: |
omf install pure
ln -s $OMF_PATH/themes/pure/conf.d/pure.fish ~/.config/fish/conf.d/pure.fish
ln -s $OMF_PATH/themes/pure/conf.d/_pure_init.fish ~/.config/fish/conf.d/pure_init.fish
args:
creates: ~/.config/fish/conf.d/pure.fish
- name: check git plugin install
shell: grep git ~/.config/fish/fish_variables
register: gitcheck
ignore_errors: True
changed_when: false
- name: Install git plugin
shell: omf install https://github.com/jhillyerd/plugin-git
when: gitcheck is failed
- name: Globale fish configuration
copy:
src: config.fish
dest: ~/.config/fish/
backup: yes
- name: Laptops fish configuration
copy:
src: laptop.fish
dest: ~/.config/fish/conf.d/
backup: yes
when: "'laptop' in {{ group_names }}"
- debug:
msg: "Do not forget to 'chsh /usr/bin/fish'"

@ -1,14 +0,0 @@
# Setup fzf
# ---------
if [[ ! "$PATH" == */home/user/.fzf/bin* ]]; then
export PATH="$PATH:/home/user/.fzf/bin"
fi
# Auto-completion
# ---------------
[[ $- == *i* ]] && source "/home/user/.fzf/shell/completion.zsh" 2> /dev/null
# Key bindings
# ------------
source "/home/user/.fzf/shell/key-bindings.zsh"

@ -1,10 +0,0 @@
---
- name: clone fzf
git:
repo: https://github.com/junegunn/fzf.git
dest: ~/.fzf
depth: 1
- name: create config file
copy: src=files/fzf.zsh dest=~/.fzf.zsh

@ -1,2 +1,25 @@
[Qt]
style=GTK+
[Qt%20Plugin%20Cache%204.8.false]
usr\lib\qt4\plugins\inputmethods\libqimsw-multi.so=40807, 0, x86_64 linux g++-4 full-config, 2019-01-16T15:16:39
usr\lib\qt4\plugins\imageformats\libqgif.so=40807, 0, x86_64 linux g++-4 full-config, 2019-01-16T15:16:39
usr\lib\qt4\plugins\imageformats\libqico.so=40807, 0, x86_64 linux g++-4 full-config, 2019-01-16T15:16:39
usr\lib\qt4\plugins\imageformats\libqjpeg.so=40807, 0, x86_64 linux g++-4 full-config, 2019-01-16T15:16:39
usr\lib\qt4\plugins\imageformats\libqmng.so=40807, 0, x86_64 linux g++-4 full-config, 2019-01-16T15:16:39
usr\lib\qt4\plugins\imageformats\libqsvg.so=40807, 0, x86_64 linux g++-4 full-config, 2019-01-16T15:16:39
usr\lib\qt4\plugins\imageformats\libqtiff.so=40807, 0, x86_64 linux g++-4 full-config, 2019-01-16T15:16:39
usr\lib\qt4\plugins\iconengines\libqsvgicon.so=40807, 0, x86_64 linux g++-4 full-config, 2019-01-16T15:16:39
opt\teamviewer\tv_bin\RTlib\plugins\systemtrayicon\libsni-qt.so=40806, 1, i386 linux g++-4 full-config, 2018-01-06T13:04:51
[Qt%20Factory%20Cache%204.8]
com.trolltech.Qt.QInputContextFactoryInterface%3A\usr\lib\qt4\plugins\inputmethods\libqimsw-multi.so=2019-01-16T15:16:39, imsw-multi
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqgif.so=2019-01-16T15:16:39, gif
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqico.so=2019-01-16T15:16:39, ico
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqjpeg.so=2019-01-16T15:16:39, jpeg, jpg
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqmng.so=2019-01-16T15:16:39, mng
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqsvg.so=2019-01-16T15:16:39, svg, svgz
com.trolltech.Qt.QImageIOHandlerFactoryInterface%3A\usr\lib\qt4\plugins\imageformats\libqtiff.so=2019-01-16T15:16:39, tiff, tif
com.trolltech.Qt.QIconEngineFactoryInterfaceV2%3A\usr\lib\qt4\plugins\iconengines\libqsvgicon.so=2019-01-16T15:16:39, svg, svgz, svg.gz
com.trolltech.Qt.QIconEngineFactoryInterface%3A\usr\lib\qt4\plugins\iconengines\libqsvgicon.so=2019-01-16T15:16:39
com.nokia.qt.QSystemTrayIconSysFactoryInterface%3A\opt\teamviewer\tv_bin\RTlib\plugins\systemtrayicon\libsni-qt.so=2018-01-06T13:04:51, default

@ -1,8 +1,8 @@
[Settings]
gtk-theme-name=Numix-DarkBlue
gtk-icon-theme-name=Vibrancy-Colors-Full-Dark
gtk-theme-name=Equilux
gtk-icon-theme-name=Paper-Mono-Dark
gtk-font-name=Sans 10
gtk-cursor-theme-name=Capitaine
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR

@ -1,21 +1,54 @@
---
- name: Install Numix Theme
aur: name={{item}} use=makepkg
with_items:
- numix-themes-darkblue
- vibrancy-colors
- name: Install Themes and Icons
aur:
name:
- equilux-theme
- paper-icon-theme
skip_installed: yes
- name: Create gtk conf dir
file: path=~/.config/gtk-3.0/ state=directory
file:
path: ~/.config/gtk-3.0/
state: directory
- name: Configure GTK
copy: src=files/settings.ini dest=~/.config/gtk-3.0/settings.ini backup=yes
copy:
src: settings.ini
dest: ~/.config/gtk-3.0/
backup: yes
- name: Configure Qt as GTK theme
copy: src=files/Trolltech.conf dest=~/.config/Trolltech.conf backup=yes
copy:
src: Trolltech.conf
dest: ~/.config/
backup: yes
- name: Update font cache
shell: creates=.Xdefaults fc-cache -f
shell: fc-cache -f
args:
creates: .Xdefaults
changed_when: false
- name: Link Xdefaults
file: src=~/.Xresources dest=~/.Xdefaults state=link force=yes
file:
src: ~/.Xresources
dest: ~/.Xdefaults
state: link
force: yes
- name: Create .Xresources.d dir
file:
path: ~/.Xresources.d
state: directory
- name: Configure Cursors
copy:
src: cursor
dest: ~/.Xresources.d/
- name: Init Cursors in .Xresources
lineinfile:
path: ~/.Xresources
create: yes
state: present
line: '#include ".Xresources.d/cursor"'

@ -1,32 +1,37 @@
---
- name: Install i3-wm
aur: name={{item}} use=makepkg
with_items:
- i3-gaps
- i3lock
aur:
name:
- i3-gaps
- i3lock
skip_installed: yes
- name: Clone i3lock-fancy-multimonitor
git:
repo: https://github.com/guimeira/i3lock-fancy-multimonitor
dest: ~/.i3/i3lock-fancy-multimonitor
force: yes
update: no
- name: Configure i3lock blur
lineinfile:
path: ~/.i3/i3lock-fancy-multimonitor/lock
regexp: '^BLURTYPE="2x8"'
line: '#BLURTYPE="2x8"'
ignore_errors: True
- name: Configure i3lock blur bis
lineinfile:
path: ~/.i3/i3lock-fancy-multimonitor/lock
regexp: '^#BLURTYPE="5x3"'
line: 'BLURTYPE="5x3"'
ignore_errors: True
- name: Configure xinitrc
copy: src=files/xinitrc dest=~/.xinitrc backup=yes
copy:
src: xinitrc
dest: ~/.xinitrc
backup: yes
- name: Template config file
template: src=templates/config.j2 dest=~/.i3/config backup=yes
template:
src: config.j2
dest: ~/.i3/config
backup: yes

@ -1,22 +1,4 @@
#assign osz
assign [class="Google-chrome"] $tag1
assign [class="Thunderbird"] $tag3
assign [class="Lollypop"] $tag5
for_window [class="Lollypop"] focus
assign [class="Code"] $tag6
for_window [class="Code"] focus
assign [class="WebTorrent"] $tag7
for_window [class="WebTorrent"] focus
assign [class="Nicotine"] $tag9
for_window [class="Nicotine"] focus
#bindsym osz
bindsym $mod+Control+Left exec ~/dev/git/mpris-ctrl/mpris-ctrl.sh Lollypop prev
bindsym $mod+Control+Down exec ~/dev/git/mpris-ctrl/mpris-ctrl.sh Lollypop play-pause
bindsym $mod+Control+Right exec ~/dev/git/mpris-ctrl/mpris-ctrl.sh Lollypop next
bindsym $mod+Control+Prior exec "cd ~/dev/git/interfaceliftdownloader/ ; ./interfacelift.sh -c ./wallpaper.conf"
bindsym $mod+Control+Next exec "~/dev/git/interfaceliftdownloader/interfacelift.sh -sc ~/dev/git/interfaceliftdownloader/wallpaper.conf"
#INCLUDE####################################################
#assign workspace to screens
workspace $tag1 output DP-1-1
workspace $tag2 output eDP-1
@ -30,7 +12,8 @@ workspace $tag9 output eDP-1
workspace $tag10 output eDP-1
# exec startup apps
exec --no-startup-id i3-msg 'exec thunderbird'
exec --no-startup-id i3-msg 'exec google-chrome-stable'
exec --no-startup-id i3-msg 'exec google-chrome-stable --app="https://gmail.com"'
exec --no-startup-id i3-msg 'workspace $tag4; exec termite -e "screen -rd weechat &"'
exec --no-startup-id i3-msg 'workspace $tag2; exec termite'
#INCLUDE####################################################

@ -1,37 +1,15 @@
#assign work
assign [class="Google-chrome"] $tag1
assign [class="Thunderbird"] $tag3
assign [class="Code"] $tag6
for_window [class="Code"] focus
assign [class="Virt-manager"] $tag8
for_window [class="Virt-manager"] focus
assign [class="VirtualBox"] $tag8
for_window [class="VirtualBox"] focus
assign [class="Connman-gtk"] $tag10
for_window [class="Connman-gtk"] focus
#class confs
for_window [class="Cssh"] floating enable, border normal
for_window [class="XTerm"] floating enable, border normal
for_window [class="feh"] floating enable, border normal
for_window [class="Wine"] move to workspace $tag6
for_window [class="Pidgin"] move to workspace $tag5
for_window [class="retroarch"] move to scratchpad
#bindsym work
bindsym $mod+Control+Prior exec "cd ~/dev/git/interfaceliftdownloader/ ; ./interfacelift.sh -c ./wallpaper.conf"
bindsym $mod+Control+Next exec "~/dev/git/interfaceliftdownloader/interfacelift.sh -sc ~/dev/git/interfaceliftdownloader/wallpaper.conf"
#INCLUDE####################################################
#assign workspace to screens
workspace $tag1 output HDMI-1
workspace $tag2 output HDMI-2
workspace $tag3 output HDMI-2
workspace $tag4 output HDMI-2
workspace $tag5 output HDMI-2
workspace $tag1 output HDMI2 HDMI3
workspace $tag2 output HDMI3
workspace $tag3 output HDMI1
workspace $tag4 output HDMI1
workspace $tag5 output HDMI3
# exec startup apps
exec --no-startup-id i3-msg 'exec thunderbird'
exec --no-startup-id i3-msg 'exec google-chrome-stable --app=http://mail.umontpellier.fr &'
exec --no-startup-id i3-msg 'exec google-chrome-stable --app=https://gmail.com &'
exec --no-startup-id i3-msg 'exec google-chrome-stable &'
exec --no-startup-id i3-msg 'workspace $tag4; exec termite -e "screen -rd weechat &"'
exec --no-startup-id i3-msg 'workspace $tag2; exec termite'
#INCLUDE####################################################

@ -17,7 +17,7 @@ bindsym $mod+Return exec termite
# start drofi dmenu
bindsym $mod+Tab exec --no-startup-id rofi -show window
bindsym $mod+Shift+d exec --no-startup-id rofi -show run
bindsym $mod+d exec --no-startup-id rofi -show drun
bindsym $mod+d exec --no-startup-id rofi -modi drun -show drun
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
@ -96,9 +96,9 @@ set $tag10 "10:"
#colors
# class border backgr. text indicator child_border
client.focused #FFFFFF #FFFFFF #000000 #000000 #000000
client.focused_inactive #333333 #5f676a #ffffff #484e50 #000000
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.focused #222222 #5A5A5A #E1E1E1 #000000 #000000
client.focused_inactive #222222 #5A5A5A #E1E1E1 #484e50 #000000
client.unfocused #222222 #323232 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
@ -115,15 +115,7 @@ bindsym $mod+Shift+q exec ~/.config/rofi/powermenu.sh
# apps
bindsym $mod+Control+t exec thunar
bindsym $mod+Control+n exec connman-gtk
# by class
## floatings
for_window [class="XTerm"] floating enable, border normal
for_window [class="feh"] floating enable, border normal
# assigns focus
assign [class="Connman-gtk"] $tag10
for_window [class="Connman-gtk"] focus
bindsym $mod+Control+p exec pavucontrol
#toggle workspace's display screen
bindsym $mod+less move workspace to output right
@ -153,6 +145,28 @@ bindsym $mod+Shift+underscore move container to workspace $tag8
bindsym $mod+Shift+ccedilla move container to workspace $tag9
bindsym $mod+Shift+agrave move container to workspace $tag10
# floatings
for_window [class="XTerm"] floating enable, border normal
for_window [class="feh"] floating enable, border normal
for_window [class="Gpick"] floating enable, border pixel 1
for_window [title="Images de Variety"] floating enable, border pixel 1, move left 647px
# assigns focus
assign [class="Connman-gtk"] $tag10
for_window [class="Connman-gtk"] focus
assign [class="Transmission-gtk"] $tag9
assign [title=".*mail.*"] $tag3
assign [class="Google-chrome"] $tag1
assign [class="spotify"] $tag5
for_window [class="spotify"] focus
assign [class="Code"] $tag6
for_window [class="Code"] focus
#bindsym spotify
bindsym $mod+Control+Left exec ~/dev/git/mpris-ctrl/mpris-ctrl.sh spotify prev
bindsym $mod+Control+Down exec ~/dev/git/mpris-ctrl/mpris-ctrl.sh spotify play-pause
bindsym $mod+Control+Right exec ~/dev/git/mpris-ctrl/mpris-ctrl.sh spotify next
{% include 'by_host/' + ansible_hostname + '/config.j2' ignore missing %}
{% include 'by_os/' + ansible_distribution|lower + '/config.j2' ignore missing %}

@ -1,15 +1,22 @@
---
- name: Install neofetch
aur: name={{item}} use=makepkg
with_items:
- w3m
- neofetch
aur:
name:
- w3m
- neofetch
skip_installed: yes
- name: creates neofetch conf dir
file: path=~/.config/neofetch state=directory
file:
path: ~/.config/neofetch
state: directory
- name: Configure neofetch
copy: src=files/config.conf dest=~/.config/neofetch/config.conf
copy:
src: config.conf
dest: ~/.config/neofetch/
- name: Copy neofetch archlinux img
copy: src=files/archlinux.png dest=~/.config/neofetch/archlinux.png
copy:
src: archlinux.png
dest: ~/.config/neofetch/

@ -0,0 +1,29 @@
" Plugins will be downloaded under the specified directory.
call plug#begin('~/.vim/plugged')
" Declare the list of plugins.
Plug 'tpope/vim-sensible'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" List ends here. Plugins become visible to Vim after this call.
call plug#end()
" Configure autoindent
set tabstop=4 softtabstop=2 expandtab shiftwidth=2 autoindent
" remember last cursor place
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
" Configure Airline
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_symbols.space = "\ua0"
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#show_buffers = 0
let g:airline_theme = 'minimalist'
" Default term cursor
set guicursor=

@ -0,0 +1,12 @@
---
- name: Install neovim
package:
name: neovim
state: present
become: True
- name: Copy neovim conf file
copy:
src: init.vim
dest: ~/.config/nvim/
notify: trigger plug install

@ -1,9 +0,0 @@
---
- name: Install common packages [Archlinux]
pacman:
state: present
name:
- expac
- jshon
- pygmentize
become: True

@ -1,8 +1,12 @@
---
- name: Add EPEL repository
yum: name=epel-release state=present
yum:
name: epel-release
state: present
become: True
- name: Install pip package
yum: name=python-pip state=present
yum:
name: python-pip
state: present
become: True

@ -1,13 +1,17 @@
---
- name: Install common packages
package: name={{item}} state=present
with_items:
- curl
- wget
become: True
package:
name:
- curl
- wget
- jq
- most
- fzf
state: present
- name: Test host packages file
stat: path="{{ role_path }}/tasks/by_host/{{ ansible_hostname }}/main.yml"
stat:
path: "{{ role_path }}/tasks/by_host/{{ ansible_hostname }}/main.yml"
register: host_file
- name: Include host packages
@ -15,7 +19,8 @@
when: host_file.stat.exists
- name: Test distribution packages file
stat: path="{{ role_path }}/tasks/by_os/{{ ansible_distribution|lower }}/main.yml"
stat:
path: "{{ role_path }}/tasks/by_os/{{ ansible_distribution|lower }}/main.yml"
register: distribution_file
- name: Include distribution packages

@ -1,2 +0,0 @@
- name: clean tmp packer
shell: rm -Rf /tmp/packer*

@ -1,4 +0,0 @@
---
- name: Install arch-itect packages
pacman: name=thunderbird state=present
become: True

@ -1,4 +0,0 @@
---
- name: Install osz packages
pacman: name=geary state=present
become: True

@ -1,17 +1,12 @@
---
- name: add unifont gpg missing key
shell: gpg --recv-keys 1A09227B1F435A33
- name: Install Desktop packages [Archlinux]
aur: name={{item}} use=makepkg
with_items:
- google-chrome
- connman-gtk
- gnome-ssh-askpass2
- ttf-font-awesome-4
- ttf-unifont
- ttf-font-icons
notify: clean tmp packer
- name: Flush handlers to clean /tmp
meta: flush_handlers
- name: Install Desktop aur packages [Archlinux]
aur:
name:
- trizen
- google-chrome
- connman-gtk
- gnome-ssh-askpass2
- ttf-font-awesome-4
- ttf-unifont
- ttf-font-icons
skip_installed: yes

@ -1,22 +1,22 @@
---
- name: Install Desktop packages
package: name={{item}} state=present
with_items:
- xorg-server
- xorg-xinit
- lxappearance
- slop
- maim
- feh
- xclip
- xorg-xrdb
- xorg-xfd
- connman
- ttf-hack
package:
name:
- xorg-server
- xorg-xinit
- lxappearance
- feh
- xclip
- xorg-xrdb
- xorg-xfd
- connman
- ttf-hack
state: present
become: True
- name: Test host packages file
stat: path="{{ role_path }}/tasks/by_host/{{ ansible_hostname }}/main.yml"
stat:
path: "{{ role_path }}/tasks/by_host/{{ ansible_hostname }}/main.yml"
register: host_file
- name: Include distribution packages
@ -24,7 +24,8 @@
when: host_file.stat.exists
- name: Test distribution packages file
stat: path="{{ role_path }}/tasks/by_os/{{ ansible_distribution|lower }}/main.yml"
stat:
path: "{{ role_path }}/tasks/by_os/{{ ansible_distribution|lower }}/main.yml"
register: distribution_file
- name: Include distribution packages

@ -1,4 +1,6 @@
---
- name: Install backlight controller package
aur: name=light-git use=makepkg
aur:
name: light-git
skip_installed: yes
when: ansible_os_family == "Archlinux"

@ -1,7 +1,7 @@
# Shadow
shadow = false;
no-dnd-shadow = true;
no-dock-shadow = true;
# no-dnd-shadow = true;
# no-dock-shadow = true;
clear-shadow = true;
shadow-radius = 7;
shadow-offset-x = -7;
@ -15,7 +15,9 @@ shadow-exclude = [
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c"
"_GTK_FRAME_EXTENTS@:c",
"name = 'jgmenu'",
"class_g = 'jgmenu'"
];
# shadow-exclude = "n:e:Notification";
# shadow-exclude-reg = "x10+0+0";
@ -32,7 +34,7 @@ alpha-step = 0.06;
# inactive-dim-fixed = true;
# blur-background = true;
# blur-background-frame = true;
blur-kern = "3x3box"
# blur-kern = "3x3box"
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"
# blur-background-fixed = true;
blur-background-exclude = [

@ -0,0 +1 @@
picom --backend glx --vsync -GCb --config ~/.picom &

@ -0,0 +1 @@
picom --config ~/.picom &

@ -0,0 +1,22 @@
---
- name: Install compton
package:
name: picom
- name: Configure picom
copy:
src: picom
dest: ~/.picom
backup: yes
- name: Init compton in .xprofile
copy:
src: picom.sh
dest: ~/.xprofile.d/
when: ansible_user_id != "vagrant"
- name: Init compton in .xprofile [Vagrant]
copy:
src: picom.vagrant.sh
dest: ~/.xprofile.d/
when: ansible_user_id == "vagrant"

@ -3,7 +3,11 @@
- \~/.config/polybar/launch.sh
- \~/.config/polybar/pkg.sh
# Dualscreen configuration
# Managed dirs
- \~/.config/polybar/modules
- \~/.config/polybar/bars
# Dualscreen configuration by host
Add a dir named as hostname to include specific host configuration for multiple screen launch
```
mkdir templates/$(hostname)
@ -13,51 +17,3 @@ MONITOR=HDMI2 polybar top &
MONITOR=HDMI2 polybar bottom &
EOF
```
It will uncomment monitor values in config.j2 too
# Modules configuration by host
```
mkdir templates/by_host/$(hostname)
# Top modules configuration
echo <<\EOF > templates/$(hostname)/modules-top.j2
modules-left = i3 xwindow
modules-center =
modules-right = backlight volume pkg wlan vpncheck battery date
EOF
# Bottom modules configuration
echo <<\EOF > templates/by_host/$(hostname)/modules-bottom.j2
modules-left =
modules-center = networkspeedup networkspeeddown
modules-right = temperature filesystem-slash filesystem-home cpu memory
EOF
```
# Modules definition
## By host
```
echo <<\EOF > templates/by_host/$(hostname)/modules-def.j2
[module/example]
type = custom/script
interval = 1200
format = <label>
label = "%output:0:100%%"
exec = uname -a
EOF
```
## By OS
```
echo <<\EOF > templates/by_os/<archlinux|debian|centos>/modules-def.j2
[module/example2]
type = custom/script
interval = 1200
format = <label>
label = "%output:0:100%%"
exec = hostname
EOF
```

@ -0,0 +1,38 @@
[bar/bottom]
monitor = ${env:MONITOR}
monitor-strict = true
dpi = 72
bottom = true
width = 100%
height = 20
offset-x = 0
offset-y = 0
;background = ${xrdb:color9}
background = ${colors.background}
foreground = ${colors.foreground}
overline-size = 0
overline-color = #f00
underline-size = 0
underline-color = #00f
border-bottom-size = 0
border-bottom-color = ${colors.background}
spacing = 1
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = hack:pixelsize=12;2
font-1 = unifont:size=10;2
font-2 = siji:pixelsize=10;3
font-3 = FontAwesome:pixelsize=14;2
modules-left = jgmenu
modules-center = networkspeedup networkspeeddown
modules-right = temperature filesystem-slash filesystem-home cpu memory
tray-position = right
tray-padding = 2

@ -0,0 +1,51 @@
[bar/top]
monitor = ${env:MONITOR}
monitor-strict = true
dpi = 72
bottom = false
width = 100%
height = 20
offset-x = 0
offset-y = 0
;background = ${xrdb:color9}
background = ${colors.background}
foreground = ${colors.foreground}
overline-size = 0
overline-color = #f00
underline-size = 2
underline-color = #00f
border-bottom-size = 0
border-bottom-color = ${colors.background}
spacing = 1
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = hack:pixelsize=12;2
font-1 = unifont:size=10;2
font-2 = siji:pixelsize=10;3
font-3 = FontAwesome:pixelsize=14;2
modules-left = i3 xwindow
modules-center =
modules-right = backlight volume redshift wlan eth vpncheck pkg battery date
tray-position = right
tray-padding = 4
;tray-transparent = true
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev

@ -0,0 +1,51 @@
[bar/top_light]
monitor = ${env:MONITOR}
monitor-strict = true
dpi = 72
bottom = false
width = 100%
height = 20
offset-x = 0
offset-y = 0
;background = ${xrdb:color9}
background = ${colors.background}
foreground = ${colors.foreground}
overline-size = 0
overline-color = #f00
underline-size = 2
underline-color = #00f
border-bottom-size = 0
border-bottom-color = ${colors.background}
spacing = 1
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = hack:pixelsize=12;2
font-1 = unifont:size=10;2
font-2 = siji:pixelsize=10;3
font-3 = FontAwesome:pixelsize=14;2
modules-left = i3 xwindow
modules-center =
modules-right = date
tray-position = right
tray-padding = 4
;tray-transparent = true
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev

@ -0,0 +1,58 @@
[colors]
background = #222
background-alt = #444
foreground = #dfdfdf
foreground-alt = #55
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[global/wm]
margin-top = 5
margin-bottom = 5
[settings]
; The throttle settings lets the eventloop swallow up til X events
; if they happen within Y millisecond after first event was received.
; This is done to prevent flood of update event.
;
; For example if 5 modules emit an update event at the same time, we really
; just care about the last one. But if we wait too long for events to swallow
; the bar would appear sluggish so we continue if timeout
; expires or limit is reached.
throttle-output = 5
throttle-output-for = 10
; Time in milliseconds that the input handler will wait between processing events
throttle-input-for = 30
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
screenchange-reload = true
; bars includes
include-file = ~/.config/polybar/bars/top_light
include-file = ~/.config/polybar/bars/top
include-file = ~/.config/polybar/bars/bottom
; modules includes
include-file = ~/.config/polybar/modules/xwindow
include-file = ~/.config/polybar/modules/xkeyboard
include-file = ~/.config/polybar/modules/jgmenu
include-file = ~/.config/polybar/modules/filesystem-home
include-file = ~/.config/polybar/modules/filesystem-slash
include-file = ~/.config/polybar/modules/i3
include-file = ~/.config/polybar/modules/backlight
include-file = ~/.config/polybar/modules/cpu
include-file = ~/.config/polybar/modules/memory
include-file = ~/.config/polybar/modules/wlan
include-file = ~/.config/polybar/modules/eth
include-file = ~/.config/polybar/modules/networkspeedup
include-file = ~/.config/polybar/modules/networkspeeddown
include-file = ~/.config/polybar/modules/date
include-file = ~/.config/polybar/modules/volume
include-file = ~/.config/polybar/modules/battery
include-file = ~/.config/polybar/modules/temperature
include-file = ~/.config/polybar/modules/pkg
include-file = ~/.config/polybar/modules/redshift
include-file = ~/.config/polybar/modules/vpncheck
include-file = ~/.config/polybar/modules/powermenu

@ -0,0 +1,18 @@
[module/backlight]
type = internal/backlight
card = intel_backlight
click-left = connman-gtk
format = <label> <bar>
label = ""
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #ff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}

@ -0,0 +1,33 @@
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98
time-format = "%H%{F#92}%M%{F-}"
label-discharging = %percentage% %time%
format-charging = <animation-charging> <label-charging>
format-charging-underline = #f3f99d
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750

@ -0,0 +1,16 @@
[module/cpu]
type = internal/cpu
interval = 2
format = <ramp-coreload>
format-prefix =
format-prefix-foreground = ${colors.foreground-alt}
;format-underline = #f90000
label = %percentage%
ramp-coreload-0 = %{F#5b}▁%{F-}
ramp-coreload-1 = %{F#5b}▂%{F-}
ramp-coreload-2 = %{F#5b}▃%{F-}
ramp-coreload-3 = %{F#ff5c57}▄%{F-}
ramp-coreload-4 = %{F#ff5c57}▅%{F-}
ramp-coreload-5 = %{F#ff5c57}▆%{F-}
ramp-coreload-6 = %{F#ff5c57}▇%{F-}
ramp-coreload-7 = %{F#ff5c57}█%{F-}

@ -0,0 +1,15 @@
[module/date]
type = internal/date
interval = 1
date = "%d%{F#92}%m%{F-}%{F#49}%y%{F-}"
date-alt = " %d"
time = "%H%{F#92}%M%{F-}%{F#49}%S%{F-}"
time-alt = %H:%M
;format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%

@ -0,0 +1,13 @@
[module/eth]
type = internal/network
interface = eno1
interval = 3.0
format-connected-underline = #9f78e1
format-connected-prefix = " "
format-connected-prefix-foreground = #5b
label-connected = %ifname%
format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname%
label-disconnected-foreground = ${colors.foreground-alt}

@ -0,0 +1,5 @@
[module/filesystem-home]
type = internal/fs
interval = 25
mount-0 = /home
label-mounted = "%{F#5b5b5b}%{F-} %percentage_used%%"

@ -0,0 +1,7 @@
[module/filesystem-slash]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = "%{F#5b5b5b}%{F-} %percentage_used%%"
;label-unmounted = %mountpoint%: not mounted
;label-unmounted-foreground = ${colors.foreground-alt}

@ -0,0 +1,39 @@
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
strip-wsnumbers = true
pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
label-focused = %name%
label-focused-background = ${colors.background-alt}
label-focused-underline = #f3f99d
label-focused-padding = 2
label-unfocused = %name%
label-unfocused-padding = 2
label-urgent = %name%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-visible = %name%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-8 = 9;
ws-icon-9 = 10;

@ -0,0 +1,5 @@
[module/jgmenu]
type = custom/text
content-padding = 2
content = menu
click-left = "jgmenu_run >/dev/null 2>&1 &"

@ -0,0 +1,18 @@
[module/memory]
type = internal/memory
interval = 2
format = <label> <bar-used>
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
;format-underline = #4bffdc
label =
bar-used-width = 30
bar-used-foreground-0 = #5af78e
bar-used-foreground-1 = #5af78e
bar-used-foreground-2 = #f3f99d
bar-used-foreground-3 = #ff5c57
;bar-used-fill = ▐
bar-used-fill = 
bar-used-empty = 
bar-used-empty-foreground = #444444
bar-used-indicator =

@ -0,0 +1,7 @@
[module/networkspeeddown]
type = internal/network
interface = eno1
label-connected = "%downspeed:7%"
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-foreground = #5b

@ -0,0 +1,7 @@
[module/networkspeedup]
type = internal/network
interface = eno1
label-connected = "%upspeed:7%"
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-foreground = #5b

@ -0,0 +1,9 @@
[module/pkg]
type = custom/script
;tail = true
interval = 1200
format = <label>
format-underline = #ff5c57
label = "%output:0:50%"
exec = ~/.config/polybar/pkg.sh
exec-if = "ping -q -w 2 -c 1 176.34.135.167 > /dev/null"

@ -0,0 +1,33 @@
[module/powermenu]
type = custom/menu
label-open = 
label-open-foreground = #ff5c56
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-0-2 = log out
menu-0-2-exec = menu-open-3
menu-0-3 = 
menu-0-3-exec = "~/.i3/i3lock-fancy-multimonitor/lock &"
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = shutdown now
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
menu-3-0 = log out
menu-3-0-exec = i3-msg exit
menu-3-1 = cancel
menu-3-1-exec = menu-open-0

@ -0,0 +1,9 @@
[module/redshift]
type = custom/script
click-left = bash -x ~/.config/polybar/redshift.sh toggle
exec = cat ~/.config/polybar/.redshift
label = "%output:0:10%"
interval = 1
format-prefix = " "
format-underline = #268bd2
format-prefix-foreground = #5b

@ -0,0 +1,18 @@
[module/temperature]
type = internal/temperature
thermal-zone = 1
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature%
label-warn = %temperature%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}

@ -0,0 +1,28 @@
[module/volume]
type = internal/alsa
format-volume = <label-volume> <bar-volume>
label-volume = ""
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = muted
bar-volume-width = 10
bar-volume-foreground-0 = #5af78e
bar-volume-foreground-1 = #5af78e
bar-volume-foreground-2 = #5af78e
bar-volume-foreground-3 = #5af78e
bar-volume-foreground-4 = #5af78e
bar-volume-foreground-5 = #f3f99d
bar-volume-foreground-6 = #ff5c57
bar-volume-gradient = false
bar-volume-indicator = │
bar-volume-indicator-font = 2
bar-volume-indicator-foreground = #ff
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}

@ -0,0 +1,8 @@
[module/vpncheck]
type = custom/script
exec = pgrep openvpn
interval = 5
label = vpn
format-underline = #268bd2
format-prefix = " "
format-prefix-foreground = #5b

@ -0,0 +1,22 @@
[module/wlan]
type = internal/network
interface = wlp2s0
interval = 3.0
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-foreground = #5b
format-connected-underline = #9f78e1
;format-disconnected-underline = ${self.format-connected-underline}
label-connected = "%{A1:connman-gtk &:}%essid%%{A}"
;label-disconnected = "%{A1:connman-gtk &:}%{A}"
label-disconnected-foreground = #5b
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}

@ -0,0 +1,13 @@
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-underline = ${colors.secondary}
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
label-layout = %layout%
label-indicator-padding = 2
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}

@ -0,0 +1,3 @@
[module/xwindow]
type = internal/xwindow
label = " %{F#5b5b5b}%{F-} %title:0:60:...%"

@ -1,16 +1,16 @@
#!/bin/bash
pac=$(checkupdates 2>/dev/null | wc -l)
aur=$(trizen -Qua 2>/dev/null | wc -l)
kernel=$(vercmp "$(uname -r | cut -f-2 -d-)" "$(pacman --nodeps -Sp --print-format %v linux)")
#kernel=$(vercmp "$(uname -r | sed 's/-arch/\./')" "$(pacman --nodeps -Sp --print-format %v linux)")
if [[ $pac -eq "0" ]] && [[ $aur -eq "0" ]] || [[ ! $pac =~ [0-9]+ ]] || [[ ! $aur =~ [0-9]+ ]]
then
exit 0
fi
if [[ $kernel == "0" ]]
if [[ $(checkupdates | grep '^linux\ ') ]]
then
echo "$pac %{F#5b5b5b}%{F-} $aur"
else
echo "$pac %{F#ff5c57}%{F-} $aur"
else
echo "$pac %{F#5b5b5b}%{F-} $aur"
fi

@ -1,36 +1,46 @@
---
- name: Install polybar deps
package: name={{item}} state=present
with_items:
- wireless_tools
become: True
- name: Install polybar
aur: name={{item}} use=makepkg
with_items:
- siji-git
- polybar-git
aur:
name:
- siji-git
- polybar
skip_installed: yes
- name: Create polybar conf dir
file: path=~/.config/polybar state=directory
file:
path: ~/.config/polybar
state: directory
- name: Add pkg check script
copy: src=files/pkg.sh dest=~/.config/polybar/pkg.sh mode=0755
copy:
src: pkg.sh
dest: ~/.config/polybar/
mode: 0755
- name: Sync bars
synchronize:
src: files/bars
dest: ~/.config/polybar/
- name: Sync modules
synchronize:
src: files/modules
dest: ~/.config/polybar/
- name: Test if node specific template exists for launch.sh
stat: path="{{ role_path }}/templates/by_host/{{ ansible_hostname }}/launch.j2"
stat:
path: "{{ role_path }}/templates/by_host/{{ ansible_hostname }}/launch.j2"
register: launch_file
- name: Test if node specific template exists for modules top
stat: path="{{ role_path }}/templates/by_host/{{ ansible_hostname }}/modules-top.j2"
register: polybar_top_file
- name: Test if node specific template exists for modules bottom
stat: path="{{ role_path }}/templates/by_host/{{ ansible_hostname }}/modules-bottom.j2"
register: polybar_bottom_file
- name: Template launch file
template: src=templates/launch.j2 dest=~/.config/polybar/launch.sh mode=0755 backup=yes
template:
src: launch.j2
dest: ~/.config/polybar/launch.sh
mode: 0755
backup: yes
- name: Template config file
template: src=templates/config.j2 dest=~/.config/polybar/config backup=yes
copy:
src: config
dest: ~/.config/polybar/
backup: yes

@ -1,3 +1,4 @@
MONITOR=eDP-1 polybar top &
MONITOR=DP-1-1 polybar top &
MONITOR=DP-1-1 polybar top_light &
MONITOR=eDP-1 polybar bottom &
MONITOR=DP-1-2 polybar top_light &

@ -1,3 +0,0 @@
modules-left =
modules-center = networkspeedup networkspeeddown
modules-right = temperature filesystem-slash filesystem-home cpu memory

@ -1,3 +0,0 @@
modules-left = i3 xwindow
modules-center =
modules-right = backlight volume pkg vpncheck wlan eth battery date

@ -1,3 +1,4 @@
MONITOR=HDMI-1 polybar top &
MONITOR=HDMI-2 polybar top &
MONITOR=HDMI-2 polybar bottom &
MONITOR=HDMI2 polybar top &
MONITOR=HDMI3 polybar top_light &
MONITOR=HDMI1 polybar top_light &
MONITOR=HDMI3 polybar bottom &

@ -1,3 +0,0 @@
modules-left =
modules-center = networkspeedup networkspeeddown
modules-right = neon-lvmcheck neon-backupcheck filesystem-slash filesystem-home cpu memory

@ -1,19 +0,0 @@
[module/neon-lvmcheck]
type = custom/script
interval = 1200
format = <label>
label = "%output:0:100%%"
format-prefix = " neon:thinpool "
format-prefix-foreground = #5b5b5b
exec = ssh root@neon lvs | grep '^\ *rootpool' | awk '{ print $5 }'
exec-if = ssh-add -L
[module/neon-backupcheck]
type = custom/script
interval = 1200
format = <label>
label = "%output:0:100%"
format-prefix = " neon:dev/sdb "
format-prefix-foreground = #5b5b5b
exec = ssh root@neon df -h | grep /mnt/sdb | awk '{ print $5 }'
exec-if = ssh-add -L

@ -1,3 +0,0 @@
modules-left = i3 xwindow
modules-center =
modules-right = backlight volume github wlan eth vpncheck pkg battery date

@ -1,558 +0,0 @@
;=====================================================
;
; To learn more about how to configure Polybar
; go to https://github.com/jaagr/polybar
;
; The README contains alot of information
;
;=====================================================
[colors]
background = #222
background-alt = #444
foreground = #dfdfdf
foreground-alt = #55
primary = #ffb52a
secondary = #e60053
alert = #bd2c40
[global/wm]
margin-top = 5
margin-bottom = 5
[settings]
; The throttle settings lets the eventloop swallow up til X events
; if they happen within Y millisecond after first event was received.
; This is done to prevent flood of update event.
;
; For example if 5 modules emit an update event at the same time, we really
; just care about the last one. But if we wait too long for events to swallow
; the bar would appear sluggish so we continue if timeout
; expires or limit is reached.
throttle-output = 5
throttle-output-for = 10
; Time in milliseconds that the input handler will wait between processing events
throttle-input-for = 30
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
screenchange-reload = true
[bar/top]
{% if launch_file.stat.exists %}
monitor = ${env:MONITOR}
monitor-strict = true
{% else %}
;monitor = ${env:MONITOR}
;monitor-strict = true
{% endif %}
dpi = 72
bottom = false
width = 100%
height = 20
offset-x = 0
offset-y = 0
;background = ${xrdb:color9}
background = ${colors.background}
foreground = ${colors.foreground}
overline-size = 0
overline-color = #f00
underline-size = 2
underline-color = #00f
border-bottom-size = 0
border-bottom-color = ${colors.background}
spacing = 1
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = hack:pixelsize=12;2
font-1 = unifont:size=10;2
font-2 = siji:pixelsize=10;3
font-3 = FontAwesome:pixelsize=14;2
{% if polybar_top_file.stat.exists %}
{% include 'by_host/' + ansible_hostname + '/modules-top.j2' %}
{% else %}
modules-left = i3 xwindow
modules-center =
modules-right = pkg battery date powermenu
{% endif %}
tray-position = right
tray-padding = 4
;tray-transparent = true
;tray-background = #0063ff
;wm-restack = bspwm
;wm-restack = i3
;override-redirect = true
;scroll-up = bspwm-desknext
;scroll-down = bspwm-deskprev
;scroll-up = i3wm-wsnext
;scroll-down = i3wm-wsprev
[bar/bottom]
{% if launch_file.stat.exists %}
monitor = ${env:MONITOR}
monitor-strict = true
{% else %}
;monitor = ${env:MONITOR}
;monitor-strict = true
{% endif %}
dpi = 72
bottom = true
width = 100%
height = 20
offset-x = 0
offset-y = 0
;background = ${xrdb:color9}
background = ${colors.background}
foreground = ${colors.foreground}
overline-size = 0
overline-color = #f00
underline-size = 0
underline-color = #00f
border-bottom-size = 0
border-bottom-color = ${colors.background}
spacing = 1
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = hack:pixelsize=12;2
font-1 = unifont:size=10;2
font-2 = siji:pixelsize=10;3
font-3 = FontAwesome:pixelsize=14;2
{% if polybar_bottom_file.stat.exists %}
{% include 'by_host/' + ansible_hostname + '/modules-bottom.j2' %}
{% else %}
modules-left =
modules-center = networkspeedup networkspeeddown
modules-right = filesystem-slash cpu memory
{% endif %}
tray-position = right
tray-padding = 2
[module/xwindow]
type = internal/xwindow
label = " %{F#5b5b5b}%{F-} %title:0:60:...%"
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
format-underline = ${colors.secondary}
format-prefix = " "
format-prefix-foreground = ${colors.foreground-alt}
label-layout = %layout%
label-indicator-padding = 2
label-indicator-background = ${colors.secondary}
label-indicator-underline = ${colors.secondary}
[module/filesystem-home]
type = internal/fs
interval = 25
mount-0 = /home
label-mounted = "%{F#5b5b5b}%{F-} %percentage_used%%"
[module/filesystem-slash]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = "%{F#5b5b5b}%{F-} %percentage_used%%"
;label-unmounted = %mountpoint%: not mounted
;label-unmounted-foreground = ${colors.foreground-alt}
[module/bspwm]
type = internal/bspwm
ws-icon-default = x
label-focused = %index%
label-focused-background = ${colors.background-alt}
;label-focused-underline= ${colors.primary}
label-focused-underline= #f3f99d
label-focused-padding = 2
label-occupied = %index%
label-occupied-padding = 2
label-urgent = %index%!
label-urgent-background = ${colors.alert}
label-urgent-padding = 2
label-empty = %index%
label-empty-foreground = ${colors.foreground-alt}
label-empty-padding = 2
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
index-sort = true
wrapping-scroll = false
strip-wsnumbers = true
pin-workspaces = true
label-mode-padding = 2
label-mode-foreground = #000
label-mode-background = ${colors.primary}
label-focused = %name%
label-focused-background = ${module/bspwm.label-focused-background}
label-focused-underline = ${module/bspwm.label-focused-underline}
label-focused-padding = ${module/bspwm.label-focused-padding}
label-unfocused = %name%
label-unfocused-padding = ${module/bspwm.label-occupied-padding}
label-urgent = %name%!
label-urgent-background = ${module/bspwm.label-urgent-background}
label-urgent-padding = ${module/bspwm.label-urgent-padding}
label-visible = %name%
label-visible-background = ${self.label-focused-background}
label-visible-underline = ${self.label-focused-underline}
label-visible-padding = ${self.label-focused-padding}
ws-icon-0 = 1;
ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
ws-icon-6 = 7;
ws-icon-7 = 8;
ws-icon-8 = 9;
ws-icon-9 = 10;
[module/github]
type = internal/github
token = ${env:GITHUB_TOKEN}
label = "%notifications%"
format-underline = #2aa198
format-prefix = " "
format-prefix-foreground = #5b
[module/mpd]
type = internal/mpd
format-online = " <icon-prev> <icon-stop> <toggle> <icon-next> <icon-repeat> <icon-random> <label-song> <bar-progress>"
label-song-maxlen = 40
label-song-ellipsis = true
label-offline = offline
icon-prev = %{F#5b}%{F-}
icon-seekb = %{F#5b}%{F-}
icon-stop = %{F#5b}%{F-}
icon-play = %{F#5b}%{F-}
icon-pause = %{F#5b}%{F-}
icon-next = %{F#5b}%{F-}
icon-seekf = %{F#5b}%{F-}
icon-random = 
icon-repeat = 
toggle-on-foreground = ${colors.primary}
toggle-off-foreground = #66
bar-progress-width = 10
bar-progress-indicator = |
bar-progress-fill = ─
bar-progress-empty = ─
[module/backlight]
type = internal/backlight
card = intel_backlight
click-left = connman-gtk
format = <label> <bar>
label = ""
bar-width = 10
bar-indicator = |
bar-indicator-foreground = #ff
bar-indicator-font = 2
bar-fill = ─
bar-fill-font = 2
bar-fill-foreground = #9f78e1
bar-empty = ─
bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt}
[module/cpu]
type = internal/cpu
interval = 2
format = <ramp-coreload>
format-prefix =
format-prefix-foreground = ${colors.foreground-alt}
;format-underline = #f90000
label = %percentage%
ramp-coreload-0 = %{F#5b}▁%{F-}
ramp-coreload-1 = %{F#5b}▂%{F-}
ramp-coreload-2 = %{F#5b}▃%{F-}
ramp-coreload-3 = %{F#ff5c57}▄%{F-}
ramp-coreload-4 = %{F#ff5c57}▅%{F-}
ramp-coreload-5 = %{F#ff5c57}▆%{F-}
ramp-coreload-6 = %{F#ff5c57}▇%{F-}
ramp-coreload-7 = %{F#ff5c57}█%{F-}
[module/memory]
type = internal/memory
interval = 2
format = <label> <bar-used>
format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
;format-underline = #4bffdc
label =
bar-used-width = 30
bar-used-foreground-0 = #5af78e
bar-used-foreground-1 = #5af78e
bar-used-foreground-2 = #f3f99d
bar-used-foreground-3 = #ff5c57
;bar-used-fill = ▐
bar-used-fill = 
bar-used-empty = 
bar-used-empty-foreground = #444444
bar-used-indicator =
[module/wlan]
type = internal/network
interface = wlp2s0
interval = 3.0
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-foreground = #5b
format-connected-underline = #9f78e1
;format-disconnected-underline = ${self.format-connected-underline}
label-connected = "%{A1:connman-gtk &:}%essid%%{A}"
;label-disconnected = "%{A1:connman-gtk &:}%{A}"
label-disconnected-foreground = #5b
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-foreground = ${colors.foreground-alt}
[module/eth]
type = internal/network
interface = eno1
interval = 3.0
format-connected-underline = #9f78e1
format-connected-prefix = " "
format-connected-prefix-foreground = #5b
label-connected = %ifname%
format-disconnected-underline = ${self.format-connected-underline}
;label-disconnected = %ifname%
label-disconnected-foreground = ${colors.foreground-alt}
[module/networkspeedup]
type = internal/network
interface = wlp2s0
label-connected = "%upspeed:7%"
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-foreground = #5b
[module/networkspeeddown]
type = internal/network
interface = wlp2s0
label-connected = "%downspeed:7%"
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-foreground = #5b
[module/date]
type = internal/date
interval = 1
date = "%d%{F#92}%m%{F-}%{F#49}%y%{F-}"
date-alt = " %d"
time = "%H%{F#92}%M%{F-}%{F#49}%S%{F-}"
time-alt = %H:%M
;format-prefix = 
format-prefix-foreground = ${colors.foreground-alt}
format-underline = #0a6cf5
label = %date% %time%
[module/volume]
type = internal/asla
format-volume = <label-volume> <bar-volume>
label-volume = ""
label-volume-foreground = ${root.foreground}
format-muted-prefix = " "
format-muted-foreground = ${colors.foreground-alt}
label-muted = muted
bar-volume-width = 10
bar-volume-foreground-0 = #5af78e
bar-volume-foreground-1 = #5af78e
bar-volume-foreground-2 = #5af78e
bar-volume-foreground-3 = #5af78e
bar-volume-foreground-4 = #5af78e
bar-volume-foreground-5 = #f3f99d
bar-volume-foreground-6 = #ff5c57
bar-volume-gradient = false
bar-volume-indicator = │
bar-volume-indicator-font = 2
bar-volume-indicator-foreground = #ff
bar-volume-fill = ─
bar-volume-fill-font = 2
bar-volume-empty = ─
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${colors.foreground-alt}
[module/battery]
type = internal/battery
battery = BAT0
adapter = AC
full-at = 98
time-format = "%H%{F#92}%M%{F-}"
label-discharging = %percentage% %time%
format-charging = <animation-charging> <label-charging>
format-charging-underline = #f3f99d
format-discharging = <ramp-capacity> <label-discharging>
format-discharging-underline = ${self.format-charging-underline}
format-full-prefix = " "
format-full-prefix-foreground = ${colors.foreground-alt}
format-full-underline = ${self.format-charging-underline}
ramp-capacity-0 = 
ramp-capacity-1 = 
ramp-capacity-2 = 
ramp-capacity-3 = 
ramp-capacity-4 = 
ramp-capacity-foreground = ${colors.foreground-alt}
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-foreground = ${colors.foreground-alt}
animation-charging-framerate = 750
[module/temperature]
type = internal/temperature
thermal-zone = 1
warn-temperature = 60
format = <ramp> <label>
format-underline = #f50a4d
format-warn = <ramp> <label-warn>
format-warn-underline = ${self.format-underline}
label = %temperature%
label-warn = %temperature%
label-warn-foreground = ${colors.secondary}
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-foreground = ${colors.foreground-alt}
[module/pkg]
type = custom/script
;tail = true
interval = 1200
format = <label>
format-underline = #ff5c57
label = "%output:0:50%"
exec = ~/.config/polybar/pkg.sh
exec-if = "ping -q -w 2 -c 1 176.34.135.167 > /dev/null"
[module/vpncheck]
type = custom/script
exec = pgrep openvpn
interval = 5
label = vpn
format-underline = #268bd2
format-prefix = " "
format-prefix-foreground = #5b
[module/pptpcheck]
type = custom/script
exec = pgrep pppd
interval = 5
label = pptp
format-underline = #268bd2
format-prefix = " "
format-prefix-foreground = #5b
[module/powermenu]
type = custom/menu
label-open = 
label-open-foreground = #ff5c56
label-close =  cancel
label-close-foreground = ${colors.secondary}
label-separator = |
label-separator-foreground = ${colors.foreground-alt}
menu-0-0 = reboot
menu-0-0-exec = menu-open-1
menu-0-1 = power off
menu-0-1-exec = menu-open-2
menu-0-2 = log out
menu-0-2-exec = menu-open-3
menu-0-3 = 
menu-0-3-exec = "~/.i3/i3lock-fancy-multimonitor/lock &"
menu-1-0 = cancel
menu-1-0-exec = menu-open-0
menu-1-1 = reboot
menu-1-1-exec = sudo reboot
menu-2-0 = power off
menu-2-0-exec = shutdown now
menu-2-1 = cancel
menu-2-1-exec = menu-open-0
menu-3-0 = log out
menu-3-0-exec = i3-msg exit
menu-3-1 = cancel
menu-3-1-exec = menu-open-0
{% include 'by_host/' + ansible_hostname + '/modules-def.j2' ignore missing %}
{% include 'by_os/' + ansible_distribution|lower + '/modules-def.j2' ignore missing %}
; vim:ft=dosini

@ -10,8 +10,8 @@ while pgrep -x polybar >/dev/null; do sleep 1; done
{% if launch_file.stat.exists %}
{% include 'by_host/' + ansible_hostname + '/launch.j2' %}
{% else %}
polybar top &
polybar bottom &
MONITOR=$(xrandr | grep '\ connected' | head -n1 | awk '{print $1}') polybar top &
MONITOR=$(xrandr | grep '\ connected' | head -n1 | awk '{print $1}') polybar bottom &
{% endif %}
echo "Bars launched..."

@ -1,11 +1,21 @@
#!/bin/bash
action=$(echo -e "lock\nlogout\nshutdown\nreboot" | rofi -dmenu -p "power:")
action=$(echo -e "suspend\nlock\nhibernate\nlogout\nshutdown\nreboot" | rofi -dmenu -p "power:")
if [[ "$action" == "lock" ]]
then
~/.i3/i3lock-fancy-multimonitor/lock
fi
if [[ "$action" == "suspend" ]]
then
~/.i3/i3lock-fancy-multimonitor/lock && systemctl suspend-then-hibernate && echo '*/reconnect' >~/.weechat/weechat_fifo
fi
if [[ "$action" == "hibernate" ]]
then
systemctl hibernate
fi
if [[ "$action" == "logout" ]]
then
i3-msg exit

@ -28,5 +28,6 @@ rofi.fixed-num-lines: false
rofi.terminal: termite
rofi.ssh-client: ssh
rofi.ssh-command: {terminal} -e "{ssh-client} {host}"
rofi.run-command: {cmd}
rofi.run-command: fish -c '{cmd}'
rofi.run-list-command: 'fish -c functions'
rofi.run-shell-command: {terminal} -e {cmd}

@ -1,18 +1,33 @@
---
- name: Install rofi
aur: name=rofi use=makepkg
aur:
name: rofi
skip_installed: yes
- name: Create rofi conf dir
file: path=~/.config/rofi state=directory
file:
path: ~/.config/rofi
state: directory
- name: Copy powermenu script
copy: src=files/powermenu.sh dest=~/.config/rofi/powermenu.sh mode=0755
copy:
src: powermenu.sh
dest: ~/.config/rofi/powermenu.sh
mode: 0755
- name: Create .Xresources.d dir
file: path=~/.Xresources.d state=directory
file:
path: ~/.Xresources.d
state: directory
- name: Copy Xresources.d rofi file
copy: src=files/rofi dest=~/.Xresources.d/rofi
copy:
src: rofi
dest: ~/.Xresources.d/rofi
- name: Init rofi in Xresources
lineinfile: path=~/.Xresources create=yes state=present line='#include ".Xresources.d/rofi"'
lineinfile:
path: ~/.Xresources
create: yes
state: present
line: '#include ".Xresources.d/rofi"'

@ -1,7 +1,12 @@
---
- name: Install screen
package: name=screen state=present
package:
name: screen
state: present
become: True
- name: Configure screen
copy: src=files/screenrc dest=~/.screenrc backup=yes
copy:
src: screenrc
dest: ~/.screenrc
backup: yes

@ -0,0 +1,2 @@
eval $(ssh-agent)
ssh-add &

@ -1,8 +1,5 @@
---
- name: Configure ssh-agent
blockinfile:
path: ~/.xprofile
create: True
marker: "### {mark} DOTFILES ssh-add ###"
content: |
ssh-add &
copy:
src: ssh-add.sh
dest: ~/.xprofile.d/

@ -1,4 +0,0 @@
---
- name: Install termite terminfo [Archlinux]
pacman: name=termite-terminfo state=present
become: True

@ -1,8 +1,8 @@
---
- name: Install termite terminfo [Common]
shell: creates={{ item.creates }} {{ item.cmd }}
with_items:
- { creates: '/root/termite.terminfo', cmd: 'wget "https://raw.githubusercontent.com/thestinger/termite/master/termite.terminfo" -O /root/termite.terminfo' }
- { creates: '/root/.termite.terminfo', cmd: 'tic -x /root/termite.terminfo' }
- { creates: '/root/.termite.terminfo', cmd: 'touch /root/.termite.terminfo' }
- name: Install termite terminfo
shell: |
wget "https://raw.githubusercontent.com/thestinger/termite/master/termite.terminfo" -O /root/termite.terminfo
tic -x /root/termite.terminfo
args:
creates: /root/termite.terminfo
become: True

@ -1,6 +1,7 @@
---
- name: Test distribution packages file
stat: path="{{ role_path }}/tasks/by_os/{{ ansible_distribution|lower }}/main.yml"
stat:
path: "{{ role_path }}/tasks/by_os/{{ ansible_distribution|lower }}/main.yml"
register: distribution_file
- name: Include distribution packages

@ -1,13 +1,22 @@
---
- name: Install termite
package: name=termite state=present
package:
name: termite
state: present
become: True
- name: Create termite conf dir
file: path=~/.config/termite state=directory
file:
path: ~/.config/termite
state: directory
- name: Configure termite
copy: src=files/config dest=~/.config/termite/config backup=yes
copy:
src: config
dest: ~/.config/termite/config
backup: yes
- name: add termite padding
copy: src=files/gtk.css dest=~/.config/gtk-3.0/gtk.css
copy:
src: gtk.css
dest: ~/.config/gtk-3.0/gtk.css

@ -0,0 +1 @@
feh --bg-scale ~/img/wallpaper.jpg &

@ -1,14 +1,15 @@
---
- name: Create img dir
file: path=~/img state=directory
file:
path: ~/img
state: directory
- name: Copy wallpaper
copy: src=files/wallpaper.jpg dest=~/img/wallpaper.jpg
copy:
src: wallpaper.jpg
dest: ~/img/
- name: Init wallpaper in .xprofile
blockinfile:
path: ~/.xprofile
create: True
marker: "### {mark} DOTFILES wallpaper ###"
content: |
feh --bg-scale ~/img/wallpaper.jpg &
copy:
src: wallpaper.sh
dest: ~/.xprofile.d/

@ -0,0 +1,216 @@
# change_on_start = <True or False>
change_on_start = True
# change_enabled = <True or False>
change_enabled = True
# change_interval = <interval in seconds - not less than 5>
change_interval = 300
# safe_mode = <True or False>
safe_mode = False
# download_enabled = <True or False>
download_enabled = True
# download_interval = <interval in seconds - not less than 30>
download_interval = 300
# download_folder = <some folder> - when not specified, the default is ~/.config/variety/Downloaded
download_folder = ~/.config/variety/Downloaded
# Determine if there the download folder sould not exceed a certain size (in megabytes)
# quota_enabled = <True or False>
# quota_size = <size in MB, minimum 50>
quota_enabled = True
quota_size = 500
# favorites_folder = <some folder> - when not specified, the default is ~/.config/variety/Favorites
favorites_folder = ~/.config/variety/Favorites
# Prefer Copy to Favorites or Move to Favorites operation (or both), depending on the folder of the current image
# favorites_operations = <A list of directories and the preferred operation (Copy, Move or Both) for each of them>
# The default is: Downloaded:Copy;Fetched:Move;Others:Copy
# Order is important - the first matching entry will determine what operation(s) to show in the menu for a specific file
# Special folder names you can use: Downloaded, Fetched and Others (same as "/" - use it as last entry to determine the default operation)
# Example1: Downloaded:Copy;Fetched:Move;/pics/RandomImages:Move;/pics/OrganizedAlbums:Copy;Others:Copy
# Example2: Others:Both - always show both Copy and Move to Favorites, no matter which image is shown
# Move to Favorites is only shown when the user has write permissions over the file, otherwise we fallback to Copy
favorites_operations = Downloaded:Copy;Fetched:Move;Others:Copy
# fetch_folder = <some folder> - when not specified, the default is ~/.config/variety/Fetched
fetched_folder = ~/.config/variety/Fetched
# Clipboard monitoring settings
# clipboard_enabled = <True or False>
# clipboard_use_whitelist = <will we use a hosts whitelist, or we'll fetch from everywhere - True or False>
# clipboard_hosts = <comma-separated whitelist of hosts for which clipboard fetching is enabled>
clipboard_enabled = False
clipboard_use_whitelist = True
clipboard_hosts = "wallhaven.cc,wallpapers.net,flickr.com,imgur.com,deviantart.com,interfacelift.com,vladstudio.com,imageshack.us,deviantart.net,imageshack.com"
# Icon settings
# icon = <Light, Dark, Current, None, or a full path to an image file>
icon = Light
# Prefer only images with this color:
# desired_color_enabled = <True or False>
# desired_color = <None or rgb like this: 100 150 200>
# DISCLAIMER: This feature is still experimental
desired_color_enabled = False
desired_color = 160 160 160
# Minimum size of images to use, as a percentage of the screen resolution
# min_size_enabled = <True or False>
# min_size = <Percentage>
min_size_enabled = False
min_size = 80
# Should we use only landscape-oriented images?
# use_landscape_enabled = <True or False>
use_landscape_enabled = True
# Prefer light or dark images
# lightness_enabled = <True or False>
# lightness_mode = <0 for Dark, 1 for Light>
lightness_enabled = False
lightness_mode = 0
# Use a filter by rating?
# min_rating_enabled = <True or False>
# min_rating = <1 | 2 | 3 | 4 | 5>
min_rating_enabled = False
min_rating = 4
# What parts of the initial wizard have we covered
smart_notice_shown = False
smart_register_shown = False
stats_notice_shown = False
# Are smart features enabled (i.e. data collection on Fav/Trash operations), also sync, and anonymous usage stats collection?
# smart_enabled = <True or False>
smart_enabled = False
sync_enabled = True
stats_enabled = True
# Folder to copy the wallpaper image to and make it world-readable. Provides LightDM support.
# copyto_enabled = <True or False>, default is False
# copyto_folder = <Default or Path to a custom folder>, the default is Default
# Default means to use the XDG Pictures folder when home folder is unencrypted and /usr/share/backgrounds when it is encrypted.
copyto_enabled = False
copyto_folder = Default
# Clock settings
# clock_enabled = <True or False>
# clock_font = <FontName Size>, default is "Ubuntu Condensed, 70"
# clock_date_font = <FontName Size>, default is "Ubuntu Condensed, 30"
clock_enabled = False
clock_font = "Ubuntu Condensed, 70"
clock_date_font = "Ubuntu Condensed, 30"
# clock_filter = <an ImageMagick filter, read below>
#
# The filter defines the ImageMagick command that Variety uses to render the clock on the wallpaper.
# First some scaling is applied to get the image down to the screen size - this ensures
# the final drawn clock won't be rescaled by the desktop wallpaper system.
# Easiest way to see what's happening is to run variety with -v, enable clock and see what ImageMagick
# commands Variety dumps in the log.
#
# The user may want to customize the following aspects:
# fill - color of "filling"
# stroke - color of outline
# strokewidth - width of outline
# gravity - in which corner to display the clock - SouthEast, NorthEast, SouthWest, NorthWest
# annotate - these must be in the form 0x0+[%HOFFSET+X]+[%VOFFSET+Y], where you can edit X and Y -
# distance from the screen corner defined by gravity. Write them in even if they are 0.
#
# The %HOFFSET and %VOFFSET parameters are there for Variety to replace in order to compensate for the
# diferent dimensions of every image and screen.
# The several %FONT parameters are there for Variety to replace with the font settings from the GUI.
#
# The texts can contain these symbols:
#
# %H - hours (24), %I - hours (12), %p - am or pm, %M - minutes,
# %A - day of week (full), %a - day of week abbreviation, %B - month name, %b - month abbreviation, %d - day of month, %Y - year.
# The full list for these can be seen here: http://docs.python.org/library/datetime.html#strftime-strptime-behavior
# Have in mind that Variety will not update the clock more often than once every minute, so using seconds (%S) for example is pointless
#
# A tutorial on "annotating" with ImageMagick that you may use as a reference: http://www.imagemagick.org/Usage/annotating/
# You can get a very uniquely looking clock with some of the more advanced techniques (e.g. circle-shaped text, interesting colors and shading, etc....).
clock_filter = "-density 100 -font `fc-match -f '%{file[0]}' '%CLOCK_FONT_NAME'` -pointsize %CLOCK_FONT_SIZE -gravity SouthEast -fill '#00000044' -annotate 0x0+[%HOFFSET+58]+[%VOFFSET+108] '%H:%M' -fill white -annotate 0x0+[%HOFFSET+60]+[%VOFFSET+110] '%H:%M' -font `fc-match -f '%{file[0]}' '%DATE_FONT_NAME'` -pointsize %DATE_FONT_SIZE -fill '#00000044' -annotate 0x0+[%HOFFSET+58]+[%VOFFSET+58] '%A, %B %d' -fill white -annotate 0x0+[%HOFFSET+60]+[%VOFFSET+60] '%A, %B %d'"
# Quotes settings
# quotes_enabled = <True or False>
# quotes_font = <FontName Size>, default is Bitstream Charter 30
# quotes_text_color = <r g b>, default is 255 255 255
# quotes_bg_color = <r g b>, default is 80 80 80
# quotes_bg_opacity = <0-100>, default is 55
# quotes_width = <0-100>, default is 70
# quotes_hpos = <0-100>, default is 100
# quotes_vpos = <0-100>, default is 40
# quotes_text_shadow = <True or False>, default is False
# quotes_disabled_sources = <|-separated list of disabled quote plugin names>, default is empty
# quotes_tags = <comma-separated list of tags>, default is empty
# quotes_authors = <comma-separated list of authors>, default is empty
# quotes_change_enabled = <True or False>
# quotes_change_interval = <interval in seconds - not less than 10>, default is 300
quotes_enabled = False
quotes_font = Bitstream Charter 30
quotes_text_color = 255 255 255
quotes_bg_color = 80 80 80
quotes_bg_opacity = 55
quotes_text_shadow = False
quotes_width = 70
quotes_hpos = 100
quotes_vpos = 40
quotes_disabled_sources = QuotesDaddy
quotes_tags = ""
quotes_authors = ""
quotes_change_enabled = False
quotes_change_interval = 300
quotes_favorites_file = ~/.config/variety/favorite_quotes.txt
quotes_favorites_format = fortune
# Slideshow settings
slideshow_favorites_enabled = True
slideshow_sources_enabled = True
slideshow_downloads_enabled = False
slideshow_custom_enabled = False
slideshow_custom_folder = /home/user
slideshow_sort_order = Random
slideshow_monitor = All
slideshow_mode = Fullscreen
slideshow_seconds = 6.0
slideshow_fade = 0.4
slideshow_zoom = 0.2
slideshow_pan = 0.05
# List of sources
# Each source is srcX = <enabled or not|source type - one of image, folder, desktoppr, apod, flickr, wn|location>
# location depends on type - path or url or search options, or just a name for unconfigurable sources
# Folders are included recursively
# BE CAREFUL: all keys below (src1, src2, etc.) MUST be different
[sources]
src1 = False|favorites|The Favorites folder
src2 = False|fetched|The Fetched folder
src3 = False|folder|/usr/share/backgrounds
src4 = True|desktoppr|Random wallpapers from Desktoppr.co
src5 = True|bing|Bing Photo of the Day
src6 = True|unsplash|High-resolution photos from Unsplash.com
src7 = True|apod|NASA's Astronomy Picture of the Day
src8 = False|earth|World Sunlight Map - live wallpaper from Die.net
src9 = False|flickr|user:www.flickr.com/photos/peter-levi/;user_id:93647178@N00;
# Image filters to apply randomly to every wallpaper (ImageMagick is used for this)
# Each filter is filterX = <enabled or not|filter name|arguments to pass to ImageMagick when calling convert>
# BE CAREFUL: all keys below (filter1, filter2, etc.) MUST be different
[filters]
filter1 = False|Keep original|
filter2 = False|Grayscale|-type Grayscale
filter3 = False|Heavy blur|-blur 120x40
filter4 = False|Soft blur|-blur 20x7
filter5 = False|Oil painting|-paint 8
filter6 = '''False|Pencil sketch|-colorspace gray \( +clone -tile ~/.config/variety/pencil_tile.png -draw "color 0,0 reset" +clone +swap -compose color_dodge -composite \) -fx 'u*.2+v*.8''''
filter7 = False|Pointilism|-spread 10 -noise 3
filter8 = False|Pixellate|-scale 3% -scale 3333%

@ -0,0 +1 @@
variety &

@ -0,0 +1,17 @@
---
- name: install variety
package:
name: variety
state: present
become: yes
- name: configure variety
copy:
src: variety.conf
dest: ~/.config/variety
backup: yes
- name: configure variety xprofile
copy:
src: variety.sh
dest: ~/.xprofile.d/

@ -1,289 +0,0 @@
" pathogen.vim - path option manipulation
" Maintainer: Tim Pope <http://tpo.pe/>
" Version: 2.4
" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
"
" For management of individually installed plugins in ~/.vim/bundle (or
" ~\vimfiles\bundle), adding `execute pathogen#infect()` to the top of your
" .vimrc is the only other setup necessary.
"
" The API is documented inline below.
if exists("g:loaded_pathogen") || &cp
finish
endif
let g:loaded_pathogen = 1
" Point of entry for basic default usage. Give a relative path to invoke
" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke
" pathogen#surround(). Curly braces are expanded with pathogen#expand():
" "bundle/{}" finds all subdirectories inside "bundle" inside all directories
" in the runtime path.
function! pathogen#infect(...) abort
for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}']
if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]'
call pathogen#surround(path)
elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)'
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#surround(path . '/{}')
elseif path =~# '[{}*]'
call pathogen#interpose(path)
else
call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')')
call pathogen#interpose(path . '/{}')
endif
endfor
call pathogen#cycle_filetype()
if pathogen#is_disabled($MYVIMRC)
return 'finish'
endif
return ''
endfunction
" Split a path into a list.
function! pathogen#split(path) abort
if type(a:path) == type([]) | return a:path | endif
if empty(a:path) | return [] | endif
let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
endfunction
" Convert a list to a path.
function! pathogen#join(...) abort
if type(a:1) == type(1) && a:1
let i = 1
let space = ' '
else
let i = 0
let space = ''
endif
let path = ""
while i < a:0
if type(a:000[i]) == type([])
let list = a:000[i]
let j = 0
while j < len(list)
let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
let path .= ',' . escaped
let j += 1
endwhile
else
let path .= "," . a:000[i]
endif
let i += 1
endwhile
return substitute(path,'^,','','')
endfunction
" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
function! pathogen#legacyjoin(...) abort
return call('pathogen#join',[1] + a:000)
endfunction
" Turn filetype detection off and back on again if it was already enabled.
function! pathogen#cycle_filetype() abort
if exists('g:did_load_filetypes')
filetype off
filetype on
endif
endfunction
" Check if a bundle is disabled. A bundle is considered disabled if its
" basename or full name is included in the list g:pathogen_blacklist or the
" comma delimited environment variable $VIMBLACKLIST.
function! pathogen#is_disabled(path) abort
if a:path =~# '\~$'
return 1
endif
let sep = pathogen#slash()
let blacklist =
\ get(g:, 'pathogen_blacklist', get(g:, 'pathogen_disabled', [])) +
\ pathogen#split($VIMBLACKLIST)
if !empty(blacklist)
call map(blacklist, 'substitute(v:val, "[\\/]$", "", "")')
endif
return index(blacklist, fnamemodify(a:path, ':t')) != -1 || index(blacklist, a:path) != -1
endfunction
" Prepend the given directory to the runtime path and append its corresponding
" after directory. Curly braces are expanded with pathogen#expand().
function! pathogen#surround(path) abort
let sep = pathogen#slash()
let rtp = pathogen#split(&rtp)
let path = fnamemodify(a:path, ':s?[\\/]\=$??')
let before = filter(pathogen#expand(path), '!pathogen#is_disabled(v:val)')
let after = filter(reverse(pathogen#expand(path, sep.'after')), '!pathogen#is_disabled(v:val[0:-7])')
call filter(rtp, 'index(before + after, v:val) == -1')
let &rtp = pathogen#join(before, rtp, after)
return &rtp
endfunction
" For each directory in the runtime path, add a second entry with the given
" argument appended. Curly braces are expanded with pathogen#expand().
function! pathogen#interpose(name) abort
let sep = pathogen#slash()
let name = a:name
if has_key(s:done_bundles, name)
return ""
endif
let s:done_bundles[name] = 1
let list = []
for dir in pathogen#split(&rtp)
if dir =~# '\<after$'
let list += reverse(filter(pathogen#expand(dir[0:-6].name, sep.'after'), '!pathogen#is_disabled(v:val[0:-7])')) + [dir]
else
let list += [dir] + filter(pathogen#expand(dir.sep.name), '!pathogen#is_disabled(v:val)')
endif
endfor
let &rtp = pathogen#join(pathogen#uniq(list))
return 1
endfunction
let s:done_bundles = {}
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
function! pathogen#helptags() abort
let sep = pathogen#slash()
for glob in pathogen#split(&rtp)
for dir in map(split(glob(glob), "\n"), 'v:val.sep."/doc/".sep')
if (dir)[0 : strlen($VIMRUNTIME)] !=# $VIMRUNTIME.sep && filewritable(dir) == 2 && !empty(split(glob(dir.'*.txt'))) && (!filereadable(dir.'tags') || filewritable(dir.'tags'))
silent! execute 'helptags' pathogen#fnameescape(dir)
endif
endfor
endfor
endfunction
command! -bar Helptags :call pathogen#helptags()
" Execute the given command. This is basically a backdoor for --remote-expr.
function! pathogen#execute(...) abort
for command in a:000
execute command
endfor
return ''
endfunction
" Section: Unofficial
function! pathogen#is_absolute(path) abort
return a:path =~# (has('win32') ? '^\%([\\/]\|\w:\)[\\/]\|^[~$]' : '^[/~$]')
endfunction
" Given a string, returns all possible permutations of comma delimited braced
" alternatives of that string. pathogen#expand('/{a,b}/{c,d}') yields
" ['/a/c', '/a/d', '/b/c', '/b/d']. Empty braces are treated as a wildcard
" and globbed. Actual globs are preserved.
function! pathogen#expand(pattern, ...) abort
let after = a:0 ? a:1 : ''
if a:pattern =~# '{[^{}]\+}'
let [pre, pat, post] = split(substitute(a:pattern, '\(.\{-\}\){\([^{}]\+\)}\(.*\)', "\\1\001\\2\001\\3", ''), "\001", 1)
let found = map(split(pat, ',', 1), 'pre.v:val.post')
let results = []
for pattern in found
call extend(results, pathogen#expand(pattern))
endfor
elseif a:pattern =~# '{}'
let pat = matchstr(a:pattern, '^.*{}[^*]*\%($\|[\\/]\)')
let post = a:pattern[strlen(pat) : -1]
let results = map(split(glob(substitute(pat, '{}', '*', 'g')), "\n"), 'v:val.post')
else
let results = [a:pattern]
endif
let vf = pathogen#slash() . 'vimfiles'
call map(results, 'v:val =~# "\\*" ? v:val.after : isdirectory(v:val.vf.after) ? v:val.vf.after : isdirectory(v:val.after) ? v:val.after : ""')
return filter(results, '!empty(v:val)')
endfunction
" \ on Windows unless shellslash is set, / everywhere else.
function! pathogen#slash() abort
return !exists("+shellslash") || &shellslash ? '/' : '\'
endfunction
function! pathogen#separator() abort
return pathogen#slash()
endfunction
" Convenience wrapper around glob() which returns a list.
function! pathogen#glob(pattern) abort
let files = split(glob(a:pattern),"\n")
return map(files,'substitute(v:val,"[".pathogen#slash()."/]$","","")')
endfunction
" Like pathogen#glob(), only limit the results to directories.
function! pathogen#glob_directories(pattern) abort
return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
endfunction
" Remove duplicates from a list.
function! pathogen#uniq(list) abort
let i = 0
let seen = {}
while i < len(a:list)
if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
call remove(a:list,i)
elseif a:list[i] ==# ''
let i += 1
let empty = 1
else
let seen[a:list[i]] = 1
let i += 1
endif
endwhile
return a:list
endfunction
" Backport of fnameescape().
function! pathogen#fnameescape(string) abort
if exists('*fnameescape')
return fnameescape(a:string)
elseif a:string ==# '-'
return '\-'
else
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
endif
endfunction
" Like findfile(), but hardcoded to use the runtimepath.
function! pathogen#runtime_findfile(file,count) abort
let rtp = pathogen#join(1,pathogen#split(&rtp))
let file = findfile(a:file,rtp,a:count)
if file ==# ''
return ''
else
return fnamemodify(file,':p')
endif
endfunction
" Section: Deprecated
function! s:warn(msg) abort
echohl WarningMsg
echomsg a:msg
echohl NONE
endfunction
" Prepend all subdirectories of path to the rtp, and append all 'after'
" directories in those subdirectories. Deprecated.
function! pathogen#runtime_prepend_subdirectories(path) abort
call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')')
return pathogen#surround(a:path . pathogen#slash() . '{}')
endfunction
function! pathogen#incubate(...) abort
let name = a:0 ? a:1 : 'bundle/{}'
call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')')
return pathogen#interpose(name)
endfunction
" Deprecated alias for pathogen#interpose().
function! pathogen#runtime_append_all_bundles(...) abort
if a:0
call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')')
else
call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()')
endif
return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}')
endfunction
" vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=':

@ -1,49 +0,0 @@
---
- name: Install vim
package: name={{item}} state=present
with_items:
- vim
become: True
- name: Create .vim dirs
file: path={{item}} state=directory
with_items:
- ~/.vim
- ~/.vim/bundle
- ~/.vim/autoload
- name: Clone airline
git:
repo: https://github.com/vim-airline/vim-airline
dest: ~/.vim/bundle/vim-airline
- name: Clone airline-themes
git:
repo: https://github.com/vim-airline/vim-airline-themes
dest: ~/.vim/bundle/vim-airline-thmes
- name: Ansible vim
git:
repo: https://github.com/pearofducks/ansible-vim
dest: ~/.vim/bundle/ansible-vim
- name: Configure vim
template: src=templates/vimrc dest=~/.vimrc backup=yes
- name: Configure pathogen autoload
copy: src=files/pathogen.vim dest=~/.vim/autoload/pathogen.vim
- name: Clone colorizer
git:
repo: https://github.com/lilydjwg/colorizer
dest: ~/.vim/bundle/colorizer
- name: Clone vim-sleught
git:
repo: https://github.com/tpope/vim-sleuth
dest: ~/.vim/bundle/vim-sleuth
- name: Clone auto-pairs
git:
repo: https://github.com/jiangmiao/auto-pairs
dest: ~/.vim/bundle/auto-pairs

@ -1,34 +0,0 @@
"pathogen
execute pathogen#infect()
" lines numbers
" set nu
syntax on
filetype plugin indent on
set background=dark
set mouse=r
set ruler " show the cursor position all the time
set autoindent " always set autoindenting on
set wildmenu
" tab 4 spaces
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
" brackets highlight color
autocmd VimEnter,Colorscheme * :hi MatchParen cterm=none ctermbg=white ctermfg=black
" remember last cursor place
au BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
" airline
let g:airline_powerline_fonts = 1
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_symbols.space = "\ua0"
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#show_buffers = 0
let g:airline_theme = 'minimalist'
" fzf
set rtp+=~/.fzf

@ -1,11 +1,6 @@
# Weechat Theme
To let ansible rerun cmd in weechat fifo, please
To trigger configuration again, you need to remove lock file
```
rm ~/.weechat/themed
```
Then you can re run configuration
```
cd ~/dotfiles
./install.sh weechat
```

@ -0,0 +1 @@
screen -DmS weechat /usr/bin/weechat &

@ -1,18 +1,16 @@
---
- name: Install weechat
package: name={{item}} state=present
with_items:
- screen
- weechat
package:
name:
- screen
- weechat
state: present
become: True
- name: Init weechat in .xprofile
blockinfile:
path: ~/.xprofile
create: True
marker: "### {mark} DOTFILES weechat ###"
content: |
screen -DmS weechat /usr/bin/weechat &
- name: Weechat in xprofile
copy:
src: weechat.sh
dest: ~/.xprofile.d/
when: ansible_user_id != "vagrant"
- name: Start weechat
@ -28,8 +26,10 @@
when: not stat_fifo.stat.exists
- name: Theme weechat
shell: creates=~/.weechat/themed echo {{item}} >~/.weechat/weechat_fifo
with_items:
shell: echo {{item}} >~/.weechat/weechat_fifo
args:
creates: ~/.weechat/themed
loop:
- '*/bar hide nicklist'
- '*/bar show title'
- '*/bar hide status'
@ -59,4 +59,7 @@
- '*/reload'
- name: Create themed file
file: path=~/.weechat/themed state=touch
file:
path: ~/.weechat/themed
state: touch
changed_when: false

@ -0,0 +1,71 @@
# For the benefit of emacs users: -*- shell-script -*-
###########################
# xbindkeys configuration #
###########################
#
# Version: 1.8.6
#
# If you edit this file, do not forget to uncomment any lines
# that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# To specify a key, you can use 'xbindkeys --key' or
# 'xbindkeys --multikey' and put one of the two lines in this file.
#
# The format of a command line is:
# "command to start"
# associated key
#
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier:
# Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# The release modifier is not a standard X modifier, but you can
# use it if you want to catch release events instead of press events
# By defaults, xbindkeys does not pay attention with the modifiers
# NumLock, CapsLock and ScrollLock.
# Uncomment the lines above if you want to pay attention to them.
#keystate_numlock = enable
#keystate_capslock = enable
#keystate_scrolllock= enable
"amixer set Master toggle"
m:0x0 + c:121
XF86AudioMute
"amixer set Master 5%-"
m:0x0 + c:122
XF86AudioLowerVolume
"amixer set Master 5%+"
m:0x0 + c:123
XF86AudioRaiseVolume
"light -U 5"
m:0x0 + c:232
XF86MonBrightnessDown
"light -A 5"
m:0x0 + c:233
XF86MonBrightnessUp
"maim -s -d2"
m:0x10 + c:107
Mod2 + Print
"xdotool click --clearmodifiers 2"
m:0x10 + c:135
Mod2 + Menu
##################################
# End of xbindkeys configuration #
##################################

@ -0,0 +1 @@
xbindkeys &

@ -1,15 +1,17 @@
---
- name: Install xbindkeys
package: name=xbindkeys state=present
package:
name: xbindkeys
state: present
become: True
- name: Configure xbindkeys
copy: src=files/xbindkeysrc dest=~/.xbindkeysrc backup=yes
copy:
src: xbindkeysrc
dest: ~/.xbindkeysrc
backup: yes
- name: Init xbindkeys in .xprofile
blockinfile:
path: ~/.xprofile
create: True
marker: "### {mark} DOTFILES xbindkeys###"
content: |
xbindkeys &
copy:
src: xbindkeys.sh
dest: ~/.xprofile.d/

Some files were not shown because too many files have changed in this diff Show More