add -ft argument
This commit is contained in:
13
tools.go
13
tools.go
@@ -548,6 +548,15 @@ func savePinned() {
|
||||
}
|
||||
|
||||
func launch(command string, terminal bool) {
|
||||
themeToPrepend := ""
|
||||
// add "GTK_THEME=<default_gtk_theme>" environment variable
|
||||
if *forceTheme {
|
||||
settings, _ := gtk.SettingsGetDefault()
|
||||
th, err := settings.GetProperty("gtk-theme-name")
|
||||
if err == nil {
|
||||
themeToPrepend = th.(string)
|
||||
}
|
||||
}
|
||||
// trim % and everything afterwards
|
||||
if strings.Contains(command, "%") {
|
||||
cutAt := strings.Index(command, "%")
|
||||
@@ -577,6 +586,10 @@ func launch(command string, terminal bool) {
|
||||
cmdIdx = 0
|
||||
}
|
||||
|
||||
if themeToPrepend != "" {
|
||||
envVars = append(envVars, fmt.Sprintf("GTK_THEME=%s", themeToPrepend))
|
||||
}
|
||||
|
||||
cmd := exec.Command(elements[cmdIdx], elements[1+cmdIdx:]...)
|
||||
|
||||
if terminal {
|
||||
|
||||
Reference in New Issue
Block a user