Compare commits
2 commits
42ac8bee8c
...
f698f2614e
Author | SHA1 | Date | |
---|---|---|---|
f698f2614e | |||
05b641bc97 |
7 changed files with 24 additions and 32 deletions
|
@ -5,12 +5,13 @@ import (
|
|||
)
|
||||
|
||||
var ewwCmd = &cobra.Command{
|
||||
Use:"eww" ,
|
||||
Use: "eww",
|
||||
Short: "eww integration",
|
||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||
hm.LoadConfig(configPath)
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(ewwCmd)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
)
|
||||
|
||||
var makoCmd = &cobra.Command{
|
||||
Use:"mako" ,
|
||||
Use: "mako",
|
||||
Short: "mako integration",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("hahah mako baby")
|
||||
|
@ -18,5 +18,3 @@ var makoCmd = &cobra.Command{
|
|||
func init() {
|
||||
rootCmd.AddCommand(makoCmd)
|
||||
}
|
||||
|
||||
|
||||
|
|
17
cmd/root.go
17
cmd/root.go
|
@ -2,12 +2,12 @@ package cmd
|
|||
|
||||
import (
|
||||
"os"
|
||||
cc "github.com/ivanpirog/coloredcobra"
|
||||
|
||||
"git.dayl.in/daylin/hyprman/internal"
|
||||
cc "github.com/ivanpirog/coloredcobra"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
|
||||
func Execute() {
|
||||
cc.Init(&cc.Config{
|
||||
RootCmd: rootCmd,
|
||||
|
@ -25,22 +25,17 @@ func Execute() {
|
|||
}
|
||||
}
|
||||
|
||||
var configPath string
|
||||
var hm = &hyprman.Hyprman{}
|
||||
var (
|
||||
configPath string
|
||||
hm = &hyprman.Hyprman{}
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "hyprman",
|
||||
Short: "hyprland companion app",
|
||||
PersistentPreRun: func(cmd *cobra.Command, args []string) {
|
||||
hm.LoadConfig(configPath)
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
func init() {
|
||||
rootCmd.CompletionOptions.HiddenDefaultCmd = true
|
||||
rootCmd.PersistentFlags().StringVarP(&configPath, "config", "c", hyprman.DefaultConfigPath(), "path to config file")
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -277,4 +277,3 @@ func (hm *Hyprman) Watch() {
|
|||
hm.handleHyprEvent(line)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,4 +33,3 @@ package hyprman
|
|||
// log.Fatal(err)
|
||||
// }
|
||||
// }
|
||||
|
||||
|
|
Loading…
Reference in a new issue