NEWM
NEWM is a Wayland compositor written with laptops and touchpads in mind. The idea is, instead of placing windows inside the small viewport (that is, the monitor) to arrange them along an arbitrarily large two-dimensional wall (generally without windows overlapping) and focus the compositors job on moving around along this wall efficiently and providing ways to the user to rearrange the wall such that he finds the overall layout intuitive.
Get NEWM From ko-fi
And Support Archcraft Development.
Installation
Follow the instructions below to install NEWM :
- Download newm.tar.gz file from ko-fi, and save it in a directory.
- Open a terminal in same directory and run the following command to extract the tar file :
$ tar -xzvf newm_YYYY-MM-DD.tar.gz
- Once the file is extracted, change to the extracted directory which should be
newm
- Install On Archcraft
- Install On Other Distributions
On Archcraft, You can simply install the provided packages in pkgs directory :
To install solid version :
$ sudo pacman -U archcraft-newm-X.Y-Z-any.pkg.tar.zst
To install blur version :
$ sudo pacman -U archcraft-newm-blur-X.Y-Z-any.pkg.tar.zst
If you want to install this setup on Arch Linux or on any other distro, follow the points below :
- Install the following programs on your Linux distro:
newm-atha
,wtype
alacritty
wlroots
wl-clipboard
waybar
wofi
foot
mako
grim
slurp
wf-recorder
light
yad
wlogout
thunar
geany
mpv
mpd
mpc
viewnior
imagemagick
xfce-polkit
xorg-xwayland
xdg-desktop-portal-wlr
playerctl
- After installing programs above, Create newm directory in
~/.config
$ mkdir -p ~/.config/newm
- To install solid style, Copy Everything from
dotfiles/solid
to~/.config/newm
$ cp -r ./dotfiles/solid/* ~/.config/newm/
- To install blur style, Copy Everything from
dotfiles/blur
to~/.config/newm
$ cp -r ./dotfiles/blur/* ~/.config/newm/
- To launch
Newm
properly on your system, install the additional files provided inshared
directory :
$ sudo install -Dm 755 dotfiles/shared/open-wl /usr/local/bin/open-wl
$ sudo install -Dm 755 dotfiles/shared/run_newm /usr/local/bin/run_newm
$ sudo install -Dm 755 dotfiles/shared/00-lock.sh /usr/lib/systemd/system-sleep/00-lock.sh
- Logout and login to your amazingly configured NEWM WC.
Install the fonts from
fonts
and GTK theme, icons and cursor fromgtk
directory for overall appearance.
NEWM comes pre-installed on Archcraft WSE
and Archcraft Prime
ISOs.
Configuration
NEWM is pre-configured in Archcraft. In this section, We'll see how the NEWM wayland compositor is configured, what tools and utilities are used to make it look and work like a complete desktop environment.
Config Structure
The configuration structure of NEWM in Archcraft looks something like this:
~/.config
└── newm : newm config directory
├── foot : terminal config
├── mako : notification daemon config
│ └── icons : notification icons
├── rofi : rofi config files
├── scripts : various scripts for functionality
├── wallpapers : wallpapers
├── waybar : statusbar config
├── wlogout : wlogout config
│ └── icons : session icons
├── wofi : launcher config
└── config.py : main config file for newm
Terminal
Foot is the default terminal. In the NEWM wayland compositor, foot is launched with an alternative config file. If you need to change anything, make sure you modify the config files in ~/.config/newm/foot
directory. These are the following config files you can modify to change the behaviour of your foot terminal:
~/.config/newm/foot/foot.ini
: Main configuration file
~/.config/newm/foot/colors.ini
: Colors configurations
~/.config/newm/foot/fonts.ini
: Fonts configurations
If you need any help with foot config, run :
man foot.ini
in terminal.
Notification
Mako is used as a notification daemon for notifications in NEWM. In the NEWM wayland compositor, mako is launched with an alternative config file, which is ~/.config/newm/mako/config
. So, If you need to modify anything, make sure you edit this file.
If you need any help with mako config, run :
man 5 mako
in terminal.
Wallpaper
If you want to change the wallpaper, Edit ~/.config/newm/config.py
script and add your wallpaper here :
background = {
##-- Apply selected wallpaper on each startup and config reload
#'path': os.environ['HOME'] + '/path/to/your/wallpapers',
##-- Apply random wallpaper on each startup and config reload
'path': os.environ["HOME"] + f"/path/to/your/wallpapers-directory/wallpaper-{random.randrange(1, 6)}.jpg",
'time_scale': 0.125,
'anim': True,
}
Statusbar
Waybar is used as the statusbar in Archcraft's NEWM wayland compositor.
The configurations for waybar can be found inside ~/.config/newm/waybar
. If you want to modify the waybar settings, or perhaps want to add/remove modules, then you need to edit the following files :
~/.config/newm/waybar/config
: Main config file
~/.config/newm/waybar/modules
: Modules config file
~/.config/newm/waybar/style.css
: CSS file for styling
~/.config/newm/waybar/colors.css
: CSS colors file
If you need any help with waybar config, run :
man waybar
Launchers and Applets
- Rofi
- Wofi
- Wlogout
Rofi is used for application launchers, command runner and various applets. To modify the rofi config, edit ~/.config/rofi/config.rasi
file.
If you need any help with rofi config, run :
man rofi
in terminal.
The scripts for rofi that are used in NEWM can be found it ~/.config/newm/scripts
directory. These are the following scripts that uses rofi to provide the launchers and applets in NEWM :
rofi_bluetooth
: bluetooth applet to quickly connect to BT devices
rofi_launcher
: an application launcher, cmd runner, file manager and task manager
rofi_music
: music applet, that controls MPD with mpc
rofi_network
: network manager applet
rofi_powermenu
: power menu, with confirmation dialog
rofi_runner
: quickly lets you run a command
rofi_screenshot
: screenshot applet that works with grim
If you want to modify any applet or perhaps want to extend the functionality of the applet, just edit these scripts.
The configuration of each script can be found inside ~/.config/newm/rofi
directory.
Let's say that you want to modify the looks of launcher, then you need to edit the ~/.config/newm/rofi/launcher.rasi
file. Same goes for every other applet, Edit the respective file in the same directory.
If you need any help with rofi theming, run :
man rofi-theme
in terminal.
To change the colors and fonts of the launchers and applets, Edit the ~/.config/newm/rofi/shared/colors.rasi
and ~/.config/newm/rofi/shared/fonts.rasi
files.
Alternatively, Wofi is used for application launcher and powermenu.
If you need any help with wofi config, run :
man 5 wofi
in terminal.
The scripts for wofi that are used in NEWM can be found it ~/.config/newm/scripts
directory. These are the following scripts that uses wofi to provide the launchers and powermenu applets in NEWM :
wofi_menu
: application launcher
wofi_powermenu
: power menu, with confirmation dialog
If you want to modify any applet or perhaps want to extend the functionality of the applet, just edit these scripts.
The configuration of wofi can be found inside ~/.config/newm/wofi
directory.
To change the colors and fonts of the launchers and applets, Edit the ~/.config/newm/wofi/style.css
file.
Wlogout, A Wayland logout menu is also configured for session management is NEWM.
Edit ~/.config/newm/scripts/wlogout
script to adjust the looks of wlogout. The configuration of wlogout can be found inside ~/.config/newm/wlogout
directory.
If you want to use wlogout instead of rofi and wofi, Edit the config file ~/.config/newm/config.py
and uncomment wlogout keybindings.
If you need any help with wlogout config, run :
man wlogout
in terminal.
By default, rofi is used as app launcher. But, If you want to use wofi instead of rofi, Edit the config file ~/.config/newm/config.py
and uncomment wofi keybindings (and, comment the rofi bindings).
wayland compositor
The main configuration file of NEWM is ~/.config/newm/config.py
. Edit this script for everything, from startup programs to input/output config to keybindings, etc.
If you need any help with newm configuration, visit : Newm Docs
Keybindings
Here's a list of some important keybinds you need to know for operating NEWM easily. If you want to view, modify or add new keybinds, Edit ~/.config/newm/config.py
file.
Applications
Keys | Action |
---|---|
super + Return | Open terminal |
super + shift + Return | Open floating terminal |
super + alt + Return | Open terminal with selected geometry |
super + F | Open file manager (thunar) |
super + E | Open text editor (geany) |
super + W | Open web browser (firefox) |
Menu and Applets
Keys | Action |
---|---|
alt + F1 | Open application launcher |
super + D | Open application launcher |
super + R | Open command runner |
super + N | Open network manager applet |
super + M | Open music applet |
super + X | Open powermenu applet |
super + S | Open screenshots applet |
super + B | Open bluetooth applet |
Hardware Keys
Keys | Action |
---|---|
Take screenshot | |
alt + Print | Take screenshot in 5 seconds delay |
shift + Print | Take screenshot in 10 seconds delay |
super + Print | Take screenshot of selected area |
XF86AudioRaiseVolume | Increase volume |
XF86AudioLowerVolume | Decrease volume |
XF86AudioMute | Toggle mute speakers |
XF86AudioMicMute | Toggle mute microphone |
XF86MonBrightnessUp | Increase display brightness |
XF86MonBrightnessDown | Decrease display brightness |
Window Management
Keys | Action |
---|---|
super | Toggle Overview |
super + C/Q | Close focued window |
super + Space | Toggle fullscreen mode |
super + shift + Space | Toggle floating mode |
super + S | Swap b/w overlapping views |
super + Equal | Increase Scale / Zoom in |
super + Minus | Decrease Scale / Zoom out |
super + Left | Change focus to the left view |
super + Right | Change focus to the right view |
super + Up | Change focus to the upper view |
super + Down | Change focus to the lower view |
super + shift + Left/Right/Up/Down | Move view to respective side |
super + ctrl + Left/Right/Up/Down | Resize view respectively |
Misc Keys
Keys | Action |
---|---|
super + P | Run colorpicker |
ctrl + alt + L | Trigger lockscreen |
super + shift + C | Reload newm config |
ctrl + alt + Delete | Quit NEWM |
Touchpad Gestures
Gesture | Action |
---|---|
super + move-1 | Move window |
super + swipe-2 | Resize window |
swipe-3 | Scroll among windows |
swipe-4 | Adjust scale |
Nvidia
If you're on Archcraft
and install the provided package, There's nothing else you need to do in order to run it on Nvidia machine. When you install Archcraft on a machine that has Nvidia, It does all the operations (mentioned below) required to run a wayland compositor on such machines. The compositor should work fine.
If you're running any other distribution and want to install this setup on your Nvidia machine, You need to do some tweaking. In this guide, I'm assuing you're using Arch Linux. Follow the steps below to make this wayland compositor work on Nvidia :
- Install Nvidia Dnewms on your system. NVIDIA
- Edit
/etc/mkinitcpio.conf
file and addnvidia
kernel modules
MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm"
- In the same file, Remove
kms
hook from hooks array if present. - Rebuild your initrd file with :
sudo mkinitcpio -P linux
- Edit
/etc/default/grub
file and addnvidia_drm.modeset=1
kernel parameter for Nvidia
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia_drm.modeset=1 ..."
- Update your grub config file with :
sudo grub-mkconfig -o /boot/grub/grub.cfg
- Reboot your Nvidia Machine and login to your wayland compositor, It should work now.
More Information: NVIDIA#Installation, NVIDIA#DRM_kernel_mode_setting
Screenshots
Desktop
Here's few screenshots of NEWM
desktop. These'll give you an idea of the experience of NEWM in Archcraft.
- Solid
- Blur
Desktop 1 | Desktop 2 | Desktop 3 | Desktop 4 | Desktop 5 |
---|---|---|---|---|
Desktop 6 | Desktop 7 | Desktop 8 | Desktop 9 | Desktop 10 |
---|---|---|---|---|
Desktop 11 | Desktop 12 |
---|---|
Desktop 1 | Desktop 2 | Desktop 3 | Desktop 4 | Desktop 5 |
---|---|---|---|---|
Desktop 6 | Desktop 7 | Desktop 8 | Desktop 9 | Desktop 10 |
---|---|---|---|---|
Checkout all the videos here : NEWM Playlist
Themes
There are two themes available for NEWM.
- Solid
- Blur
FAQs
How to update my config to new configs?
Download the updated package from ko-fi (for free) and just install it to update to new configs.
Steps to get updates (or re-download files):
- Login to you Ko-fi account
- Go to your
Ko-fi Payments History
- Select the purchases you've made
- Click on
View Details
- Then, Click on
View Content
to download the updated files.
Why my cursor is not visible?
When using certain graphics dnewms (e.g. the VMSVGA graphics controller or the proprietary NVIDIA dnewm), the cursor is invisible. This can be fixed by using software cursors :
$ export WLR_NO_HARDWARE_CURSORS=1
How to change GTK theme, icons and cursor?
To change GTK theme, icons and cursor in NEWM session, Edit ~/.config/newm/scripts/gtkthemes
script and restart NEWM to apply the changes.
THEME='Nordic'
ICONS='Qogir-Dark'
FONT='Noto Sans 9'
CURSOR='Qogirr-Dark'
How to manage multiple monitors and resolution in NEWM?
If you use multiple monitors with NEWM wayland compositor, you can manage them as follow:
- You can get the names of your outputs with
wlr-randr
- Edit
~/.config/newm/config.py
file and use the information you get by the command above:
outputs = [
##-- Laptop Display, Mode: 1920x1080, Scale: 1
{ 'name': 'eDP-1', 'scale': 1.0, 'width': 1920, 'height': 1080,
'mHz': 60, 'pos_x': 0, 'pos_y': 0 , 'anim': True },
##-- External Monitor, Mode: 1920x1080, Scale: 1.5, Position: Right of Laptop
{ 'name': 'HDMI-A-1', 'scale': 1.5, 'width': 1920, 'height': 1080,
'mHz': 60, 'pos_x': 1920, 'pos_y': 0 , 'anim': True },
]