added files

This commit is contained in:
2025-07-12 11:31:54 +02:00
parent c8b5f931f9
commit 3eb06362a9
27 changed files with 1641 additions and 1 deletions

2
waybar/scripts/power.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
wlogout -p layer-shell

24
waybar/scripts/tlp-profile.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
# Get the current power source from tlp-stat
power_source=$(tlp-stat -s | grep -i "power source" | awk '{print $4}')
if [ "$power_source" == "AC" ]; then
# On AC power
icon=""
tooltip="TLP Profile: AC"
class="ac"
elif [ "$power_source" == "battery" ]; then
# On Battery power
icon=""
tooltip="TLP Profile: Battery"
class="bat"
else
# Fallback for unknown state
icon=""
tooltip="TLP Profile: Unknown"
class="unknown"
fi
# Output in JSON format for Waybar
printf '{"text": "%s", "tooltip": "%s", "class": "%s"}\n' "$icon" "$tooltip" "$class"