mirror of
https://github.com/agresdominik/dotfiles.git
synced 2026-04-21 18:05:50 +00:00
New changes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -f /sys/module/amdgpu/drivers/pci:amdgpu/0000:28:00.0/gpu_busy_percent ]; then
|
||||
usage=$(awk '{print $1}' /sys/module/amdgpu/drivers/pci:amdgpu/0000:28:00.0/gpu_busy_percent)
|
||||
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}%"
|
||||
else
|
||||
echo "N/A"
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
KBD_PATH="/org/freedesktop/UPower/devices/keyboard_dev_D7_E8_29_FA_0F_CF"
|
||||
|
||||
if upower -i "$KBD_PATH" 2>/dev/null | grep -q "present:.*yes"; then
|
||||
perc=$(upower -i "$KBD_PATH" | awk '/percentage:/ {print $2}')
|
||||
echo "KBD:$perc"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
MOUSE_PATH=$(upower -e | grep -E 'hidpp_battery_[0-9]+$' | head -n 1)
|
||||
|
||||
if [[ -n "$MOUSE_PATH" ]] && upower -i "$MOUSE_PATH" 2>/dev/null | grep -q "present:.*yes"; then
|
||||
perc=$(upower -i "$MOUSE_PATH" | awk '/percentage:/ {print $2}')
|
||||
echo "MOUSE:$perc"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user