@@ -239,6 +239,10 @@ def delete_webbapp(self, webapp):
239239 if os .path .exists (epiphany_orig_prof_dir ):
240240 os .remove (epiphany_orig_prof_dir )
241241 shutil .rmtree (os .path .join (EPIPHANY_PROFILES_DIR , "org.gnome.Epiphany.WebApp-%s" % webapp .codename ), ignore_errors = True )
242+ falkon_orig_prof_dir = os .path .join (os .path .expanduser ("~/.config/falkon/profiles" ), webapp .codename )
243+ if os .path .exists (falkon_orig_prof_dir ):
244+ os .remove (falkon_orig_prof_dir )
245+ shutil .rmtree (os .path .join (FALKON_PROFILES_DIR , webapp .codename ), ignore_errors = True )
242246
243247 def create_webapp (self , name , url , icon , category , browser , custom_parameters , isolate_profile = True , navbar = False , privatewindow = False ):
244248 # Generate a 4 digit random code (to prevent name collisions, so we can define multiple launchers with the same name)
@@ -250,7 +254,7 @@ def create_webapp(self, name, url, icon, category, browser, custom_parameters, i
250254 desktop_file .write ("[Desktop Entry]\n " )
251255 desktop_file .write ("Version=1.0\n " )
252256 desktop_file .write ("Name=%s\n " % name )
253- desktop_file .write ("Comment=%s\n " % _ ("Web App" ))
257+ desktop_file .write ("Comment=%s\n " % gettext . gettext ("Web App" ))
254258
255259 exec_string = self .get_exec_string (browser , codename , custom_parameters , icon , isolate_profile , navbar ,
256260 privatewindow , url )
@@ -286,6 +290,14 @@ def create_webapp(self, name, url, icon, category, browser, custom_parameters, i
286290 with open (app_mode_file , 'w' ) as fp :
287291 pass
288292
293+ if browser .browser_type == BROWSER_TYPE_FALKON :
294+ falkon_profile_path = os .path .join (FALKON_PROFILES_DIR , codename )
295+ os .makedirs (falkon_profile_path )
296+ # Create symlink of profile dir at ~/.config/falkon/profiles
297+ falkon_orig_prof_dir = os .path .join (os .path .expanduser ("~/.config/falkon/profiles" ), codename )
298+ os .symlink (falkon_profile_path , falkon_orig_prof_dir )
299+
300+
289301 def get_exec_string (self , browser , codename , custom_parameters , icon , isolate_profile , navbar , privatewindow , url ):
290302 if browser .browser_type in [BROWSER_TYPE_FIREFOX , BROWSER_TYPE_FIREFOX_FLATPAK , BROWSER_TYPE_FIREFOX_SNAP ]:
291303 # Firefox based
@@ -341,6 +353,17 @@ def get_exec_string(self, browser, codename, custom_parameters, icon, isolate_pr
341353 exec_string += " \" " + url + "\" "
342354 if custom_parameters :
343355 exec_string += " {}" .format (custom_parameters )
356+ elif browser .browser_type == BROWSER_TYPE_FALKON :
357+ # KDE Falkon
358+ exec_string = browser .exec_path
359+ exec_string += " --wmclass=WebApp-" + codename
360+ if isolate_profile :
361+ exec_string += " --profile=" + codename
362+ if privatewindow :
363+ exec_string += " --private-browsing"
364+ if custom_parameters :
365+ exec_string += " {}" .format (custom_parameters )
366+ exec_string += " --no-remote " + url
344367 else :
345368 # Chromium based
346369 if isolate_profile :
0 commit comments