2023-11-02 19:51:54 +01:00
|
|
|
---
|
2021-06-19 12:37:46 +02:00
|
|
|
- name: Create Termux directory
|
2023-11-02 19:51:54 +01:00
|
|
|
ansible.builtin.file:
|
2021-06-19 12:37:46 +02:00
|
|
|
state: directory
|
|
|
|
path: "{{ ansible_user_dir }}/.termux"
|
2023-11-02 19:51:54 +01:00
|
|
|
mode: u=rwx,g=rx,o=rx
|
2021-06-19 12:37:46 +02:00
|
|
|
# TODO This is a dotfiles directory.
|
|
|
|
# Make it not install unless it's Termux
|
|
|
|
|
|
|
|
- name: Silence Termux login message
|
2023-11-02 19:51:54 +01:00
|
|
|
ansible.builtin.file:
|
2021-06-19 12:37:46 +02:00
|
|
|
state: file
|
|
|
|
path: "{{ ansible_user_dir }}/.hushlogin"
|
2023-11-02 19:51:54 +01:00
|
|
|
mode: u=rw,g=r,o=r
|
2021-06-19 12:37:46 +02:00
|
|
|
|
|
|
|
# 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
|
2023-11-02 19:51:54 +01:00
|
|
|
ansible.builtin.copy:
|
2021-06-19 12:37:46 +02:00
|
|
|
content: "{{ base16_schemes['schemes'][base16_scheme]['termux']['colors']['base16-' + base16_scheme + '.properties'] }}"
|
|
|
|
dest: "{{ ansible_env.HOME }}/.termux/colors.properties"
|
2023-11-02 19:51:54 +01:00
|
|
|
mode: u=rw,g=r,o=r
|
2021-06-19 12:37:46 +02:00
|
|
|
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
|