After install Arch @ Erwin Li | 2022-11-24T17:53:09Z | 4 minutes read | Update at 2023-12-06T00:27:08Z

After installing the Arch, we need to configurate it to ensure the daily usage. My plan is Arch+dwm

Create normal user

Synchronize time(optional, if not)

If time is not set correct when you install Arch, you need the following command line. If time is incorrect, you can access website by web browser.

sudo timedatectl set-ntp true

Installing and starting dwm

install x server:

pacman -S xorg xorg-xinit

install DWM:

git clone git://git.suckless.org/st
git clone git://git.suckless.org/dmenu
git clone git://git.suckless.org/dwm
cd st
sudo make install
cd ../dwm
sudo make install
cd ../dmenu
sudo make install

Configurate ~/.xinitrc

exec dwm

after login to your account:

xstart

Touchpad configuration

The aim of this step is enable natural scrolling and tap-to-click.

list all input device:

xinput list
#-----------------------------------------------------------------------
# my output:
# ⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
# ⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
# ⎜   ↳ GXTP7863:00 27C6:01E0 Mouse             	id=10	[slave  pointer  (2)]
# ⎜   ↳ GXTP7863:00 27C6:01E0 Touchpad          	id=11	[slave  pointer  (2)]
# ⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
#     ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
#     ↳ Video Bus                               	id=6	[slave  keyboard (3)]
#     ↳ Video Bus                               	id=7	[slave  keyboard (3)]
#     ↳ Power Button                            	id=8	[slave  keyboard (3)]
#     ↳ HD Camera: HD Camera                    	id=9	[slave  keyboard (3)]
#     ↳ Huawei WMI hotkeys                      	id=12	[slave  keyboard (3)]
#     ↳ AT Translated Set 2 keyboard            	id=13	[slave  keyboard (3)]

The touchpad id is 11, then check the properties:

xinput list-props 11
#-------------------------------------------------------------------------
# Device 'GXTP7863:00 27C6:01E0 Touchpad':
# 	Device Enabled (189):	1
# 	Coordinate Transformation Matrix (191):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
# 	libinput Tapping Enabled (345):	0
# 	libinput Tapping Enabled Default (346):	0
# 	libinput Tapping Drag Enabled (347):	1
# 	libinput Tapping Drag Enabled Default (348):	1
# 	libinput Tapping Drag Lock Enabled (349):	0
# 	libinput Tapping Drag Lock Enabled Default (350):	0
# 	libinput Tapping Button Mapping Enabled (351):	1, 0
# 	libinput Tapping Button Mapping Default (352):	1, 0
# 	libinput Natural Scrolling Enabled (324):	0
# 	libinput Natural Scrolling Enabled Default (325):	0
# 	libinput Disable While Typing Enabled (353):	1
# 	libinput Disable While Typing Enabled Default (354):	1
# 	libinput Scroll Methods Available (326):	1, 1, 0
# 	libinput Scroll Method Enabled (327):	1, 0, 0
# 	libinput Scroll Method Enabled Default (328):	1, 0, 0
# 	libinput Click Methods Available (355):	1, 1
# 	libinput Click Method Enabled (356):	1, 0
# 	libinput Click Method Enabled Default (357):	1, 0
# 	libinput Middle Emulation Enabled (358):	0
# 	libinput Middle Emulation Enabled Default (359):	0
# 	libinput Accel Speed (333):	0.198364
# 	libinput Accel Speed Default (334):	0.000000
# 	libinput Accel Profiles Available (335):	1, 1
# 	libinput Accel Profile Enabled (336):	1, 0
# 	libinput Accel Profile Enabled Default (337):	1, 0
# 	libinput Left Handed Enabled (338):	0
# 	libinput Left Handed Enabled Default (339):	0
# 	libinput Send Events Modes Available (309):	1, 1
# 	libinput Send Events Mode Enabled (310):	0, 0
# 	libinput Send Events Mode Enabled Default (311):	0, 0
# 	Device Node (312):	"/dev/input/event11"
# 	Device Product ID (313):	10182, 480
# 	libinput Drag Lock Buttons (340):	<no items>
# 	libinput Horizontal Scroll Enabled (341):	1
# 	libinput Scrolling Pixel Distance (342):	15
# 	libinput Scrolling Pixel Distance Default (343):	15
# 	libinput High Resolution Wheel Scroll Enabled (344):	1

set Tapping Enabled (345) and Natural Scrolling Enabled (324) to 1:

xinput set-prop 11 345 1
xinput set-prop 11 324 1
#      device_id option_id value

reference: https://wiki.archlinux.org/title/Xinput

Install firefox or chrome

Install Zsh and oh-my-zsh

Sound

Install alsa-utils ,pulseaudio and pulseaudio-alsa

sudo pacman -S alsa-utils pulseaudio pulseaudio-alsa

aplay -l to show all the sound card, the default one is card 0. However, card 0 is HDMI output in most of cases, we need to change it to another card.

aplay -l:
-----------------------------------------------------------------------------------------------
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: CX8070 Analog [CX8070 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

configurate default card in ~/.asoundrc:

defaults.pcm.card xx
defaults.ctl.card xx

The ‘pcm’ options affect which card and device will be used for audio playback while the ‘ctl’ option affects which card is used by control utilities like alsamixer.

Then adjust the sound by alsamixer

reference: https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture

ranger installation

……

Scripts

#get volume level
amixer -c 1 sget Master
# sound up
# sound down
# mute

© 2020 - 2024 Li Yuanhao's Blog

Powered by Hugo with theme Dream.

avatar

Li Yuanhao's BlogJust do it

Social Links