Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-08-23 18:55:16

Friedrich
Member
Registered: 2016-09-18
Posts: 140

Change function when pressing F1 in Thunar

Hi,

offen when i press F2 to rename a file i press F1 and the help opens. I don't need the help. Can i change the function of F1 to the same as F2 only in Thunar? Or is it hard coded?

Friedrich

Offline

#2 2020-08-24 01:52:34

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: Change function when pressing F1 in Thunar

You can't have both F1 and F2 set to the same event. But you can make F1 open the bulk rename dialog instead of F2.

While thunar is not running:

thunar -q

...edit the file ~/.config/Thunar/accels.scm and to disable the F1 for help, change the line:

;  (gtk_accel_path "<Actions>/ThunarWindow/contents" "F1")

...to read:

 (gtk_accel_path "<Actions>/ThunarWindow/contents" "")

Then you can set F1 to execute the bulk rename function. Change:

; (gtk_accel_path "<Actions>/ThunarStandardView/rename" "F2")

...to read:

 (gtk_accel_path "<Actions>/ThunarStandardView/rename" "F1")

Pay special attention to the commas at the beginning of the lines.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2020-08-25 12:56:29

alcornoqui
Member
Registered: 2014-07-28
Posts: 832

Re: Change function when pressing F1 in Thunar

Off-topic, but related:

ToZ, I've tweaked accels.scm this way in the past, succesfully, but I have one computer where it isn't working (what puzzles me is those shortcuts show in the Thunar menus, localized in my language, but don't work at all).

The shortcuts are to sort by name, size, type, date, ascending, descending, mapped to Shift+Control+1,2,3,4,5,6. Thunar 1.8.14 in Xubuntu 18.04.

The relevant entries in ~/.config/Thunar/accels.scm are:

(gtk_accel_path "<Actions>/ThunarStandardView/sort-by-name" "<Primary><Shift>1")
(gtk_accel_path "<Actions>/ThunarStandardView/sort-by-size" "<Primary><Shift>2")
(gtk_accel_path "<Actions>/ThunarStandardView/sort-descending" "<Primary><Shift>6")
(gtk_accel_path "<Actions>/ThunarStandardView/sort-by-type" "<Primary><Shift>3")
(gtk_accel_path "<Actions>/ThunarStandardView/sort-ascending" "<Primary><Shift>5")
(gtk_accel_path "<Actions>/ThunarStandardView/sort-by-mtime" "<Primary><Shift>4")

Any clues? (I can open a different thread if needed)

Offline

#4 2020-09-11 17:59:14

HeuFui
Member
Registered: 2020-09-11
Posts: 1

Re: Change function when pressing F1 in Thunar

alcornoqui wrote:

Off-topic, but related:

ToZ, I've tweaked accels.scm this way in the past, succesfully, but I have one computer where it isn't working (what puzzles me is those shortcuts show in the Thunar menus, localized in my language, but don't work at all).

The shortcuts are to sort by name, size, type, date, ascending, descending, mapped to Shift+Control+1,2,3,4,5,6. Thunar 1.8.14 in Xubuntu 18.04.

The relevant entries in ~/.config/Thunar/accels.scm are:

(gtk_accel_path "<Actions>/ThunarStandardView/sort-by-name" "<Primary><Shift>1")
(gtk_accel_path "<Actions>/ThunarStandardView/sort-by-size" "<Primary><Shift>2")
(gtk_accel_path "<Actions>/ThunarStandardView/sort-descending" "<Primary><Shift>6")
(gtk_accel_path "<Actions>/ThunarStandardView/sort-by-type" "<Primary><Shift>3")
(gtk_accel_path "<Actions>/ThunarStandardView/sort-ascending" "<Primary><Shift>5")
(gtk_accel_path "<Actions>/ThunarStandardView/sort-by-mtime" "<Primary><Shift>4")

Any clues? (I can open a different thread if needed)

For some unknown reason to me, Thunar does not allow/accepts/registers the <Primary><Shift>1 or 2, etc.. I tried on mine and it didn't work. However, when I changed the accelerators to <Primary><Shift>F1 (keeping the same order), it worked. Go figure.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 535.03 KiB (Peak: 535.88 KiB) ]