Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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:
Expand Down
41 changes: 40 additions & 1 deletion ui.glade
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,45 @@ Author: Gabriele Musco
<property name="position">5</property>
</packing>
</child>
<child>
<object class="GtkBox" id="boxWMclass">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">10</property>
<child>
<object class="GtkLabel" id="labelWMclass">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="label" translatable="yes">StartupWMClass:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entryWMclass">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="secondary_icon_tooltip_text" translatable="yes">Used to relate specific windows to certain applications. For example to assign a custom icon to a Chromium webapp.</property>
<property name="placeholder_text" translatable="yes">(Optional)</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
</packing>
</child>
<child>
<object class="GtkBox" id="boxIcon">
<property name="visible">True</property>
Expand Down Expand Up @@ -569,7 +608,7 @@ Author: Gabriele Musco
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">6</property>
<property name="position">7</property>
</packing>
</child>
</object>
Expand Down