We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
比如,我用的是linux,默认调用的是xdg-open,但是问题是这个命令只要调一次,就会生成一个新的图片进程实例,我在手机上点了10次,电脑上会出现10个运行的图片,最后我得一个一个关了才行,如果能在配置文件中进行自己配置命令就好了,比如,我改了一下代码,让他运行 eog -w,这样,就只会运行一个界面实例了,如果能支持就方便了。
# 应用系统设置 [setting] logpath = "tmp/log" port = 8899 uri = "eog -w"
下面代码就可以支持
func Open(uri string) error { //runtime.GOOS run, ok := commands[runtime.GOOS] if !ok { return fmt.Errorf("don't know how to open things on %s platform", runtime.GOOS) } _uri := g.Config().GetString("setting.uri") if len(_uri) >0 { run = _uri } //exec.Command run = run + " " + uri fmt.Println(run) cmds := strings.Split(run, " ") cmd := exec.Command(cmds[0], cmds[1:]...) //cmd.Start fmt.Println("[CommandAs]", cmds) return cmd.Start() }
The text was updated successfully, but these errors were encountered:
经测试 eog -w 在centos上面也是点击多张图片,也不会达到“只会运行一个界面实例”的效果。你那边测试是可以的吗?
Sorry, something went wrong.
对,我的ubuntu18.04是没有问题的, 其实,就算eog这个不支持,也回有别的支持,如果能扩展到支持配置,就大大的扩展的功能的自由度。
No branches or pull requests
比如,我用的是linux,默认调用的是xdg-open,但是问题是这个命令只要调一次,就会生成一个新的图片进程实例,我在手机上点了10次,电脑上会出现10个运行的图片,最后我得一个一个关了才行,如果能在配置文件中进行自己配置命令就好了,比如,我改了一下代码,让他运行 eog -w,这样,就只会运行一个界面实例了,如果能支持就方便了。
下面代码就可以支持
The text was updated successfully, but these errors were encountered: