mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-31 11:16:12 +02:00
Rename to open/close-thunderbird-app.ps1
This commit is contained in:
parent
5f395f6e9a
commit
dbb442c7ad
@ -6,7 +6,7 @@ Installation
|
|||||||
------------
|
------------
|
||||||
1. Download and install *Serenade* from https://serenade.ai/.
|
1. Download and install *Serenade* from https://serenade.ai/.
|
||||||
2. Download and install the *PowerShell Scripts*, then set the search path to it.
|
2. Download and install the *PowerShell Scripts*, then set the search path to it.
|
||||||
3. Execute the PowerShell script: `./export-to-serenade.ps1 computer` - this creates a custom JavaScript file at `$HOME/.serenade/scripts/PowerShell.js` using the wake word 'computer'. Recommended wake words with a high detection rate are: "Alexa", "Computer", "Siri" and "Windows".
|
3. Execute: `./export-to-serenade.ps1 computer` in the *PowerShell Scripts* - this creates a custom JavaScript file at `$HOME/.serenade/scripts/PowerShell.js` using the wake word 'computer'. Recommended wake words with a high detection rate are: "Alexa", "Computer", "Siri" and "Windows".
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
@ -28,7 +28,7 @@ More supported voice commands are:
|
|||||||
[wake word], open NAME app
|
[wake word], open NAME app
|
||||||
--------------------------
|
--------------------------
|
||||||
* this launches the given application.
|
* this launches the given application.
|
||||||
* replace NAME by: "Calculator", "Netflix", or "Visual Studio".
|
* replace NAME by: "Calculator", "Netflix", "Thunderbird", or "Visual Studio".
|
||||||
* when finished use: *[wake word], close NAME app* to stop the application.
|
* when finished use: *[wake word], close NAME app* to stop the application.
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Closes Mozilla Thunderbird
|
Closes the Thunderbird app
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This script closes the Mozilla Thunderbird email client gracefully.
|
This script closes the Mozilla Thunderbird email application gracefully.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./close-mozilla-thunderbird
|
PS> ./close-thunderbird-app
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
@ -4,17 +4,17 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This script exports all PowerShell scripts to Serenade to execute them by voice.
|
This script exports all PowerShell scripts to Serenade to execute them by voice.
|
||||||
.PARAMETER WakeWord
|
.PARAMETER WakeWord
|
||||||
Specifies the wakeword (none by default)
|
Specifies the wake word (none by default)
|
||||||
.PARAMETER FilePattern
|
.PARAMETER FilePattern
|
||||||
Specifies the file pattern for the scripts ("$PSScriptRoot/*.ps1" by default)
|
Specifies the file pattern for the scripts ("$PSScriptRoot/*.ps1" by default)
|
||||||
.PARAMETER Application
|
.PARAMETER Application
|
||||||
Specifies the application to be used
|
Specifies the application to be used
|
||||||
.PARAMETER TargetFile
|
.PARAMETER TargetFile
|
||||||
Specifies the target file ("$HOME/.serenade/scripts/PowerShell.js" by default)
|
Specifies the target file ("$HOME\.serenade\scripts\PowerShell.js" by default)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./export-to-serenade.ps1 Computer
|
PS> ./export-to-serenade.ps1 Computer
|
||||||
⏳ Exporting 264 PowerShell scripts to C:\Users\Markus/.serenade/scripts/PowerShell.js...
|
⏳ Exporting 496 PowerShell scripts to C:\Users\Markus\.serenade\scripts\PowerShell.js...
|
||||||
✔️ exported 264 scripts with wakework "Computer" to Serenade in 22 sec
|
✔️ exported 496 scripts with wake word "Computer" to Serenade in 3 sec
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#requires -version 2
|
#requires -version 2
|
||||||
|
|
||||||
param([string]$WakeWord = "", [string]$FilePattern = "$PSScriptRoot/*.ps1", [string]$Application = "terminal", [string]$TargetFile = "$HOME/.serenade/scripts/PowerShell.js")
|
param([string]$WakeWord = "", [string]$FilePattern = "$PSScriptRoot/*.ps1", [string]$Application = "terminal", [string]$TargetFile = "$HOME\.serenade\scripts\PowerShell.js")
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
$StopWatch = [system.diagnostics.stopwatch]::startNew()
|
||||||
@ -39,7 +39,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds
|
||||||
"✔️ exported $($Scripts.Count) PowerShell scripts with wakeword `"$WakeWord`" to Serenade in $Elapsed sec"
|
"✔️ exported $($Scripts.Count) PowerShell scripts with wake word `"$WakeWord`" to Serenade in $Elapsed sec"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Launches Mozilla Thunderbird
|
Launches the Thunderbird app
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This script launches the Mozilla Thunderbird email client.
|
This script launches the Mozilla Thunderbird email application.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./open-mozilla-thunderbird
|
PS> ./open-thunderbird-app
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
Loading…
Reference in New Issue
Block a user