hyprman/cmd/mako.go

27 lines
499 B
Go
Raw Permalink Normal View History

2024-05-21 15:41:20 -05:00
package cmd
import (
"github.com/spf13/cobra"
2024-06-11 11:53:13 -05:00
hyprman "git.dayl.in/daylin/hyprman/internal"
2024-05-21 15:41:20 -05:00
)
var makoCmd = &cobra.Command{
2024-05-31 14:59:23 -05:00
Use: "mako",
Short: "mako integration",
Run: func(cmd *cobra.Command, args []string) {
2024-06-11 11:53:13 -05:00
hyprman.ListNotifications(number, json)
2024-05-31 14:59:23 -05:00
},
2024-05-21 15:41:20 -05:00
}
var (
2024-06-11 11:53:13 -05:00
number int
json bool
)
2024-05-21 15:41:20 -05:00
func init() {
2024-05-31 14:59:23 -05:00
rootCmd.AddCommand(makoCmd)
2024-06-11 11:53:13 -05:00
makoCmd.Flags().IntVarP(&number, "number", "n", 10, "number of notifications")
makoCmd.Flags().BoolVar(&json, "json", false, "output data as json")
2024-05-21 15:41:20 -05:00
}