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
  • 313

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).
  • Thanks. This wasn't quite complete, but I figured out the sensitivity and switching to top-left corner from there. If anyone's curious, this is the full script I used: http://pastebin.com/hLdRvGHE – Straemer Dec 24 '12 at 00:00
  • Sorry, didn't notice that. Glad you got it working. – Andrew Soutar Dec 26 '12 at 04:12
  • Hi, I'm trying to make a script that toggles auto-hide of the unity lancher. I tried te folowwing, but it doesn't seem to work: #!/bin/python AUTOHIDE= $(dconf read /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode) if (AUTOHIDE=1): dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 0 else: dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1' – user138784 May 08 '13 at 11:59
  • Not sure what you're trying to do there... it seems to be neither python nor bash. Anyway, here's a script that will do that in bash: http://pastebin.com/iGnELJNu – Straemer May 23 '13 at 02:34