Compare commits

...

5 Commits

Author SHA1 Message Date
Geoffrey Frogeye 16bb2362ad
Move install-prefs to Ansible
I never ended up moving to this installation system, did I?
2021-06-20 10:08:29 +02:00
Geoffrey Frogeye fb5a885e3c
Add Termux to Ansible (untested) 2021-06-19 12:37:46 +02:00
Geoffrey Frogeye 4e8681fad0
Moved some desktop environment stuff to Ansible 2021-06-19 12:25:38 +02:00
Geoffrey Frogeye fda5b38ddb
color role → desktop_environment role
Is this commit without too many change so that Git catches on the
rename?
Yes, yes it is.
2021-06-18 21:55:41 +02:00
Geoffrey Frogeye fd580acf2c
It's a display **server**, you dummy 2021-06-18 21:53:42 +02:00
30 changed files with 272 additions and 259 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

@ -21,3 +21,5 @@ has_battery: no
# Activate numlock by default
auto_numlock: no
# Machine has SSH key to access git.frogeye.fr
has_forge_access: no

View File

@ -1,5 +1,5 @@
root_access: yes
display_manager: "x11"
display_server: "x11"
dev_stuffs:
- python
- shell
@ -9,3 +9,4 @@ dev_stuffs:
software_full: yes
has_battery: yes
auto_numlock: yes
has_forge_access: yes

View File

@ -1,5 +1,5 @@
root_access: yes
display_manager: "x11"
display_server: "x11"
dev_stuffs:
- shell
- network

View File

@ -1,6 +1,8 @@
- name: Default
hosts: all
roles:
- role: facts
tags: facts
- role: access
tags: access
when: root_access
@ -11,8 +13,14 @@
when: root_access
- role: dotfiles
tags: dotfiles
- role: mnussbaum.base16-builder-ansible # Required for color
tags: color
- role: color
tags: color
- role: mnussbaum.base16-builder-ansible # Required for desktop_environment
tags:
- color
- desktop_environment
- role: termux
tags: termux
when: termux
- role: desktop_environment
tags: desktop_environment
when: display_server

View File

