Skip to content

Access and change the opacity of many windows on the Windows operating system

Notifications You must be signed in to change notification settings

MCluck90/win-opacity-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

win-opacity

Read and write the opacity values of windows on the Windows operating system.

Example

const winOpacity = require('win-opacity');
const windows = winOpacity.getWindows();
for (const win of windows) {
  console.log(win.title); // Title on the window
  const opacity = winOpacity.getOpacity(win);
  // Make the window slightly more transparent
  winOpacity.setOpacity(win, opacity - 10);
}

Type Definitions

Definitions given in TypeScript format.

type WindowHandle = number;
interface NativeWindow {
  string title;
  WindowHandle handle;
};

API

  • getWindows() -> NativeWindow[]
    • Gets all visible windows
  • getOpacity(window: WindowHandle | NativeWindow) -> number
    • Returns the opacity of a window. The value will be in the range of [0-255]
  • setOpacity(window: WindowHandle | NativeWindow, opacity: number) -> void
    • Sets the opacity of a window. opacity must be in the range of [0-255]

About

Access and change the opacity of many windows on the Windows operating system

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published