~mil/sxmo-devel

sxmo-docs-next: userGuide: document userscript titles v1 UNKNOWN

Zach DeCook: 1
 userGuide: document userscript titles

 1 files changed, 10 insertions(+), 7 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~mil/sxmo-devel/patches/28815/mbox | git am -3
Learn more about email & git

[PATCH sxmo-docs-next] userGuide: document userscript titles Export this patch

Also deprecate convoluted advice for a userscript file:
if you really want to do that, use the scripts hook.
---
 USERGUIDE.md | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/USERGUIDE.md b/USERGUIDE.md
index cec5c12..915ec9b 100644
--- a/USERGUIDE.md
+++ b/USERGUIDE.md
@@ -564,7 +564,7 @@ refer to [the changelog](./CHANGELOG.md).
    </tr>
    <tr>
      <td>$XDG_CONFIG_HOME/sxmo/userscripts</td>
      <td>Directory or file to place user scripts which will automatically appear in the menu system</td>
      <td>Directory to place user scripts which will automatically appear in the menu system</td>
    </tr>
    <tr>
      <td>$XDG_CONFIG_HOME/sxmo/hooks/ring [^1]</td>
@@ -848,12 +848,15 @@ User scripts are custom scripts the user can run via the [global
system menu](#strongincluded-menusstrong). To add your own custom
userscript:

- either create the `$XDG_CONFIG_HOME/sxmo/userscripts` directory and place your
`.sh` scripts in the `userscripts` directory. Note, Userscripts should be set to
be executable.
- or touch the `$XDG_CONFIG_HOME/sxmo/userscripts` file and write your entries
in it, following the appmenu format `<name> ^ <should-return-to-menu> ^ <script-path-or-command>`
one entry per line. Example: ` Weather ^ 0 ^ sxmo_terminal.sh -f "monospace:size=5" sh -c "curl http://wttr.in/ | less -SR"`
- create the `$XDG_CONFIG_HOME/sxmo/userscripts` directory,
- place your script in the `userscripts` directory,
- and set the executable bit and shebang so the system can run it.

You can set a title for the script by adding a comment line of the following format near the top of the file:

```sh
# title="$icon_glb My world"
```

For examples of scripts Sxmo users have made for their mobile devices, see:

-- 
2.34.1
Applied, with modifications (kept the option to do 'file' too)


--
sic dicit magister P
https://phartman.sites.luc.edu/
GPG keyID 0xE0DBD3D6 (CAE6 3A6F 755F 7BC3 36CA  330D B3E6 39C6 E0DB D3D6)
Why do you remove the file part ?