-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes
33 lines (22 loc) · 1.7 KB
/
notes
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
1. get current / active window id
hyprctl activewindow| grep -G '^Window'|cut -d' ' -f2
2. get activewindow content 50 char at most
hyprctl clients|grep 56126d069cc0|sed -e 's/^Window.*-> //'|cut -c -50
3. cut the 1st char from a string
cut -c2-
4. cut the last char from string
v="some strings"
v2=${v::-1}
5. jq array
https://stackoverflow.com/questions/68121082/how-to-iterate-over-json-array-with-jq
6. magic varialbe
EWW_TEMPS too long to preview all the value,
use (label :text "${arraylength(EWW_TEMPS)}") from eww logs got it.
{"ACPITZ_TEMP1":"27.8","CORETEMP_CORE_0":"34","CORETEMP_CORE_12":"32","CORETEMP_CORE_16":"33","CORETEMP_CORE_20":"34","CORETEMP_CORE_24":"33","CORETEMP_CORE_28":"33",
"CORETEMP_CORE_32":"35","CORETEMP_CORE_33":"35","CORETEMP_CORE_34":"35","CORETEMP_CORE_35":"35","CORETEMP_CORE_36":"33","CORETEMP_CORE_37":"33","CORETEMP_CORE_38":"33",
"CORETEMP_CORE_39":"33","CORETEMP_CORE_4":"35","CORETEMP_CORE_40":"35","CORETEMP_CORE_41":"35","CORETEMP_CORE_42":"35","CORETEMP_CORE_43":"35","CORETEMP_CORE_44":"34",
"CORETEMP_CORE_45":"34","CORETEMP_CORE_46":"34","CORETEMP_CORE_47":"34","CORETEMP_CORE_8":"34","CORETEMP_PACKAGE_ID_0":"37",
"IWLWIFI_1_TEMP1":"28","NCT6798_AUXTIN0":"27","NCT6798_AUXTIN1":"19","NCT6798_AUXTIN2":"127","NCT6798_AUXTIN3":"31","NCT6798_AUXTIN4":"127","NCT6798_CPUTIN":"31",
"NCT6798_PCH_CHIP_CPU_MAX_TEMP":"0","NCT6798_PCH_CHIP_TEMP":"0","NCT6798_PCH_CPU_TEMP":"0","NCT6798_PCH_MCH_TEMP":"0","NCT6798_PECI_AGENT_0_CALIBRATION":"31",
"NCT6798_SYSTIN":"29","NVME_COMPOSITE_SAMSUNG_SSD_980_PRO_500GB_TEMP1":"33.85",
"NVME_SENSOR_1_SAMSUNG_SSD_980_PRO_500GB_TEMP2":"33.85","NVME_SENSOR_2_SAMSUNG_SSD_980_PRO_500GB_TEMP3":"37.85"}