From eb06cf62c5daba2246724ec7a10f00d743cdec6a Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 15 Aug 2026 19:08:20 -0700 Subject: [PATCH] tlp, improve the on and off output, expecially in relation to Mullvad. --- tasks/workstation/linux/software/tlp.yml | 36 ++++++++++++++++++------ 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/tasks/workstation/linux/software/tlp.yml b/tasks/workstation/linux/software/tlp.yml index 9f78fa3..0295af0 100644 --- a/tasks/workstation/linux/software/tlp.yml +++ b/tasks/workstation/linux/software/tlp.yml @@ -142,7 +142,7 @@ function tlp-devices { if [[ ! -z "$@" ]]; then tlp-devices - echo -e "\nApplying '$@'...\n" + echo -e "\n Applying '$@'...\n" fi wifi $@ bluetooth $@ @@ -151,18 +151,38 @@ } alias devices="tlp-devices " - function all-off { - tlp-devices off - mullvad disconnect - } - alias off="all-off " + function devices-off { + echo -e "\n Checking Mullvad Status...\n" + mullvad status - function all-on { + echo -e "\n Checking Hardware Status...\n" + tlp-devices off + + echo -e "\n Disconnecting Mullvad...\n" + mullvad disconnect + sleep 3 + mullvad status + } + alias off="devices-off " + + function devices-on { + echo -e "\n Checking Mullvad Status...\n" + mullvad status + + echo -e "\n Checking Hardware Status...\n" tlp-devices on + + echo -e "\n Connecting Mullvad...\n" mullvad connect mullvad reconnect + sleep 3 + mullvad status + + echo -e "\n Rehecking Mullvad Status...\n" + sleep 12 + mullvad status } - alias on="all-on " + alias on="devices-on " marker: '# {mark} MANAGED BY ANSIBLE | tlp' state: present create: yes