Brainitech/Brain_Shell
关于
Brain_Shell 是使用 Quickshell 和 QML 构建的动态、低干扰、模块化桌面 Shell,目前支持运行 Hyprland 的 Arch 和 NixOS
开发工具可以做什么
- Fluid Interface & Animations: A responsive UI that automatically scales to fit your monitor's resolution, smoother than a perfectly timed parry. Features configurable animation speeds and styles.
- Dynamic Theming & Presets: System colors automatically adapt to your active wallpaper, backed by 12 popular theme presets, independent color overrides, and an integrated color studio.
- Keyboard & GUI Driven: The best of both worlds. Full keyboard navigation when you want speed, and a clean GUI mouse based control for both situations.
- System Dashboard: A unified hub for quick settings, media controls, user profile access, and built-in time tools (alarms, timers, and stopwatches).
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- -1
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Brain_Shell
A dynamic, modular Wayland desktop shell built with Quickshell and QML. Currently built for Hyprland, with support for additional compositors planned.
Showcase
[!NOTE] v0.2.0 Release: This is a ground-up architecture overhaul. While far more stable than
v0.1.1, you may still encounter bugs. Please report them via GitHub Issues or Join our Discord.Platform Scope: Brain_Shell is currently built for Hyprland, and officially supported on Arch Linux and NixOS. Other distros may work, but aren't guaranteed yet. See Roadmap.
AI Assistance Notice: Certain elements of this project (like architectural planning, codebase audits, GitHub workflows, debugging, and large-scale cleanups) were developed with the assistance of AI tools.
License Notice: As of
v0.2.0, the project license has been migrated from MIT to the GNU Affero General Public License v3.0 (AGPLv3).
What's New
For a complete breakdown of new features, architectural improvements, and bug fixes in v0.2.2, see CHANGELOG.md or the GitHub Releases page.
Features
Fluid Interface & Animations: A responsive UI that automatically scales to fit your monitor's resolution, smoother than a perfectly timed parry. Features configurable animation speeds and styles.
Dynamic Theming & Presets: System colors automatically adapt to your active wallpaper, backed by 12 popular theme presets, independent color overrides, and an integrated color studio.
Keyboard & GUI Driven: The best of both worlds. Full keyboard navigation when you want speed, and a clean GUI mouse based control for both situations.
System Dashboard: A unified hub for quick settings, media controls, user profile access, and built-in time tools (alarms, timers, and stopwatches).
Performance Monitoring: Live resource tracking for CPU, RAM, battery, and temperatures. Includes dedicated fan and GPU controls for supported Nvidia devices.
Built-in Kanban Board: Desktop-integrated To-Do, Ongoing, and Completed task lists with support for customizable priority tags and deadlines.
Smart App Launcher: A fast, search-driven application menu that learns and prioritizes your most frequently used apps.
Interactive Notch: A sleek drop-down area at the top of your screen that houses quick media controls, an audio visualizer, and other handy, glanceable tools.
Live Settings Configuration: Adjust layout dimensions, visual behavior, and data preferences on the fly without restarting the shell. (More customization options are planned for future updates).
Screen Recording & Capture: Fully integrated screenshot and screen recording tools with support for region/window selection, audio inclusion, configurable FPS, and multiple encoding backends (wf-recorder, gpu-screen-recorder, wl-screenrec).
Intelligent Keybinds: A visual keybind editor equipped with live conflict detection to prevent overlapping shortcuts.
Connectivity Manager: A centralized menu to toggle and connect to Wi-Fi networks, Bluetooth devices, VPNs, and hotspot.
Audio & Media Hub: Quick input/output device switching and a full audio mixer, paired with clean on-screen displays (OSD) for volume and brightness.
Smart Notifications: Interactive desktop alerts featuring hover-to-pause and click-to-dismiss functionality.
Built-in Screen Capture: Native tools for taking screenshots and recording your screen, with options to select specific targets, framerates, and audio capture.
Clipboard History: A interactive clipboard manager fully integrated with keyboard navigation support.
Power Menu: A keyboard-optimized menu for executing shutdown, restart, lock, and sleep actions.
Workspace & Layout Management: Monitor Active workspaces and Switch Hyprland Layouts with a single Click.
Focus Mode: Hides the status bar to provide a clean, distraction-free screen.
Eye Care & Nightlight: Built-in screen color filters and a warm nightlight mode for low-light environments.
OS Branding: Displays a custom icon based on your operating system for a native, personalized feel.
Requirements
[!IMPORTANT] Matugen is required for dynamic color generation. Brain_Shell will not function correctly without it.
The dependencies below are for the currently supported compositor, Hyprland. Requirements for additional compositors will be documented as support for them lands - Have a look at the Roadmap.
Core Dependencies
Runtime & Rendering
- Hyprland v0.55+ - Wayland compositor
- quickshell - QML shell framework
- Qt6 - Qt6 libraries and QML engine
- qt6ct - Qt6 theme configuration
System Tools
- PipeWire - Audio server (pipewire, pipewire-pulse, wireplumber)
- NetworkManager - Network management
- BlueZ - Bluetooth stack (bluez, bluez-utils)
- Brightnessctl - Backlight control
- Mpris - Media Retrieval
- Playerctl - Player controls
- UPower - Battery and power info
- libnotify - Desktop notifications
- Polkit - Privilege escalation
- wl-clipboard - Wayland clipboard (wl-copy/wl-paste)
- xdg-user-dirs - Manage user directories
- util-linux - Standard Linux utilities
Theming & Wallpaper
- Matugen - Material You color generation (REQUIRED)
- awww - Wallpaper daemon (Wayland)
- ImageMagick - Image manipulation
Screen Capture & Utilities
- wf-recorder - Screen recording (Wayland, default backend)
- gpu-screen-recorder - Optional recording backend (GPU encoding)
- wl-screenrec - Optional recording backend (lightweight)
- grimblast - Screenshot utility (Wayland)
- cava - Audio visualizer
- slurp - Region/window selection
- wtype - Keyboard input emulation
- cliphist - Clipboard history manager
Hardware Management
- lm_sensors - CPU temperature & fan monitoring
- rfkill - Airplane mode control
- envycontrol - GPU switching (NVIDIA/Intel hybrid laptops)
- auto-cpufreq - CPU frequency scaling
- nbfc-linux - Laptop fan control
Hyprland Integration
- hyprlock - Lock screen
- hypridle - Idle management daemon
- hyprsunset - Blue light filter
- xdg-desktop-portal-hyprland - Portal backend
- xdg-desktop-portal-gtk - GTK Portal backend
- hyprpolkitagent - Polkit authentication agent
Fonts
- ttf-jetbrains-mono-nerd - Primary font (Nerd Font variant)
- ttf-noto-nerd - Emoji and CJK support
- ttf-nerd-fonts-symbols-common - Symbols support
Installation Commands (Manual)
[!IMPORTANT] Brain_Shell is a standalone shell designed to run on top of an existing compositor configuration. However, a default Hyprland template is provided for users setting up their environment directly from a TTY.
Arch Linux (yay / paru)
# 1. Core Official Repository Packages (42 essential dependencies)
sudo pacman -S --needed \
qt6-base qt6-declarative qt6-wayland qt6-multimedia qt6-5compat qt6ct \
pipewire pipewire-pulse wireplumber playerctl mpv-mpris mpd-mpris networkmanager \
bluez bluez-utils brightnessctl upower libnotify polkit kitty python \
wl-clipboard slurp xdg-user-dirs wf-recorder cava imagemagick awww matugen \
wtype lm_sensors util-linux rfkill hyprland hyprsunset hyprlock hyprpolkitagent \
hypridle xdg-desktop-portal-hyprland xdg-desktop-portal-gtk \
ttf-jetbrains-mono-nerd ttf-nerd-fonts-symbols-common cliphist
# 2. AUR Packages (using yay, replace with paru if preferred)
yay -S --needed quickshell-git grimblast-git
# 3. Optional Hardware Management & Tools (Install only if applicable)
# For Hybrid NVIDIA Laptops:
yay -S --needed envycontrol
# For Laptop Fan Control:
yay -S --needed nbfc-linux
# For Laptop Power Optimization:
yay -S --needed auto-cpufreq
Installation
[!WARNING] Notes for Existing Users
- If you installed Brain_Shell via the installer, v0.2.0 will be pulled in automatically through the auto-update mechanism, a manual reinstall is not required.
- That said, v0.2.0 includes breaking architectural and config changes. If you run into migration issues (or want a guaranteed clean slate), a full uninstall followed by a fresh install is recommended - Have a look at the Uninstallation below.
One line installer
[!TIP] Automated Setup: The installation script verifies system prerequisites, creates a timestamped backup of your Hyprland configuration in
~/.config/hypr/, installs dependencies via your package manager, and registers Brain_Shell in your autostart.
curl -fsSL https://raw.githubusercontent.com/Brainitech/Brain_Shell/refs/heads/main/install.sh | bash
The installer automatically:
- ✓ Detects your Linux distribution and window manager.
- ✓ Backs up your existing Hyprland configuration file.
- ✓ Installs all required dependencies.
- ✓ Clones the repository to
~/.local/src/Brain_Shell. - ✓ Updates your Hyprland config to auto-start Brain_Shell.
- ✓ Provides a default Hyprland template for users with no previous Hyprland install.
[!IMPORTANT] If you're on
OMARCHYthen disable theomarchy-shellstartup line located in/usr/share/omarchy/default/hypr/autostart.luaComment out the linehl.exec_cmd("omarchy-shell-launch")Failing to do this will interfere withBrain_Shell's Notification and Wallpaper Manager. The Installer should already do this if it detects Omarchy.
NixOS & Home Manager
Brain_Shell provides official, declarative NixOS and Home Manager flake modules. Dependencies, system services, fonts, and Hyprland integration are all configured automatically.
[!IMPORTANT] Brain_Shell requires nixos-unstable (or a recent nixpkgs snapshot). Stable channels may lack required packages such as
quickshellandawww.
NixOS System Module
The NixOS module enables system-level services (PipeWire, Bluetooth, Polkit, XDG portals), installs all runtime packages system-wide, and places brain-shell on $PATH.
1. Add Brain_Shell to your system flake (/etc/nixos/flake.nix):
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
brain-shell = {
url = "github:Brainitech/Brain_Shell?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, brain-shell, ... }: {
nixosConfigurations.hostname = nixpkgs.lib.nixosSystem {
modules = [
brain-shell.nixosModules.default
./configuration.nix
];
};
};
}
2. Enable the module in configuration.nix:
programs.brain-shell = {
enable = true;
# configFormat = "lua";
# The Hyprland config format Brain Shell should expect and generate files for.
# "lua" (Hyprland 0.55+) or "conf". Default: "lua".
};
3. Rebuild:
sudo nixos-rebuild switch --flake /etc/nixos/
After the rebuild, add the Brain_Shell autostart to your Hyprland config (see Hyprland Integration on NixOS below).
Home Manager Module
The Home Manager module handles user-level installation, fonts, and the systemd autostart service. It can also auto-inject Brain_Shell's layer rules and keybinds into your Hyprland config.
1. Add Brain_Shell to your Home Manager flake:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
brain-shell = {
url = "github:Brainitech/Brain_Shell?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, brain-shell, ... }: {
homeConfigurations.username = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
brain-shell.homeManagerModules.default
./home.nix
];
};
};
}
2. Enable in home.nix:
{ pkgs, ... }:
{
# Default Stuff
programs.brain-shell = {
enable = true;
# systemd.enable = false;
# Autostart Brain Shell via a systemd user service bound to graphical-session.target.
# Default: false. When false, an exec_cmd hook is injected into Hyprland instead.
# Set to true if you prefer systemd to manage the session.
# installDefaultHyprlandConfig = false;
# Deploys Brain_Shell's bundled Hyprland config template to ~/.config/hypr/.
# Useful for fresh Hyprland installs with no existing configuration.
# Default: false. WARNING: this overwrites existing hyprland.lua.
# hyprlandIntegration = {
# enable = true; # default
# format = "lua"; # "lua" or "conf" (default: "lua")
# };
# Writes ~/.config/hypr/lua.d/brain-shell.lua (or conf.d/brain-shell.conf)
# with layer rules and the dynamic keybind source line. Disable if you
# manage hyprland config yourself and want full control.
# terminal = "kitty";
# Terminal emulator used for nmtui and screenshot previews. Default: "kitty".
# extraPackages = [ ];
# Additional packages installed alongside Brain Shell in the user profile.
# Example: [ pkgs.gpu-screen-recorder pkgs.envycontrol ]
};
}
3. Switch your profile:
home-manager switch --flake ~/.config/home-manager/
Hyprland Integration on NixOS
If hyprlandIntegration.enable = true (default) in your Home Manager config, Brain_Shell drops its layer rules and keybinds right into ~/.config/hypr/lua.d/brain-shell.lua. No extra config needed.
If you manage your Hyprland configuration manually or prefer the system-level NixOS module, add the following snippets yourself:
For ~/.config/hypr/hyprland.lua (Lua format — Recommended for Hyprland 0.55+)
-- Brain Shell layer rules — required for correct rendering
hl.layer_rule({ match = { namespace = "^brain-shell.*" }, no_anim = true })
hl.layer_rule({ match = { namespace = "selection" }, no_anim = true, ignore_alpha = 1 })
-- Dynamic keybinds managed by Brain Shell's visual editor
local kb_path = os.getenv("HOME") .. "/.config/Brain_Shell/Brain_ShellKeybinds.lua"
local f = io.open(kb_path, "r")
if f then f:close(); dofile(kb_path) end
If Brain Shell is not started by systemd (i.e., systemd.enable = false or using the NixOS system module without Home Manager), also add the autostart hook:
hl.on("hyprland.start", function()
hl.exec_cmd("brain-shell")
end)
For ~/.config/hypr/hyprland.conf (Hyprlang format — Fallback option)
# Brain Shell layer rules — required for correct rendering
layerrule = noanim, ^(brain-shell.*)$
layerrule = noanim, selection
layerrule = ignorealpha 1, selection
# Dynamic keybinds managed by Brain Shell's visual editor
source = ~/.config/Brain_Shell/Brain_ShellKeybinds.conf
If Brain Shell is not started by systemd (i.e., systemd.enable = false or using the NixOS system module without Home Manager), also add:
exec-once = brain-shell
[!NOTE] Brain_Shell keeps its runtime state (
~/.config/Brain_Shell/src/user_data/,matugen/, keybindings) mutable and initializes it on first launch. This means you can still use the visual editor and tweak settings inside the shell, while Nix handles the core package and services.
Manual installation
git clone https://github.com/Brainitech/Brain_Shell.git
cd Brain_Shell
chmod +x install.sh
./install.sh
Starting the Shell Manually: If you choose to bypass the installer script entirely and configure the environment yourself, you must manually ensure the startup files are executed by your compositor.
- Make sure required dependencies are installed (see the Requirements section).
- Ensure the required
matugendirectory exists:mkdir -p ~/.config/Brain_Shell/matugen - Source the autostart file directly in your main Hyprland configuration.
For hyprland.lua, inject:
dofile(os.getenv("HOME") .. "/path/to/Brain_Shell/src/config/autostart/BrainShell-hyprland.lua")
For hyprland.conf, inject:
source = ~/path/to/Brain_Shell/src/config/autostart/BrainShell-hyprland.conf
After installation, restart Hyprland for changes to take effect. Or manually start the required background services:
awww-daemon & #if not running already
hypridle &
systemctl --user start hyprpolkitagent
wl-paste --type text --watch cliphist store &
wl-paste --type image --watch cliphist store &
hyprctl reload
qs -p ~/path/to/Brain_Shell &
Hardware Configuration (Optional)
If your setup utilizes hybrid graphics or laptop fan control, additional configuration is required after installing the optional packages:
Laptop Fan Control (nbfc-linux)
Enables real-time fan monitoring and quiet/auto/max profile switching in the Dashboard (FanPanel):
#Enable and start the background service:
sudo systemctl enable --now nbfc_service
#Find and apply your laptop's profile:**
# Search for recommended configurations matching your laptop model
nbfc config --recommend
# Apply the chosen model profile and start fan control
nbfc config -s "<Profile_Name>"
nbfc start
#Verify status:
nbfc status
[!IMPORTANT] If the above steps don't work, visit the official nbfc-linux's github page.
Hybrid GPU Switching (envycontrol)
Enables GPU power mode switching (Integrated, Hybrid, Dedicated) in the Dashboard (PowerPanel):
- Prerequisites: Laptops with hybrid NVIDIA graphics (NVIDIA Optimus) and an active polkit agent (e.g.,
hyprpolkitagent).[!WARNING] Behavior: Switching modes in the Dashboard triggers root authorization via
pkexecand automatically initiates a reboot to apply the necessary display manager and driver/kernel module changes. - Verify status manually:
sudo envycontrol --query
Getting Started & Keybindings
| Shortcut | Target Action | Description |
|---|---|---|
SUPER + D |
Dashboard | Open/close main dashboard hub (system stats, media, profile, clock) |
SUPER + Q |
App Launcher | Open search-driven application launcher |
SUPER + C |
Settings | Open shell customization and visual preferences panel |
SUPER + ESC |
Power Menu | Open session controls (shutdown, reboot, lock, logout) |
SUPER + V |
Clipboard | Open clipboard history manager |
SUPER + Z |
Kanban Board | Open desktop task management board |
CTRL + ESC |
Emergency Exit | Unfreeze keybindings and reset active Hyprland submap |
CLI Wrapper & IPC Integration
Command Line Interface (brain-shell)
When installed via NixOS or Home Manager, the brain-shell executable is available globally on your $PATH:
# Launch Brain Shell directly with bundled dependencies
brain-shell
# Send IPC toggle commands
brain-shell ipc call <TARGET> toggle
IPC Integration
Brain_Shell provides an IPC interface via Quickshell's IPC subsystem. You can trigger surfaces from Hyprland keybinds, scripts, or terminal commands:
NixOS / Home Manager:
brain-shell ipc call <TARGET> toggle
Arch Linux / Manual Installation:
qs ipc -p ~/.local/src/Brain_Shell call <TARGET> toggle
| IPC Target | Description |
|---|---|
dashboard-home |
Toggle main dashboard |
dashboard-stats |
Toggle dashboard stats |
dashboard-kanban |
Toggle dashboard kanban |
dashboard-launcher |
Toggle dashboard launcher |
dashboard-config |
Toggle dashboard config |
audioOut-toggle |
Toggle audio mixer output |
audioMix-toggle |
Toggle audio mixer |
audioIn-toggle |
Toggle audio mixer input |
wifi-toggle |
Toggle wifi network |
bluetooth-toggle |
Toggle bluetooth network |
vpn-toggle |
Toggle vpn network |
hotspot-toggle |
Toggle hotspot network |
notification-toggle |
Toggle notifications |
clipboard-toggle |
Toggle clipboard history |
wallpaper-toggle |
Toggle wallpaper menu |
PowerMenu-toggle |
Toggle power menu |
screenrec-on |
Toggle screen recording setup |
focus-toggle |
Toggle distraction-free focus mode |
lock-session |
Lock the session |
screenshot-toggle |
Toggle screenshot utility |
Uninstallation
Giving up already? YOU DIED. (Just kidding, here's how to safely remove it without losing your soul):
To completely remove Brain_Shell and restore your previous configuration:
Arch Linux / Manual Installation
# 1. Kill Currently Running Shell (if running)
pkill quickshell || pkill qs || true
# 2. Remove cloned repository and user configuration
rm -rf ~/.local/src/Brain_Shell
rm -rf ~/.config/Brain_Shell
# 3. Remove the Brain_Shell autostart line from your Hyprland configuration (hyprland.lua / hyprland.conf)
NixOS / Home Manager
- Remove
programs.brain-shell.enable = true;from your flake / system / Home Manager configuration. - Rebuild your system (
sudo nixos-rebuild switch --flake /etc/nixos/) or Home Manager profile (home-manager switch). - Optionally remove user configuration and state:
rm -rf ~/.config/Brain_Shell
Roadmap
Current (v0.2.2)
- Core shell framework
- System monitoring dashboard
- Keybind editor with live conflict detection
- Network management (WiFi, Bluetooth, VPN)
- Audio control panel
- Screen recording integration
- Clipboard manager
- Material You color integration
- Lua config generation
- Professional installer (Arch/NixOS)
- Auto-update mechanism with release-based updates
- Scaling on Different Screen Sizes
- Config Pages for Shell Customization
- App Launcher frecency-based sorting
- Unified popup configuration layer
- Notch Mini Player
- Home Manager Flake integration
Upcoming
Compositor & Distro Support
- niri support
- Sway support
- Other Compositor support
- Broader distribution support (Fedora, Debian/Ubuntu, openSUSE)
Customization & Ecosystem
- Advanced Customization Options
- Compositor-Specific GUI Settings
- Community themes
- Plugin/extension API for third-party widgets
- Additional theme presets
Tooling & Documentation
- CLI for Brain_Shell (
brain-shellwrapper with IPC forwarding) - Extended documentation site
- Onboarding guide
Known Issues
If you encounter an unlisted issue, capture debug output by running brain-shell (on NixOS) or qs -p ~/.local/src/Brain_Shell (on Arch Linux) in a terminal or inspecting systemd logs, then file a report on GitHub Issues.
- Keybind Conflict Detection Failure: The conflict detector may fail or incorrectly map binds in certain edge cases.
- Lua Keybind Resolution: Hyprland Lua keybinds that lack explicit descriptions are currently falling back and being read generically as the line number in the code.
- Context Aware Multi-Monitor Behavior: On a multi-monitor setup, the shell behaves the same on all monitors.
Contributing
Brain_Shell is actively developed and welcomes contributions!
- Found a bug? → Open an issue
- Have an idea? → Start a discussion
- Want to contribute? → Have a look at CONTRIBUTING.md
- Want to join the community? → Join Discord
Special Thanks
- Hyprland Community: For creating an exceptional Wayland compositor and fostering an amazing community
- Quickshell Contributors: For the powerful QML framework that powers this shell
- Matugen Team: For Material You color generation technology
- Wayland Project: For the modern display protocol foundation
- Caelestia Shell & AX-Shell: For the inspiration
- Dhruv Nair: For the pre-alpha testing and post-release loyalty.
- NotCandy001: For the installer
- SiriKedas: For the new architecture Idea and time.
- All the Testers & Contributors: For their time put into testing and suggesting fixes.
Brain_Shell has recently been Endorsed by theyh4t3-ashlxy. Menace of the Discord Server. They show up, vibe code, complain about the shell, aggressively support it anyway, and somehow keeps the server alive.
Brain Cells Collected
License
This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3) – see the LICENSE file for details.
探索相关项目
加载中…