@ -1,14 +1,38 @@
- name: Ensure directories for theme are present
- name: Ensure directories for desktop applications are present
file:
state: directory
path: "{{ ansible_env.HOME }}/{{ item }}"
path: "{{ ansible_user_dir }}/{{ item }}"
mode: "u=rwx,g=rx,o=rx"
with_items:
- ".config/Xresources"
- ".config/rofi"
- ".local/bin"
- ".local/share/fonts"
- ".config/qutebrowser"
- ".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
- base16_builder:
scheme: "{{ base16_scheme }}"
@ -16,7 +40,6 @@
- i3
- xresources
- rofi
- termux
- alacritty
- shell
- fzf
@ -25,92 +48,120 @@
- tridactyl
- dunst
register: base16_schemes
tags:
- color
- name: Configure Alacritty
template:
src: "{{ ansible_env.HOME }}/.config/alacritty/alacritty.yml.j2"
dest: "{{ ansible_env.HOME }}/.config/alacritty/alacritty.yml"
mode: "u+rw,g=r,o=r"
mode: "u=rw,g=r,o=r"
# Alacritty has live config reload, so no command to execute
# However, it doesn't work with yaml includes, hence the template
tags:
- color
- name: Set base16 theme for Xresources
copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['xresources']['xresources']['base16-' + base16_scheme + '-256.Xresources'] }}"
dest: "{{ ansible_env.HOME }}/.config/Xresources/theme"
mode: "u+rw,g=r,o=r"
mode: "u=rw,g=r,o=r"
notify:
- xrdb-reload
tags:
- color
when: display_server == 'x11'
- name: Download base16 theme for qutebrowser
copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['qutebrowser']['themes/minimal']['base16-' + base16_scheme + '.config.py'] }}"
dest: "{{ ansible_env.HOME }}/.config/qutebrowser/theme.py"
mode: "u+rw,g=r,o=r"
mode: "u=rw,g=r,o=r"
notify:
- qutebrowser-reload
tags:
- color
- name: Download base16 theme for Tridactyl
copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['tridactyl']['base16-' + base16_scheme + '.config.py'] }}"
# url: "https://raw.githubusercontent.com/bezmi/base16-tridactyl/master/base16-{{ base16_scheme }}.css"
dest: "{{ ansible_env.HOME }}/.config/tridactyl/themes/theme.css"
mode: "u+rw,g=r,o=r"
mode: "u=rw,g=r,o=r"
when: False # Not currently used
tags:
- color
- name: Configure i3
template:
src: "{{ ansible_env.HOME }}/.config/i3/config.j2"
dest: "{{ ansible_env.HOME }}/.config/i3/config"
mode: "u+rw,g=r,o=r"
mode: "u=rw,g=r,o=r"
notify:
- i3-reload
tags:
- color
when: display_server == 'x11'
- name: Set base16 theme for rofi
copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['rofi']['themes']['base16-' + base16_scheme + '.' + item] }}"
dest: "{{ ansible_env.HOME }}/.config/rofi/theme.{{ item }}"
mode: "u+rw,g=r,o=r"
mode: "u=rw,g=r,o=r"
with_items:
- rasi
- config
tags:
- color
- name: Configure Dunst
template:
src: "{{ ansible_env.HOME }}/.config/dunst/dunstrc.j2"
dest: "{{ ansible_env.HOME }}/.config/dunst/dunstrc"
mode: "u+rw,g=r,o=r"
mode: "u=rw,g=r,o=r"
tags:
- color
when: display_server == 'x11'
- name: Download base16 theme for fzf
copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['fzf']['bash']['base16-' + base16_scheme + '.config'] }}"
dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApplyFzf"
mode: "u+rw,g=r,o=r"
mode: "u=rw,g=r,o=r"
notify:
- fzf-reload
- name: Download base16 theme for Termux
copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['termux']['colors']['base16-' + base16_scheme + '.properties'] }}"
dest: "{{ ansible_env.HOME }}/.termux/colors.properties"
mode: "u+rw,g=r,o=r"
# TODO Only on Termux
tags:
- color
- name: Download base16 theme for shell
copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['shell']['script']['base16-' + base16_scheme + '.sh'] }}"
dest: "{{ ansible_env.HOME }}/.local/bin/colorSchemeApply"
mode: "u+rwx,g=rx,o=rx"
mode: "u=rwx,g=rx,o=rx"
notify:
- shell-reload
when: False # Not currently used
tags:
- color
- name: Set used base16 theme for vim
copy:
path: "{{ ansible_env.HOME }}/.config/vim/colorscheme.vim"
mode: "u+rw,g=r,o=r"
mode: "u=rw,g=r,o=r"
content: "colorscheme base16-{{ base16_scheme }}"
when: False # Not currently used
tags:
- color
- name: Enable user services
systemd:
name: "{{ item }}"
state: started
enabled: yes
scope: user
loop:
- pulseaudio
- mpd
# TODO bar (might change bar in the future, so...)
# TODO highlight (there IS a template but the colors look different from vim and mostly the same from when there's no config)

View File

@ -1,9 +1,28 @@
- name: Ensure directories for applications are present
file:
state: directory
path: "{{ ansible_user_dir }}/{{ item }}"
mode: "u=rwx,g=rx,o=rx"
with_items:
- ".cache/zsh"
- ".cache/mpd"
- ".ssh"
- ".local/bin"
- name: Install dotfiles repository
git:
repo: https://git.frogeye.fr/geoffrey/dotfiles.git
repo: "{% if has_forge_access %}git@git.frogeye.fr:{% else %}https://git.frogeye.fr/{% endif %}geoffrey/dotfiles.git"
dest: "{{ ansible_user_dir }}/.dotfiles"
update: "{{ not has_forge_access }}"
notify: install dotfiles
- name: Install python dependencies for scripts
pip:
requirements: "{{ ansible_user_dir }}/.dotfiles/config/scripts/requirements.txt"
- name: Install Neovim plugins
command: "nvim +PlugUpgrade +PlugUpdate +PlugInstall +qall"
failed_when: no
changed_when: yes
# TODO Build Neovim configuration better

View File

