Skip to content

MahdiMirzadeh/qbittorrent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

55 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Themes for qBittorrent

Left-to-right: solarized-light, gruvbox-light, solarized-dark, gruvbox-dark, dracula, dark

Curated color themes for qBittorrent, available for both the Qt desktop client and WebUI (qbittorrent-nox). Each theme ships in two formats:

  • Qt desktop client: .qbtheme bundle (v4.6.0+, Qt6)
  • WebUI: .tar.gz or .zip archive

๐Ÿ“ฆ Downloads

Theme Palette Qt Client WebUI
Dark Dark .qbtheme tar.gz ยท zip
Dracula Dracula .qbtheme tar.gz ยท zip
Gruvbox Dark Gruvbox Dark .qbtheme tar.gz ยท zip
Solarized Dark Solarized Dark .qbtheme tar.gz ยท zip
Gruvbox Light Gruvbox Light .qbtheme tar.gz ยท zip
Solarized Light Solarized Light .qbtheme tar.gz ยท zip

๐Ÿš€ Installation

WebUI (Alternative Web UI)

  1. Download a WebUI theme archive (.tar.gz or .zip) from the Downloads section
  2. Extract it to a directory:
    mkdir -p ~/.config/qbittorrent/webui
    tar -xzf webui-dracula.tar.gz -C ~/.config/qbittorrent/webui
  3. In qBittorrent:
    • Go to Tools โ†’ Options โ†’ Web UI
    • Enable "Use alternative Web UI"
    • Set "Files location" to the extracted folder (e.g., ~/.config/qbittorrent/webui/webui-dracula)
    • Click Save and reload the WebUI page

Troubleshooting: If you encounter "Unacceptable file type, only regular file is allowed", disable alternative UI via API:

curl "http://localhost:8080/api/v2/app/setPreferences?json=%7B%22alternative_webui_enabled%22:false%7D"

Qt Desktop Client

  1. Download a .qbtheme file from the Downloads section
  2. In qBittorrent:
    • Go to Tools โ†’ Options โ†’ Behavior โ†’ Interface
    • Under "Interface theme", click "..." and select the downloaded .qbtheme file
    • Click OK and restart qBittorrent

๐Ÿ› ๏ธ Build Locally

Prerequisites

  • jq โ€” JSON processor
  • rcc โ€” Qt Resource Compiler (Qt5 or Qt6)
  • zip โ€” (optional) for WebUI .zip archives
# Arch Linux
sudo pacman -S jq qt6-base

# Ubuntu/Debian
sudo apt install jq qtbase5-dev-tools

# macOS
brew install jq qt

Build Commands

# Build all themes
./gen.sh

# Build a single theme
./gen.sh themes/dracula.json

# Outputs:
# - qt/<theme>.qbtheme
# - webui/<theme>.tar.gz
# - webui/<theme>.zip (if zip is installed)

๐Ÿ“ธ Screenshots

Dark

Qt Client WebUI
qt dark webui dark

Dracula

Qt Client WebUI
qt dracula webui dracula

Gruvbox Dark

Qt Client WebUI
qt gruvbox-dark webui gruvbox-dark

Solarized Dark

Qt Client WebUI
qt solarized-dark webui solarized-dark

Gruvbox Light

Qt Client WebUI
qt gruvbox-light webui gruvbox-light

Solarized Light

Qt Client WebUI
qt solarized-light webui solarized-light

๐Ÿง‘โ€๐Ÿ’ป Development

Architecture

This repository contains:

.
โ”œโ”€โ”€ gen.sh              # POSIX-compliant build script
โ”œโ”€โ”€ themes/             # Theme definitions (JSON)
โ”‚   โ”œโ”€โ”€ dracula.json
โ”‚   โ”œโ”€โ”€ dark.json
โ”‚   โ””โ”€โ”€ ...
โ”œโ”€โ”€ template/
โ”‚   โ”œโ”€โ”€ qt/             # Qt client templates
โ”‚   โ”‚   โ”œโ”€โ”€ stylesheet.qss.template
โ”‚   โ”‚   โ”œโ”€โ”€ config.json.template
โ”‚   โ”‚   โ””โ”€โ”€ icons/
โ”‚   โ””โ”€โ”€ webui/          # WebUI base + theme override
โ”‚       โ”œโ”€โ”€ private/
โ”‚       โ”‚   โ””โ”€โ”€ css/
โ”‚       โ”‚       โ””โ”€โ”€ theme.css.template
โ”‚       โ””โ”€โ”€ ...
โ”œโ”€โ”€ qt/                 # Build output: .qbtheme files
โ””โ”€โ”€ webui/              # Build output: archives

