add system.doll

This commit is contained in:
41666 2025-04-22 22:56:12 -07:00
parent 8502a4de48
commit 7401eceb60
6 changed files with 259 additions and 25 deletions

20
plugins/utils.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
color() {
local color="$1"
local message="$(cat /dev/stdin)"
echo "<span style=\"color:${color};\">${message}</span>"
}
system-image() {
local color="$1"
local url="$2"
local altText="$(cat /dev/stdin)"
echo "<img src=\"${url}\" alt=\"${altText}\" style=\"width:150px;height:150px;border:${color} solid;border-width:0 5px 5px 0;\" />"
}
cmd="$1"
shift
$cmd $@