-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui
More file actions
executable file
·81 lines (68 loc) · 3.39 KB
/
gui
File metadata and controls
executable file
·81 lines (68 loc) · 3.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
source api
KEY=$((RANDOM % 9000 + 1000))
cpu_info=()
cpu_info+=("Architecture" "$(get_cpu_architecture)")
cpu_info+=("Model name" "$(get_cpu_name)")
cpu_info+=("Clock speed" "$(get_cpu_speed)")
cpu_info+=("Cores" "$(get_cpu_cores)")
cpu_info+=("Virtualization" "$(get_cpu_vtx)")
gpu_info=()
gpu_info+=("Brand" "$(get_gpu_brand)")
gpu_info+=("Model name" "$(get_gpu_name)")
gpu_info+=("Memory" "$(get_gpu_memory)")
ram_info=()
ram_info+=("Total memory" "$(get_total_memory)")
ram_info+=("Branded capacity" "$(get_memory_simple)")
motherboard_info=()
motherboard_info+=("Product" "$(get_product)")
motherboard_info+=("Motherboard Brand" "$(get_motherboard_brand)")
motherboard_info+=("Model" "$(get_motherboard_model)")
firmware_type_get="$(firmware_type)"
motherboard_info+=("Firmware type" "$firmware_type_get")
motherboard_info+=("$firmware_type_get Vendor" "$(get_bios_vendor)")
motherboard_info+=("$firmware_type_get Version" "$(get_bios_version) ($(get_bios_date))")
os_info=()
os_info+=("Name" "$(get_distro_prettyname)")
os_info+=("Distribution" "$(get_distro_name)")
os_info+=("Version" "$(get_distro_version)")
os_info+=("Computer name" "$(get_network_name)")
os_info+=("Kernel type" "$(get_kernel_name)")
os_info+=("Kernel version" "$(get_kernel_version)")
os_info+=("Desktop environment" "$(get_desktop_environment)")
os_info+=("Windowing system" "$(get_windowing_system)")
yad --plug="$KEY" --tabnum=1 --list --no-selection --column="Parameter" \
--column="Value" --no-headers "${cpu_info[@]}" &
yad --plug="$KEY" --tabnum=2 --list --no-selection --column="Parameter" \
--column="Value" --no-headers "${gpu_info[@]}" &
yad --plug="$KEY" --tabnum=3 --list --no-selection --column="Parameter" \
--column="Value" --no-headers "${ram_info[@]}" &
yad --plug="$KEY" --tabnum=4 --list --no-selection --column="Parameter" \
--column="Value" --no-headers "${motherboard_info[@]}" &
df -B1 --output=source,target,fstype,size,avail,pcent | tail -n +2 | grep "/dev/" | \
awk '{
cmd="numfmt --to=iec --suffix=B " $4; cmd | getline total; close(cmd)
cmd="numfmt --to=iec --suffix=B " $5; cmd | getline free; close(cmd)
# insert a space before the unit (B, K, M, G, T)
gsub(/([KMGT]?B)$/, " &", total)
gsub(/([KMGT]?B)$/, " &", free)
printf "%s\n%s\n%s\n%s\n%s\n%s\n", $1,$2,$3,total,free,$6
}' | \
yad --plug="$KEY" --tabnum=5 --list --no-selection \
--column="Device" --column="Mountpoint" \
--column="Type" --column="Total" \
--column="Free" --column="Usage:bar" &
lspci -mm | \
awk -F'"' '{ printf "%s\n%s\n%s\n%s\n", $1, $2, $4, $6 }' | \
yad --plug="$KEY" --tabnum=6 --list --no-selection \
--column="ID" --column="Type" \
--column="Brand" --column="Device" &
yad --plug="$KEY" --tabnum=7 --list --no-selection --column="Parameter" \
--column="Value" --no-headers "${os_info[@]}" &
awk '{printf "%s\n", $1}' /proc/modules | sed "s/[,-]$//" | sort |\
yad --plug="$KEY" --tabnum=8 --text="Currently loaded kernel modules" --list --column="Name" --no-headers &
GDK_BACKEND=x11 yad --notebook --title="Systemboard - $(hostname)" --key="$KEY" --tab="CPU" --tab="GPU" \
--tab="Memory" --tab="Motherboard" --tab="Disks" --tab="PCI Modules" --tab="$(os_type)" --tab="Kernel Modules" \
--width=700 --height=500 --center --no-buttons --tab-pos=left \
--window-icon="$(get_icon)" --image="$(get_icon)" --image-on-top --class="Systemboard" \
--text="$(systemboard_title_text)"