Skip to main content
Bounty Awarded with 300 reputation awarded by Thomas Keller
deleted 850 characters in body
Source Link
intika
  • 15.1k
  • 8
  • 51
  • 85

Available customization?

The setting gtk-recent-files-enabled=false can be added to ~/.config/gtk-3.0/settings.ini that would disable the recent entry. Also not directly related but gtk-recent-files-limit=0 and gtk-recent-files-max-age=0 can be used as well to disable recent files. For Gtk2 this solution is used to disable recent files.

Other settings suck as show hidden files or startup mode can be set with

gsettings set org.gtk.Settings.FileChooser show-hidden true
gsettings set org.gtk.Settings.FileChooser startup-mode cwd

Screenshot of dconf-editor with other available settings

FileChooser Settings

FileChooser Startup Mode


GTK File Chooser?

A perfect solution would be an upstream commit/patch to at least gtkfilechooserdialog.c and gtkfilechooserwidget.c to implement additional features answering this question needs and making it available to all users through updates. The documentation for the current implementation is available for GTK2 and GTK3.


Patching it locally?

A patch for such features is not a quick task and other than the upstream solution, applying such patch locally would require using a custom patched version of the GTK library that may lead to system updates complication.

The other way to apply such patch is by using LD_PRELOAD environment variable along with a newly developed patching library to replace the current GTK code with the patched one. this can be applied separately to each application or system wide. Such solution would be considered as a workaround/hack as it's far from being clean but still this can be efficient. (as an additional dev. note, the newly ld_preload library may contain code implementing something similar to this).


Any workaround?

For users that have multiple desktop installed (for instance Gnome and KDE) can force some application to use the KDE dialog which is more customizable. As example with chromium this can be done with the following

XDG_CURRENT_DESKTOP=KDE chromium

There are also other workaround to replace GTK dialogs such as KGtk or xdg-desktop-portal-kde.

Available customization?

The setting gtk-recent-files-enabled=false can be added to ~/.config/gtk-3.0/settings.ini that would disable the recent entry. Also not directly related but gtk-recent-files-limit=0 and gtk-recent-files-max-age=0 can be used as well to disable recent files. For Gtk2 this solution is used to disable recent files.

Other settings suck as show hidden files or startup mode can be set with

gsettings set org.gtk.Settings.FileChooser show-hidden true
gsettings set org.gtk.Settings.FileChooser startup-mode cwd

Screenshot of dconf-editor with other available settings

FileChooser Settings

FileChooser Startup Mode


GTK File Chooser?

A perfect solution would be an upstream commit/patch to at least gtkfilechooserdialog.c and gtkfilechooserwidget.c to implement additional features answering this question needs and making it available to all users through updates. The documentation for the current implementation is available for GTK2 and GTK3.


Patching it locally?

A patch for such features is not a quick task and other than the upstream solution, applying such patch locally would require using a custom patched version of the GTK library that may lead to system updates complication.

The other way to apply such patch is by using LD_PRELOAD environment variable along with a newly developed patching library to replace the current GTK code with the patched one. this can be applied separately to each application or system wide. Such solution would be considered as a workaround/hack as it's far from being clean but still this can be efficient. (as an additional dev. note, the newly ld_preload library may contain code implementing something similar to this).


Any workaround?

For users that have multiple desktop installed (for instance Gnome and KDE) can force some application to use the KDE dialog which is more customizable. As example with chromium this can be done with the following

XDG_CURRENT_DESKTOP=KDE chromium

There are also other workaround to replace GTK dialogs such as KGtk or xdg-desktop-portal-kde.

GTK File Chooser?

A perfect solution would be an upstream commit/patch to at least gtkfilechooserdialog.c and gtkfilechooserwidget.c to implement additional features answering this question needs and making it available to all users through updates. The documentation for the current implementation is available for GTK2 and GTK3.


Patching it locally?

A patch for such features is not a quick task and other than the upstream solution, applying such patch locally would require using a custom patched version of the GTK library that may lead to system updates complication.

The other way to apply such patch is by using LD_PRELOAD environment variable along with a newly developed patching library to replace the current GTK code with the patched one. this can be applied separately to each application or system wide. Such solution would be considered as a workaround/hack as it's far from being clean but still this can be efficient. (as an additional dev. note, the newly ld_preload library may contain code implementing something similar to this).


Any workaround?

For users that have multiple desktop installed (for instance Gnome and KDE) can force some application to use the KDE dialog which is more customizable. As example with chromium this can be done with the following

XDG_CURRENT_DESKTOP=KDE chromium

There are also other workaround to replace GTK dialogs such as KGtk or xdg-desktop-portal-kde.

Source Link
intika
  • 15.1k
  • 8
  • 51
  • 85

Available customization?

The setting gtk-recent-files-enabled=false can be added to ~/.config/gtk-3.0/settings.ini that would disable the recent entry. Also not directly related but gtk-recent-files-limit=0 and gtk-recent-files-max-age=0 can be used as well to disable recent files. For Gtk2 this solution is used to disable recent files.

Other settings suck as show hidden files or startup mode can be set with

gsettings set org.gtk.Settings.FileChooser show-hidden true
gsettings set org.gtk.Settings.FileChooser startup-mode cwd

Screenshot of dconf-editor with other available settings

FileChooser Settings

FileChooser Startup Mode


GTK File Chooser?

A perfect solution would be an upstream commit/patch to at least gtkfilechooserdialog.c and gtkfilechooserwidget.c to implement additional features answering this question needs and making it available to all users through updates. The documentation for the current implementation is available for GTK2 and GTK3.


Patching it locally?

A patch for such features is not a quick task and other than the upstream solution, applying such patch locally would require using a custom patched version of the GTK library that may lead to system updates complication.

The other way to apply such patch is by using LD_PRELOAD environment variable along with a newly developed patching library to replace the current GTK code with the patched one. this can be applied separately to each application or system wide. Such solution would be considered as a workaround/hack as it's far from being clean but still this can be efficient. (as an additional dev. note, the newly ld_preload library may contain code implementing something similar to this).


Any workaround?

For users that have multiple desktop installed (for instance Gnome and KDE) can force some application to use the KDE dialog which is more customizable. As example with chromium this can be done with the following

XDG_CURRENT_DESKTOP=KDE chromium

There are also other workaround to replace GTK dialogs such as KGtk or xdg-desktop-portal-kde.