From f79dde7228ceeca14971f19fa507bba22649619a Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sat, 23 Oct 2021 17:47:07 +0200 Subject: [PATCH] Add open-spotify.ps1 and close-spotify.ps1 --- Data/scripts.csv | 2 ++ Docs/close-spotify.md | 26 ++++++++++++++++++++++++++ Docs/open-spotify.md | 26 ++++++++++++++++++++++++++ README.md | 2 ++ Scripts/close-spotify.ps1 | 15 +++++++++++++++ Scripts/open-spotify.ps1 | 15 +++++++++++++++ 6 files changed, 86 insertions(+) create mode 100644 Docs/close-spotify.md create mode 100644 Docs/open-spotify.md create mode 100755 Scripts/close-spotify.ps1 create mode 100755 Scripts/open-spotify.ps1 diff --git a/Data/scripts.csv b/Data/scripts.csv index 0f5157ae..dc26405b 100644 --- a/Data/scripts.csv +++ b/Data/scripts.csv @@ -52,6 +52,7 @@ close-netflix.ps1, Closes the Netflix application gracefully close-onedrive.ps1, Closes Microsoft OneDrive gracefully close-serenade.ps1, Closes the Serenade.ai application gracefully close-snipping-tool.ps1, Closes the Snipping Tool application gracefully +close-spotify.ps1, Closes Spotify close-system-settings.ps1, Closes the System Settings gracefully close-thunderbird.ps1, Closes Mozilla Thunderbird gracefully close-vlc.ps1, Closes the VLC media player application @@ -173,6 +174,7 @@ open-onedrive-folder.ps1, Opens the user's OneDrive folder open-recycle-bin.ps1, Opens the user's recycle bin folder open-repos-folder.ps1, Opens the user's Git repositories folder open-snipping-tools.ps1, Opens the Snipping Tool +open-spotify.ps1, Opens the Spotify app open-task-manager.ps1, Starts the Task Manager open-videos-folder.ps1, Opens the user's videos folder pick-commit.ps1, Cherry-picks a Git commit into multiple branches diff --git a/Docs/close-spotify.md b/Docs/close-spotify.md new file mode 100644 index 00000000..b14331bf --- /dev/null +++ b/Docs/close-spotify.md @@ -0,0 +1,26 @@ +## close-spotify.ps1 - Closes Spotify + +This script closes the Spotify application gracefully. + +## Parameters +```powershell +close-spotify.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./close-spotify + +``` + +## Notes +Author: Markus Fleschutz · License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +*Generated by convert-ps2md.ps1 using the comment-based help of close-spotify.ps1* diff --git a/Docs/open-spotify.md b/Docs/open-spotify.md new file mode 100644 index 00000000..9b0a4872 --- /dev/null +++ b/Docs/open-spotify.md @@ -0,0 +1,26 @@ +## open-spotify.ps1 - Starts Spotify + +This script starts the Spotify application. + +## Parameters +```powershell +open-spotify.ps1 [] + +[] + This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, + WarningVariable, OutBuffer, PipelineVariable, and OutVariable. +``` + +## Example +```powershell +PS> ./open-spotify + +``` + +## Notes +Author: Markus Fleschutz · License: CC0 + +## Related Links +https://github.com/fleschutz/PowerShell + +*Generated by convert-ps2md.ps1 using the comment-based help of open-spotify.ps1* diff --git a/README.md b/README.md index f132f0ef..b57be0b8 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,7 @@ Mega Collection of PowerShell Scripts | [close-onedrive.ps1](Scripts/close-onedrive.ps1) | Closes Microsoft OneDrive | [Help](Docs/close-onedrive.md) | | [close-serenade.ps1](Scripts/close-serenade.ps1) | Closes the Serenade application | [Help](Docs/close-serenade.md) | | [close-snipping-tool.ps1](Scripts/close-snipping-tool.ps1)| Closes the Snipping Tool application | [Help](Docs/close-snipping-tool.md) | +| [close-spotify.ps1](Scripts/close-spotify.ps1) | Closes Spotify | [Help](Docs/close-spotify.md) | | [close-system-settings.ps1](Scripts/close-system-settings.ps1) | Closes the System Settings window | [Help](Docs/close-system-settings.md)| | [close-task-manager.ps1](Scripts/close-task-manager.ps1) | Closes the Task Manager | [Help](Docs/close-task-manager.md) | | [close-thunderbird.ps1](Scripts/close-thunderbird.ps1) | Closes Mozilla Thunderbird | [Help](Docs/close-thunderbird.md) | @@ -129,6 +130,7 @@ Mega Collection of PowerShell Scripts | [open-recycle-bin.ps1](Scripts/open-recycle-bin.ps1) | Opens the user's recycle bin folder | [Help](Docs/open-recycle-bin.md) | | [open-repos-folder.ps1](Scripts/open-repos-folder.ps1) | Opens the user's Git repositories folder | [Help](Docs/open-repos-folder.md) | | [open-snipping-tool.ps1](Scripts/open-snipping-tool.ps1)| Starts the Snipping Tool | [Help](Docs/open-snipping-tool.md) | +| [open-spotify.ps1](Scripts/open-spotify.ps1) | Opens Spotify | [Help](Docs/open-spotify.md) | | [open-task-manager.ps1](Scripts/open-task-manager.ps1)| Starts the Task Manager | [Help](Docs/open-task-manager.md) | | [open-videos-folder.ps1](Scripts/open-videos-folder.ps1)| Opens the user's videos folder | [Help](Docs/open-videos-folder.md) | | [remind-me.ps1](Scripts/remind-me.ps1) | Creates a scheduled task that will display a popup message | [Help](Docs/remind-me.md) | diff --git a/Scripts/close-spotify.ps1 b/Scripts/close-spotify.ps1 new file mode 100755 index 00000000..693e191e --- /dev/null +++ b/Scripts/close-spotify.ps1 @@ -0,0 +1,15 @@ +<# +.SYNOPSIS + Closes Spotify +.DESCRIPTION + This script closes the Spotify application gracefully. +.EXAMPLE + PS> ./close-spotify +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +& "$PSScriptRoot/close-program.ps1" "Spotify" "spotify" "" +exit 0 # success diff --git a/Scripts/open-spotify.ps1 b/Scripts/open-spotify.ps1 new file mode 100755 index 00000000..74008cc4 --- /dev/null +++ b/Scripts/open-spotify.ps1 @@ -0,0 +1,15 @@ +<# +.SYNOPSIS + Starts Spotify +.DESCRIPTION + This script starts the Spotify application. +.EXAMPLE + PS> ./open-spotify +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +Start-Process spotify.exe +exit 0 # success