This is a collection of useful references, snippets, and information that I found useful when tinkering with Arch Linux.
Network
Wi-Fi Connection
Using iwd
-
Make sure that
iwd
is running:If not, start the service by running:
-
Start the interactive prompt:
-
Find the name of the wireless device by listing all devices:
If the device is turned off, turn it on:
-
Initiate a scan for networks:
then list all available networks:
-
Connect to the desired network:
Enter the passphrase (if prompted) to the network.
Using NetworkManager(nmcli
)
-
Install
networkmanager
package if NetworkManager is not installed. -
Start / enable
NetworkManager.service
. -
List nearby Wi-Fi networks:
Connect to a Wi-Fi network:
Connet to a Wi-Fi network (input password through
STDIN
):Disconnect an interface:
Get a list of connections with their names, UUIDs, types and backing devices:
Turn of Wi-Fi:
Using iwd
as the Wi-Fi Backend
-
Install
iwd
. -
Create the following configuration file:
Battery
Check Battery Status
- Install
tlp
. - Run the following command.
Input Devices
Keyboard Input Remapping
Dual Function Keys
-
Run the following command and find out the name of the keyboard.
-
Create a new configuration:
When using a wireless keyboard however, setting the name sometimes does not work. In this case, set the name to
.*
, which processes every input. -
Create a yaml file (conventionally resides in
/etc/interception/dual-function-keys
) that contains the configuration for Dual Function Keys itself. I use the following configuration:However, pressing the key will still send the original key on press, and this may interfere with programs such as (neo)vim. To prevent this, add
HOLD_START: BEFORE_CONSUME_OR_RELEASE
.
Using evremap
-
Install
evremap
from AUR: -
Enable / start the system service:
-
Edit the service file to point to your config. First check the path of the service:
Then edit the file to point to your config:
-
Configure remapping to your taste:
Korean (Hangul) Input
This only works for hyprland
. Source
-
Install
kime
from AUR. -
Add the following configuration:
Miscellaneous
Run Fetch Script on Terminal Launch
According to the official docs, fish_greeting
is executed only when an interactive fish starts.
OBS Virtual Camera
-
Install the
v4l2loopback-dkms
package. -
Load the kernel module.
-
To reload the module, first unload the module.
-
For Chromium / WebRTC based applications, set option
exclusive_caps=1
.
GPG waiting for lock ...
Error
-
Locate all files with
.lock
or.lck
extension inside~/.gnupg
. -
Remove any lock files found.
Changing the default browser
-
To get the current default web browser:
-
To set the default web browser:
for example,
Keyboard Backlight / Brightness
- Install
brightnessctl
:
Keyboard Backlight
- Get the maximum brightness level (obtain the vendor name using
ls
in the directory): Or alternatively: Then set the brightness usingbrightnessctl
: Make sure to set the brightness level below the max level.
Brightness
- Same process as keyboard backlight, but use the path instead.
Clipboard
Piping Command Outputs to Clipboard
Wayland
-
Install
wl-clipboard
: -
To copy:
-
To paste:
X Window System
-
Install
xclip
: -
Add aliases. In
bash
:In
fish
: -
To copy:
-
To paste:
MacOS
-
To copy:
To copy the contents of a file, this also works (so that you don’t have to use
cat
): -
To paste:
Access System Clipboard in (Neo)Vim
I use hyprland
, so this only works for Wayland.
- Install
wl-clipboard
: - Add the following line to
init.vim
: Or toinit.lua
for neovim:
Change Acceleration Profile for ThinkPad Trackpoints
Change libinput
acceleration profile for ThinkPad’s trackpoint from adaptive to flat.
This only works for hyprland
. Source
Extract data.tar.gz(or .xz)
from .deb
Use ar
from binutils
. binutils
is in the base-devel
group, so it should
be already installed. Source
Desktop Entries
Desktop entries for applications (.desktop
files) usually reside in
/usr/share/applications/
or /usr/local/share/applications/
.
Modify environment variables
To set environment variables, edit the Exec=
line to first use env
.
For example: