diff options
author | Christian Hesse <mail@eworm.de> | 2020-07-17 07:36:02 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-07-17 07:52:56 +0200 |
commit | 7862ce5f1995e2c61fe93d6916d6f00c81694230 (patch) | |
tree | e69070ddec339b87747c02482d6f47d455ee05c0 | |
parent | febf0ee5e465d81ced6b86fb5af6d9e6bc1f4e4e (diff) |
global-functions: introduce $SymbolByUnicodeName
-rw-r--r-- | global-functions | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/global-functions b/global-functions index 17796fa..ba9142f 100644 --- a/global-functions +++ b/global-functions @@ -40,6 +40,7 @@ :global SendEMail; :global SendNotification; :global SendTelegram; +:global SymbolByUnicodeName; :global TimeIsSync; :global UrlEncode; :global VersionToNum; @@ -731,6 +732,21 @@ } } +# return UTF-8 symbol for unicode name +:set SymbolByUnicodeName do={ + :local Symbols { + "cross-mark"="\E2\9D\8C"; + "fire"="\F0\9F\94\A5"; + "high-voltage-sign"="\E2\9A\A1"; + "incoming-envelope"="\F0\9F\93\A8"; + "sparkles"="\E2\9C\A8"; + "warning-sign"="\E2\9A\A0"; + "white-heavy-check-mark"="\E2\9C\85" + } + + :return ($Symbols->$1); +} + # check if system time is sync :set TimeIsSync do={ :if ([ / system ntp client get enabled ] = true) do={ |