Compare commits
6
Commits
d24381ad1e
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
444b34bd31 | ||
|
|
e996cb9ef1 | ||
|
|
5b668e97f4 | ||
|
|
4b26e1b3ae | ||
|
|
5d3040da71 | ||
|
|
be4d8cd4f6 |
No files matched your search
@@ -448,4 +448,4 @@ set $refresh_i3status killall -SIGUSR1 i3status
|
|||||||
exec_always --no-startup-id "killall sunset-alarm; /home/ling/Code/sunset_alarm_cli/sunset-alarm -l 32:-111 -m 30 > ~/Reports/sunset-alarm.log 2>&1"
|
exec_always --no-startup-id "killall sunset-alarm; /home/ling/Code/sunset_alarm_cli/sunset-alarm -l 32:-111 -m 30 > ~/Reports/sunset-alarm.log 2>&1"
|
||||||
|
|
||||||
# Bedtime ;)
|
# Bedtime ;)
|
||||||
exec --no-startup-id "while true; do if [[ `date +'%H'` -ge 20 ]]; then fyi -w -u critical 'Bedtime' 'Go to sleep! >:)'; fi; sleep 150; done"
|
exec --no-startup-id "while true; do if [[ `date +'%H'` -ge 20 ]]; then fyi -w -u critical 'Bedtime' 'Go to sleep! >:)'; fi; sleep 600; done"
|
||||||
@@ -799,14 +799,23 @@
|
|||||||
alias_prod: |
|
alias_prod: |
|
||||||
alias prod="ssh -p {{ prod_port }} {{ prod_user }}@{{ prod_host }}"
|
alias prod="ssh -p {{ prod_port }} {{ prod_user }}@{{ prod_host }}"
|
||||||
function_clean_code: |
|
function_clean_code: |
|
||||||
|
function print_size_delete() {
|
||||||
|
f="$1"
|
||||||
|
if [[ -e "$f" ]]; then
|
||||||
|
du -hs "$f" && sh -c "rm -rf '$f'"
|
||||||
|
fi
|
||||||
|
}
|
||||||
function clean-code() {
|
function clean-code() {
|
||||||
echo -e "******* Android *******\n*** Build Caches ***"
|
echo -e "******* Android *******\n*** Build Caches ***"
|
||||||
find $HOME/Code/android-*/app -maxdepth 1 -type d -name "build" \
|
find $HOME/Code/android-*/app -maxdepth 1 -type d -name "build" \
|
||||||
-exec du -hs {} \; -exec rm -rf {} \;
|
-exec du -hs {} \; -exec rm -rf {} \;
|
||||||
|
|
||||||
echo -e "\n*** Gradle Caches ***"
|
echo -e "\n*** Gradle Caches ***"
|
||||||
find $HOME/Code/android-*/ -maxdepth 1 -type d -name ".gradle" \
|
find $HOME/Code/android-*/ -maxdepth 1 -type d -name ".gradle" \
|
||||||
-exec du -hs {} \; -exec rm -rf {} \;
|
-exec du -hs {} \; -exec rm -rf {} \;
|
||||||
|
|
||||||
|
print_size_delete "$HOME/.gradle"
|
||||||
|
|
||||||
echo -e "******* Flutter *******"
|
echo -e "******* Flutter *******"
|
||||||
ls $HOME/Code | grep flutter | while read project; do
|
ls $HOME/Code | grep flutter | while read project; do
|
||||||
cd $HOME/Code/$project
|
cd $HOME/Code/$project
|
||||||
@@ -816,6 +825,9 @@
|
|||||||
done
|
done
|
||||||
cd
|
cd
|
||||||
|
|
||||||
|
print_size_delete "$HOME/.pub_cache"
|
||||||
|
print_size_delete "$HOME/.pub-cache"
|
||||||
|
|
||||||
echo -e "******* PDFs *******"
|
echo -e "******* PDFs *******"
|
||||||
find $HOME/Code/ebook-* -name "*.pdf" -exec du -h {} \; -delete | sort -h
|
find $HOME/Code/ebook-* -name "*.pdf" -exec du -h {} \; -delete | sort -h
|
||||||
|
|
||||||
|
|||||||
@@ -41,13 +41,13 @@
|
|||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: "/etc/pacman.conf"
|
path: "/etc/pacman.conf"
|
||||||
regexp: '{{ item.key }}'
|
regexp: '{{ item.key }}'
|
||||||
line: '{{ item.value }} # MANAGED BY ANSIBLE'
|
line: '{{ item.value }}'
|
||||||
state: present
|
state: present
|
||||||
create: true
|
create: true
|
||||||
backup: true
|
backup: true
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
loop:
|
loop:
|
||||||
- { "key": '^[\#]?ParallelDownloads', "value": 'ParallelDownloads 3'}
|
- { "key": '^[\#]?ParallelDownloads', "value": 'ParallelDownloads = 3'}
|
||||||
|
|
||||||
# TBD / TODO: Do the mirrorlist files and distros based on facts in case ever using Arch, Manjaro, etc.
|
# TBD / TODO: Do the mirrorlist files and distros based on facts in case ever using Arch, Manjaro, etc.
|
||||||
# Same with the blocklist for sites like Berkeley which rate limit VPNs.
|
# Same with the blocklist for sites like Berkeley which rate limit VPNs.
|
||||||
@@ -61,12 +61,14 @@
|
|||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: General | Software | Packages | pacman | Artix | rate-mirrors | Update Lists
|
- name: General | Software | Packages | pacman | Artix | rate-mirrors | Update Lists
|
||||||
ansible.builtin.shell: "{{ item }}"
|
ansible.builtin.shell: |
|
||||||
|
set -o pipefail
|
||||||
|
{{ item }}
|
||||||
register: shell_check
|
register: shell_check
|
||||||
changed_when: shell_check.rc == 0
|
changed_when: shell_check.rc == 0
|
||||||
loop:
|
loop:
|
||||||
- "rate-mirrors artix | grep -v berkeley | sudo tee /etc/pacman.d/mirrorlist"
|
- "sudo -u {{ user }} rate-mirrors artix | grep -v berkeley | tee /etc/pacman.d/mirrorlist"
|
||||||
- "rate-mirrors arch | grep -v berkeley | sudo tee /etc/pacman.d/mirrorlist-arch"
|
- "sudo -u {{ user }} rate-mirrors arch | grep -v berkeley | tee /etc/pacman.d/mirrorlist-arch"
|
||||||
|
|
||||||
when: ansible_service_mgr == "runit"
|
when: ansible_service_mgr == "runit"
|
||||||
|
|
||||||
|
|||||||
@@ -211,9 +211,9 @@
|
|||||||
- name: Workstation | Linux | Software | LLMs | Facts | Choices | Sort
|
- name: Workstation | Linux | Software | LLMs | Facts | Choices | Sort
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
llm_installs: >-
|
llm_installs: >-
|
||||||
{{ llm_choices | selectattr('size_mb', 'le', ansible_memtotal_mb) | list }}
|
{{ llm_installs | union(llm_choices | selectattr('size_mb', 'le', ansible_memtotal_mb) | list) }}
|
||||||
llm_removals: >-
|
llm_removals: >-
|
||||||
{{ llm_choices | selectattr('size_mb', 'gt', ansible_memtotal_mb) | list }}
|
{{ llm_removals | union(llm_choices | selectattr('size_mb', 'gt', ansible_memtotal_mb) | list) }}
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | LLMs | Facts | Merge | Print
|
- name: Workstation | Linux | Software | LLMs | Facts | Merge | Print
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
|
|||||||
Reference in new issue
Block a user