Is there a way to put the close button somewhere to the top right edge?

I found a solution.

image

The fourth icon from the right closes the current note, the fifth all other notes.

It works with commander plugin Plugins - Obsidian and these settings:

Don’t forget to push the button:

And set the switch to: