Fork of github.com/shu-go/vvin
Go to file
Evan 8d44ba85b4 Update to reflect calling from code 2023-10-16 08:56:23 -04:00
LICENSE add: LICENSE 2019-11-10 12:15:44 +09:00
README.md Update to reflect calling from code 2023-10-16 08:56:23 -04:00
cmd_alpha.go refactor: rename to private 2019-11-18 18:42:38 +09:00
cmd_minmax.go refactor: rename to private 2019-11-18 18:42:38 +09:00
cmd_resize.go refactor: rename to private 2019-11-18 18:42:38 +09:00
cmd_topmost.go refactor: rename to private 2019-11-18 18:42:38 +09:00
cmd_wait.go fix: intervals -> interval 2019-11-18 17:33:27 +09:00
go.mod Upgrade deps, Go version 2023-10-14 21:38:49 -04:00
go.sum Upgrade deps, Go version 2023-10-14 21:38:49 -04:00
vvin.go Make into reuseable package 2023-10-14 21:34:16 -04:00

README.md

keep waking Windows up

MIT License

Usage

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)
	}
}

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})

Options:
  -t, --target WINDOW_TITLE  default to current window

minimize/restore

vvin.Vvin([]string{"-t", "notepad", "min"})

vvin.Vvin([]string{"-t", "notepad", "min", "--restore"})
vvin.Vvin([]string{"-t", "notepad", "min", "-r"})

resize

vvin.Vvin([]string{"-t", "notepad", "resize", "-x", "0", "-y", "0", "-w", "60%", "-h", "100%"})

alpha

vvin.Vvin([]string{"-t", "notepad", "alpha", "75%"})

always on top

vvin.Vvin([]string{"-t", "notepad", "topmost"})
> ./vvin -t notepad topmost

vvin.Vvin([]string{"-t", "notepad", "topmost", "--restore"})
vvin.Vvin([]string{"-t", "notepad", "topmost", "-r"})

wait

wait for a window to appear

vvin.Vvin([]string{"wait", "notepad"})
> ./vvin wait notepad

wait closed

vvin.Vvin([]string{"wait", "notepad", "--closed"})