Installation#
git clone https://git.suckless.org/dwm
cd dwm
sudo make clean install
Startup#
If you already have sddm, you can use sudo systemctl disable sddm.service
to disable it. If you don't want to use it anymore, you can use sudo systemctl enable sddm.service
to enable sddm.
# Prepare configuration file
cp /etc/X11/xinit/xinitrc ~/.xinitrc
vim ~/.xinitrc
# Add
exec dwm
# Comment out
#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login
Then restart and call startx
.
Issues Encountered#
Network Disconnection#
Use NetworkManager for connection, you may need to use dhcpcd
.
nmcli device wifi list
nmcli device wifi connect {{wifi name}} password {{pwd}}
If the connection fails, you can try nmcli connection show
to see if there is any previous connection information. You can use nmcli connection delete {{wifi name}}
to delete the corresponding information.
Input Method Failure#
Add configuration file
vim ~/.pam_environment
INPUT_METHOD DEFAULT=fcitx5
GTK_IM_MODULE DEFAULT=fcitx5
QT_IM_MODULE DEFAULT=fcitx5
XMODIFIERS DEFAULT=@im=fcitx5
Add startup command
vim ~/.xinitrc1
# Add before exec dwm
exec fcitx5 &
Ineffective Extended Screen#
# You can first check which screens are available
xrandr
#
# Add the following command to ~/.xinitrc1, before exec dwm
# I have two screens, one above the other, so I use below. There are also left and right for other configurations.
xrandr --output eDP-1-1 --auto --below HDMI-0
Common Shortcuts#
You can refer to my configuration: https://github.com/fzdwx/dwm
MOD
-> WIN
Shortcut | Description |
---|---|
MOD+SHIFT+ENTER | Open a new terminal |
Switch Focused Window within the Current Tag#
Shortcut | Description |
---|---|
ALT + tab | Switch focused window |
MOD + up | Switch focused window |
MOD + down | Switch focused window |
Cross-Tag Operations#
Shortcut | Description |
---|---|
MOD + left / right | Switch tag |
MOD + SHIGT + left / tight | Move current window to another tag |
MOD + a | Show all tags / Jump to focused window |
Window Operations#
Shortcut | Description |
---|---|
MOD + q | Quit window |
MOD + h | Hide window |
MOD + SHIFT + h | Show window (like a stack) |
MOD + ENTER | Set current window as master |
MOD + f | Toggle fullscreen for current window |
MOD + CTRL + arrow key | Move window |
MOD + ALT + arrow key | Adjust window size |
MOD + o | Show only current window / Show all windows |
MOD + t | Toggle floating mode for focused window |
MOD + SHIFT + t | Toggle floating mode for all windows |
| MOD + SHIFT + f
| Toggle status bar |
Screen Switching#
Shortcut | Description |
---|---|
MOD + x | Move mouse to another screen |
MOD + SHIFT + X | Move current window to another screen |
Updates#
Clickable Status Bar#
Recently, I followed the configuration of a master yaocccc, which has a clickable status bar.
The main idea is to parse the signal
based on the predefined format, and then call the predefined script file (commit).
It is also easy to extend. You can refer to my fm. update
constructs the content to be returned, and click
is the method called when clicked. wezterm start --class float ranger
in my case starts wezterm and calls ranger.