Fork of github.com/shu-go/vvin
Find a file
Evan a839fe4655 Update from upstream by squashing
commit 6172ea4fdf435d7125697d40af2c17ae5ff3a8c6
Author: Shuhei Kubota <kubota.shuhei+github@gmail.com>
Date:   Sat Nov 4 15:30:11 2023 +0900

    build: same config as csv2xlsx

commit 6c522e8ca857f7218db476153ffd06e8b7d2bdde
Author: Shuhei Kubota <kubota.shuhei+github@gmail.com>
Date:   Sat Nov 4 15:11:53 2023 +0900

    change: debug output

commit 4cec3963cdc20c781bbacde8be927591145b95ca
Author: Shuhei Kubota <kubota.shuhei+github@gmail.com>
Date:   Sat Nov 4 15:10:26 2023 +0900

    chore: use gli/v2

commit 958c93d6256bbb4611f21f870087c074a783001b
Author: Shuhei Kubota <kubota.shuhei+github@gmail.com>
Date:   Fri Nov 3 20:45:57 2023 +0900

    fix(alpha): improve output, variable name

commit 8bc79c6bd2c4a93c087e8fea7c2e306e7028466c
Author: Shuhei Kubota <kubota.shuhei+github@gmail.com>
Date:   Fri Nov 3 20:18:34 2023 +0900

    refactor: remove unused code

commit 7a14926dd7f83dd6a41f3baa6c905b7c81191a93
Author: Shuhei Kubota <kubota.shuhei+github@gmail.com>
Date:   Fri Nov 3 20:18:59 2023 +0900

    build: go 1.21

commit 40007434e6fdbc3ad485862b3d2785d7ba7263a8
Author: Shuhei Kubota <kubota.shuhei+github@gmail.com>
Date:   Fri Nov 3 20:18:15 2023 +0900

    fix: call cancel finally

commit 5b02edacd34942adedf38d089737d3c8130d52e3
Author: Shuhei Kubota <kubota.shuhei+github@gmail.com>
Date:   Fri Nov 3 20:16:34 2023 +0900

    fix: typo
2024-04-04 10:50:39 -04:00
cmd_alpha.go Update from upstream by squashing 2024-04-04 10:50:39 -04:00
cmd_minmax.go Mark as Windows only 2023-10-17 00:00:50 -04:00
cmd_resize.go Update from upstream by squashing 2024-04-04 10:50:39 -04:00
cmd_topmost.go Mark as Windows only 2023-10-17 00:00:50 -04:00
cmd_wait.go Update from upstream by squashing 2024-04-04 10:50:39 -04:00
go.mod Update from upstream by squashing 2024-04-04 10:50:39 -04:00
go.sum Update from upstream by squashing 2024-04-04 10:50:39 -04:00
LICENSE add: LICENSE 2019-11-10 12:15:44 +09:00
README.md Update README.md 2023-10-16 16:15:05 -04:00
renovate.json Add Renovate Bot support 2023-11-03 09:54:32 -04:00
vvin.go Update from upstream by squashing 2024-04-04 10:50:39 -04:00

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

wait closed

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