$schemamarkup = get_post_meta(get_the_ID(), 'schemamarkup', true); if(!empty($schemamarkup)) { echo $schemamarkup; }

Arch Linux Swap Mouse Buttons – Step-by-step

August 10, 2021 | By the+gnu+linux+evangelist.

Setting up

  1. 2. Installing Xinput

    Now to Install Xinput Utility for Arch
    Simply play:

    sudo pacman -Sy xorg-xinput

    Authenticate with the User Admin Pass.
    If Got “User is Not in Sudoers file” then see: How to Enable sudo.

  2. 3. Finding out Device Name

    So to Display Devices List
    Run:

    xinput list

    Select & Copy Device’s Name with Ctrl+x.

    Xinput Arch Tutorial - Devices List

    Or simply take note of the Device’s ID.
    But if No Device Name but “xwayland” on GNOME Wayland then instead follow the linked Guide:

    Wayland xinput output

    How to Swap Mouse Buttons on GNOME Wayland

    Mouse Buttons Switch Wayland Guide
  3. 4. Swapping Mouse Buttons

    Now to Remap Mouse Buttons Map on Arch
    First, to list the Current Map run:

    xinput --get-button-map [DEVICEIDNAME]

    You can use either the Device ID or Name.
    So as in this example:

    xinput --get-button-map 13

    Now for instance to Switch Buttons 1 and 3 simply play:

    xinput --set-button-map 13 3 2 1

    So it’s enough to input the part of the sequence that you intend to Change, but Starting from the head!
    Next to Check your new Setup again:

    xinput --get-button-map 13
    buttons map

    How to Find the Mouse Button ID

    Find Device Button on Arch
  4. 5. Making Permanent Config

    Last, to make a Permanent Xinput Configuration File
    For a Single User using the nano editor, put your both Commands into:

    nano ~/.xsessionrc

    Ctrl+x to Save & Exit from nano Editor.
    So the setup should be consistent also after Reboot.

    xsessionrc setup

Contents