Save Battery Life (#32)

* Added parameters (also made the script more of a program).

* Add additional options for unplugged devices.

* Allow disabling of cron jobs and lowering of telegraf frequency through new config options.

* Fix cron package name.

* Fix ssh service name for Ubuntu.

* Add output to the options so user knows they were switched.

* Prevent some tasks when device is mobile.

* Enhance and add to comments.

* Add function to check flatpak app disk usage.

* Add repair into flatpak commands to help clean disk space of unused apps.

* Remove "Done!" output from flatpak-usage.

* Go ahead and add function for purging Flatpak apps.

* Few more comment changes.
This commit is contained in:
2022-12-03 15:28:29 -06:00
committed by GitHub
parent 3e05260423
commit e39aeb20e7
11 changed files with 162 additions and 48 deletions

View File

@ -8,7 +8,7 @@
special_time: hourly
job: "sudo flatpak update --noninteractive"
state: present
disabled: no
disabled: "{{ 'yes' if battery else 'no' }}"
when: flatpak_distro
- name: General | Cron | Ansible | Linux | Update User Flatpaks
@ -18,5 +18,5 @@
special_time: hourly
job: "sudo -u {{ user }} flatpak update --noninteractive"
state: present
disabled: no
disabled: "{{ 'yes' if battery else 'no' }}"
when: flatpak_distro

View File

@ -1,5 +1,14 @@
---
# Use flatpaks because they're consistent! :)
# Use flatpaks because they're consistent versions across different distros! :)
## To see how much space is taken up try the .rc function flatpak-usage ##
# If you'd like to remove flatpaks to save space:
## Note: This functionality now exists in .rc function flatpak-purge ##
# $ flatpak remove --all --delete-data
# $ flatpak repair
# Then remove, autoremove, and purge flatpak executable with package manager.
# Source: https://softhints.com/how-to-completely-remove-flatpak-linux-mint/
## Flatpak Pre-reqs ##