Dwm: Difference between revisions
Guest09248 (talk | contribs) |
(dwm is also in the official repository, no need to compile it every time) |
||
(17 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
[https://dwm.suckless.org/ dwm] is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts. | [https://dwm.suckless.org/ dwm] is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts. | ||
This guide covers: | This guide covers: | ||
* Installing dependencies for the [https://suckless.org suckless] tools and installing firefox | * Installing dependencies for the [https://suckless.org suckless] tools and installing firefox | ||
* Installing from source dwm (dynamic window manager), dmenu (dynamic menu), st (simple terminal) | * Installing from source or from repository dwm (dynamic window manager), dmenu (dynamic menu), st (simple terminal) | ||
* Configuring the new profile to run dwm at login. | * Configuring the new profile to run dwm at login. | ||
<br> | |||
== | = Prerequisites = | ||
* [[Installation|Install]] AlpineLinux | |||
* [[Setting_up_a_new_user#Creating_a_new_user|Create a user account]] (optional but recommended) | |||
* [[Repositories#Enabling_the_community_repository|Enable the Community repository]] | |||
* [[Alpine_setup_scripts#setup-xorg-base|Install Xorg]] | |||
<br> | |||
== Installing from binary repository == | |||
{{Cmd|# apk add dwm dmenu st}} | |||
{{ | |||
This will install {{Pkg|dwm}}, {{Pkg|dmenu}} and {{Pkg|st}} | |||
{{ | |||
== Installing | == Installing from source == | ||
= | === Installing dependencies === | ||
== Installing dependencies == | |||
{{Note| | {{Note| | ||
'''git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses''' is needed to install suckless tools from source. | '''git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses''' is needed to install suckless tools from source. | ||
Line 62: | Line 33: | ||
The command to install the dependencies: | The command to install the dependencies: | ||
{{cmd|# | {{cmd|# apk add git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses dbus-x11 firefox-esr adwaita-gtk2-theme adwaita-icon-theme ttf-dejavu}} | ||
== Installing suckless tools dwm, dmenu, and st from source == | === Installing suckless tools dwm, dmenu, and st from source === | ||
Change to the /tmp directory. {{cmd| | Change to the /tmp directory. {{cmd|$ cd /tmp}} then execute: | ||
{{cmd|# git clone https://git.suckless.org/dwm}} | {{cmd|# git clone https://git.suckless.org/dwm}} | ||
Once downloaded, go to the dwm directory {{cmd|# cd dwm}} | Once downloaded, go to the dwm directory {{cmd|# cd dwm}} | ||
To install, run: | To install, run: | ||
{{cmd|# | {{cmd|# make clean install}} | ||
Next, go up one directory level {{cmd|# cd ..}} to install dmenu: | Next, go up one directory level {{cmd|# cd ..}} to install dmenu: | ||
{{cmd|# git clone https://git.suckless.org/dmenu}} | {{cmd|# git clone https://git.suckless.org/dmenu}} | ||
{{cmd|# cd dmenu}} | {{cmd|# cd dmenu}} | ||
{{cmd|# | {{cmd|# make clean install}} | ||
Finally, go up one more directory level {{cmd|# cd ..}} to install st: | Finally, go up one more directory level {{cmd|# cd ..}} to install st: | ||
{{cmd|# git clone https://git.suckless.org/st}} | {{cmd|# git clone https://git.suckless.org/st}} | ||
{{cmd|# cd st}} | {{cmd|# cd st}} | ||
{{cmd|# | {{cmd|# make clean install}} | ||
== Setting up your profile == | == Setting up your profile == | ||
Change to your home directory: | Change to your home directory: | ||
{{cmd| | {{cmd|$ cd /home/<yourusername>}} | ||
Create .xinitrc: | Create .xinitrc: | ||
{{cmd| | {{cmd|$ vi .xinitrc}} | ||
Add this line: | Add this line: | ||
{{cat|~/.xinitrc| | {{cat|~/.xinitrc|exec dwm}} | ||
exec dwm}} | |||
Save the file and exit vi. | Save the file and exit vi. | ||
Next, create .profile.: | Next, create .profile.: | ||
{{cmd| | {{cmd|$ vi .profile}} | ||
Add this line: | Add this line: | ||
{{cat|~/.profile| | {{cat|~/.profile|startx}} | ||
startx}} | |||
{{Note|If you install additional programs that call your `$SHELL` with the POSIX `-l` login flag, you'll need to make launching `startx` conditional, otherwise X will attempt to launch every time your shell is called with the login flag. | {{Note|If you install additional programs that call your `$SHELL` with the POSIX `-l` login flag, you'll need to make launching `startx` conditional, otherwise X will attempt to launch every time your shell is called with the login flag. | ||
{{cat|~/.profile| | {{cat|~/.profile|if [ -z $DISPLAY ] && [ $(tty) {{=}} /dev/tty1 ]; then | ||
if | |||
startx | startx | ||
fi | fi | ||
Line 105: | Line 74: | ||
Press alt+p to launch dmenu. Type firefox then press enter. Firefox will load and run in tile 9. | Press alt+p to launch dmenu. Type firefox then press enter. Firefox will load and run in tile 9. | ||
= = | = See Also = | ||
* https://pkgs.alpinelinux.org/contents?file=dwm | * https://pkgs.alpinelinux.org/contents?file=dwm | ||
* [https://wiki.gentoo.org/wiki/Dwm "dwm is only a single binary, and its source code is intended to never exceed 2000 SLOC. dwm is customized through editing its source code"] | * [https://wiki.gentoo.org/wiki/Dwm "dwm is only a single binary, and its source code is intended to never exceed 2000 SLOC. dwm is customized through editing its source code"] | ||
* [[ | * [[AwesomeWM]] | ||
* [[Raspberry Pi 3 - Browser Client]] - A guide which omits dwm, but uses similar steps to install firefox in a diskless install on ARM. dwm is not used on the RPI3, due to tmpfs limitations. | * [[Raspberry Pi 3 - Browser Client]] - A guide which omits dwm, but uses similar steps to install firefox in a diskless install on ARM. dwm is not used on the RPI3, due to tmpfs limitations. | ||
[[ | [[Category:Desktop]] |
Revision as of 16:34, 8 September 2022
dwm is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts.
This guide covers:
- Installing dependencies for the suckless tools and installing firefox
- Installing from source or from repository dwm (dynamic window manager), dmenu (dynamic menu), st (simple terminal)
- Configuring the new profile to run dwm at login.
Prerequisites
- Install AlpineLinux
- Create a user account (optional but recommended)
- Enable the Community repository
- Install Xorg
Installing from binary repository
# apk add dwm dmenu st
This will install dwm, dmenu and st
Installing from source
Installing dependencies
git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses is needed to install suckless tools from source.
dbus-x11 is needed for the dbus system (enables firefox running in dwm to open in a tile)
The last three adwaita-gtk2-theme adwaita-icon-theme ttf-dejavu are optional, but recommended for a nicer looking firefox.The command to install the dependencies:
# apk add git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses dbus-x11 firefox-esr adwaita-gtk2-theme adwaita-icon-theme ttf-dejavu
Change to the /tmp directory.
$ cd /tmp
then execute:
# git clone https://git.suckless.org/dwm
Once downloaded, go to the dwm directory
# cd dwm
To install, run:
# make clean install
Next, go up one directory level
# cd ..
to install dmenu:
# git clone https://git.suckless.org/dmenu
# cd dmenu
# make clean install
Finally, go up one more directory level
# cd ..
to install st:
# git clone https://git.suckless.org/st
# cd st
# make clean install
Setting up your profile
Change to your home directory:
$ cd /home/<yourusername>
Create .xinitrc:
$ vi .xinitrc
Add this line:
Contents of ~/.xinitrc
Save the file and exit vi.
Next, create .profile.:
$ vi .profile
Add this line:
Contents of ~/.profile
Contents of ~/.profile
Log out or reboot. dwm will run the next time you log in. Press alt+p to launch dmenu. Type firefox then press enter. Firefox will load and run in tile 9.
See Also
- https://pkgs.alpinelinux.org/contents?file=dwm
- "dwm is only a single binary, and its source code is intended to never exceed 2000 SLOC. dwm is customized through editing its source code"
- AwesomeWM
- Raspberry Pi 3 - Browser Client - A guide which omits dwm, but uses similar steps to install firefox in a diskless install on ARM. dwm is not used on the RPI3, due to tmpfs limitations.