From 54170f3da670d691b294fafdbe018a104b652026 Mon Sep 17 00:00:00 2001 From: jamesread Date: Sun, 25 Feb 2024 22:39:29 +0000 Subject: [PATCH] feature: Better default config file, restart icons --- config.yaml | 15 +++++++++++---- internal/config/emoji.go | 5 +++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/config.yaml b/config.yaml index 95968c8..e05bf1b 100644 --- a/config.yaml +++ b/config.yaml @@ -15,9 +15,9 @@ actions: # # If you are running OliveTin in a container remember to pass through the # docker socket! https://docs.olivetin.app/action-container-control.html - - title: Restart media container - shell: docker restart mediacontainer - icon: box + - title: Ping the Internet + shell: ping -c 1 1.1.1.1 + icon: ping # This uses `popupOnStart: execution-dialog-stdout-only` to simply show just # the command output. @@ -108,12 +108,19 @@ actions: # # Docs: https://docs.olivetin.app/action-ssh.html # Docs: https://docs.olivetin.app/action-service.html - - title: restart httpd on server1 + - title: Restart httpd on server1 id: restart_httpd icon: restart timeout: 1 shell: ssh root@server1 'service httpd restart' + # Lots of people use OliveTin to build web interfaces for their electronics + # projects. It's best to install OliveTin as a native package (eg, .deb), and + # then you can use either a python script or the `gpio` command. + - title: Toggle GPIO light + shell: gpioset gpiochip1 9=1 + icon: light + # There are several built-in shortcuts for the `icon` option, but you # can also just specify any HTML, this includes any unicode character, # or a link to a custom icon. diff --git a/internal/config/emoji.go b/internal/config/emoji.go index b311035..769c18e 100644 --- a/internal/config/emoji.go +++ b/internal/config/emoji.go @@ -6,13 +6,14 @@ var emojis = map[string]string{ "smile": "😀", "ping": "📡", "backup": "💾", - "reboot": "⏻", - "restart": "⏻", + "reboot": "🔄", + "restart": "🔄", "box": "📦", "ashtonished": "😲", "clock": "🕒", "disk": "💽", "logs": "🔍", + "light": "💡", } func lookupHTMLIcon(keyToLookup string) string {