Linux MCSR
- A documentation repository to help setting up Linux for MCSR.
Getting Started
- The instructions start from the very basics and explain each step verbosely. Feel free to skip some steps if you know what you are doing.
- You can get started right here.
- If you have any issues, feel free to ask for help in the #public-help channel in the Linux MCSR Discord server.
Thanks
- Boyenn for giving me the idea to make this guide.
- tesselslate for even making MCSR on Linux possible.
- Nish for making the mdbook frontend setup for the guide.
- draconix and Gore for helping to update and maintain the guide.
- All the nerds in the Linux MCSR discord who helped me through my stupidity.
- All contributors and authors of all the docs, websites or applications that this guide references, namely:
- tesselslate
- qMaxXen
- Gore
- Esensats
- priffie
- draconix
- osh
License
The documentation was all written under GNU GPLv3. You can check the license here.
Introduction
This section explains why using Linux for Minecraft speedrunning is ideal, choosing a Linux distro and desktop environment, and creating bootable media. If you're already using Linux, skip ahead to the post-installation section.
Why Linux?
If you're not already using Linux, you’re probably asking - why would you use Linux for speedrunning, or for anything at all?
- Minecraft runs excellently on Linux, even better than on Windows.
- On Windows, it's recommended to play in fullscreen to avoid input lag. This makes window resizing scripts slow and distracting, and makes other windows such as Ninjabrain Bot invisible unless you turn off fullscreen/resize the game. On Linux, however, you can use windowed or borderless windowed without any input lag, so you have the best of both worlds.
- Resize macros, magnifiers/projectors, keyboard layouts for search crafting, rebinding and the like are very clean when using waywall.
While this sounds nice, you should have more of a reason other than speedrunning to make the switch.
- Outside of Minecraft, Windows is quickly turning into a less favourable option for more and more things, with Windows 11 being bloated with unnecessary AI features and more invasive data collection, and is becoming more and more unstable as time goes on ¹ ².
- Linux, with more support from developers and with things like Proton, is catching up to Windows for gamers, creatives, developers, and your average computer user.
- If there’s something you still need Windows for though (notably Valorant/Fortnite/Adobe software), don’t worry - this guide will also go over dual-booting, so you can use both Windows and Linux interchangeably.
Distributions & Desktop Environments
- Linux, being a free and open source operating system, comes in several different flavours a.k.a distributions a.k.a distros.
- Some of the popular distributions are Ubuntu, Fedora, Arch Linux(btw), etc.
- For MCSR, we recommend a distribution based on RHEL called Fedora, which balances stability with frequent updates.
- The next choice you should make is what desktop environment or DE to use - this includes the general visuals, window behaviour and management, pre-installed apps, things like that.
- The Fedora team provides many versions, or “spins”, with different DEs pre-installed. Some spins just provide a standalone window manager without many pre-installed apps or much of anything, for a clean, efficient albeit less beginner-friendly experience.
- We will first attempt to use a Wayland-based DE (a.k.a. a Wayland compositor), which are newer but sometimes less stable than DEs using the older X11 backend, especially for NVIDIA users.
- The great thing about Linux is that you can use whichever DE or spin that you want, swap between them easily, and customize your setup endlessly. Speedrunning works just fine on most popular DEs.
- This guide will use the official KDE Plasma version of Fedora. The Plasma DE will feel very familiar if you’re coming from Windows, and tends to work well for NVIDIA users when using Wayland.
- Go here and download the latest Live ISO for Fedora KDE Plasma, under For Intel and AMD x86_64 systems.
- You can learn more about Linux Distributions here.
Creating Fedora installation media
- After downloading the ISO from the official Fedora Project website, pick up a USB stick of at least 5GB space or above.
- NOTE: The USB stick will be formatted during the install process and all data on it will be erased.
- To install the ISO into the USB stick, use Balena Etcher from here.
- Plug in the USB stick to your PC and open Balena Etcher. Back up any data before proceeding.
- Under Select Image, locate wherever you downloaded the Fedora ISO from before and select it.
- Under Select Drive, select the USB device name. It should be auto-selected for you, just make sure its the right USB.
- Then click Flash to start creating your Bootable USB!
- Wait for it to finish Flashing and Verifying as well. Don't quit Balena until all of it is done.
- Congratulations! You've just created a bootable Fedora USB. If you don't plan on dual-booting Windows and Linux, move to the live environment section to install Fedora, otherwise keep reading.
Dual-booting
- Before rebooting your computer and beginning to install Fedora, you should make space on your hard drive for Fedora to install to.
- Press Windows+R, and type
diskmgmt.msc. Here, you should see all of your disks - ideally you have a separate disk to install Fedora to, but usually we install it alongside Windows on theC:/disk. - If using the
C:/disk, right click the main (largest) partition on the disk and select Shrink Volume. - If you can spare around 50 GB (around 50000 MB) for Fedora, then do so. If you're sure you have the free space on the disk but it isn't letting you shrink it enough, consider using a third-party app like MiniDisk Partition Wizard to shrink the volume instead.
- Leave this as empty space - do not make a new partition after shrinking.
- You can shrink the volume further after installing Fedora if you need more space - for now, shrink it as much as possible, then move to the live environment section to finally install Fedora.
Live Environment
The instructions below will show you how to boot into the Fedora live environment on your USB stick.
Booting into the Live USB
- After following the previous section to flash the ISO onto your USB stick, it is now time to install Fedora on your system.
- Before rebooting, you might want to take note of some settings while you're still on Windows (i.e. Windows cursor speed).
- Plug in your USB drive and restart your PC. Before it boots into Windows, it'll tell you what key to press to enter UEFI setup - usually it's Delete, Escape or one of the function keys (i.e. F2).
- Once you're in the BIOS, make sure to have Secure Boot disabled and make sure to have CSM/BIOS mode disabled. These are usually under the menu labeled "Boot".
- Now, look for an option labeled Boot Override or Boot Options, usually under the "Boot" or "Exit" menus. Under here, select the USB you just installed Fedora on to boot into it.
- If you can't find Boot Options then changing the Boot Order is an alternative. Under here, reorder the options to have the USB stick at the top. Now, select Exit & save changes, and wait for your system to reboot.
- You will be greeted with a boot screen listing some boot options initially, just hit enter on the first option to boot into the live environment.
Testing the Live Environment
- Now that you have the Live Environment running, you can test out Fedora running the KDE Plasma desktop environment.
- Linux, given its versatility, doesn't require you to install the system on your physical hardware in order to test it, so whatever you do on here will not affect what you have already on your system. Feel free to mess around!
- When you are done, you can proceed with the installation procedure.
Installation
The instructions given below will install Fedora on your PC.
From Zero to Hero
- After testing out Fedora on the live environment, you are now ready to install it on your PC.
- In the Live Environment, click the Install to Hard Drive icon on the desktop.
- Run through the simple install steps. Make sure the correct disk is selected - if you shrunk your hard drive in Windows as shown in the introduction section, you should be able to move forward without any issues.
- If you didn't make space earlier, you can also let Fedora shrink/clear an existing partition to make space for the installation here.
- When prompted, enable the root account.
- You may encrypt your data when prompted if you like, this just means your data is more secure but you may have to type your password a bit more to access certain files.
- Once the installer is complete, go to the start menu and restart your computer when you're ready.
First Boot
- After rebooting, you should boot into your Fedora installation. If you're dual-booting, you'll get the option to pick either Fedora or Windows. Proceed with Fedora.
- Once booted, you can remove your USB. You will be prompted to Start Setup and set your username and password among other things.
- When prompted, you should enable third-party repositories during the setup. This will be required to install some software that might be proprietary but necessary for normal use.
Your Linux installation is now complete! We can now proceed with the post-installation steps.
Post Install
The following chapters will go through the first things you should do after installing Linux.
Basic Terminal usage
- The primary method of downloading and installing software on Linux is using the package manager in the terminal. In Plasma, you can open a terminal window with
Ctrl+Alt+T, or open the start menu and search for Konsole. - The terminal command for installing most things is
sudo dnf install, followed by a list of apps or things you want to install.- NOTE: Running commands with
sudowill run them with admin privileges. Be careful when running random commands withsudo, especially ones likerm -rf.
- NOTE: Running commands with
- To update your system, and anything else you’ve installed with dnf, simply run
sudo dnf update.- Run this now to ensure everything is up to date. It's a good idea to update things somewhat frequently.
- You can use
sudo dnf searchto check if something you want to install can be installed with dnf. - There are a couple other useful things dnf can do to help you with installing things, which you will learn to use with time. Generally, running something with the
--helpoption tells you how to use it properly (i.e.sudo dnf --help). - The rest of this guide will be followable without much further terminal knowledge, but if you want to learn more about the terminal, check out the terminal page.
Software Manager
- The Discover app in Plasma is like an app store - it's a simple place for you to search and install packages and apps.
- Plasma will let you know when it finds any updates for apps you've installed through Discover.
After updating your system with dnf, NVIDIA users should install the proper graphics drivers. Drivers for other GPUs are pre-installed - if you aren't using an NVIDIA graphics card, jump ahead to downloading and installing Java.
Linux Terminal
In this document, we will be learning the basics of the Linux Terminal. We will go through all the basic commands with examples for each. Using Linux without touching the terminal is very much possible, but understanding how to use it opens up many possibilities. For setting up Minecraft for speedrunning, we will have to run a few terminal commands, but the information below is more complementary than anything.
What is a terminal?
It's a part of every system (irrespective of Operating System) that helps you control the system from a very stripped down level (without a Graphical User Interface). Programs or Commands can be run from here to perform some task on the system.
It is a very powerful tool and most of the time, GUI applications have these commands running in the back when you click buttons to perform actions.
You can open up a terminal in Plasma by hitting the keybind Ctrl+Alt+T.
Directories
A directory is like a folder on your computer under which files or other folders can exist.
In Linux, everything on your system, including the hardware devices that you have connected to your computer will be available for use as a file. It's a UNIX system convention.
The / directory in your system is the root of your file system. It has everything that is on your storage that is mounted.
Here are some of the directories in / and descriptions of what they hold.
In the terminal type in this command
cd Desktop
The cd command is used to change your current working directory (the current folder that you have open) to the directory that you specify. Desktop in this case.
There are some shortcut characters that you can use to make your life easier while working with directories.
The symbol ~ is used to refer to the user's home folder (/home/<user_name>).
cd
Now type
ls
The ls command is used to list out the contents of your current directory.
You can use some flags to tell the command what to output.
ls -l
The -l flag can be used to long list (or vertical list) out the contents along with the permissions on each file/folder.
ls -a
The -a flag can used to show all files and folders in the current directory along with the hidden files. You can use both of the above commands in unison like this
ls -la
You can make directories inside your current directory using the mkdir command.
mkdir test
If you want to create multiple directories inside of each other, then we use the -p flag.
mkdir -p test1/test11
- This would create a
test1directory in your current directory and create atest11directory inside oftest1. - If you want to remove all these directories that you created just now, you can use either
rmdirorrm. rmdiris used to delete directories that are empty.
rmdir test
- This would work because
testis empty. But the same thing wouldn't work withtest1as it has atest11directory inside it. - So we use the
rmcommand with the-rflag to remove it.
rm -r test1
- The
-rflag represents recursive removal. You can also use the-fflag to force remove the directories. - Remember,
-fwould remove everything even if it is read-only. - You can create a new file using the
touchcommand.
touch text.txt
- You can view the contents of this file by using the
catcommand.
cat text.txt
- This wouldn't output anything as the file is empty. You can open this file right in the terminal by using
nanowhich is a terminal based editor.
nano text.txt
- Once you are done editing the contents you can hit
Ctrl+SandCtrl+Xto save and quit. - You can remove this file now with
rm.
rm text.txt
Super User Privileges
- Super user privileges are admin privileges or elevated privileges given to a user in any UNIX system.
- To execute commands as a super user, we use the
sucommand.sustands for switch user. - Try executing
su -
- Now a terminal would open with a different color to denote that you have super user privileges. In this terminal, you literally can nuke your whole system. So be careful about what you do in here.
- To get back to your normal user terminal, type
exit
- If you want to execute only some commands with super user privileges, you can use the wrapper command
sudo. - This is safer as you can be sure to execute each command with the right permissions.
- Try out this command
sudo dnf update
- Super user privileges are required for package manager commands on any Linux system.
- So to install packages you will be prompted to give your password.
Pipe
- The Pipe symbol (
|) is used to chain the outputs of certain commands into other commands. - There are several uses to this symbol, but the most common usage is to use it alongside the
grepcommand. - Try this command
touch text.txt
ls | grep text.txt
grepis used to print out all the lines within an output or a file withtext.txtin it.- You can pipe the output of any command into
grepand get the matching lines based on your search term.
Now that you know these terminal basics, learn how you can automate common tasks with bash scripts.
File permissions
File permissions in a UNIX system are distributed per user.
The only permission we really care about is the executable flag. This flag tells the operating system that it can execute that file as a binary.
To set the executable flag on a file we use the chmod command.
touch bin
chmod +x bin
- Now edit the contents of
binwith
nano bin
- Add these contents in it
#!/bin/bash
echo "Hello World"
- Here the echo command is used to print out text to the console.
- To execute this script, we use this command
./bin
- You would see the console output
Hello World. - There are other permissions too, but we mostly use
chmod +xto set the executable flag on files. - We can also remove the executable flag from a file by using
chmod -x.
chmod -x bin
Clearing out worlds
- Now that we know much about the Linux terminal, we can now make scripts to automate our filesystem tasks.
- We can declare variables in scripts using the syntax:
<variable_name>=<value>
- Here is a script to clear out saves in all your instances.
#!/bin/bash
instances=("Ranked" "SeedQueue" "Practice")
# DO NOT add a '/' at the end of launcher_prefix's value
launcher_prefix=~/.local/share/PrismLauncher/instances
for inst in ${instances[@]};
do
rm -r $launcher_prefix/$inst/minecraft/saves/Random*
rm -r $launcher_prefix/$inst/minecraft/saves/New*
done
- We use a list called
instancesto list the names of some instances we might have in Prism Launcher. - Here in the
rmcommands, we use shorthand representation to expand every folder starting withRandomandNewin its name. Its matches would include names likeRandom Speedrun #12345,New World (32), and so on. - We also use
forto loop over every instance and delete every matching world folder.
Going ahead
We are now proficient with the Linux terminal and bash scripting!
NVIDIA Drivers
- Before we setup Minecraft we need to first install the NVIDIA Drivers. If you are not on an NVIDIA GPU you can skip to the Java section.
- Open up a terminal and then type in these commands.
sudo dnf install kernel-devel kernel-headers gcc make dkms acpid libglvnd-glx libglvnd-opengl libglvnd-devel pkgconfig
sudo dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf makecache
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda
- This should install NVIDIA drivers on your system. Restart your system and you should have GPU acceleration.
- Remember! Do NOT install NVIDIA drivers from NVIDIA's official website. It creates some irreversible changes to the system that the package manager of Fedora cannot detect and might bloat your install with unnecessary packages. Moreover, everytime you need to update the driver, you would have to run through that process again. Whereas with the package manager, the driver updates will be rolled out after testing along with your normal upgrades. Learn more here.
After rebooting, move ahead to downloading and installing Java.
Java
- Open up a terminal and type in these commands:
sudo dnf install java-21-openjdk
- This will install and setup the Java JDK for you.
- Remember! JDK versions will be named in the same format. So JDK 11 would be named as java-11-openjdk and so on. So if you want to install other versions of the JDK you follow the same format. Its easy, isn't it? :D
- To run .jar files, such as ModCheck or Ninjabrain Bot, you can use the following terminal command, replacing
<path/to/jarfile.jar>with the actual path to the .jar file:
java -jar <path/to/jarfile.jar>
GraalVM
- GraalVM is a Java runtime which runs slower to start with, but greatly speeds up as time goes on. Using GraalVM is recommended for running Minecraft when using SeedQueue.
- To download it, look here. Make sure to select Java 21 along with
Linux x64for the platform. - After downloading it, extract it somewhere and select the
javabinary file in thebinfolder by right clicking your instance in Prism Launcher > Edit > Settings > Java > Java installation > Browse.
- To download it, look here. Make sure to select Java 21 along with
OBS
- This section goes over installing and setting up OBS on your system.
- Open up a terminal and type in this command:
sudo dnf install obs-studio
- This should download and install OBS on your system.
- After downloading and installing it, you can open it and set it up as per usual.
- On Wayland, you can capture specific windows or displays with the Screen Capture (PipeWire) source.
- On X11, use the Window Capture (Xcomposite) source.
- If you plan on using window resizing scripts on X11, it is recommended to set your Minecraft capture source to be centered. After adding Minecraft, select it and press Ctrl+E to open the transform settings - here, click "Reset", then set "Positional Alignment" to "Center". Finally, close the transform settings and press Ctrl+D.
- If you are using classic wall (i.e. multi-instancing on versions without SeedQueue), you might want to look at these docs to setup OBS to work with resetti.
Splitting audio
- Read ahead to set up audio splitting (useful for removing music from your Twitch VODs to avoid copyright, or only capturing game audio in your recordings).
- As of right now, OBS on Linux does not support application-specific audio capture out of the box - we instead use an OBS plugin to achieve this.
- Download and install the plugin using the instructions here.
- After installing the plugin and restarting OBS, check the list of sources. You should see the "Application Audio Capture (PipeWire)" source at the top - after adding it, select the app to capture audio from in the Applications dropdown.
- Make sure to mute/disable desktop audio afterwards.
Setting up Minecraft
This section goes over how to best set up Minecraft itself for speedrunning.
Launcher
- Here, we will be installing a fork of MultiMC called Prism Launcher.
- On Fedora, install Prism by opening a terminal and running these commands:
sudo dnf copr enable g3tchoo/prismlauncher
sudo dnf install prismlauncher
- This should install Prism Launcher - open the start menu and search for it.
- Users on other distros should locate their distro on the Prism download page and follow the instructions.
- Avoid using Flatpak (Flathub) where possible - you may run into issues running waywall later.
Instance Setup
- You can watch this Windows setup guide to get your Minecraft instance set up. The instructions should be largely the same on Linux, with the exception of:
- Running Java apps (i.e. ModCheck), as explained in the Java section earlier, can be done in the terminal with
java -jar <path/to/jarfile.jar>, replacing<path/to/jarfile.jar>with the actual path to the .jar file. - Ninjabrain Bot will not work out of the box on Wayland - we will setup an app called waywall later to address this.
- Jingle is a Windows-only application - we will set up alternatives later for either Wayland or X11.
- Running Java apps (i.e. ModCheck), as explained in the Java section earlier, can be done in the terminal with
Further optimizations
-
The default version of GLFW included in LWJGL for Minecraft version 1.16.1 may cause crashes when tabbing out of the game, and tends to have worse performance.
- Update LWJGL by right clicking your instance in Prism > Edit > Version > Right click LWJGL 3 > Change Version > Select 3.3.3 (newer versions have their own share of issues).
-
Using jemalloc may greatly improve memory performance for Minecraft on Linux.
- To install jemalloc on Fedora, open up a terminal and run
sudo dnf install jemalloc-devel. - To find where jemalloc installed to, run
jemalloc-config --libdir. This is usually/usr/lib, which means the full path to jemalloc would be/usr/lib/libjemalloc.so. - To ensure Minecraft runs with jemalloc, go to Prism > Settings > Environment Variables. Add a new environment variable with the name
LD_PRELOAD. Under "Value", enter the path to jemalloc we found earlier.
- To install jemalloc on Fedora, open up a terminal and run
-
NVIDIA users should add another environment variable named
__GL_THREADED_OPTIMIZATIONSand set its value to 0. With driver versions greater than 525, not having this variable set may cause crashes, or make preemptive navigation very inconsistent because of a driver-side optimization to the Minecraft renderer (colloquially known as "preemptive bug"). -
Your environment variables should look something like this:
-
Finally, users on dual-GPU setups (i.e. laptops with integrated and dedicated graphics) should ensure Minecraft runs with dedicated graphics.
- In Prism, go to Settings > Minecraft > Tweaks > Check Use discrete GPU.
Moving forward
Move to the next section to continue setup.
Speedrunning on Wayland
- Wayland, as mentioned earlier, is newer and more up-to-date than X11. We recommend you first try speedrunning on Wayland, and switch to X11 if you face major problems, such as poor FPS when using waywall.
- On Fedora KDE Plasma, Wayland is the default backend.
- Setup waywall for Ninjabrain Bot support, window resizing, key remapping, magnifiers, and many other useful speedrunning utilities.
- After setting up waywall:
- see Boat Eye on Wayland to setup pixel perfect eye measuring (boat eye) both for new players and those who already had boat eye setup on Windows.
- see Keymap Rebinds using waywall for setting up rebinds for search crafting.
waywall
- waywall is a Wayland compositor designed to run inside your existing Wayland session. It provides various convenient features for speedrunning, including but not limited to:
- Window resizing
- Key remapping
- Ninjabrain Bot support
- Mirrors (i.e. magnifiers for eye measuring, F3, etc.) without using OBS
- Lots of custom functionality.
- If you're using X11, please use resetti instead.
Installation
-
To install waywall on Fedora:
-
First install the dependencies with the following terminal command:
sudo dnf install libspng-devel cmake meson mesa-libEGL-devel luajit-devel libwayland-client libwayland-server libwayland-cursor libxkbcommon-devel xorg-x11-server-Xwayland-devel wayland-protocols-devel wayland-scanner wayland-devel libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel -
Then, run the commands on this page of the waywall documentation to compile waywall from source.
-
-
On Arch Linux, you can install waywall through the AUR.
-
Users on Debian-based distros may have trouble building waywall manually due to certain dependencies being far out of date. If you're having trouble, join the Linux MCSR Discord server.
-
Run
waywallin a terminal to check it's installed properly.- Use the absolute path to the waywall executable if this doesn't work (i.e. if you built waywall in
/home/username/waywall/build/waywall, run/home/username/waywall/build/waywall/waywall). - The wrapper command for your instance in the next step should also use this path instead of
waywall.
- Use the absolute path to the waywall executable if this doesn't work (i.e. if you built waywall in
-
Once waywall is installed properly, visit the next page of the documentation to patch GLFW and set up your instance to launch within waywall.
-
After this, move to the next section to install an example config and learn how to customize it to your liking.
Troubleshooting
- On dual-GPU setups (i.e. laptops with integrated and dedicated graphics), waywall may not display mirrors correctly, specifically if the desired GPU is an NVIDIA one.
-
To fix this:
- Arch users should check
nvidia-primeis installed. - If you're on another distro (i.e. Fedora):
-
Run the below commands to create the prime-run script on your PATH:
mkdir ~/.local/bincd ~/.local/bintouch prime-runnano prime-run -
Then, paste the following text, and save and exit the file with Ctrl+X:
#!/bin/bash __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@" -
Finally, make the script executable by running
sudo chmod +x prime-run.
-
- Arch users should check
-
Then, modify your wrapper command in your instance's settings in Prism like so:
sh -c "waywall wrap -- prime-run $INST_JAVA \"$@\"" -
Remember to replace
waywallwith the absolute path if you must. -
Finally, uncheck "Use discrete GPU" in Prism Launcher settings if it was checked earlier when setting up Minecraft.
-
Configuring waywall
After setting up waywall, you must create a configuration file to run it and use its features.
waywall is configured in Lua, a lightweight and easy-to-learn scripting language. The config file for waywall is located at the following path ~/.config/waywall/init.lua by default. If you make any changes in your config file and wish to reload your config, simply save init.lua.
Note that certain parts of your config require restarting your Minecraft instance to take effect, i.e. shaders.
Using a pre-made config
It is recommended to use a pre-made config, with window resizing and magnifiers set up for you. Here are two templates by Gore (@goreay_12 on Discord):
- If you want to use a generic config with a bunch of features that you can customize out of the box, check out the generic config. (Many users refer to this as the generic config or the Gore config.)
- If you would prefer to use a basic config that you can build from without anything fancy, check out the barebones config.
The Linux MCSR community also publishes their own configuration files in #configuration-showcase in the Discord server. Feel free to check those out, and ask any questions in the #public-help channel.
Creating/editing your config file
If you wish to create a config file from scratch, you should read the documentation for information on the different options, functions, and API references.
You may create a file in ~/.config/waywall/init.lua and use this as a starting point:
local waywall = require("waywall")
local helpers = require("waywall.helpers")
local config = {
input = {
layout = "us",
repeat_rate = 40,
repeat_delay = 300,
sensitivity = 1.0,
confine_pointer = false,
},
theme = {
background = "#303030ff",
},
}
config.actions = {}
return config
Note that the next section regarding boat eye setup is only practical if you resize Minecraft to a tall resolution, and use a mirror to magnify the game further. Please see an existing config for pointers on how you can set this up.
Profiles
You can also load a config from any other Lua file in ~/.config/waywall/ by using the --profile argument in the wrapper command. This can be used if you want multiple configs for different instances. For example, setting your wrapper command to waywall wrap --profile ranked -- reads a config from ~/.config/waywall/ranked.lua.
If your config is valid, and you properly followed the setup steps in the previous section, launching your instance should result in the window title being "waywall" instead of the usual "Minecraft":
Boat Eye on Wayland
Before setting up boat eye, first setup waywall for window resizing, magnifiers and sensitivity changes.
For boat eye, Wayland users have 2 main methods to change your mouse's sensitivity:
- Waywall sensitivity
- Uses mcsr-calcsens.
- Lets you decrease your sensitivity automatically when you change to tall resolution, or manually with either a mouse button or keyboard key (not limited to mouse buttons like usual).
- Also easily allows the use of a "god sensitivity" without changing how the mouse feels whatsoever.
- With a god sens, the default boat mode in Ninjabrain Bot may be set to green boat, removing the need to get in a boat and F3+C to get green boat before measuring, assuming you haven't steered a boat at any point beforehand.
- Does not require increasing DPI/decreasing pointer speed, avoiding any issues with other games that do not have a raw input option or when using your mouse on other PCs.
- Windows-like setup + raw input/DPI toggle
- This mirrors what you would do on Windows, which involves changing your mouse's DPI and your system's pointer speed to ensure things feel the same after changing your Minecraft sensitivity.
- Quickest to setup if your mouse's DPI is already set accordingly, i.e. if you had boat eye set up on Windows beforehand.
Method 1: Waywall sensitivity
Skip steps 1.1 and 1.2 if you've never set up boat eye before.
1.1: Find DPI and Minecraft sens for Windows sens of 10
- Go to the Waywall Boat Eye Utility Website.
- Input your DPI, Minecraft Sensitivity and Windows Sensitivity on the "Reverse Boat Eye Calculator".
- Note down the new DPI and Minecraft sens.
1.2: Configure your mouse DPI
- Using your mouse's software, change your DPI to the final DPI you noted in the previous section, or the closest possible value.
- If your mouse is in this list of devices, install and use either
piperorratbagctlto configure its DPI. - If you have a Razer mouse, install and use
openrazer. - If your mouse doesn't have a Linux driver, you will need to boot back into Windows, use a Windows VM (if you're daring enough), or another device with Windows installed to configure its DPI.
- OR use software like maccel instead.
- In the Sens Multiplier field in maccel, input the new DPI you found in the previous section divided by 1000. For example, if your new DPI was 350, change the Sens Multiplier to 0.350.
- OR use software like maccel instead.
- Note that not using the exact DPI will not affect the accuracy of your eye measurements.
- If your mouse is in this list of devices, install and use either
1.3: Get new waywall and boat eye sensitivities
- Go back to the Waywall Boat Eye Utility Website.
- You could use the original mcsr-calcsens python program if you prefer.
- Input the new Minecraft sens you got from step 1.1 on "MCSR Calcsens Online".
- If you skipped step 1.1, instead input your current Minecraft sens from options.txt.
- You can find your current options.txt sensitivity by right clicking your instance in Prism Launcher > Folder > minecraft > options.txt > searching for
mouseSensitivity.
- You can find your current options.txt sensitivity by right clicking your instance in Prism Launcher > Folder > minecraft > options.txt > searching for
- If you skipped step 1.1, instead input your current Minecraft sens from options.txt.
- Note down the outputs.
1.4: Setup your waywall config
- If you're using one of Gore's pre-made configs, see the section below.
- If you're using your own config:
- Set
config.input.sensitivityto the "New normal sensitivity coefficient" given by mcsr-calcsens. - Use
waywall.set_sensitivity()to change your sensitivity when moving to tall and back to normal.
- Set
1.4.1: Gore config setup
- Generic Config
-
Find this line in
config.lua:local sens_change = { enabled = false, normal = 1.0, tall = 0.1 } -
Set enabled to true, and normal and tall to the normal and tall sensitivity coefficients from mcsr-calcsens.
-
- Barebones Config
-
Find these lines in
init.lua:-- ==== SENSITIVITIES ==== local normal_sens = 1 local tall_sens = 0.1 -
Set normal_sens and tall_sens to the sensitivity coefficients from mcsr-calcsens.
-
1.5: General boat eye setup
- Set your Minecraft sensitivity to what was given by mcsr-calcsens.
- Remember to update your sensitivity in
minecraft/config/mcsr/standardsettings.jsonif you're using StandardSettings, otherwise just changeminecraft/options.txt.
- Remember to update your sensitivity in
- Complete the steps from 2:30 to 3:40 in this boat eye setup video.
- In Ninjabrain Bot options > Optional Features > Boat Measurements, set the Default boat mode to "Green boat (with boat angle of 0)".
- Finally, turn off raw input ingame (change it in StandardSettings if you're using it) - the waywall sens will only take affect if you do this.
Method 2: Windows-like setup
2.1: Converting Windows sensitivity
- Convert your Windows cursor speed to the corresponding Linux pointer speed using the following table:
| Windows Sens | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EPP off | -0.96875 | -0.9375 | -0.875 | -0.75 | -0.625 | -0.5 | -0.375 | -0.25 | -0.125 | 0.0 | 0.25 | 0.5 | 0.75 | 1.0 | 1.25 | 1.5 | 1.75 | 2.0 | 2.25 | 2.5 |
| EPP on | -0.9 | -0.8 | -0.7 | -0.6 | -0.5 | -0.4 | -0.3 | -0.2 | -0.1 | 0.0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1.0 |
2.2: Change sensitivity in your settings
- With the value from the table above, change your pointer speed in your compositor's configuration.
- Below are some examples for some common compositors.
KDE
- Press Alt+F2 to open KRunner, and search for "mouse settings".
- Set "Pointer speed" to your new sensitivity.
Hyprland
-
Open the Hyprland config file in a text editor:
~/.config/hypr/hyprland.conf. -
If you haven't added your devices config yet, run
hyprctl devicesin your terminal and you'll see an output like this:$ hyprctl devices ... Input Device: turtle-beach-burst-ii-air-mouse ... -
Then add the following block of code to the config file, setting the name to what you got from the previous step, and sensitivity to your new sensitivity:
# eg: for a windows sensitivity of 3 device { name = turtle-beach-burst-ii-air-mouse accel_profile = flat sensitivity = -0.875 natural_scroll = false } -
Save the file and reload your config with
hyprctl reload.
Sway
-
Open your config file in a text editor:
~/.config/sway/config. -
If you haven't added your devices config yet, run
swaymsg -t get_inputsin your terminal and you'll see an output like this:$ swaymsg -t get_inputs ... Input device:Turtle Beach Burst II Air Mouse Type: pointer Identifier: 4341:20482:Turtle_Beach_Burst_II_Air_Mouse ... -
Then add the following block of code to the config file, setting the input identifier to what you got from the previous step, and pointer_accel to your new sensitivity:
# eg: for a windows sensitivity of 3 input "4341:20482:Turtle_Beach_Burst_II_Air_Mouse" { natural_scroll disabled accel_profile "flat" pointer_accel -0.875 } -
Save the file and reload your config with
swaymsg reload.
2.3: General boat eye setup
- Complete the steps from 2:30 to 3:40 in this boat eye setup video.
Measuring an eye
- After setting your sensitivity with one of the methods above, watch the boat eye setup video from 5:24 for an example boat eye measurement.
- On either of Gore's template configs, the default key for tall resizing & magnifying is F4.
- If you followed the waywall sensitivity method above, note that you can skip pressing F3+C when exiting the boat - the boat icon on Ninjabrain Bot should be green by default.
- This is made possible by using the god sens in Minecraft and the specific waywall sensitivity values given by mcsr-calcsens.
Search crafting setup using waywall
This section goes over creating a keyboard layout for search crafting using waywall and xkb, similar to using Microsoft Keyboard Layout Creator on Windows.
Creating a layout
- First, create the
~/.config/xkb/symbolsdirectory by runningmkdir -p ~/.config/xkb/symbols. - Create a file in this directory
touch ~/.config/xkb/symbols/mc, and open it in a text editornano ~/.config/xkb/symbols/mc. - Paste the following example layout into this file:
default partial alphanumeric_keys
xkb_symbols "basic" {
name[Group1] = "Minecraft";
key <TLDE> { [ plus, plus ] }; // ~ > +
key <AE01> { [ 8, 8 ] }; // 1 > 8
key <AE02> { [ 4, 4 ] }; // 2 > 4
key <AE03> { [ Armenian_nu, Armenian_NU ] }; // 3 > ն
key <AE04> { [ Armenian_gim, Armenian_GIM ] }; // 4 > գ
key <AE05> { [ Armenian_tche, Armenian_TCHE ] }; // 5 > ճ
key <AD01> { [ Armenian_yech, Armenian_YECH ] }; // q > ե
key <AD02> { [ Armenian_tyun, Armenian_TYUN ] }; // w > տ
key <AD03> { [ Armenian_pe, Armenian_PE ] }; // e > պ
key <AD04> { [ Armenian_se, Armenian_SE ] }; // r > ս
key <CAPS> { [ Armenian_vo, Armenian_VO ] }; // capslock > ո
key <AC01> { [ Armenian_re, Armenian_RE ] }; // a > ր
key <AC02> { [ Armenian_vyun, Armenian_VYUN ] }; // s > ւ
key <AC03> { [ Armenian_hi, Armenian_HI ] }; // d > յ
key <AC04> { [ Armenian_cha, Armenian_CHA ] }; // f > չ
key <AB01> { [ Armenian_ini, Armenian_INI ] }; // z > ի
key <AB02> { [ Armenian_ayb, Armenian_AYB ] }; // x > ա
key <AB03> { [ Armenian_ken, Armenian_KEN ] }; // c > կ
key <AB04> { [ Armenian_za, Armenian_ZA ] }; // v > զ
key <LALT> { [ Armenian_dza, Armenian_DZA ] }; // alt > ձ
};
- Let's break down how the layout file works.
- In the above example, the comment code on the right (the text after the
//) shows which key is being mapped to what character.
key <AD03> { [ Armenian_pe, Armenian_PE ] }; // e > պ
- This line remaps lowercase
eto theպcharacter, and uppercaseEto theՊcharacter.key <AD03>refers to theekey.- Most of the common keys remapped for search crafting (i.e. keys close to the WASD cluster) are listed in the above example layout, you can add keys further on the right by simply copying the key before it and increasing the number accordingly.
- Some keys (i.e. TLDE, CAPS, LALT in the above example) are named much more clearly.
Armenian_perefers to theպcharacter.Armenian_PErefers to theՊcharacter.- Here is the list of valid names for characters.
- To find the matching name, first try searching for the character in the list with Ctrl+F, otherwise find a proper name for the character and attempt to search for that instead (for the Armenian layout above, the Wikipedia page for the Armenian alphabet was especially useful).
Using the layout in waywall
- After creating your layout, open your waywall config file in a text editor (
nano ~/.config/waywall/init.lua). - Go to the
config.inputtable and edit thelayoutoption to "mc".
- Essentially, the
~/.config/xkb/symbolsfolder is checked for a file named "mc", and switches to that layout if it's found. - If you want to have multiple layouts to swap between easily, copy your existing layout file in
~/.config/xkb/symbolsand give it a distinct name, then edit init.lua accordingly.
Speedrunning on X11
- X11 is a more stable backend than Wayland, but is generally outdated compared to Wayland. We recommend you first try speedrunning on Wayland, and switch to X11 if you face major problems.
Installing and running X11 on Fedora KDE Plasma
- On Fedora KDE Plasma, Wayland is the default backend. To switch to X11, run the below terminal command to install Plasma for X11, along with a few other helpful things:
sudo dnf install plasma-workspace-x11 xorg-x11-drivers setxkbmap xhost xmodmap xorg-x11-xauth xorg-x11-xinit xrdb
- Then, go to the start menu and log out.
- Look for a button in the bottom left corner of the sign-in screen - there, select Plasma (X11), and log in as normal.
Next steps
- To get started on X11, setup Ninjabrain Bot.
- For window resizing, setup resetti.
- After setting up resetti, see Boat Eye on X11 to setup pixel perfect eye measuring (boat eye) both for new players and those who already had boat eye setup on Windows.
- See Keymap Rebinds on X11 for setting up rebinds for search crafting.
resetti
- resetti is an X11 app mainly used for resizing the Minecraft window.
- If you're using Wayland, please use waywall instead.
- Go to this link to download the latest version of resetti.
- On Fedora, download and run the
.rpmfile to install resetti. Once installed, check that it's working by opening a terminal and runningresetti version. - If you are unsure what to download, simply pick the binary file (just named "resetti"). Once downloaded, check that it's working by opening a terminal and running
<path/to/resetti> version, replacing <path/to/resetti> with the path to the resetti binary file you just downloaded. Run the following commands using the binary path as well.
- On Fedora, download and run the
- Run
resetti new <profile_name>to create a new config, replacing the<profile_name>with a name for the config. Eg:resetti new seedqueue1. - Go to
~/.config/resettito find your config files, and open the one you've created with a text editor (done in the terminal withnano ~/.config/resetti/<profile_name>.toml). Here, you can add custom resolutions and hotkeys to toggle them. - Hooks are essentially terminal commands that run when pressing one of your resetti hotkeys. Further information regarding hooks and the resetti config can be found here.
- You can now run resetti with
resetti <profile_name>in a terminal to run the macro :D. - Some things to note:
- Resizing will only work if the game is unfullscreened (as mentioned earlier, windowed/borderless will perform the same as fullscreen - on Plasma, you can make a window borderless by pressing Alt+F3 and disabling window borders).
- Quirks with out of bounds resizing are addressed in the Boat Eye for X11 section.
Using classic wall with resetti
- If you would like to run resetti with its Wall features still, you can look here to download the binary for the last stable wall release of resetti.
- After downloading, do the same steps as listed above under the
Using SeedQueue with resettisection. - On top of the options listed in the above section, you must also perform more additional setup as listed here.
Ninjabrain Bot
- This section goes over installing Ninjabrain Bot on X11 and creating a desktop entry for it, so you can easily open it from the start menu/your app launcher.
- On Wayland, please instead run Ninjabrain Bot through waywall - this is done with the example config provided.
- Download the .jar for Ninjabrain Bot as per usual from here.
- NOTE: NBTrackr can be used to see Ninjabrain Bot information easily, especially for single-monitor users.
- To add it as an application to your list of applications, ensure the applications folder exists by running the following command:
mkdir -p ~/.local/share/applications/
- Then, create this file with the following contents under
~/.local/share/applications/NinjabrainBot.desktop, replacing<path/to/Ninjabrain-Bot-1.5.1.jar>with the actual path to Ninjabrain Bot on your system.
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=NinjabrainBot
Icon=minecraft
Exec=java -jar <path/to/Ninjabrain-Bot-1.5.1.jar>
- Now you can launch Ninjabrain Bot from your applications menu! Note that if you move the Ninjabrain Bot .jar file, you will have to edit this file as well.
Boat Eye on X11
Setting up boat eye on X11 is not as easy as it is on Windows. You might see some weird behaviour while using it just because X11 handles mouse movement much different than Windows. Make sure to follow instructions as closely as possible.
Setting up mouse drivers
- Check online if your mouse has software supported on Linux.
- For most Razer mice, install
openrazerfor the GUI as well as the driver. - If your mouse is in this list of devices install
piperfor the GUI andlibratbagfor the driver. - If you don't have mouse software, you can either:
- switch back to Windows and set your DPI (and DPI toggle if you can/want) as necessary,
- OR use software like maccel instead.
- Instead of inputting your mouse's DPI into the sens calculator in the next section, input 1. The resulting New DPI is what you should use in the Sens Multiplier field in maccel.
- OR skip changing your DPI and cursor speed entirely, and just change your Minecraft sensitivity.
- Find the closest value to your current sensitivity in the first column of this list, and change it accordingly.
- You can find your current sensitivity by right clicking your instance in Prism Launcher > Folder > minecraft > options.txt > searching for
mouseSensitivity. - Remember to update your sensitivity in
minecraft/config/mcsr/standardsettings.jsonif you're using StandardSettings, otherwise just changeminecraft/options.txt.
- For most Razer mice, install
Finding your sens values
- If you're setting up boat eye for the first time, refer to this sens calculator to figure out your boat eye cursor speed, DPI and sensitivity.
- You can find your current options.txt sensitivity by right clicking your instance in Prism Launcher > Folder > minecraft > options.txt > searching for
mouseSensitivity. - Leave cursor speed on 10 in the calculator, assuming you haven't changed pointer speed on Linux before (on Plasma, check if pointer speed is 0.00 in System Preferences > Mouse > select your mouse under the Device dropdown).
- You can find your current options.txt sensitivity by right clicking your instance in Prism Launcher > Folder > minecraft > options.txt > searching for
- To convert the Windows cursor speed from the sens calculator to the appropriate Linux speed, use the EPP off row in the table below.
| Windows Sens | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EPP off | -0.96875 | -0.9375 | -0.875 | -0.75 | -0.625 | -0.5 | -0.375 | -0.25 | -0.125 | 0.0 | 0.25 | 0.5 | 0.75 | 1.0 | 1.25 | 1.5 | 1.75 | 2.0 | 2.25 | 2.5 |
| EPP on | -0.9 | -0.8 | -0.7 | -0.6 | -0.5 | -0.4 | -0.3 | -0.2 | -0.1 | 0.0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1.0 |
- For example, if the calculator gave you a cursor speed of 3, the corresponding value in the table is -0.875.
Setting your sens values
- Once you know your settings:
- Set the DPI to the DPI that you took from the calculator in your mouse configuration application.
- Set your Minecraft sensitivity in
minecraft/config/mcsr/standardsettings.json, orminecraft/options.txtif you disabled/aren't using StandardSettings.
- Install
xinputusing your package manager, to set your cursor speed accurately in X11. - Figure out the correct device ID for your mouse by running
xinputin a terminal and analyzing the output. - Pick the correct id corresponding to your mouse and note it down.
- Eg:
Logitech G102 LIGHTSYNC Gaming Mouse id=11 [slave pointer (2)]Here the device id would be11. - Now set the cursor speed by executing the following command in a terminal:
xinput set-prop <device_id> "libinput Accel Speed" <speed>
- Here, replace
<device_id>with the id and<speed>with the resulting speed you calculated from the table before. - In our example, the command would be
xinput set-prop 11 "libinput Accel Speed" -0.875. - You should also disable mouse acceleration with the command:
xinput set-prop <device_id> "libinput Accel Profile Enabled" 0 1 0
- These settings will reset after rebooting your PC - if you're happy with how your mouse feels, save your configuration by creating and editing a libinput configuration file:
sudo touch /etc/X11/xorg.conf.d/99-libinput-custom-config.conf
sudo nano /etc/X11/xorg.conf.d/99-libinput-custom-config.conf
- Paste the following text into this file, replacing
<speed>with your pointer speed calculated earlier and<mousename>with the name of your mouse as shown when runningxinput.
Section "InputClass"
Identifier "PointerSpeed"
MatchDriver "libinput"
MatchProduct "<mousename>"
Option "AccelProfile" "flat"
Option "AccelSpeed" "<speed>"
EndSection
Window resizing with resetti
- If you haven't already, install resetti to handle window resizing.
- In your config, add an entry under your
alt_reslist with the dimensions"384x16384+768,-7652".- The position (
768,-7652in this case) may be incorrect depending on your monitor setup, change it as necessary to position the game in the center of your monitor.- Here's a simple rule for finding the proper position to center the game:
X = (monitor width / 2) - (resize width / 2),Y = (monitor height / 2) - (resize height / 2).
- Here's a simple rule for finding the proper position to center the game:
- The position (
- Then, add a hotkey to toggle this res at the bottom of your config using
ingame_toggle_res(n). - Check that the resizing works by running resetti and pressing your hotkey ingame.
- If your game doesn't become thin and tall, see the Issues with certain WMs section and double-check your config.
Eye Measuring Projector
- There are two methods for displaying an eye measuring projector:
- You can use xEyeSee to display an eye measuring projector automatically when using Tall Macro. This method does not require OBS Studio.
- The second method is to use OBS Studio. You can follow this tutorial to setup an OBS projector.
- Note that this projector won't automatically position itself beside your game unlike xEyeSee - you should instead place the window behind your game yourself.
Issues with certain WMs
- There are some window managers that have trouble with out-of-bounds window resizing, or just window resizing in general:
- kwin (KDE Plasma Desktop Environment)
- muffin (Linux Mint/Cinnamon Desktop Environment)
- xfwm (XFCE Desktop Environment)
- mutter (Gnome Desktop Environment)
- Before switching desktop environments/window managers, check if initially resizing the game window out of monitor bounds works for you.
- Set the
play_resand eachalt_resoption in your resetti config to be 1 pixel larger than your monitor's bounds in either dimension. - Make sure to unmaximize/unfullscreen your game window (play in borderless if possible - on KDE, press Alt+F3 and disable window borders).
- On i3 or other tiling window managers, make sure the game window is undocked (make the window floating).
- After this, you may also be required to manually drag the game window partially offscreen before your resizing hotkeys work properly.
- Set the
i3
i3 is an X11 WM that has been tested a lot and it works very well with Fedora and all the tools. You can set it up in this section of the guide.
Finishing Up
- This covers all of the Linux-specific setup for boat eye - check out the following timestamps in osh's boat eye guide for the remaining setup:
- A high polling rate on your mouse may also cause problems, such as lag when moving the ingame camera. Use your mouse software and decrease it if necessary - usually anything below 1000Hz is fine.
- Congratulations! We have successfully set up boat eye on Linux!
Rebinding Keys (for searchcrafting)
- Install
xdotoolandxmodmap
sudo dnf install xdotool xmodmap
- Now make a new file called
Rebinder.pywherever you like and copy the following contents into it.
import os
# Settings
window_filter = "Minecraft*"
rebinds = {
25: "h",
43: "w",
}
reset_rebinds = {
43: "h",
25: "w",
}
rebound_keys = False
while True:
active_window = os.popen(
"xdotool getactivewindow getwindowclassname").read()
if window_filter in active_window and not rebound_keys:
for (keycode, keysym) in rebinds.items():
rebind_cmd = f"xmodmap -e 'keycode {keycode} = {keysym}'"
os.system(rebind_cmd)
print(f"Rebound Keycode: {keycode} to Keysym: {keysym}")
rebound_keys = True
elif window_filter not in active_window and rebound_keys:
for (keycode, keysym) in reset_rebinds.items():
reset_cmd = f"xmodmap -e 'keycode {keycode} = {keysym}'"
process = os.popen(reset_cmd)
os.system(reset_cmd)
print(f"Rebound Keycode: {keycode} to Keysym: {keysym}")
rebound_keys = False
- Here you can configure what keycodes can be rebound to what key symbols and how you can reset them to their original state (this happens when you are not focussed on a Minecraft instance).
- This information can be obtained by running
xevin a terminal and hitting the respective key. You need to look for the Key Press or Key Release event in the output which will state the keycode and keysym in the following lines after it. The examples are a good place to start. Hithandwand see what the keycodes are. They should be43and25respectively. The example is a circular rebind fromh -> wandw -> h.
- This information can be obtained by running
- Names for characters that aren't on your native keyboard layout (for example, the
Øcharacter found on Danish & Norwegian layouts) can be found here.- To find the matching name, first try searching for the character in the list with Ctrl+F (in the case of
Ø, the matching name is "oslash"). - Otherwise, find a proper name for the character and attempt to search for that instead (for example, the Wikipedia page for the Armenian alphabet is especially useful).
- To find the matching name, first try searching for the character in the list with Ctrl+F (in the case of
- NOTE If you rebind keys using this method, you won't need to change any binds ingame. Minecraft will automatically detect the change in layout and adjust accordingly.
- Now running
python3 Rebinder.pywill rebind your keys if focussed on a Minecraft window.- Note that you need to run
python3 Rebinder.pyin a terminal each time before playing Minecraft.
- Note that you need to run
Setting up i3
In this section, we will be setting up i3 on Fedora primarily for a smooth window resizing experience. By the end of it, you will have a working version of Fedora + i3 with some preset configurations.
Install Dependencies
To install all the dependecies of our i3 setup, run the following command in a terminal:
sudo dnf install polkit-gnome
systemctl enable --now polkit
sudo dnf install NetworkManager network-manager-applet i3 rofi xrandr flameshot i3status i3lock
systemctl enable --now NetworkManager
Here rofi is used to make an app launcher for you. You can launch apps by hitting a keybind (similar to finder on Mac's :D).
xrandr is used to determine what your main monitor and how you can arrange displays.
flameshot is used to take screenshots.
polkit-gnome is used to make a GUI to enter your super user password.
Preset Config
Copy the following config over to ~/.config/i3/config by making the directories as required. Remember ~/.config/i3 is the directory and config is just the file under ~/.config/i3.
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
set $termcmd gnome-terminal
set $browsercmd firefox
set $screenshotcmd flameshot gui
set $monitor "exec xrandr | grep primary | awk -F ' ' '{print $1}'"
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
# font pango:FiraCode NerdFont 10
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
font pango:DejaVu Sans Mono 8
# font pango:DejaVu Sans Mono 0
# Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex-autostart --autostart --environment i3
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# move tiling windows via drag & drop by left-clicking into the title bar,
# or left-clicking anywhere into the window while holding the floating modifier.
# tiling_drag modifier titlebar
# start a terminal
bindsym $mod+Return exec $termcmd
# kill focused window
bindsym $mod+q kill
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+Ctrl+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+Ctrl+f fullscreen toggle
bindsym $mod+Shift+f floating toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
workspace $ws1 output $monitor
workspace $ws2 output $monitor
workspace $ws3 output $monitor
workspace $ws4 output $monitor
workspace $ws5 output $monitor
workspace $ws6 output $monitor
workspace $ws7 output $monitor
workspace $ws8 output $monitor
workspace $ws9 output $monitor
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
# reload the configuration file
bindsym $mod+Shift+c reload
#Shift restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+q exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mouse for that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Remove window borders
for_window [class="^.*"] border pixel 0
# default_border pixel 0
# default_floating_border pixel 0
# Default layout setting
workspace_layout tabbed
# Window gaps
gaps inner 6
# Titlebar colors
# client.focused #5E81AC #5E81AC #ECEFF4 #5E81AC
client.focused #5E81AC #5E81AC #5E81AC #5E81AC
# Disable focus follow mouse
focus_follows_mouse no
# Custom binds
bindsym $mod+b exec $browsercmd
bindsym $mod+Shift+s exec $screenshotcmd
bindsym $mod+p exec rofi -show drun
for_window [class="Minecraft\* 1.16.1"] floating enable
for_window [class="ninjabrainbot-Main"] floating enable
for_window [title="Windowed Projector \(Scene\) - Mag"] floating enable, resize set width 1, resize set height 1, move position 0 0
for_window [title="Windowed Projector \(Scene\) - Wall"] floating enable, resize set width 1920, resize set height 1080, move position 0 0
focus_on_window_activation focus
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
position top
tray_output $monitor
status_command i3status
colors {
background #000000
statusline #ECEFF4
focused_workspace #ECEFF4 #5E81AC
active_workspace #ECEFF4 #333333
inactive_workspace #888888 #222222
urgent_workspace #ECEFF4 #900000
}
}
exec /usr/libexec/polkit-gnome-authentication-agent-1 & eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh,gpg)
Rofi Config
If you absolutely hate the light theme on rofi, you can copy the following contents into ~/.config/rofi/config.rasi and make the directories as required.
/**
* User: deadguy
* Copyright: deadguy
*/
@theme "/dev/null"
configuration {
display-drun: "Activate";
display-run: "Execute";
show-icons: true;
icon-theme: "Papirus";
sidebar-mode: true;
}
* {
background-color: rgb(18, 30, 37);
text-color: #d3d7cf;
selbg: rgb(0, 86, 136);
actbg: rgb(22, 37, 46);
urgbg: #e53935;
winbg: #26c6da;
selected-normal-foreground: @winbg;
normal-foreground: @text-color;
selected-normal-background: @actbg;
normal-background: @background-color;
selected-urgent-foreground: @background-color;
urgent-foreground: @text-color;
selected-urgent-background: @urgbg;
urgent-background: @background-color;
selected-active-foreground: @winbg;
active-foreground: @text-color;
selected-active-background: @actbg;
active-background: @selbg;
line-margin: 2;
line-padding: 2;
separator-style: "none";
hide-scrollbar: "true";
margin: 0px;
padding: 0px;
font: "Fira Code Nerd Font 10";
}
window {
x-offset: 0px;
margin-right: 60px;
height: 650px;
orientation: horizontal;
children: [mainbox];
}
mainbox {
spacing: 0em;
padding: 0px;
width:150px;
children: [ inputbar, listview, sidebar ];
expand: true;
}
button { padding: 5px 2px; }
button selected {
background-color: @active-background;
text-color: @background-color;
}
inputbar {
children: [ entry ];
}
textbox-prompt-colon {
text-color: inherit;
expand: false;
margin: 0 0.3em 0em 0em;
}
listview {
spacing: 0em;
dynamic: true;
cycle: true;
}
element {
padding: 16px;
border: 0 0 0 5px solid;
}
entry {
expand: true;
text-color: @normal-foreground;
background-color: rgb(25, 41, 51);
vertical-align: 1;
padding: 12px;
font: "Hack Nerd Font 13";
}
element normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
element selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
padding: 16px;
border: 0 0 0 5px solid;
border-color: @active-background;
}
element selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
element selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
element alternate.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element alternate.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element alternate.active {
background-color: @active-background;
text-color: @active-foreground;
}
Logging into i3
- First, logout of your current (Plasma) session.
- In the login screen, look for a button in one of the bottom corners (should be currently labeled "Plasma (X11) or similar).
- Click on it and choose the i3 option in it.
- Now you can login with your password and you will be put into the i3 session.
Keybinds
These are the list of basic keybinds in i3:
Windows + Enter-> Opens Terminal.Windows + P-> Opens app launcher (rofi). You can launch any other apps from there.Windows + <number>-> Switch to Virtual Desktop <number>.Windows + Shift + <number>-> Move the current window to Virtual Desktop <number>.Windows + W-> Make all windows in the current Virtual Desktop maximized.Windows + Shift + F-> Toggle the current window to be floating.Windows + Drag (Left Click)-> Move the window under cursor around.Windows + Drag (Right Click)-> Resize the window under cursor.Windows + Shift + Q-> Logout of i3. Must be done to shutdown or restart the PC.Windows + Shift + C-> Reload the config file of i3.Windows + Shift + R-> Reload the complete i3 session.
Other QoL Stuff
You can also install arandr using the command sudo dnf install autorandr in a terminal. This is a GUI frontend for xrandr which you can launch from the app launcher and you can arrange your connected displays as you want. Your primary display is the one that is underlined in the GUI there.
Congratulations! You have now setup i3! Now you can do boat eye without any hitches :D.
Drag clicking
- By default, drag clicking will not work on Linux - it is set to ignore multiple successive fast clicks (similar to high debounce time).
- To fix this:
- Create the configuration folder for
libinput, which handles mouse input:sudo mkdir -p /etc/libinput. - Create a config file in this folder:
sudo touch /etc/libinput/local-overrides.quirks. - Open this file in a text editor:
sudo nano /etc/libinput/local-overrides.quirks. - Paste the following content and save the file:
- Create the configuration folder for
[Never Debounce]
MatchUdevType=mouse
ModelBouncingKeys=1
- Finally, restart your system to bring the new config into effect.
Setting up tmpfs
You should get better performance by symlinking your Minecraft world folders into /tmp/mc/ and setting /tmp as a tmpfs volume.
What that means is that files in these folders will be stocked in your memory and deleted on every reboot.
NOTE: Use this method IF AND ONLY IF you have some RAM to spare whilst resetting. DO NOT use it if you are using >70-80% of RAM during resetting as running the script in the background takes up memory as well!
- First define
/tmpas a tmpfs volume by adding the following line to/etc/fstab
tmpfs /tmp tmpfs defaults,size=Xg 0 0
Replace X with the number of gigabits you want to allocate, it won't use all of it if not needed but this sets a limit.
- E.g. While running Prism Launcher, I would symlink
~/.local/share/PrismLauncher/instances/Instance1/.minecraft/savesto/tmp/mc/1/and so on by using the command below for each, ensure you have deleted thesavesfolder beforehand.
ln -s /tmp/mc/1 ~/.local/share/PrismLauncher/instances/Instance1/.minecraft/saves
As the /tmp folder is cleared on every restart you need to setup a script to create the folder on every boot, if your distribution uses systemd (this includes Fedora) you could do something like this:
- First create the file
/etc/rc.localwith the following content:
#!/bin/bash
mkdir /tmp/mc
for i in {1..X} # Replace X with the number of instances you use
do
mkdir /tmp/mc/$i
#---------Optional Part if you want to import your practice maps--------
# First you need to put all your practice maps in the same foder somewhere on your pc for me
# it's in /home/username/Documents/speedrun/maps
ln -s "/home/username/Documents/speedrun/maps/ZCrafting Practice v2" /tmp/mc/$i/
ln -s "/home/username/Documents/speedrun/maps/ZLBP 3.14.0" /tmp/mc/$i/
ln -s "/home/username/Documents/speedrun/maps/ZOW Practice V2" /tmp/mc/$i/
ln -s "/home/username/Documents/speedrun/maps/ZPortal Practice v2" /tmp/mc/$i/
ln -s "/home/username/Documents/speedrun/maps/ZRyguy2k4 End Practice v3.4.0-1.16.1" /tmp/mc/$i/
# adapt the previous commands depending on your maps and their location
#---------End Optional Part-------------
chown username -R /tmp/mc/$i # Replace username by yours
done
After the file is saved, execute
sudo chmod +x /etc/rc.local
Then run the following commands
sudo nano /etc/systemd/system/rc-local.service
And enter the following content
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
Now run the following commands and check that the folders created successfully
sudo systemctl enable rc-local
sudo systemctl start rc-local
NOTE: If you don't have systemd on your distribution, you can use the same script and run it at the start of your session.
- And now you can keep clearing out these folders every 300s or so by running a simple script in the background.
- This script preserves the training maps (their folder name must start with "Z") and the last 5 random worlds for verification purposes.
- Replace "X" with your number of instances.
#!/bin/bash
IFS=$'\n'
while true
do
for i in {1..X}
do
for save in $(ls /tmp/mc/$i -t1 --ignore=Z* | tail -n +6)
do
rm -r "/tmp/mc/$i/$save"
done
done
sleep 300
done
- Here the "X" in the for loop is the total number of instances that you have. Make sure to name the folders exactly as in the above example for this script, i.e.,
/tmp/mc/1and so on. - Now set the executable flag on the script by performing the following command in a terminal
chmod +x script.sh
- And execute it everytime you start your resetting session with the following command
./script.sh