Have a simple bash script (run from the context menu Caja filemanager )
need right in it ,the script check the conditions
if nothing is selected/highlighted output
if you had selected a directory and pressed Ctrl_Right to perform команду1 (change owner recursively)
if you were selected directory/file to execute команду2 (change of owner only for the dedicated)
otherwise perform команду3
that's what I with grief in half, piled ,BUT plugging in this line
if [[ echo "$key" == "key=down" ]] replaced tricked :)
but what I can't figure out why not change the owner,what's wrong?through the console all the rules.
# find id of the active Claudia
idkb=$(xinput list | grep -Po 'AT Translated Set 2 keyboard\s+id=\d+' | grep -Po '\d+$')
# and assigned to the variable key value of the pressed button
#"key=down", down , "key=up" - NOT down .
key=$(xinput --query-state $idkb | grep -Po '105]=.*' )
# if script execution key was pressed Ctrl_Right
#ie the previous line/command returned: "key=down"
#WHY THE ERROR ,SO I HAD TO DO SO
if [ $key != "105]=up" ]
# print message and run a command recursively change the user
sudo chown-R $user $path && notify-send "recursively"
# if not , i.e. returned (should return "key=up" ) ,
# then change the user only for the selected file/directory
sudo chown $user $path && notify-send "one"
# BY AND LARGE , ALL OF THE MESSAGES IN THIS CODE,ONLY NEEDED FOR DEBUGGING
notify-send-t 3000 "owner of path: $path has become $user keycod key: $key" ;