After installing Arch Linux with suckless dwm window manager, some of the keys in your keyboard may stop working.
This requires the need to manually set up keybinds for your set up.
In order to get started, there are some packages that you need to install to set the keybinds.
The packages are
The commands to install these two packages for Arch are:
if you don't have yay installed, run this first
sudo pacman -Sy yay
or you can also build them from AUR, but I suggest using yay
yay -S xbindkeys xbindkeys_config-gtk2 xbindkeys -d > ~/.xbindkeysrc
This will create a file called .xbindkeysrc in your home directory which contains all your keybinds, but we will be using the GUI version instead.
If you want to not use the GUI version or if it is not working for you, check out the xbindkeys manual here
- Open the application called
xbindkeys_configeither from dmenu or from the terminal
- You will be prompted with a window such as:
- On the bottom bar, there are several options, select
Newwhich will open a panel to the left.
- There are several text boxes for each attribute. Name would contain the name of the keybind, Key will contain the keycode of the hardware keys and Action contains the command that will execute upon pressing the button.
Config for Volume Up:
- First write Volume Up in the name and then select
Get Keythat will pop up a blank window.
- Select the key combination for your keybind
- Next, put this command into the Action box
pactl set-sink-volume @DEFAULT_SINK@ +1%
You can change 1% to whatever value you want to increment the volume by.
- Lastly hit Save
Config for Volume Down:
- Same as Volume up except the Action command will be
pactl set-sink-volume @DEFAULT_SINK@ -1%
Config for Mute:
- To mute/unmute the Audio Output/Speaker/Headphone
pactl set-sink-mute @DEFAULT_SINK@ toggle
- To mute/unmute the Audio Input/Microphone
pactl set-source-mute @DEFAULT_SOURCE@ toggle
Config for Media Playback:
To set keybinds for pause/play or next/previous, you need to install
Run the command
yay -Sy playerctl in the terminal and you are good to go.
The Action Commands for Pause/Play:
The Action Commands for Previous Track:
The Action Commands for Next Track:
Once Done, Hit Save and Exit and lastly, in order for your keybinds to remain permanent after each boot, you must configure your .xinitrc in the directory
Use a text editor of your choice and add the following line: