templier-ansible/roles/xorg/tasks/main.yml

85 lines
1.7 KiB
YAML
Raw Normal View History

2021-01-29 00:08:39 +00:00
---
- name: Queries package manager for graphical instalation
package:
name:
- autorandr
- font-bh-ttf
- gsfonts
- light
- noto-fonts-emoji
- physlock
- sdl_ttf
- ttf-bitstream-vera
- ttf-dejavu
- ttf-liberation
- xorg-fonts-type1
- xorg-xinit
- xorg-server
- xss-lock
register: pkg_result
retries: 3
until: pkg_result is succeeded
become: yes
- name: Queries package manager for graphical instalation specific to abyme installation
package:
name:
- nvidia
register: pkg_result
retries: 3
until: pkg_result is succeeded
when: laptop.gpu
become: yes
- name: Queries package manager for graphical instalation specific to abyme installation
package:
name:
- numlockx
register: pkg_result
retries: 3
until: pkg_result is succeeded
when: laptop.numpad
become: yes
- name: Copy user configuration files
template:
src: 'xinitrc.j2'
dest: '.xinitrc'
- name: Copy touchpad configuration
template:
src: '30-touchpad.conf.j2'
dest: '/etc/X11/xorg.conf.d/30-touchpad.conf'
become: yes
- name: Change backlight property # doing some shifty things
file:
path: '/sys/class/backlight/intel_backlight/brightness'
group: video
mode: '0664'
become: yes
- name: Gives user the good group
user:
name: ynerant
groups: video
append: yes
become: yes
- name: Create autorandr configuration folder
file:
path: '~/.config/autorandr'
state: directory
- name: Install autorandr postswitch configuration file
template:
src: 'postswitch.j2'
dest: '~/.config/autorandr/postswitch'
mode: '0755'
- name: Enable autorandr service
service:
name: autorandr
enabled: yes
become: true