📜 ⬆️ ⬇️

Improving usability of Krusader

0. Intro.


Undoubtedly, krusader is the leader among graphic file managers. Externally similar to the famous Total Commander, but the functionality is weaker. I’ll show you how to improve usability a bit for everyday use. And we will do this through useractions. With their help, you can do almost any action with files and the program, no matter what, packing files with one click or complex actions with a group of files, or anything else (you can even download files from neta with their subsequent processing).



So, the toolbar where the action icons will be placed is visible in the image above.

1. Let's start.


To create \ user users management there is an item in the menu - Useractions -> Manage User Actions ...
It sets the parameters of the action being created. Such as title, picture, category. By the way, if there is no category you need, then you can simply write down the name and it will be created automatically. In the Command field you write the necessary commands for bash. Elementary. You can use any commands from the system or a combination of them.
')


In this example, a script was written to export the specified database. The command in this case looks like this:
mysqldump -uroot -p111111 %_Ask("Enter the database name?", "", "Enter the database name")% > db.sql

To help create teams for a crusade, there is a small helper. Click on the button with a cross to the right of the “ommand” field and you can select the already predefined methods of the crusadera. They are grouped with respect to the panels:
1. Active Panel - file manipulations in the active panel.
2. Other Panel - for inactive panel.
3. Left \ Right Panel - for the left and right panel.
4. Panel Independend - contains dialogs with the user and internal commands of the crusadera.

After completing these actions and saving, we will get a new item by right-clicking in the User Actions menu.

2. In one click.


Now that the action has been created, you can get rid of the unnecessary mouse clicks. Take out the action on the toolbar!
Settings -> Configure Toolbars.
We find on the left our action and add it to the right column.



And we get a nice button in the toolbar.

3. Examples of useraction scripts.



Add file to svn:
svn add %aCurrent%

Remove file from svn:
svn remove %aCurrent%

Go to another folder:
%aGoto("/home/")%

Run the program:
/usr/bin/konsole
(yes, just by typing the path to the executable file)

Add file to Amarok's playlist:
amarok --append %aList("Selected")%

Mount partition:
mount -t %_Ask("Filesystem Type?")% %_Ask("Device ?")% %_Ask("Mount Point ?")%

Copy the file to another panel and open it:
%_Copy("%aCurrent%", "%oPath%")% kate %oPath%%aCurrent("Yes")%
(this way you can combine several teams into one)

Source: https://habr.com/ru/post/76358/


All Articles