Have a look at this open book for more information:


Shell

Redirections

Redirect STDOUT to file:

ls 1> file

Append STDOUT to existing file:

ls 1>> file

Redirect STDERR to file:

ls 2> file

Redirect STDERR to STDOUT:

ls 2>&1

Suppress STDERR:

ls 2>/dev/null

Pipelines

Pipe output into another program:

ls -l | grep "something"

FIFOs

FIFOs (First In First Out) are like pipeline but can be used by multiple programs simultaneously.

mkfifio fifo
tee fifo < fifo&
ls -al > fifo
echo "something" > fifo

System Tweaks

Kitty

Kitty FAQ

Disable PC Speaker (Beep) globally

Blacklisting the pcspkr module will prevent udev from loading it at boot.

echo "blacklist pcspkr" | sudo tee /etc/modprobe.d/nobeep.conf

GTK+ Applications take long time to startup under sway

This is due to GTK+ waiting for xdg-desktop-portal to start via D-Bus. This times out because the D-Bus activated service doesn’t know what WAYLAND_DISPLAY to connect to. I solved this by adding the following to my sway config:

#exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec "systemctl --user import-environment SWAYSOCK WAYLAND_DISPLAY"