-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
51 lines (49 loc) · 1.46 KB
/
main.go
File metadata and controls
51 lines (49 loc) · 1.46 KB
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
// Package main handles the commands that nirimgr supports.
//
// Currently supports the following commands:
//
// # events
//
// The events command
//
// nirimgr events
//
// listens on the niri event-stream, and reacts
// to specified events. You need to configure the rules in the config.json file.
// It supports the same matching on windows as the niri config window-rule. Specify
// matches and excludes containing the title or appId of the window you want to match.
// Then provide which actions you want to do on the matched window, e.g. MoveWindowToFloating
// will move the matched window to floating.
//
// # scratch
//
// The scratch command
//
// nirimgr scratch [move|show]
//
// takes one argument, either `move` or `show`. Move will move the
// currently focused window to the scratchpad workspace. Show will take the last window
// on the scratchpad workspace, and move it to the currently focused workspace.
//
// # list
//
// The list command
//
// nirimgr list
//
// lists all the available actions and events defined in nirimgr.
package main
import (
"github.com/soderluk/nirimgr/cmd"
_ "github.com/soderluk/nirimgr/cmd/floating" // Register floating window subcommands
_ "github.com/soderluk/nirimgr/cmd/scratchpad" // Register scratch subcommands
"github.com/soderluk/nirimgr/config"
"github.com/soderluk/nirimgr/internal/common"
)
func main() {
if err := config.Configure("config.json"); err != nil {
panic(err)
}
common.SetupLogger()
cmd.Execute()
}