1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Make openFileUtil configurable

Let user configure the command/utility to use to open a file or URL from within a WTF widget
This commit is contained in:
Anand Sudhir Prayaga
2018-07-24 12:59:21 +02:00
parent a7fe8207d0
commit 4ae8de8bdd
5 changed files with 12 additions and 3 deletions

View File

@@ -81,7 +81,8 @@ func NamesFromEmails(emails []string) []string {
// OpenFile opens the file defined in `path` via the operating system
func OpenFile(path string) {
filePath, _ := ExpandHomeDir(path)
cmd := exec.Command("open", filePath)
openFileUtil := Config.UString("wtf.openFileUtil", "open")
cmd := exec.Command(openFileUtil, filePath)
ExecuteCommand(cmd)
}