diff options
Diffstat (limited to 'cmd/gotop/main.go')
-rw-r--r-- | cmd/gotop/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/gotop/main.go b/cmd/gotop/main.go index 3a33535..94f03a8 100644 --- a/cmd/gotop/main.go +++ b/cmd/gotop/main.go @@ -77,6 +77,7 @@ func parseArgs() error { opflag.BoolVarP(&conf.Mbps, "mbps", "", conf.Mbps, tr.Value("args.mbps")) opflag.BoolVar(&conf.Test, "test", conf.Test, tr.Value("args.test")) opflag.StringP("", "C", "", tr.Value("args.conffile")) + opflag.BoolVarP(&conf.Nvidia, "nvidia", "", conf.Nvidia, "Enable NVidia GPU support") list := opflag.String("list", "", tr.Value("args.list")) wc := opflag.Bool("write-config", false, tr.Value("args.write")) opflag.SortFlags = false @@ -139,6 +140,9 @@ func parseArgs() error { } os.Exit(0) } + if conf.Nvidia { + conf.ExtensionVars["nvidia"] = "true" + } if *wc { path, err := conf.Write() if err != nil { |