@ -0,0 +1,12 @@
- name: Set facts
set_fact:
arch_based: "{{ ansible_distribution == 'Archlinux' }}"
arch: "{{ ansible_lsb.id == 'Arch' }}"
manjaro: "{{ ansible_lsb.id == 'Manjaro' or ansible_lsb.id == 'Manjaro-ARM' }}"
termux: "{{ ansible_distribution == 'OtherLinux' and ansible_python.executable == '/data/data/com.termux/files/usr/bin/python' }}"
debian_based: "{{ ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' }}"
debian: "{{ ansible_distribution == 'Debian' }}"
ubuntu: "{{ ansible_distribution == 'Ubuntu' }}"
tags:
- always
# TODO Make this a real Ansible fact maybe?

View File

@ -1,17 +1,7 @@
- name: Set variables
set_fact:
arch_based: "{{ ansible_distribution == 'Archlinux' }}"
arch: "{{ ansible_lsb.id == 'Arch' }}"
manjaro: "{{ ansible_lsb.id == 'Manjaro' or ansible_lsb.id == 'Manjaro-ARM' }}"
termux: "{{ ansible_distribution == 'OtherLinux' and ansible_python.executable == '/data/data/com.termux/files/usr/bin/python' }}"
debian_based: "{{ ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' }}"
debian: "{{ ansible_distribution == 'Debian' }}"
ubuntu: "{{ ansible_distribution == 'Ubuntu' }}"
tags: softwarelist
# TODO Install python if not done
# Or maybe not, it requires a lot of automation for something that can be done
# very quickly manually and is usually uneccessary
# very quickly manually and is usually already installed
- name: Install python-apt dependency for Termux
block:
@ -67,6 +57,60 @@
# WARNING: You are using pip version 20.2.3; however, version 20.3.3 is available.
# You should consider upgrading via the '/data/data/com.termux/files/usr/bin/python3 -m pip install --upgrade pip' command.
# Arch configuration
- name: Install ccache
pacman:
name: ccache
state: present
extra_args: "--asdeps"
become: yes
when: arch_based
- name: Enable makepkg ccache
replace:
path: /etc/makepkg.conf
regexp: '^BUILDENV=(.+)!ccache(.+)$'
replace: 'BUILDENV=\1ccache\2'
become: yes
when: arch_based
- name: Set makepkg MAKEFLAGS
replace:
path: /etc/makepkg.conf
regexp: '^#? *MAKEFLAGS=(.+)-j[0-9]+(.+)$'
replace: "MAKEFLAGS=\\1-j{{ j }}\\2"
become: yes
vars:
j: "{{ [ansible_processor_nproc - 1, 1] | max | int }}"
when: arch_based
- name: Enable makepkg color
replace:
path: /etc/makepkg.conf
regexp: '^BUILDENV=(.+)!color(.+)$'
replace: 'BUILDENV=\1color\2'
become: yes
when: arch_based
- name: Enable pacman colors
lineinfile:
path: /etc/pacman.conf
regexp: "^#?Color"
line: "Color"
become: yes
when: arch_based
- name: Enable pacman pac-man
lineinfile:
path: /etc/pacman.conf
regexp: "^#?ILoveCandy"
line: "ILoveCandy"
insertafter: "^#?Color"
become: yes
when: arch_based
# Install alternative package managers
- name: Install dependencies for AUR helpers
pacman:
@ -118,3 +162,13 @@
notify: "software changed"
tags: softwarelist
when: arch_based and root_access
# translate-shell
# $ curl -L git.io/trans > ~/.local/bin/trans
# $ chmod +x ~/.local/bin/trans
# sct
# $ TMP=$(mktemp /tmp/XXXXXXXXXX.c)
# $ wget https://gist.githubusercontent.com/ajnirp/208c03d3aa7f02c743d2/raw/55bf3eed25739173d8be57b5179ed5542cf40ed6/sct.c -O $TMP
# $ cc $TMP --std=c99 -lX11 -lXrandr -o $HOME/.local/bin/sct
# $ rm $TMP

View File

