-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.go
61 lines (55 loc) · 1.11 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package main
import (
"fmt"
"log"
"os"
"github.com/urfave/cli/v2"
)
func main() {
app := &cli.App{
Name: "fenster",
EnableBashCompletion: true,
Description: "Better fullscreen spaces",
Commands: []*cli.Command{
{
Name: "start",
Usage: "Starts fenster service",
Action: func(c *cli.Context) error {
return StartServer()
},
},
{
Name: "prepare",
Usage: "Collects data about spaces before the full screen",
Action: func(c *cli.Context) error {
fmt.Println("Not implement yet")
return nil
},
},
{
Name: "space",
Description: "Handling spaces",
Subcommands: []*cli.Command{
{
Name: "next",
Usage: "Move current app to next avalibale window",
Action: func(c *cli.Context) error {
return HandleRight()
},
},
{
Name: "previous",
Usage: "Move current app to previous avalibale window",
Action: func(c *cli.Context) error {
return HandleLeft()
},
},
},
},
},
}
err := app.Run(os.Args)
if err != nil {
log.Fatal(err)
}
}