Skip to content

Getting Started

This guide walks you through installing FG42, running it for the first time, and basic configuration.

Install Nix

FG42 requires Nix with flakes enabled. If you don't have Nix yet:

curl -L https://nixos.org/nix/install | sh

Then enable flakes by adding to ~/.config/nix/nix.conf:

experimental-features = nix-command flakes

Install FG42

Option 1: Direct install

nix profile install "git+https://git.sr.ht/~lxsameer/FG42#"

This adds fg42 and fg42-wm to your PATH.

Option 2: Try without installing

nix run "git+https://git.sr.ht/~lxsameer/FG42#"

See the Home Manager setup on the home page.

First Launch

Run FG42:

fg42

FG42 starts as a normal Emacs session with all configured modules loaded. You get syntax highlighting, completion, git integration, and language support out of the box.

Basic Usage

FG42 is Emacs — all standard Emacs keybindings and concepts apply. Here are some FG42-specific additions:

Key Action
C-x g Open Magit (git status)
C-c s Ripgrep search
C-- Embark act (contextual actions)
C-c TAB Toggle code folding
M-x fg42-describe-module Browse FG42 module docs
M-x fg42-describe-keybinding Search all keybindings

See the Keybinding Index for a complete list.

Configuration

User init file

Create ~/.config/fg42/init.el for personal tweaks:

;; Example: change font size
;; (set-face-attribute 'default nil :height 140)

;; Example: add a hook
;; (add-hook 'python-ts-mode-hook #'my-python-setup)

This file is loaded after all FG42 modules are initialized.

Nix-level configuration

For deeper changes (enabling/disabling modules, adding system dependencies), configure via Nix.

With Home Manager:

programs.fg42 = {
  enable = true;
  extraModules = [
    ({ ... }: {
      # Disable modules you don't need
      fg42.dart.enable = false;
      fg42.verilog.enable = false;

      # Configure options
      fg42.organize.org-dir = "~/notes";
    })
  ];
};

With a direct build, create your own flake that imports FG42 and adds custom modules.

Window Manager Mode

FG42 can run as a full X11 window manager using EXWM:

fg42-wm

Or select "FG42" from your display manager's session list.

In WM mode, s- (Super key) keybindings manage workspaces:

Key Action
s-0 to s-9 Switch to workspace
s-w Switch workspace interactively
s-d Launch application
s-r Reset to line mode

Next Steps