@ -18,7 +18,7 @@
{% include 'snippets/pm_multimedia_common.j2' %}
{% include 'snippets/pm_data_management.j2' %}
{# Include rules-determined snippets #}
{% if display_manager %}
{% if display_server %}
{% include 'snippets/pm_desktop_environment.j2' %}
{% endif %}
{% if termux %}

View File

@ -26,7 +26,7 @@ meld
{% if arch_based %}
yubikey-touch-detector
{% endif %}
{% if display_manager == "x11" %}
{% if display_server == "x11" %}
i3-wm
libgnomekbd{{ lib_suffix }}
dunst
@ -55,6 +55,8 @@ wireless_tools
{% else %}
lemonbar
{% endif %}
{# lemonbar dependency #}
notmuch
autorandr
keynav
sct
@ -64,6 +66,6 @@ xorg-xbacklight
{% elif debian_based %}
xbacklight
{% endif %}
{% elif display_manager == "wayland" %}
{% elif display_server == "wayland" %}
sway
{% endif %}

View File

@ -1,6 +1,6 @@
yosys
iverilog
ghdl
{% if display_manager %}
{% if display_server %}
gtkwave
{% endif %}

View File

@ -9,6 +9,6 @@ dnsutils
whois
nmap
tcpdump
{% if display_manager %}
{% if display_server %}
wireshark-qt
{% endif %}

View File

@ -14,7 +14,7 @@ texlive-base
texlive-lang-european
{% endif %}
pdftk
{% if display_manager %}
{% if display_server %}
{# Spell checking #}
hunspell-en_gb
hunspell-en_us

View File

@ -7,6 +7,6 @@ rsync
youtube-dl
megatools
transmission-cli
{% if display_manager %}
{% if display_server %}
transmission-qt
{% endif %}

View File

@ -1,4 +1,4 @@
{% if display_manager %}
{% if display_server %}
gimp
inkscape
mpv

View File

@ -1,7 +1,7 @@
{#
Big behemoth applications
#}
{% if display_manager %}
{% if display_server %}
gimp
inkscape
darktable

View File

@ -4,7 +4,7 @@ Stuff that isn't required on Android because there are apps for that
{# Password handling #}
pass
pwgen
{% if display_manager %}
{% if display_server %}
rofi-pass
{# TODO Try autopass.cr #}
{% endif %}
@ -18,7 +18,7 @@ lynx
{# https://aur.archlinux.org/packages/tiv/#comment-812593 #}
tiv
{% endif %}
{% if display_manager %}
{% if display_server %}
thunderbird
{% endif %}
{# Organisation #}

View File

@ -1,6 +1,6 @@
openssh
wget
rsync
{% if display_manager %}
{% if display_server %}
tigervnc
{% endif %}

View File

@ -0,0 +1,5 @@
etckeeper
tlp
dhcpcd
wpa_supplicant
chrony

View File

@ -0,0 +1,10 @@
***************
*** 6,11 ****
--- 6,12 ----
{
include "us(basic)"
include "level3(ralt_switch)"
+ include "keypad(oss)"
name[Group1]= "US keyboard with french symbols - AltGr combination";

View File

@ -1,24 +1,9 @@
# TODO For other distributions
- name: Set variables
set_fact:
arch_based: "{{ ansible_distribution == 'Archlinux' }}"
# arch: "{{ ansible_lsb.id == 'Arch' }}"
# manjaro: "{{ ansible_lsb.id == 'Manjaro' or ansible_lsb.id == 'Manjaro-ARM' }}"
# termux: "{{ ansible_distribution == 'OtherLinux' and ansible_python.executable == '/data/data/com.termux/files/usr/bin/python' }}"
# debian_based: "{{ ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' }}"
# debian: "{{ ansible_distribution == 'Debian' }}"
# ubuntu: "{{ ansible_distribution == 'Ubuntu' }}"
# Package are installed with --asdeps because they are needed
# Etckeeper
- name: Install etckeeper (Arch based)
pacman:
name: etckeeper
state: present
become: yes
when: arch_based
- name: Check if etckeeper is initialized
stat:
path: /etc/.git
@ -44,58 +29,6 @@
value: "etckeeper@{{ inventory_hostname }}"
become: yes
# Arch configuration
- name: Install ccache
pacman:
name: ccache
state: present
become: yes
when: arch_based
- name: Enable makepkg ccache
replace:
path: /etc/makepkg.conf
regexp: '^BUILDENV=(.+)!ccache(.+)$'
replace: 'BUILDENV=\1ccache\2'
become: yes
when: arch_based
- name: Set makepkg MAKEFLAGS
replace:
path: /etc/makepkg.conf
regexp: '^#? *MAKEFLAGS=(.+)-j[0-9]+(.+)$'
replace: "MAKEFLAGS=\\1-j{{ j }}\\2"
become: yes
vars:
j: "{{ [ansible_processor_nproc - 1, 1] | max | int }}"
when: arch_based
- name: Enable makepkg color
replace:
path: /etc/makepkg.conf
regexp: '^BUILDENV=(.+)!color(.+)$'
replace: 'BUILDENV=\1color\2'
become: yes
when: arch_based
- name: Enable pacman colors
lineinfile:
path: /etc/pacman.conf
regexp: "^#?Color"
line: "Color"
become: yes
when: arch_based
- name: Enable pacman pacman
lineinfile:
path: /etc/pacman.conf
regexp: "^#?ILoveCandy"
line: "ILoveCandy"
insertafter: "^#?Color"
become: yes
when: arch_based
# Manjaro configuration
- name: Remove Manjaro's pamac
@ -111,7 +44,7 @@
stat:
path: /etc/X11/nvidia-xorg.conf
register: nvidia_xrun
when: display_manager == 'x11'
when: display_server == 'x11'
- name: Add nvidia-xrun xorg config directory
set_fact:
@ -120,22 +53,31 @@
xorg_default_config_dirs:
- /etc/X11/xorg.conf.d
xorg_nvidia_config_dirs: "{{ ['/etc/X11/nvidia-xorg.conf.d'] if nvidia_xrun.stat.exists else [] }}"
when: display_manager == 'x11'
when: display_server == 'x11'
- name: Configure Xorg keyboard layout
copy:
src: xorg/keyboard.conf
dest: "{{ item }}/00-keyboard.conf"
become: yes
when: display_manager == 'x11'
when: display_server == 'x11'
notify: etc changed
loop: "{{ xorg_common_config_dirs }}"
- name: Use Alt keys for numpad
patch:
src: us_qwert_alt_numpad.patch
dest: /usr/share/X11/xkb/symbols/us_qwerty-fr
become: yes
when: display_server == 'x11'
# This is not very nice but it's updated so infrequently that it's not worth
# the trouble
- name: Check if there is Intel backlight
stat:
path: /sys/class/backlight/intel_backlight
register: intel_backlight
when: display_manager == 'x11'
when: display_server == 'x11'
- name: Install Intel video drivers (Arch based)
pacman:
@ -143,14 +85,15 @@
# state: "{{ intel_backlight.stat.exists }}"
state: present
become: yes
when: display_manager == 'x11' and intel_backlight.stat.exists and arch_based
when: display_server == 'x11' and intel_backlight.stat.exists and arch_based
# TODO With software role? Would permit other distributions
- name: Configure Xorg Intel backlight
copy:
src: xorg/intel_backlight.conf
dest: "{{ item }}/20-intel_backlight.conf"
become: yes
when: display_manager == 'x11' and intel_backlight.stat.exists
when: display_server == 'x11' and intel_backlight.stat.exists
notify: etc changed
loop: "{{ xorg_common_config_dirs }}"
@ -159,7 +102,7 @@
src: xorg/touchpad.conf
dest: "{{ item }}/30-touchpad.conf"
become: yes
when: display_manager == 'x11'
when: display_server == 'x11'
notify: etc changed
loop: "{{ xorg_common_config_dirs }}"
@ -168,7 +111,7 @@
src: xorg/joystick.conf
dest: "{{ item }}/50-joystick.conf"
become: yes
when: display_manager == 'x11'
when: display_server == 'x11'
notify: etc changed
loop: "{{ xorg_common_config_dirs }}"
@ -196,13 +139,6 @@
# TLP configuration
- name: Install TLP (Arch based)
pacman:
name: tlp
state: present
when: arch_based
become: yes
- name: Start/enable TLP
systemd:
name: tlp
@ -213,13 +149,6 @@
# Network configuration
- name: Install dhcpcd (Arch based)
pacman:
name: dhcpcd
state: present
when: arch_based
become: yes
- name: Start/enable dhcpcd
systemd:
name: dhcpcd
@ -228,15 +157,6 @@
become: yes
notify: etc changed
- name: Install wpa_supplicant (Arch based)
pacman:
name: wpa_supplicant
state: present
when: arch_based
become: yes
notify:
- wifi setup changed
- name: Configure wpa_supplicant
template:
src: wpa_supplicant.conf.j2
@ -309,13 +229,6 @@
notify: etc changed
when: arch_based
- name: Install chrony
pacman:
name: chrony
state: present
when: arch_based
become: yes
- name: Configure chrony
copy:
src: chrony.conf

View File

@ -0,0 +1,36 @@
- name: Create Termux directory
file:
state: directory
path: "{{ ansible_user_dir }}/.termux"
mode: "u=rwx,g=rx,o=rx"
# TODO This is a dotfiles directory.
# Make it not install unless it's Termux
- name: Silence Termux login message
file:
state: file
path: "{{ ansible_user_dir }}/.hushlogin"
mode: "u=rw,g=r,o=r"
# Build a single color scheme and template and assign it to a variable
- base16_builder:
scheme: "{{ base16_scheme }}"
template: # This requires https://github.com/mnussbaum/base16-builder-ansible/pull/6
- termux
register: base16_schemes
tags:
- color
- name: Download base16 theme for Termux
copy:
content: "{{ base16_schemes['schemes'][base16_scheme]['termux']['colors']['base16-' + base16_scheme + '.properties'] }}"
dest: "{{ ansible_env.HOME }}/.termux/colors.properties"
mode: "u=rw,g=r,o=r"
tags:
- color
# TODO
# Upgrade
# If root:
# $ apt install tsu
# $ echo '/system/bin/mount -o remount,rw /; ln -s /data/data/com.termux/files/usr /usr; /system/bin/mount -o remount,ro /' | tsu

View File

@ -2,7 +2,6 @@
# TODO De-hardcode
cd ~/.dotfiles/config/automatrop
echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness
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

@ -1,46 +0,0 @@
#!/usr/bin/env bash
# Installs user preferences the way I like it
# NOTE In the process of migrating to a new install workflow.
# This holds stuff that have not been migrated yet.
# TODO A lot of stuff
mkdir -p $HOME/.cache
mkdir -p $HOME/.cache/zsh
mkdir -p $HOME/.cache/mpd
mkdir -p $HOME/.ssh
mkdir -p $HOME/.local/bin
. $HOME/.config/scripts/softwareList
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
systemctl enable pulseaudio --user --now
systemctl enable mpd --user --now
echo '# Alt keys on keypad
# In /usr/share/X11/xkb/symbols/us_qwerty-fr add:
# include "keypad(oss)"
'
### RECYCLE BIN
# Help yourself
# # translate-shell
# curl -L git.io/trans > ~/.local/bin/trans
# chmod +x ~/.local/bin/trans
# # sct
# TMP=$(mktemp /tmp/XXXXXXXXXX.c)
# wget https://gist.githubusercontent.com/ajnirp/208c03d3aa7f02c743d2/raw/55bf3eed25739173d8be57b5179ed5542cf40ed6/sct.c -O $TMP
# cc $TMP --std=c99 -lX11 -lXrandr -o $HOME/.local/bin/sct
# rm $TMP

View File

@ -1,43 +0,0 @@
#!/data/data/com.termux/files/usr/bin/env bash
# Setups a Termux system the way I like it
if [ ! -d /data/data/com.termux/files ]; then
echo "This is not a Termux system (or pacman isn't installed)"
return 1
fi
# Configuration
function prompt { # text
while true; do
read -p "$1 [yn] " yn
case $yn in
[Yy]* ) return 1;;
[Nn]* ) return 0;;
* ) echo "Please answer yes or no.";;
esac
done
}
if [ -z $ROOT ]; then
prompt "Is this device rooted and BusyBox installed in /system/bin/?"
ROOT=$?
fi
# Update
apt update
apt upgrade
# (needed for install-prefs)
apt install coreutils
apt install grep
# Used by some of my termux scripts
apt install jq
# Config
touch ~/.hushlogin
if [ $ROOT == 1 ]; then
apt install tsu
echo '/system/bin/mount -o remount,rw /; ln -s /data/data/com.termux/files/usr /usr; /system/bin/mount -o remount,ro /' | tsu
fi

View File

@ -2,7 +2,6 @@
# TODO De-hardcode
cd ~/.dotfiles/config/automatrop
echo 30000 | sudo tee /sys/class/backlight/intel_backlight/brightness
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
cd ~/.dotfiles/config/automatrop
echo 1 | sudo tee /sys/class/backlight/intel_backlight/brightness
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