1

So Minecraft fullscreen seems to not work for me. Because of this I just run it in a maximized window. Usually what I do is set my sidebar to auto-hide, revealing at the top left corner with 0 sensitivity, so that it doesn't take up space or keep popping up.

My question is how would I be able to do this through a script? I currently have a bash script to run Minecraft, I could make it a python script or something if needed. My best guess is that there's a file I can write into that would store these values. I would prefer not to disable it entirely just because I sometimes like to switch to another workspace and open up a web browser through the dash.

Straemer
  • 303

1 Answers1

3

Add the following lines at the beginning of your script:

AUTOHIDE=$(dconf read /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode)
dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1

The first line saves whether or not we currently autohide to the variable AUTOHIDE. The second line simply turns on autohiding.

Then, add the following at the end of the script:

dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode $AUTOHIDE

This restores the autohide setting from the variable we saved earlier. If autohiding was enabled before you launched Minecraft, the script won't turn it off; otherwise, it will.

I can only think of two situations in which this wouldn't work:

  1. If you lauch Minecraft using exec, in which case the code at the end wouldn't get called (not much we can do about that except for not calling it with exec).
  2. You run multiple instances of Minecraft at the same time, which would require a more elaborate method (which I would be happy to detail for you, should you be interested).