Qt Client Themes

Overview

qBittorrent themes (supported since v4.2.2) are .qbtheme bundles โ€” Qt Resource Collection (RCC) files loaded at runtime. These bundles use the virtual path :/uitheme for all resources.

File Structure

A .qbtheme file must contain:

  • stylesheet.qss (required) โ€” Qt Style Sheet defining widget appearance
  • config.json (required, since v4.3.0) โ€” Color definitions for GUI elements
  • icons/ (optional, since v4.3.0) โ€” Custom icon overrides

stylesheet.qss โ€” Qt Style Sheets

Uses CSS-like syntax to style Qt widgets. Resources are referenced via :/uitheme prefix:

QPushButton {
    background: #282a36;
    border: 1px solid #44475a;
}

QCheckBox::indicator:checked {
    image: url(:/uitheme/icons/checkbox_checked.svg);
}

References:

config.json โ€” Color Definitions

Defines semantic colors used throughout qBittorrent's GUI. Accepts #rrggbb hex or Qt color names.

Supported color keys:

{
  "colors": {
    // Palette roles (Qt standard)
    "Palette.Window": "#282a36",
    "Palette.WindowText": "#f8f8f2",
    "Palette.Base": "#1e1f29",
    "Palette.AlternateBase": "#282a36",
    "Palette.Text": "#f8f8f2",
    "Palette.Button": "#44475a",
    "Palette.ButtonText": "#f8f8f2",
    "Palette.BrightText": "#ffffff",
    "Palette.Highlight": "#bd93f9",
    "Palette.HighlightedText": "#ffffff",
    "Palette.Link": "#8be9fd",
    "Palette.Light": "#6272a4",
    "Palette.Midlight": "#44475a",
    "Palette.Mid": "#383a59",
    "Palette.Dark": "#191a21",
    
    // Log colors
    "Log.TimeStamp": "#6272a4",
    "Log.Normal": "#f8f8f2",
    "Log.Info": "#8be9fd",
    "Log.Warning": "#ffb86c",
    "Log.Critical": "#ff5555",
    "Log.BannedPeer": "#ff79c6",
    
    // Transfer list state colors
    "TransferList.Downloading": "#50fa7b",
    "TransferList.StalledDownloading": "#f1fa8c",
    "TransferList.Uploading": "#bd93f9",
    "TransferList.StalledUploading": "#ffb86c",
    "TransferList.PausedDownloading": "#ff6e6e",
    "TransferList.PausedUploading": "#ff79c6",
    "TransferList.Error": "#ff5555",
    "TransferList.MissingFiles": "#ff5555"
  }
}

Custom Icons

Override default icons by including files matching qBittorrent's icon names in your theme:

icons/
โ”œโ”€โ”€ application-exit.svg
โ”œโ”€โ”€ edit-clear.svg
โ”œโ”€โ”€ folder-new.svg
โ””โ”€โ”€ ...

Reference in QSS as: url(:/uitheme/icons/your_icon.svg)

Our Build Process

  1. Reads color tokens from themes/<name>.json
  2. Substitutes placeholders in stylesheet.qss.template and config.json.template
  3. Compiles with Qt's rcc tool โ†’ qt/<name>.qbtheme

Version Compatibility

  • qBittorrent v4.6.0+ (Qt6) โ€” Fully supported
  • qBittorrent v4.3.0โ€“4.5.x (Qt5) โ€” Compatible with config.json colors
  • qBittorrent v4.2.2โ€“4.2.5 โ€” QSS only (no config.json)

Official Documentation: Create custom themes for qBittorrent

WebUI Themes

Overview

qBittorrent's WebUI (since v4.1.0) supports alternate WebUI implementations through external file directories. The architecture separates:

  • public/ โ€” Login/authentication pages
  • private/ โ€” Main WebUI functionality (requires authentication)

