Moved some desktop environment stuff to Ansible

This commit is contained in:
Geoffrey Frogeye 2021-06-19 12:25:38 +02:00
parent fda5b38ddb
commit 4e8681fad0
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
7 changed files with 36 additions and 24 deletions

View file

@ -1,8 +0,0 @@
#!/usr/bin/env bash
mkdir -p $HOME/.local/share/fonts
echo $(for i in "" "%20Bold" "%20Oblique" "%20Bold%20Oblique"; do
cd $HOME/.local/share/fonts
wget -c http://raw.githubusercontent.com/powerline/fonts/master/DejaVuSansMono/DejaVu%20Sans%20Mono$i%20for%20Powerline.ttf
done)
wget -c "https://raw.githubusercontent.com/FortAwesome/Font-Awesome/a8386aae19e200ddb0f6845b5feeee5eb7013687/fonts/fontawesome-webfont.ttf" -O $HOME/.local/share/fonts/fontawesome-webfont.ttf

View file

@ -1,14 +1,38 @@
- name: Ensure directories for theme are present - name: Ensure directories for theme are present
file: file:
state: directory state: directory
path: "{{ ansible_env.HOME }}/{{ item }}" path: "{{ ansible_user_dir }}/{{ item }}"
mode: "u=rwx,g=rx,o=rx"
with_items: with_items:
- ".config/Xresources" - ".config/Xresources"
- ".config/rofi" - ".config/rofi"
- ".local/bin" - ".local/bin"
- ".local/share/fonts"
- ".config/qutebrowser" - ".config/qutebrowser"
- ".config/tridactyl/themes" - ".config/tridactyl/themes"
# Download fonts
- name: Download terminal fonts
get_url:
url: "http://raw.githubusercontent.com/powerline/fonts/master/DejaVuSansMono/{{ item | urlencode }}"
dest: "{{ ansible_user_dir }}/.local/share/fonts/{{ item }}"
mode: "u=rw,g=r,o=r"
loop:
- DejaVu Sans Mono Bold for Powerline.ttf
- DejaVu Sans Mono Bold Oblique for Powerline.ttf
- DejaVu Sans Mono for Powerline.ttf
- DejaVu Sans Mono Oblique for Powerline.ttf
- name: Download icon fonts
get_url:
url: "https://raw.githubusercontent.com/FortAwesome/Font-Awesome/a8386aae19e200ddb0f6845b5feeee5eb7013687/fonts/fontawesome-webfont.ttf"
dest: "{{ ansible_user_dir }}/.local/share/fonts/fontawesome-webfont.ttf"
mode: "u=rw,g=r,o=r"
- name: Install python dependencies for lemonbar
pip:
requirements: "{{ ansible_user_dir }}/.dotfiles/config/lemonbar/requirements.txt"
# Build a single color scheme and template and assign it to a variable # Build a single color scheme and template and assign it to a variable
- base16_builder: - base16_builder:
scheme: "{{ base16_scheme }}" scheme: "{{ base16_scheme }}"
@ -35,6 +59,8 @@
mode: "u+rw,g=r,o=r" mode: "u+rw,g=r,o=r"
# Alacritty has live config reload, so no command to execute # Alacritty has live config reload, so no command to execute
# However, it doesn't work with yaml includes, hence the template # However, it doesn't work with yaml includes, hence the template
tags:
- color
- name: Set base16 theme for Xresources - name: Set base16 theme for Xresources
copy: copy:
@ -45,6 +71,7 @@
- xrdb-reload - xrdb-reload
tags: tags:
- color - color
when: display_server == 'x11'
- name: Download base16 theme for qutebrowser - name: Download base16 theme for qutebrowser
copy: copy:
@ -75,6 +102,7 @@
- i3-reload - i3-reload
tags: tags:
- color - color
when: display_server == 'x11'
- name: Set base16 theme for rofi - name: Set base16 theme for rofi
copy: copy:
@ -94,6 +122,7 @@
mode: "u+rw,g=r,o=r" mode: "u+rw,g=r,o=r"
tags: tags:
- color - color
when: display_server == 'x11'
- name: Download base16 theme for fzf - name: Download base16 theme for fzf
copy: copy:

View file

@ -55,6 +55,8 @@ wireless_tools
{% else %} {% else %}
lemonbar lemonbar
{% endif %} {% endif %}
{# lemonbar dependency #}
notmuch
autorandr autorandr
keynav keynav
sct sct

View file

@ -2,7 +2,6 @@
# TODO De-hardcode # TODO De-hardcode
cd ~/.dotfiles/config/automatrop
echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness
xrandr --output HDMI-0 --brightness 1 xrandr --output HDMI-0 --brightness 1
ansible-playbook playbooks/default.yml -e base16_scheme=solarized-dark --tags color --connection local --limit $HOSTNAME automatrop -e base16_scheme=solarized-dark --tags color

View file

@ -10,17 +10,9 @@ mkdir -p $HOME/.cache
mkdir -p $HOME/.cache/zsh mkdir -p $HOME/.cache/zsh
mkdir -p $HOME/.cache/mpd mkdir -p $HOME/.cache/mpd
mkdir -p $HOME/.ssh mkdir -p $HOME/.ssh
mkdir -p $HOME/.local/bin # mkdir -p $HOME/.local/bin
. $HOME/.config/scripts/softwareList
echo "Doing stuff cuz" echo "Doing stuff cuz"
if command -v Xorg > /dev/null
then
$HOME/.config/Xresources/configure
pip install --user --requirement $HOME/.config/lemonbar/requirements.txt
fi
changeColors monokai
vim +PlugUpgrade +PlugUpdate +PlugInstall +qall vim +PlugUpgrade +PlugUpdate +PlugInstall +qall
systemctl enable pulseaudio --user --now systemctl enable pulseaudio --user --now

View file

@ -2,7 +2,6 @@
# TODO De-hardcode # TODO De-hardcode
cd ~/.dotfiles/config/automatrop
echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness
xrandr --output HDMI-0 --brightness 1 xrandr --output HDMI-0 --brightness 1
ansible-playbook playbooks/default.yml -e base16_scheme=solarized-light --tags color --connection local --limit $HOSTNAME automatrop -e base16_scheme=solarized-light --tags color

View file

@ -2,7 +2,6 @@
# TODO De-hardcode # TODO De-hardcode
cd ~/.dotfiles/config/automatrop
echo 1 | sudo tee /sys/class/backlight/intel_backlight/brightness echo 1 | sudo tee /sys/class/backlight/intel_backlight/brightness
xrandr --output HDMI-0 --brightness 0.5 xrandr --output HDMI-0 --brightness 0.5
ansible-playbook playbooks/default.yml -e base16_scheme=solarized-dark --tags color --connection local --limit $HOSTNAME automatrop -e base16_scheme=solarized-dark --tags color