Hi there is it possible to run a script in snippets?
Hi there, i'm working on your layouts, and I have created a touch bar with password shortcuts right on the screen. What I am wondering is can we execute scripts in the snippets sections?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Onboard Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Francesco Fumanti
- Solved:
- 2017-12-22
- Last query:
- 2017-12-22
- Last reply:
- 2017-12-19
|
#1 |
The snippets simulate somebody typing on a keyboard. It does not interprete what is being typed; it only sends keystrokes to the front application.
You can however put cli commands into the snippets. I have for example the following in a snippet:
tail -f /var/log/syslog \n
When I click on that snippet while the terminal is the front application, I see the system log that scrolls in the terminal.
Remark: The "\n" at the end of the command is equivalent to hitting the return key. You can remove it and the command gets only executed after you hit the return key on the keyboard.
Mathew Potter (matt-r) said : | #2 |
Thanks Francesco Fumanti, that solved my question.
Mathew Potter (matt-r) said : | #3 |
Thank you, this was helpful, i've got it in my mind to have a little bit of touchbar on the my touch screen xps :) this gets me one setup closer
mathew
Francesco Fumanti (frafu) said : | #4 |
You're welcome.