mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-21 09:35:40 +02:00
xdg-app-chooser: update comment about default application
It seems that now, the default is changed.
This commit is contained in:
parent
8235201167
commit
14418580ff
1 changed files with 5 additions and 6 deletions
|
@ -3,22 +3,21 @@
|
||||||
"""Simple application selector relying on GTK app chooser dialog.
|
"""Simple application selector relying on GTK app chooser dialog.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# This doesn't allow to set a default application for a MIME type. Use
|
# This also sets the default application for a MIME type (similar to "xdg-mime
|
||||||
# "xdg-mime default something.desktop mime/type" to change a default.
|
# default something.desktop mime/type"). Usually, it will update
|
||||||
# Usually, it will update ~/.config/mimeapps.list.
|
# ~/.config/mimeapps.list.
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
import gi
|
import gi
|
||||||
|
|
||||||
|
gi.require_version("Gtk", "3.0")
|
||||||
|
from gi.repository import Gtk, Gio
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__)
|
parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__)
|
||||||
parser.add_argument("file", metavar="FILE", help="file to open")
|
parser.add_argument("file", metavar="FILE", help="file to open")
|
||||||
options = parser.parse_args()
|
options = parser.parse_args()
|
||||||
|
|
||||||
gi.require_version("Gtk", "3.0")
|
|
||||||
from gi.repository import Gtk, Gio
|
|
||||||
|
|
||||||
# Query MIME TYPE
|
# Query MIME TYPE
|
||||||
f = Gio.File.new_for_path(options.file)
|
f = Gio.File.new_for_path(options.file)
|
||||||
file_info = f.query_info("standard::content-type", 0)
|
file_info = f.query_info("standard::content-type", 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue