mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-02 10:59:14 +01:00
Add check-month.ps1
This commit is contained in:
parent
d15a5e5af3
commit
877cdab36e
@ -32,7 +32,7 @@ When finished say: *"Computer, close [app]"* to close the application.
|
||||
|
||||
*"Computer, check [item]."*
|
||||
--------------------------
|
||||
Lets the computer check something, replace [item] by: `Bitcoin rate`, `Christmas`, `CPU`, `date`, `dawn`, `day`, `DNS`, `drives`, `dusk`, `Easter Sunday`, `Earth` (fun), `Ether rate`, `headlines`, `Independence Day`, `ISS position`, `midnight`, `moon phase`, `New Year`, `noon`, `operating system`, `ping`, `Santa`, `sunrise`, `sunset`, `swap space`, `tea time`, `Tether rate`, `time`, `time zone`, `up-time`, `VPN`, `weather`, `week`, `year`, or `zenith`.
|
||||
Lets the computer check something, replace [item] by: `Bitcoin rate`, `Christmas`, `CPU`, `date`, `dawn`, `day`, `DNS`, `drives`, `dusk`, `Easter Sunday`, `Earth` (fun), `Ether rate`, `headlines`, `Independence Day`, `ISS position`, `midnight`, `moon phase`, `month`, `New Year`, `noon`, `operating system`, `ping`, `Santa`, `sunrise`, `sunset`, `swap space`, `tea time`, `Tether rate`, `time`, `time zone`, `up-time`, `VPN`, `weather`, `week`, `year`, or `zenith`.
|
||||
|
||||
|
||||
*"Computer, open [letter] drive."*
|
||||
|
23
Scripts/check-month.ps1
Normal file
23
Scripts/check-month.ps1
Normal file
@ -0,0 +1,23 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Gets the current month name
|
||||
.DESCRIPTION
|
||||
This script determines and speaks the current month name by text-to-speech (TTS).
|
||||
.EXAMPLE
|
||||
PS> ./check-month
|
||||
✔️ It's December.
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
try {
|
||||
[system.threading.thread]::currentthread.currentculture=[system.globalization.cultureinfo]"en-US"
|
||||
$MonthName = (Get-Date -UFormat %B)
|
||||
& "$PSScriptRoot/give-reply.ps1" "It's $MonthName."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
exit 1
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
.SYNOPSIS
|
||||
Switches to a random wallpaper
|
||||
.DESCRIPTION
|
||||
This script downloads a random photo and sets it as desktop wallpaper.
|
||||
This script downloads a random photo from Unsplash and sets it as desktop wallpaper.
|
||||
.PARAMETER Category
|
||||
Specifies the photo category (beach, city, ...)
|
||||
.EXAMPLE
|
||||
@ -23,7 +23,7 @@ function GetTempDir {
|
||||
}
|
||||
|
||||
try {
|
||||
& "$PSScriptRoot/give-reply.ps1" "Loading from Unsplash..."
|
||||
& "$PSScriptRoot/give-reply.ps1" "Just a second..."
|
||||
|
||||
$Path = "$(GetTempDir)/next_wallpaper.jpg"
|
||||
& wget -O $Path "https://source.unsplash.com/3840x2160?$Category"
|
||||
|
Loading…
Reference in New Issue
Block a user