A Minimal Windows Terminal: CMD + Clink + XDG

Writing

Windows Terminal + Scoop + Clink + fzf + fd + zoxide + fastfetch.

A CMD-based setup with XDG-style directories and the Maple Mono font, without PowerShell, WSL, or Starship.

1. Install the tools

Prerequisite: Scoop is already installed.

scoop install clink fzf fd zoxide fastfetch

2. Set environment variables

Run the following in CMD:

setx HOME "%USERPROFILE%"
setx XDG_CONFIG_HOME "%USERPROFILE%\.config"
setx XDG_DATA_HOME "%USERPROFILE%\.local\share"
setx XDG_STATE_HOME "%USERPROFILE%\.local\state"
setx XDG_CACHE_HOME "%USERPROFILE%\.cache"

Close all Windows Terminal windows, then reopen the application.

Create the directories:

mkdir "%XDG_CONFIG_HOME%\clink\scripts"
mkdir "%XDG_CONFIG_HOME%\fastfetch"
mkdir "%XDG_DATA_HOME%\zoxide"
mkdir "%XDG_STATE_HOME%\clink"
mkdir "%XDG_CACHE_HOME%"

clink-fzf:

curl.exe -fL "https://raw.githubusercontent.com/chrisant996/clink-fzf/main/fzf.lua" -o "%XDG_CONFIG_HOME%\clink\scripts\fzf.lua"

clink-zoxide:

curl.exe -fL "https://raw.githubusercontent.com/shunsambongi/clink-zoxide/master/zoxide.lua" -o "%XDG_CONFIG_HOME%\clink\scripts\zoxide.lua"

Open the file:

notepad "%XDG_CONFIG_HOME%\clink\start.cmd"

Paste the following and save:

@echo off

rem XDG / Clink
set "CLINK_PROFILE=%XDG_STATE_HOME%\clink"
set "CLINK_SETTINGS=%XDG_CONFIG_HOME%\clink"
set "CLINK_INPUTRC=%XDG_CONFIG_HOME%\clink\.inputrc"

rem zoxide
set "_ZO_DATA_DIR=%XDG_DATA_HOME%\zoxide"

rem fzf + fd
set "FZF_DEFAULT_OPTS=--height=70%% --layout=reverse --border=rounded --info=inline --cycle"
set "FZF_DEFAULT_COMMAND=fd --type f --hidden --exclude .git --exclude node_modules"
set "FZF_CTRL_T_COMMAND=fd --type f --hidden --exclude .git --exclude node_modules"
set "FZF_ALT_C_COMMAND=fd --type d --hidden --exclude .git --exclude node_modules"

rem fastfetch
fastfetch --config "%XDG_CONFIG_HOME%\fastfetch\config.jsonc"

rem Clink
clink inject --quiet --profile "%CLINK_PROFILE%" --scripts "%XDG_CONFIG_HOME%\clink\scripts"

5. Use a minimal prompt

Open:

notepad "%XDG_CONFIG_HOME%\clink\scripts\prompt.lua"

Paste the following and save:

local prompt = clink.promptfilter(50)

function prompt:filter()
    return "\27[90m" .. clink.get_cwd()
        .. "\27[0m\n\27[32m❯\27[0m ", false
end

The result:

C:\Users\Neo\Projects
❯

A gray path and a green prompt symbol, with no additional theme dependency.

6. Keep fastfetch minimal

Open:

notepad "%XDG_CONFIG_HOME%\fastfetch\config.jsonc"

Paste the following and save:

{
    "logo": {
        "type": "none"
    },
    "display": {
        "separator": "  ",
        "key": {
            "width": 9
        }
    },
    "modules": [
        "os",
        "kernel",
        "uptime",
        "cpu",
        "memory"
    ]
}

No logo or color blocks—just five pieces of system information.

7. Add a Windows Terminal profile

Open Windows Terminal and press Ctrl+, to open Settings.

  1. Select Add a new profile, then duplicate Command Prompt.
  2. Set the name to CMD + Clink.
  3. Set the command line to:
cmd.exe /d /k "%USERPROFILE%\.config\clink\start.cmd"
  1. Set the starting directory to %USERPROFILE%.
  2. Set the font to Maple Mono.
  3. Set the font size to 11.
  4. Save the profile and make it the default.

There is no need to edit Windows Terminal’s JSON configuration.

Open a new CMD + Clink session and run:

clink set prompt.spacing compact
clink set fzf.default_bindings true
clink set zoxide.hook pwd
clink set history.max_lines 10000
clink set clink.colorize_input true

prompt.spacing compact removes the extra blank line before the prompt.

Reopen the terminal.

9. Keyboard shortcuts and commands

Shortcut or commandAction
Ctrl+TSearch for files with fd + fzf
Ctrl+RSearch command history with fzf
Alt+CSelect a directory with fd + fzf
z fooJump to a directory with zoxide
ziSelect a directory interactively with zoxide + fzf

10. Verify the setup

clink info
clink set prompt.spacing
clink set fzf.default_bindings
clink set zoxide.hook
zoxide query --list

Check fastfetch:

fastfetch --config "%XDG_CONFIG_HOME%\fastfetch\config.jsonc"

11. Final directory structure

%USERPROFILE%\
├── .config\
│   ├── clink\
│   │   ├── start.cmd
│   │   ├── clink_settings
│   │   └── scripts\
│   │       ├── fzf.lua
│   │       ├── zoxide.lua
│   │       └── prompt.lua
│   └── fastfetch\
│       └── config.jsonc
├── .local\
│   ├── share\
│   │   └── zoxide\
│   └── state\
│       └── clink\
├── .cache\
└── scoop\

Only three files need ongoing maintenance:

  • start.cmd: environment variables and the startup sequence.
  • prompt.lua: the terminal prompt.
  • fastfetch/config.jsonc: the system information display.

Configuration lives in XDG-style directories, Scoop handles program updates, and Windows Terminal launches the session.

← Back to writing