This separation enhances security and allows customization without modifying qBittorrent itself.

File Structure

An alternate WebUI must replicate qBittorrent's stock WebUI structure:

webui-mytheme/
โ”œโ”€โ”€ public/
โ”‚   โ”œโ”€โ”€ index.html          # Login page
โ”‚   โ”œโ”€โ”€ login.html
โ”‚   โ””โ”€โ”€ images/             # Icons for login
โ”œโ”€โ”€ private/
โ”‚   โ”œโ”€โ”€ index.html          # Main WebUI
โ”‚   โ”œโ”€โ”€ css/
โ”‚   โ”‚   โ”œโ”€โ”€ style.css
โ”‚   โ”‚   โ””โ”€โ”€ theme.css       # Our theme override
โ”‚   โ”œโ”€โ”€ scripts/
โ”‚   โ””โ”€โ”€ images/
โ”œโ”€โ”€ translations/
โ””โ”€โ”€ webui.qrc

Our Theming Approach

Instead of creating a full alternate WebUI, we extend the stock WebUI with a theme.css overlay:

  1. Copy the stock WebUI structure from template/webui/
  2. Add private/css/theme.css.template with CSS variables:
    :root {
        --bg-primary: %BG_PRIMARY%;
        --fg-primary: %FG_PRIMARY%;
        --accent: %ACCENT%;
        --status-downloading: %STATUS_DOWNLOADING%;
        /* ... */
    }
    
    /* Override stock styles */
    body { background: var(--bg-primary); color: var(--fg-primary); }
    .toolbar { background: var(--bg-secondary); }
  3. Load theme.css last in index.html to ensure overrides take precedence
  4. Render tokens from themes/<name>.json and pack as .tar.gz/.zip

Installation

Users extract the archive and configure qBittorrent:

  1. Tools โ†’ Options โ†’ Web UI
  2. Enable "Use alternative Web UI"
  3. Set "Files location" to the extracted directory
  4. Save and reload

Note: qbittorrent-nox requires regular files (no symlinks) due to security restrictions.

Customization

  • Colors: Edit theme.css.template CSS variables
  • Icons: Replace files in public/images/ and private/images/
  • Layout: Modify HTML/CSS in private/ (advanced)

Build Process

Our gen.sh script:

  1. Copies template/webui/ to temp directory
  2. Renders theme.css from theme.css.template using JSON color tokens
  3. Creates archives: webui/webui-<name>.tar.gz (and .zip)

Official Documentation: Developing alternate WebUIs

Creating a New Theme

  1. Create a theme definition:

    cp themes/dracula.json themes/mytheme.json
  2. Edit color tokens in themes/mytheme.json:

    {
      "name": "My Theme",
      "author": "Your Name",
      "description": "A beautiful custom theme",
      "colors": {
        "BG_PRIMARY": "#1e1e2e",
        "FG_PRIMARY": "#cdd6f4",
        "ACCENT": "#89b4fa",
        ...
      }
    }

    Required tokens: See existing themes for the full list of color keys.

  3. Build the theme:

    ./gen.sh themes/mytheme.json
  4. Output artifacts:

    • qt/mytheme.qbtheme
    • webui/mytheme.tar.gz
    • webui/mytheme.zip (if zip is installed)

โš™๏ธ Compatibility

  • qBittorrent v4.6.0+ (Qt6) โ€” Fully tested and supported
  • qBittorrent < v4.6.0 (Qt5) โ€” Generally compatible, minor rendering differences may occur
  • WebUI โ€” Works with all qBittorrent versions supporting alternative WebUI

๐Ÿค Contributing

Contributions are welcome! To add a new theme:

  1. Fork this repository
  2. Create a new theme JSON in themes/
  3. Test locally with ./gen.sh
  4. Submit a pull request

For bug reports or feature requests, please open an issue.

๐Ÿ“„ License

MIT License โ€” see LICENSE for details.

Theme generator and templates by Mahdi Mirzadeh. Built for the qBittorrent project.

About

๐ŸŽจ Curated color themes for qBittorrent, available for both the Qt desktop client and WebUI (qbittorrent-nox).

Topics

Resources

License

Stars

Watchers

Forks

Contributors

โšก