mirror of
https://codeberg.org/scip/sway-descratch.git
synced 2025-12-19 21:41:04 +01:00
add version flag -v and give it a version
This commit is contained in:
9
main.go
9
main.go
@@ -28,7 +28,16 @@ import (
|
|||||||
"github.com/alecthomas/repr"
|
"github.com/alecthomas/repr"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const VERSION = `v0.0.3`
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
if len(os.Args) > 1 {
|
||||||
|
if os.Args[1] == "-v" {
|
||||||
|
fmt.Printf("This is sway-descratch version %s\n", VERSION)
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// we need a session to sway via IPC
|
// we need a session to sway via IPC
|
||||||
ipc := swayipc.NewSwayIPC()
|
ipc := swayipc.NewSwayIPC()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user