From a21cf92e250a875da843ad6d2179a08bfe005525 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 15 Nov 2022 14:27:56 +0100 Subject: [PATCH] add sample rpl rpograms Signed-off-by: Gwenhael Le Moine --- samples/dpi.rpl | 6 ++++++ samples/tibou-sensors.rpl | 5 +++++ 2 files changed, 11 insertions(+) create mode 100644 samples/dpi.rpl create mode 100644 samples/tibou-sensors.rpl diff --git a/samples/dpi.rpl b/samples/dpi.rpl new file mode 100644 index 0000000..7afbd08 --- /dev/null +++ b/samples/dpi.rpl @@ -0,0 +1,6 @@ +@ ( resx resy diaginches -- dpi ) + +@ Naive version +@ 'diag' lsto 'y' lsto 'x' lsto y x / 'ratio' lsto diag sq 1 ratio sq + / sqrt 'xd' lsto x xd / + +sq rot rot over / sq 1 + rot swap / sqrt / \ No newline at end of file diff --git a/samples/tibou-sensors.rpl b/samples/tibou-sensors.rpl new file mode 100644 index 0000000..6a50b2d --- /dev/null +++ b/samples/tibou-sensors.rpl @@ -0,0 +1,5 @@ +"cpu: " +"/sys/class/hwmon/hwmon3/temp1_input" fread str→ 1000 / + "⁰C" + +" | " + +"gpu: " "/sys/class/hwmon/hwmon4/temp1_input" fread str→ 1000 / + "⁰C" + ++ \ No newline at end of file