Compare commits
3 Commits
1397fbe4a3
...
667b1cf288
Author | SHA1 | Date | |
---|---|---|---|
667b1cf288 | |||
ed02821b39 | |||
ea8864375b |
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,3 +15,4 @@
|
|||||||
# Dependency directories (remove the comment below to include it)
|
# Dependency directories (remove the comment below to include it)
|
||||||
# vendor/
|
# vendor/
|
||||||
|
|
||||||
|
.lumerc
|
||||||
|
Binary file not shown.
19
cmd/lume/init_windows.go
Normal file
19
cmd/lume/init_windows.go
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
// +build windows
|
||||||
|
|
||||||
|
// https://stackoverflow.com/a/52579002
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"golang.org/x/sys/windows"
|
||||||
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
stdout := windows.Handle(os.Stdout.Fd())
|
||||||
|
var originalMode uint32
|
||||||
|
|
||||||
|
windows.GetConsoleMode(stdout, &originalMode)
|
||||||
|
windows.SetConsoleMode(stdout, originalMode|windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING)
|
||||||
|
}
|
@ -9,20 +9,11 @@ import (
|
|||||||
lifx "git.kill0.net/chill9/lume"
|
lifx "git.kill0.net/chill9/lume"
|
||||||
lumecmd "git.kill0.net/chill9/lume/cmd"
|
lumecmd "git.kill0.net/chill9/lume/cmd"
|
||||||
"github.com/BurntSushi/toml"
|
"github.com/BurntSushi/toml"
|
||||||
|
|
||||||
"golang.org/x/sys/windows"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const lumercFile = ".lumerc"
|
const lumercFile = ".lumerc"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var originalMode uint32
|
|
||||||
stdout := windows.Handle(os.Stdout.Fd())
|
|
||||||
|
|
||||||
windows.GetConsoleMode(stdout, &originalMode)
|
|
||||||
windows.SetConsoleMode(stdout, originalMode|windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING)
|
|
||||||
defer windows.SetConsoleMode(stdout, originalMode)
|
|
||||||
|
|
||||||
var config lumecmd.Config
|
var config lumecmd.Config
|
||||||
config = loadConfig()
|
config = loadConfig()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user