diff --git a/main.py b/main.py index a71b24a..a92fea5 100755 --- a/main.py +++ b/main.py @@ -172,6 +172,7 @@ def buttonSave_clicked_cb(self, button): category=builder.get_object("comboboxtext-entry").get_text() terminal=builder.get_object("switchTerminal").get_state() keywords=builder.get_object("entryKeywords").get_text().strip() + wmclass=builder.get_object("entryWMclass").get_text().strip() #check if the name contains nothing or only spaces if name and executable: if path and not os.path.isdir(path): @@ -193,6 +194,7 @@ def buttonSave_clicked_cb(self, button): launcherString+="Name="+name+"\n" launcherString+="Icon="+self.iconPath+"\n" launcherString+="Keywords="+keywords+"\n" + launcherString+="StartupWMClass="+wmclass+"\n" launcherString+=self.untouchableLines if self.customSavePath: self.savePath=self.customSavePath @@ -284,6 +286,7 @@ def processFile(self, path): category=builder.get_object("comboboxtext-entry") terminal=builder.get_object("switchTerminal") keywords=builder.get_object("entryKeywords") + wmclass=builder.get_object("entryWMclass") self.resetUI() @@ -342,6 +345,10 @@ def processFile(self, path): keywords.set_text(lines[i].strip()[9:]) lines.pop(i) skip[6]=True + elif lines[i].strip()[:15] == "StartupWMClass=" and not skip[7]: + wmclass.set_text(lines[i].strip()[15:]) + lines.pop(i) + skip[7]=True else: self.untouchableLines+=lines.pop(i) except: diff --git a/ui.glade b/ui.glade index 296616d..3419307 100644 --- a/ui.glade +++ b/ui.glade @@ -453,6 +453,45 @@ Author: Gabriele Musco 5 + + + True + False + vertical + 10 + + + True + False + start + StartupWMClass: + + + False + True + 0 + + + + + True + True + Used to relate specific windows to certain applications. For example to assign a custom icon to a Chromium webapp. + (Optional) + + + False + True + 1 + + + + + False + True + 6 + + True @@ -569,7 +608,7 @@ Author: Gabriele Musco False True - 6 + 7