Skip to content

Commit

Permalink
0.4.1
Browse files Browse the repository at this point in the history
chore(README): rework readme and package description
  • Loading branch information
miniben-90 committed Apr 1, 2023
1 parent 04d55e7 commit 4ae9072
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 38 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name = "x-win"
version = "0.0.0"
authors = ["BENKHADRA Hocine <[email protected]>"]
keywords = ["window", "active", "current", "position", "title", "list", "open"]
description = "Get position, size, title and a few other properties of the active or open window(s) on Windows, MacOS and Linux."
description = "This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows."
repository = "https://github.com/miniben-90/x-win"

[lib]
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 BENKHADRA Hocine
Copyright (c) 2023 BENKHADRA Hocine

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
36 changes: 24 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@

# @miniben90/x-win

> This project work with Rust and napi-rs to make easy to have active window or an array of open windows.
> It work with Microsoft Windows (10, 11), Linux (With Xserver) and Macos(*).
This project uses Rust and napi-rs to make it easy to obtain the active window or an array of open windows. It works on Microsoft Windows (10, 11), [Linux (with X server)](#linux), and [macOS](#darwin).

## How to install

Easy to install:

```sh
# With npm
npm i @miniben90/x-win
Expand All @@ -21,9 +18,10 @@ yarn add @miniben90/x-win

## How to use

### Get information of current active window
### Get information about the currently active window

`exemple.ts`:

```typescript
import { activeWindow, type WindowInfo } from '@miniben90/x-win';

Expand All @@ -33,7 +31,8 @@ console.log(currentWindow);
```

`response`:
```json

```javascript
{
id: 26148,
info: {
Expand All @@ -56,9 +55,10 @@ console.log(currentWindow);
}
```

### Get List of open windows with informations
### Get a list of open windows with information

`exemple.ts`:

```typescript
import { openWindows, type WindowInfo } from '@miniben90/x-win';

Expand All @@ -68,7 +68,8 @@ console.log(windows);
```

`response`:
```json

```javascript
[{
id: 26148,
info: {
Expand All @@ -91,15 +92,26 @@ console.log(windows);
}]
```

# Linux

> Dependencies are required to be installed for development purposes.
```sh
sudo apt install libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxcb-shm0-dev
```

# Darwin

## For Darwin
## Screen recording permission introduced in macOS 10.15 Catalina

> ### Record screen required for macos
> Macos require to grant access for recording screen. If your project don't have it the title will have `<unknown>` as value.
> macOS requires you to grant access for screen recording. If your project does not have it, the title will display `<unknown>` as its value.
<hr class="padding-top: 30px;padding-bottom:30px">

**This project was inspired by:**
# Project References

**Project Inspirations:**

* [active-win](https://github.com/sindresorhus/active-win)
* [active-win-pos-rs](https://github.com/dimusic/active-win-pos-rs)
* This project was generated with [@napi-rs/cli](https://github.com/napi-rs)
6 changes: 3 additions & 3 deletions npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@miniben90/x-win-darwin-arm64",
"version": "0.4.0",
"version": "0.4.1",
"os": [
"darwin"
],
Expand All @@ -11,15 +11,15 @@
"files": [
"x-win.darwin-arm64.node"
],
"description": "Get position, size, title and a few other properties of the active or open window(s) on Windows, MacOS and Linux.",
"description": "This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.",
"author": {
"name": "BENKHADRA Hocine",
"email": "[email protected]",
"url": "https://benkhadra.com/"
},
"license": "MIT",
"engines": {
"node": ">= 10"
"node": ">= 14"
},
"repository": "https://github.com/miniben-90/x-win.git"
}
6 changes: 3 additions & 3 deletions npm/darwin-universal/package.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{
"name": "@miniben90/x-win-darwin-universal",
"version": "0.4.0",
"version": "0.4.1",
"os": [
"darwin"
],
"main": "x-win.darwin-universal.node",
"files": [
"x-win.darwin-universal.node"
],
"description": "Get position, size, title and a few other properties of the active or open window(s) on Windows, MacOS and Linux.",
"description": "This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.",
"author": {
"name": "BENKHADRA Hocine",
"email": "[email protected]",
"url": "https://benkhadra.com/"
},
"license": "MIT",
"engines": {
"node": ">= 10"
"node": ">= 14"
},
"repository": "https://github.com/miniben-90/x-win.git"
}
6 changes: 3 additions & 3 deletions npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@miniben90/x-win-darwin-x64",
"version": "0.4.0",
"version": "0.4.1",
"os": [
"darwin"
],
Expand All @@ -11,15 +11,15 @@
"files": [
"x-win.darwin-x64.node"
],
"description": "Get position, size, title and a few other properties of the active or open window(s) on Windows, MacOS and Linux.",
"description": "This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.",
"author": {
"name": "BENKHADRA Hocine",
"email": "[email protected]",
"url": "https://benkhadra.com/"
},
"license": "MIT",
"engines": {
"node": ">= 10"
"node": ">= 14"
},
"repository": "https://github.com/miniben-90/x-win.git"
}
6 changes: 3 additions & 3 deletions npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@miniben90/x-win-linux-x64-gnu",
"version": "0.4.0",
"version": "0.4.1",
"os": [
"linux"
],
Expand All @@ -11,15 +11,15 @@
"files": [
"x-win.linux-x64-gnu.node"
],
"description": "Get position, size, title and a few other properties of the active or open window(s) on Windows, MacOS and Linux.",
"description": "This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.",
"author": {
"name": "BENKHADRA Hocine",
"email": "[email protected]",
"url": "https://benkhadra.com/"
},
"license": "MIT",
"engines": {
"node": ">= 10"
"node": ">= 14"
},
"repository": "https://github.com/miniben-90/x-win.git",
"libc": [
Expand Down
6 changes: 3 additions & 3 deletions npm/win32-arm64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@miniben90/x-win-win32-arm64-msvc",
"version": "0.4.0",
"version": "0.4.1",
"os": [
"win32"
],
Expand All @@ -11,15 +11,15 @@
"files": [
"x-win.win32-arm64-msvc.node"
],
"description": "Get position, size, title and a few other properties of the active or open window(s) on Windows, MacOS and Linux.",
"description": "This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.",
"author": {
"name": "BENKHADRA Hocine",
"email": "[email protected]",
"url": "https://benkhadra.com/"
},
"license": "MIT",
"engines": {
"node": ">= 10"
"node": ">= 14"
},
"repository": "https://github.com/miniben-90/x-win.git"
}
6 changes: 3 additions & 3 deletions npm/win32-ia32-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@miniben90/x-win-win32-ia32-msvc",
"version": "0.4.0",
"version": "0.4.1",
"os": [
"win32"
],
Expand All @@ -11,15 +11,15 @@
"files": [
"x-win.win32-ia32-msvc.node"
],
"description": "Get position, size, title and a few other properties of the active or open window(s) on Windows, MacOS and Linux.",
"description": "This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.",
"author": {
"name": "BENKHADRA Hocine",
"email": "[email protected]",
"url": "https://benkhadra.com/"
},
"license": "MIT",
"engines": {
"node": ">= 10"
"node": ">= 14"
},
"repository": "https://github.com/miniben-90/x-win.git"
}
6 changes: 3 additions & 3 deletions npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@miniben90/x-win-win32-x64-msvc",
"version": "0.4.0",
"version": "0.4.1",
"os": [
"win32"
],
Expand All @@ -11,15 +11,15 @@
"files": [
"x-win.win32-x64-msvc.node"
],
"description": "Get position, size, title and a few other properties of the active or open window(s) on Windows, MacOS and Linux.",
"description": "This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.",
"author": {
"name": "BENKHADRA Hocine",
"email": "[email protected]",
"url": "https://benkhadra.com/"
},
"license": "MIT",
"engines": {
"node": ">= 10"
"node": ">= 14"
},
"repository": "https://github.com/miniben-90/x-win.git"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@miniben90/x-win",
"description": "Get position, size, title and a few other properties of the active or open window(s) on Windows, MacOS and Linux.",
"version": "0.4.0",
"description": "This package allows you to retrieve precise information about active and open windows on Windows, MacOS, and Linux. You can obtain the position, size, title, and other memory of windows.",
"version": "0.4.1",
"main": "index.js",
"types": "index.d.ts",
"files": [
Expand Down

0 comments on commit 4ae9072

Please sign in to comment.