fixed some i3 config and zshrc bluetooth alias

This commit is contained in:
2025-11-06 01:24:06 +01:00
parent 764b3a7f53
commit 2277906fdc
7 changed files with 180 additions and 68 deletions
+8 -4
View File
@@ -1,8 +1,12 @@
#!/bin/bash
# ~/.config/i3/scripts/gpu_usage.sh
if [ -f /sys/module/amdgpu/drivers/pci:amdgpu/0000:2b:00.0/gpu_busy_percent ]; then
usage=$(awk '{print $1}' /sys/module/amdgpu/drivers/pci:amdgpu/0000:2b:00.0/gpu_busy_percent)
echo "${usage}%"
if command -v rocm-smi &>/dev/null; then
output=$(rocm-smi --showtemp --showuse)
temp=$(echo "$output" | awk -F': ' '/Sensor edge/ {print $3; exit}')
usage=$(echo "$output" | awk -F': ' '/GPU use/ {print $3; exit}')
echo "${usage}% ${temp}°C"
else
echo "N/A"
echo "N/A"
fi
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
KBD_PATH="/org/freedesktop/UPower/devices/keyboard_dev_D7_E8_29_FA_0F_CF"
KBD_PATH="/org/freedesktop/UPower/devices/keyboard_dev_D7_E8_29_FA_0F_D0"
if upower -i "$KBD_PATH" 2>/dev/null | grep -q "present:.*yes"; then
perc=$(upower -i "$KBD_PATH" | awk '/percentage:/ {print $2}')