The "Hub"

Wiki of the Idiots

Random Stuff Linux Stuff Windows Stuff Software

My Linux Stuff

Unless you're on Linux and specifically Arch Linux, there's a good chance some of this will not work for you.


If so, go somewhere else lol.

Differences between Linux and Windows

Aliases

For some reason, looking up anything on these was super confusing for me.

Either it was extremely complicated, or it was so specific that I couldn't see how it would work it for me.

I'm going to try to make this simple, while showing every part of the process.

We'll start with the code, then I'll break it down.


First of all, open the file ~/.bashrc. This can be done with either nano or vim.

Update All Alias

alias upd='echo "UPDATE ALL THE THINGS"; sudo pacman -Syu; yay'


alias upd = Alias is the command that allows us to substitute any command, with our own command of choice. In this case, "upd" is the command I'm using, but you could replace that with literally anything you want.

echo "UPDATE ALL THE THINGS" = Echo just types out whatever is in the quotes afterwards. Do remember that this is not a command, but is just raw text.

; = This separates the commands. This is what allows me to run multiple commands in one. Without these, this command is impossible.

sudo pacman -Syu = pacman is Arch Linux's Package Manager. Any official Arch Linux packages are in pacman. Syu is simply an argument for pacman that tells it to update all.

yay = Yay is Arch Linux's community package manager. You could add an argument, such as -Syu, but yay actually defaults to updating all without any arguments.

Xboxdrv DS5 Alias

You will need these things.

  • xboxdrv. This is a package that you can download.
  • A Dualsense Controller (PS5 Controller)

alias xds5='modprobe -r xpad; xboxdrv \
                    --evdev /dev/input/by-id/usb-Sony_Interactive_Entertainment_Wireless_Controller-if03-event-joystick \
                    --evdev-absmap ABS_HAT0X=dpad_x,ABS_HAT0Y=dpad_y,ABS_X=X1,ABS_Y=Y1,ABS_RX=X2,ABS_RY=Y2,ABS_Z=LT,ABS_RZ=RT \
                    --evdev-keymap BTN_SOUTH=A,BTN_EAST=B,BTN_NORTH=Y,BTN_WEST=X,BTN_START=start,BTN_MODE=guide,BTN_SELECT=back \
                    --evdev-keymap BTN_TL=LB,BTN_TR=RB,BTN_TL2=LT,BTN_TR2=RT,BTN_THUMBL=TL,BTN_THUMBR=TR \
                    --axismap -y1=y1,-y2=y2 \
                    --mimic-xpad \
                    --detach-kernel-driver \
                    --force-feedback \
                    --silent'

alias xds5 = The alias command. In this case xds5 is my command, but you could obviously change it.

modprobe -r xpad = Unloads the xpad module. This is basically required as the xpad module would cause problems.

xboxdrv = The xboxdrv command. If you have a supported controller you could just run this and it should theoretically work.

evdev and axismap stuff = All the rebinds to translate the PS5 Controller's inputs into xinput.

-- mimic-xpad = Forces the emulated controller to have force feedback ability.

--detach-kernel-driver = Detaches the original Linux driver from the controller. Only here to be redundant.

--force-feedback = Forces the emulated controller to have force feedback ability.

--silent = Stops xboxdrv from showing all controller events on the terminal.

Extra Commands (not explaining these)

sudo chmod +x (path) = executable file

sudo chmod 777 (path) = full permissions to file (Don't do this)

cd ~/(Directory) = Direct Terminal to specific Directory (Can also just right click in file explorer to open Terminal here)

cd ~ = Direct Terminal back to Root Directory (Used to undo the cd from any Terminal)

archlinux-java = Java Command Line Interface

archlinux-java = List of installed Java Environments (Gives Java Env Name)

archlinux-java = Set specific Java Environment Version (Copy Java Env Name exactly from Status)

("~/(Directory)/":) ./(Executable file name) = Execute file within specified Directory

java -Xms(amount)M -Xmx(amount)M = Set Java program initial heap size and maximum heap size (M can be replaced with G for Gigabytes)

Extra Arguments for Stuff

Copy this for Minecraft Forge Modpacks

-Dfml.earlyprogrsswindow=false


Copy this to use Feral Gamemode on Steam Games

LD_PRELOAD=$LD_PRELOAD:/usr/\$LIB/libgamemodeauto.so %command%


Copy this to use second GPU on a program

DRI_PRIME=1


Download Curseforge links with WGet (from the CLI)

Convert

curseforge.com/something/something/modpack-name/files/7-digit-number to

media.forgecdn.net/files/first-4-digits/last-3-digits/filename.zip