Skip to content

PowerShell module / cmdlet used to focus any existing window, with built-in smart auto-completion.

License

Notifications You must be signed in to change notification settings

71/Focus-Window

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Focus-Window

A PowerShell module / cmdlet for easily switching between windows.

Use Focus-Window query to focus the first window matching the given query.
Auto-completion is built-in, and will suggest every existing window on the current desktop when is pressed.

Usage

# Focus the first window that contains the name 'pwsh'.
Focus-Window pwsh

# Focus the first window that equals the name 'pwsh'.
Focus-Window '^pwsh$'

# Focus the window with the handle 101010, if it exists.
Focus-Window 101010

# Focus the window with the handle 202020, if it exists.
Focus-Window 'foo bar (202020)'

Installation

Using PowerShellGet, install the module:

Install-Module Focus-Window

Then, import it:

Note the addition of -DisableNameChecking, which is required since Focus-Window begins with "Focus," which is not an approved PowerShell verb.

Import-Module Focus-Window -DisableNameChecking

Adding an alias such as w is also suggested, but not done by default:

Set-Alias w Focus-Window

About

PowerShell module / cmdlet used to focus any existing window, with built-in smart auto-completion.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published