[AGS] Remove network speed info
This commit is contained in:
parent
f66c8639d2
commit
69d9b510f1
@ -1,6 +1,5 @@
|
||||
import { exec, execAsync, GLib, interval, Variable } from "astal";
|
||||
import { exec, interval, Variable } from "astal";
|
||||
import { Gtk } from "astal/gtk4";
|
||||
import AstalBattery from "gi://AstalBattery?version=0.1";
|
||||
|
||||
const FETCH_INTERVAL = 2000;
|
||||
|
||||
@ -16,9 +15,6 @@ const refreshStats = (): Stats => {
|
||||
const cpuNameInSensors = "CPUTIN";
|
||||
const stats = {
|
||||
kernel: exec("uname -sr"),
|
||||
netSpeed: exec(
|
||||
`/bin/bash -c "interface=$(ip route get 8.8.8.8 | awk '{print $5; exit}') && cat \"/sys/class/net/$interface/speed\""`,
|
||||
),
|
||||
cpuTemp: exec(
|
||||
`/bin/bash -c "sensors | grep -m1 ${cpuNameInSensors} | awk '{print $2}'"`,
|
||||
),
|
||||
@ -108,7 +104,6 @@ const info = () => {
|
||||
label={systemStats(stats => {
|
||||
return `CPU: ${stats.cpuTemp}, ${stats.cpuClk}
|
||||
GPU: ${stats.gpuTemp}, ${stats.gpuClk} (${stats.vram} / ${stats.availableVRAM})
|
||||
Network: ${stats.netSpeed} mb/s
|
||||
Kernel: ${stats.kernel}`;
|
||||
})}
|
||||
></label>
|
||||
|
@ -1,6 +1,5 @@
|
||||
interface Stats {
|
||||
kernel: string;
|
||||
netSpeed: string;
|
||||
cpuTemp: string;
|
||||
cpuClk: string;
|
||||
gpuTemp: string;
|
||||
|
Loading…
x
Reference in New Issue
Block a user