~anjan/sxmo-docs-stable

0ed17a17dcd35583f7b4b0ddcb3244f769c1959b — Peter John Hartman 2 years ago b6d2916
Userscript information.

Updated as per https://lists.sr.ht/~mil/sxmo-devel/patches/28815 with
modifications.
1 files changed, 10 insertions(+), 5 deletions(-)

M USERGUIDE.md
M USERGUIDE.md => USERGUIDE.md +10 -5
@@ 940,14 940,19 @@ Create a file ``~/.Xresources`` and you have the following notable settings to t

User scripts are custom scripts the user can run via the [global
system menu](#strongincluded-menusstrong). To add your own custom
userscript:
userscript, you have two options: edit the `userscripts` file or
place a shell script in the `userscripts` directory.

- 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
- Option 1. Edit `$XDG_CONFIG_HOME/sxmo/userscripts` 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"`
- Option 2. 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. You can set a title for the script by adding a comment line of the following ofrmat 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: