The icons displayed by Thunar are based upon information that is stored in the mimetypes database. And thus, to change a mimetype's icon, we need to modify that database. There is a Gnome gui called assogiate which might be used for this, but I haven't really tried it out yet. Or we can just modify the mimetype info manually, by editing/creating certain xml files.
As an example, I will attempt to change the icon for .html files. Firstly, I will fetch its mimetype from the commandline...
$ file --mime-type testfile.html
testfile.html: text/html
Next, I need to obtain its mimetype definition info from the system's mimetype database. The database is located at /usr/share/mime/, but more specifically, the source mimetype xml definitions are found in the /usr/share/mime/packages subfolder. So, I will try to find which xml file in there contains a mime-type declaration for text/html
$ cd /usr/share/mime/packages/
$ fgrep -Hn '<mime-type type="text/html">' *
freedesktop.org.xml:25295: <mime-type type="text/html">
So I have found a xml file that contains the mime-type definition for text/html. But that xml file may contain the definitions for dozens of mimetypes. So we must open it in an editor, and look for a small section of the file that begins with mime-type type="text/html" and ends with /mime-type>, as seen below.
<mime-type type="text/html">
<comment>HTML document</comment>
.
.
.
</mime-type>
Now, if we modify the systems mimetype database, it could be overwritten by a package update. So instead, we will create a new xml file in the local users mimetype database, found at ~/.local/share/mime . And since this new xml file will contain a source mimetype definition, it will be placed in the ~/.local/share/mime/packages subfolder. So, we will create a new xml file there, but using a made-up name...
$ cd ~/.local/share/mime/packages
$ gedit html_example.xml &
and paste in the text found above, but adding in two extra lines to the top, and one extra line to the bottom...
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="text/html">
<comment>HTML document</comment>
.
.
.
</mime-type>
</mime-info>
In this example, on my Linux, I don't see any icon related lines in the mimetype definition for text/html. But if you see any lines similar to these...
<generic-icon name="xx_yada_yada_xx"/>
<icon name="xx_blah_blah_xx"/>
then please edit them out. And finally, we will add in a icon-name entry of our own. In this case, I have chosen the icon for iceweasel, but you can choose your own. Any icon that is available on your system. Such that now, the new xml file looks similar to this
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="text/html">
<comment>HTML document</comment>
.
.
.
<icon name="iceweasel"/>
</mime-type>
</mime-info>
And now save the file. Now, having modified the local mimetype source definitions, we must rebuild the local mimetypes database...
$ cd ~/.local/share/mime
$ update-mime-database $PWD
If ~/.local/share/mime was empty before, then now it will contain various database files. Such that after your system has rebooted, the modified info in the local mimetype database should override the info in the main systems database. And hopefully, your html icons in Thunar will have changed too.
Well, that's how I do it. I hope that works for you. Further info on the freedesktop.org Shared MIME-info Database can be found here.
Best Answer
Thunar doesn't actually have a keybinding for changing to the next/previous tab, but instead the underlying GTK control, in this case GtkNotebook, has some key bindings.
GtkNotebook defines previous tab as both
Ctrl
+PageUp
andCtrl
+Alt
+PageUp
(and similarly for next tab/page down); however, in Thunar's case, theCtrl
+PageUp
/Ctrl
+PageDown
keybinding is blocked by the fact that the pane you're viewing (the icon and details view) is of type GtkScrolledWindow and has its own usage ofCtrl
+PageUp
/Ctrl
+PageDown
decribed here:https://developer.gnome.org/pygtk/2.24/class-gtkscrolledwindow.html#signal-gtkscrolledwindow--scroll-child
The last time I installed an OS with Thunar on it, it didn't even have tabs so I immediately discarded it and used PCManFM, which although it doesn't define a next/previous tab key, doesn't use a GtkScrolledWindow for the viewing of the files and therefore the built-in
Ctrl
+PageUp
/Ctrl
+PageDown
for the tab widget works.IMO both programs (and all file managers) should define these, and use reasonable defaults, in addition to supporting move tab left/right like many browsers do (
Ctrl
+Shift
+PageUp
/Ctrl
+Shift
+PageDown
).For Thunar, I have a patch I made to at least define all 4 of these events as keybinds explicitly (which would make them overrideable in the way you described in your original post) that I hope to post soon in this bug report:
https://bugzilla.xfce.org/show_bug.cgi?id=9585
Unfortunately while it does let you change the keybinds for those events, it doesn't let you override existing keybinds from child widgets (such as GtkScrolledWindow), so you'd have to use and bind something like
Alt
+PageUp
/Alt
+PageDown
or equally messy. If I figure out a patch for that, I'll definitely post it to the bug, but that's proving harder to figure out.* **Edit ***
You can move to a specific tab using
Alt
+N
, whereN
is a number0-9
, but I find this to be of very limited use.