vvin/README.md

84 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2019-11-09 22:43:39 -05:00
keep waking Windows up
![MIT License](https://img.shields.io/badge/License-MIT-blue)
# Usage
2023-10-16 08:56:23 -04:00
```
package main
import (
"git.bigun.dev/evan/vvin"
)
// program implements vvin
func main() {
// Bring this program's window to the top.
err := vvin.Vvin([]string{"topmost"})
if err != nil {
log.Println(err)
}
}
```
2019-11-09 22:43:39 -05:00
```
Sub commands:
minimize, min minimize/restore
maximize, max maximize/restore
resize, move, mv resize/move
alpha set alpha 0%(transparent) - 100%(opaque)
topmost set always on top/restore
wait wait for a window is opened/closed ([--close] {Title})
2019-11-09 22:43:39 -05:00
Options:
-t, --target WINDOW_TITLE default to current window
```
## minimize/restore
```
2023-10-16 08:56:23 -04:00
vvin.Vvin([]string{"-t", "notepad", "min"})
2019-11-09 22:43:39 -05:00
2023-10-16 08:56:23 -04:00
vvin.Vvin([]string{"-t", "notepad", "min", "--restore"})
vvin.Vvin([]string{"-t", "notepad", "min", "-r"})
2019-11-09 22:43:39 -05:00
```
## resize
```
2023-10-16 08:56:23 -04:00
vvin.Vvin([]string{"-t", "notepad", "resize", "-x", "0", "-y", "0", "-w", "60%", "-h", "100%"})
2019-11-09 22:43:39 -05:00
```
## alpha
```
2023-10-16 08:56:23 -04:00
vvin.Vvin([]string{"-t", "notepad", "alpha", "75%"})
2019-11-09 22:43:39 -05:00
```
## always on top
```
2023-10-16 08:56:23 -04:00
vvin.Vvin([]string{"-t", "notepad", "topmost"})
2019-11-09 22:43:39 -05:00
2023-10-16 08:56:23 -04:00
vvin.Vvin([]string{"-t", "notepad", "topmost", "--restore"})
vvin.Vvin([]string{"-t", "notepad", "topmost", "-r"})
2019-11-09 22:43:39 -05:00
```
## wait
### wait for a window to appear
```
2023-10-16 08:56:23 -04:00
vvin.Vvin([]string{"wait", "notepad"})
```
### wait closed
```
2023-10-16 08:56:23 -04:00
vvin.Vvin([]string{"wait", "notepad", "--closed"})
```