diff --git a/cmd/root.go b/cmd/root.go index 66e424a..ad7b530 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -28,6 +28,8 @@ import ( var transition bool var softCutDuration float64 +var width int32 +var height int32 /* * checkStdin checks if any data has been passed in through stdin and returns @@ -157,7 +159,7 @@ func milkbucket(cmd *cobra.Command, args []string) { } defer sdl.Quit() - m, err := newMilkDropWindow(800, 600, args, softCutDuration) + m, err := newMilkDropWindow(width, height, args, softCutDuration) if err != nil { cobra.CheckErr(err) } @@ -205,4 +207,6 @@ func init() { // when this action is called directly. rootCmd.Flags().BoolVarP(&transition, "transition", "t", false, "smoothly transition between presets") rootCmd.Flags().Float64VarP(&softCutDuration, "soft-cut-duration", "s", 3, "time in seconds for a soft transition between two presets (use with --transition)") + rootCmd.Flags().Int32Var(&width, "width", 800, "window width") + rootCmd.Flags().Int32Var(&height, "height", 600, "window height") }