mirror of
https://github.com/agresdominik/dotfiles.git
synced 2026-04-21 18:05:50 +00:00
fixed some i3 config and zshrc bluetooth alias
This commit is contained in:
@@ -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,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}')
|
||||
|
||||
Reference in New Issue
Block a user