From 57d130ca513079028e34721f1db66aed6427088b Mon Sep 17 00:00:00 2001 From: gouvinb Date: Thu, 9 Nov 2023 15:49:50 +0100 Subject: [PATCH] Restore the code to trim % and everything that follows --- tools.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools.go b/tools.go index 3f3ac4e..8a55d3d 100644 --- a/tools.go +++ b/tools.go @@ -548,6 +548,14 @@ func savePinned() { } func launch(command string, terminal bool) { + // trim % and everything afterwards + if strings.Contains(command, "%") { + cutAt := strings.Index(command, "%") + if cutAt != -1 { + command = command[:cutAt-1] + } + } + themeToPrepend := "" // add "GTK_THEME=" environment variable if *forceTheme {