Skip to content

Instantly share code, notes, and snippets.

@jmsdnns
Created July 17, 2023 22:18
Show Gist options
  • Save jmsdnns/49456f0fcac28756ea8ae2520c709217 to your computer and use it in GitHub Desktop.
Save jmsdnns/49456f0fcac28756ea8ae2520c709217 to your computer and use it in GitHub Desktop.
Deassociate VSCode with every mime type it hijacks (like a jerk!)
#!/usr/bin/env python
from gi.repository import Gio
app_name = 'Visual Studio Code'
for mtype in Gio.content_types_get_registered():
launcher = Gio.AppInfo.get_default_for_type(mtype, False)
if not launcher:
continue
handler = launcher.get_display_name()
if handler == app_name:
launcher.remove_supports_type(mtype)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment