mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
theme revisions
This commit is contained in:
@@ -14,6 +14,8 @@ Singleton {
|
|||||||
|
|
||||||
readonly property string _homeUrl: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
readonly property string _homeUrl: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
||||||
readonly property string homeDir: _homeUrl.startsWith("file://") ? _homeUrl.substring(7) : _homeUrl
|
readonly property string homeDir: _homeUrl.startsWith("file://") ? _homeUrl.substring(7) : _homeUrl
|
||||||
|
readonly property string _configUrl: StandardPaths.writableLocation(StandardPaths.ConfigLocation)
|
||||||
|
readonly property string configDir: _configUrl.startsWith("file://") ? _configUrl.substring(7) : _configUrl
|
||||||
readonly property string shellDir: Qt.resolvedUrl(".").toString().replace("file://", "").replace("/Common/", "")
|
readonly property string shellDir: Qt.resolvedUrl(".").toString().replace("file://", "").replace("/Common/", "")
|
||||||
readonly property string wallpaperPath: Prefs.wallpaperPath
|
readonly property string wallpaperPath: Prefs.wallpaperPath
|
||||||
property bool matugenAvailable: false
|
property bool matugenAvailable: false
|
||||||
@@ -301,7 +303,7 @@ palette = 15=${fg_b}`;
|
|||||||
console.log("Qt theming enabled:", qtTheming);
|
console.log("Qt theming enabled:", qtTheming);
|
||||||
|
|
||||||
systemThemeGenerationInProgress = true;
|
systemThemeGenerationInProgress = true;
|
||||||
systemThemeGenerator.command = [shellDir + "/generate-themes.sh", wallpaperPath, shellDir, homeDir, "generate", isLight, iconTheme, gtkTheming, qtTheming];
|
systemThemeGenerator.command = [shellDir + "/generate-themes.sh", wallpaperPath, shellDir, configDir, "generate", isLight, iconTheme, gtkTheming, qtTheming];
|
||||||
systemThemeGenerator.running = true;
|
systemThemeGenerator.running = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,7 +337,7 @@ palette = 15=${fg_b}`;
|
|||||||
console.log("GTK theming enabled:", gtkTheming);
|
console.log("GTK theming enabled:", gtkTheming);
|
||||||
console.log("Qt theming enabled:", qtTheming);
|
console.log("Qt theming enabled:", qtTheming);
|
||||||
|
|
||||||
systemThemeRestoreProcess.command = [shellDir + "/generate-themes.sh", "", shellDir, homeDir, "restore", isLight, iconTheme, gtkTheming, qtTheming];
|
systemThemeRestoreProcess.command = [shellDir + "/generate-themes.sh", "", shellDir, configDir, "restore", isLight, iconTheme, gtkTheming, qtTheming];
|
||||||
systemThemeRestoreProcess.running = true;
|
systemThemeRestoreProcess.running = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,7 +367,7 @@ palette = 15=${fg_b}`;
|
|||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: gtkAvailabilityChecker
|
id: gtkAvailabilityChecker
|
||||||
command: ["bash", "-c", "command -v gsettings >/dev/null && [ -d ~/.config/gtk-3.0 -o -d ~/.config/gtk-4.0 ]"]
|
command: ["bash", "-c", "command -v gsettings >/dev/null && [ -d " + configDir + "/gtk-3.0 -o -d " + configDir + "/gtk-4.0 ]"]
|
||||||
running: false
|
running: false
|
||||||
onExited: (exitCode) => {
|
onExited: (exitCode) => {
|
||||||
gtkThemingEnabled = (exitCode === 0);
|
gtkThemingEnabled = (exitCode === 0);
|
||||||
@@ -406,10 +408,6 @@ palette = 15=${fg_b}`;
|
|||||||
if (exitCode === 0) {
|
if (exitCode === 0) {
|
||||||
console.log("System themes generated successfully");
|
console.log("System themes generated successfully");
|
||||||
console.log("stdout:", systemThemeStdout.text);
|
console.log("stdout:", systemThemeStdout.text);
|
||||||
|
|
||||||
// GTK theme application is now handled by the simplified generate-themes.sh script
|
|
||||||
|
|
||||||
ToastService.showInfo("System themes updated successfully");
|
|
||||||
} else {
|
} else {
|
||||||
console.error("System theme generation failed, exit code:", exitCode);
|
console.error("System theme generation failed, exit code:", exitCode);
|
||||||
console.error("stdout:", systemThemeStdout.text);
|
console.error("stdout:", systemThemeStdout.text);
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ Singleton {
|
|||||||
readonly property string defaultMonoFontFamily: "Fira Code"
|
readonly property string defaultMonoFontFamily: "Fira Code"
|
||||||
|
|
||||||
readonly property string _homeUrl: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
readonly property string _homeUrl: StandardPaths.writableLocation(StandardPaths.HomeLocation)
|
||||||
|
readonly property string _configUrl: StandardPaths.writableLocation(StandardPaths.ConfigLocation)
|
||||||
|
readonly property string _configDir: _configUrl.startsWith("file://") ? _configUrl.substring(7) : _configUrl
|
||||||
|
|
||||||
Timer {
|
Timer {
|
||||||
id: fontCheckTimer
|
id: fontCheckTimer
|
||||||
@@ -433,10 +435,10 @@ Singleton {
|
|||||||
"fi\n" +
|
"fi\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"# Ensure config directories exist\n" +
|
"# Ensure config directories exist\n" +
|
||||||
"mkdir -p ~/.config/gtk-3.0 ~/.config/gtk-4.0\n" +
|
"mkdir -p " + _configDir + "/gtk-3.0 " + _configDir + "/gtk-4.0\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"# Update settings.ini files (keep existing gtk-theme-name)\n" +
|
"# Update settings.ini files (keep existing gtk-theme-name)\n" +
|
||||||
"for config_dir in ~/.config/gtk-3.0 ~/.config/gtk-4.0; do\n" +
|
"for config_dir in " + _configDir + "/gtk-3.0 " + _configDir + "/gtk-4.0; do\n" +
|
||||||
" settings_file=\"$config_dir/settings.ini\"\n" +
|
" settings_file=\"$config_dir/settings.ini\"\n" +
|
||||||
" if [ -f \"$settings_file\" ]; then\n" +
|
" if [ -f \"$settings_file\" ]; then\n" +
|
||||||
" # Update existing icon-theme-name line or add it\n" +
|
" # Update existing icon-theme-name line or add it\n" +
|
||||||
@@ -485,9 +487,9 @@ Singleton {
|
|||||||
" ' \"$config_file\" > \"$config_file.tmp\" && mv \"$config_file.tmp\" \"$config_file\"\n" +
|
" ' \"$config_file\" > \"$config_file.tmp\" && mv \"$config_file.tmp\" \"$config_file\"\n" +
|
||||||
" fi\n" +
|
" fi\n" +
|
||||||
"}\n" +
|
"}\n" +
|
||||||
"remove_icon_theme " + home + "/.config/qt5ct/qt5ct.conf\n" +
|
"remove_icon_theme " + _configDir + "/qt5ct/qt5ct.conf\n" +
|
||||||
"remove_icon_theme " + home + "/.config/qt6ct/qt6ct.conf\n" +
|
"remove_icon_theme " + _configDir + "/qt6ct/qt6ct.conf\n" +
|
||||||
"rm -f " + home + "/.config/environment.d/95-qtct.conf 2>/dev/null || true\n" +
|
"rm -f " + _configDir + "/environment.d/95-qtct.conf 2>/dev/null || true\n" +
|
||||||
"systemctl --user import-environment --unset=QT_QPA_PLATFORMTHEME --unset=QT_QPA_PLATFORMTHEME_QT6 2>/dev/null || true\n" +
|
"systemctl --user import-environment --unset=QT_QPA_PLATFORMTHEME --unset=QT_QPA_PLATFORMTHEME_QT6 2>/dev/null || true\n" +
|
||||||
"dbus-update-activation-environment --systemd QT_QPA_PLATFORMTHEME= QT_QPA_PLATFORMTHEME_QT6= 2>/dev/null || true\n" +
|
"dbus-update-activation-environment --systemd QT_QPA_PLATFORMTHEME= QT_QPA_PLATFORMTHEME_QT6= 2>/dev/null || true\n" +
|
||||||
"rm -rf " + home + "/.cache/icon-cache " + home + "/.cache/thumbnails 2>/dev/null || true\n";
|
"rm -rf " + home + "/.cache/icon-cache " + home + "/.cache/thumbnails 2>/dev/null || true\n";
|
||||||
@@ -497,7 +499,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var script =
|
var script =
|
||||||
"mkdir -p " + home + "/.config/qt5ct " + home + "/.config/qt6ct " + home + "/.config/environment.d 2>/dev/null || true\n" +
|
"mkdir -p " + _configDir + "/qt5ct " + _configDir + "/qt6ct " + _configDir + "/environment.d 2>/dev/null || true\n" +
|
||||||
"update_qt_config() {\n" +
|
"update_qt_config() {\n" +
|
||||||
" local config_file=\"$1\"\n" +
|
" local config_file=\"$1\"\n" +
|
||||||
" local theme_name=\"$2\"\n" +
|
" local theme_name=\"$2\"\n" +
|
||||||
@@ -528,15 +530,15 @@ Singleton {
|
|||||||
" printf '[Appearance]\\nicon_theme=%s\\n' \"$theme_name\" > \"$config_file\"\n" +
|
" printf '[Appearance]\\nicon_theme=%s\\n' \"$theme_name\" > \"$config_file\"\n" +
|
||||||
" fi\n" +
|
" fi\n" +
|
||||||
"}\n" +
|
"}\n" +
|
||||||
"update_qt_config " + home + "/.config/qt5ct/qt5ct.conf " + _shq(qtThemeName) + "\n" +
|
"update_qt_config " + _configDir + "/qt5ct/qt5ct.conf " + _shq(qtThemeName) + "\n" +
|
||||||
"update_qt_config " + home + "/.config/qt6ct/qt6ct.conf " + _shq(qtThemeName) + "\n" +
|
"update_qt_config " + _configDir + "/qt6ct/qt6ct.conf " + _shq(qtThemeName) + "\n" +
|
||||||
"if command -v qt5ct >/dev/null 2>&1; then\n" +
|
"if command -v qt5ct >/dev/null 2>&1; then\n" +
|
||||||
" printf 'QT_QPA_PLATFORMTHEME=qt5ct\\n' > " + home + "/.config/environment.d/95-qtct.conf\n" +
|
" printf 'QT_QPA_PLATFORMTHEME=qt5ct\\n' > " + _configDir + "/environment.d/95-qtct.conf\n" +
|
||||||
" if command -v qt6ct >/dev/null 2>&1; then\n" +
|
" if command -v qt6ct >/dev/null 2>&1; then\n" +
|
||||||
" printf 'QT_QPA_PLATFORMTHEME_QT6=qt6ct\\n' >> " + home + "/.config/environment.d/95-qtct.conf\n" +
|
" printf 'QT_QPA_PLATFORMTHEME_QT6=qt6ct\\n' >> " + _configDir + "/environment.d/95-qtct.conf\n" +
|
||||||
" fi\n" +
|
" fi\n" +
|
||||||
"else\n" +
|
"else\n" +
|
||||||
" rm -f " + home + "/.config/environment.d/95-qtct.conf 2>/dev/null || true\n" +
|
" rm -f " + _configDir + "/environment.d/95-qtct.conf 2>/dev/null || true\n" +
|
||||||
"fi\n" +
|
"fi\n" +
|
||||||
"systemctl --user import-environment QT_QPA_PLATFORMTHEME QT_QPA_PLATFORMTHEME_QT6 2>/dev/null || true\n" +
|
"systemctl --user import-environment QT_QPA_PLATFORMTHEME QT_QPA_PLATFORMTHEME_QT6 2>/dev/null || true\n" +
|
||||||
"dbus-update-activation-environment --systemd QT_QPA_PLATFORMTHEME QT_QPA_PLATFORMTHEME_QT6 2>/dev/null || true\n" +
|
"dbus-update-activation-environment --systemd QT_QPA_PLATFORMTHEME QT_QPA_PLATFORMTHEME_QT6 2>/dev/null || true\n" +
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import qs.Widgets
|
|||||||
ScrollView {
|
ScrollView {
|
||||||
id: launcherTab
|
id: launcherTab
|
||||||
|
|
||||||
contentWidth: availableWidth
|
|
||||||
contentHeight: column.implicitHeight + Theme.spacingXL
|
contentHeight: column.implicitHeight + Theme.spacingXL
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ ScrollView {
|
|||||||
property alias profileBrowser: profileBrowserLoader.item
|
property alias profileBrowser: profileBrowserLoader.item
|
||||||
property alias wallpaperBrowser: wallpaperBrowserLoader.item
|
property alias wallpaperBrowser: wallpaperBrowserLoader.item
|
||||||
|
|
||||||
contentWidth: availableWidth
|
|
||||||
contentHeight: column.implicitHeight
|
contentHeight: column.implicitHeight
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import qs.Widgets
|
|||||||
ScrollView {
|
ScrollView {
|
||||||
id: timeWeatherTab
|
id: timeWeatherTab
|
||||||
|
|
||||||
contentWidth: availableWidth
|
|
||||||
contentHeight: column.implicitHeight
|
contentHeight: column.implicitHeight
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import qs.Widgets
|
|||||||
ScrollView {
|
ScrollView {
|
||||||
id: widgetsTab
|
id: widgetsTab
|
||||||
|
|
||||||
contentWidth: availableWidth
|
|
||||||
contentHeight: column.implicitHeight + Theme.spacingXL
|
contentHeight: column.implicitHeight + Theme.spacingXL
|
||||||
clip: true
|
clip: true
|
||||||
|
|
||||||
|
|||||||
449
README.md
449
README.md
@@ -1,250 +1,337 @@
|
|||||||
# DankMaterialShell (Quickshell)
|
# DankMaterialShell
|
||||||
|
|
||||||
A [Quickshell](https://quickshell.org/) built shell designed to be highly functional, in Material 3 style.
|
A [Quickshell](https://quickshell.org/)-based desktop shell with Material 3 design principles, built for functionality and modern aesthetics.
|
||||||
|
|
||||||
Specifically created for [niri](https://github.com/YaLTeR/niri).
|
Specifically optimized for the [niri](https://github.com/YaLTeR/niri) compositor, but compatible with other Wayland compositors.
|
||||||
|
|
||||||
<image>
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Features](#features)
|
||||||
|
- [Requirements](#requirements)
|
||||||
|
- [Installation](#installation)
|
||||||
|
- [Core Dependencies](#core-dependencies)
|
||||||
|
- [Optional Dependencies](#optional-dependencies)
|
||||||
|
- [Shell Installation](#shell-installation)
|
||||||
|
- [Configuration](#configuration)
|
||||||
|
- [Theme Configuration](#theme-configuration)
|
||||||
|
- [App Theming Setup](#app-theming-setup)
|
||||||
|
- [Usage](#usage)
|
||||||
|
- [Basic Controls](#basic-controls)
|
||||||
|
- [IPC Commands](#ipc-commands)
|
||||||
|
- [Calendar Integration](#calendar-integration)
|
||||||
|
- [Troubleshooting](#troubleshooting)
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- **Material 3 Design**: Modern, clean interface following Google's latest design language
|
||||||
|
- **Dynamic Theming**: Automatic color extraction from wallpapers using matugen
|
||||||
|
- **System Integration**: Built-in audio controls, brightness management, and media controls
|
||||||
|
- **Application Launcher**: Spotlight-style launcher for quick app access
|
||||||
|
- **Clipboard History**: Visual clipboard manager with search functionality
|
||||||
|
- **Process Manager**: Built-in task manager for system monitoring
|
||||||
|
- **Notification Center**: Centralized notification management
|
||||||
|
- **Calendar Support**: Integration with various calendar services
|
||||||
|
- **Lockscreen**: Secure screen locking functionality
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
**Base Requirements:**
|
||||||
|
- Wayland compositor (niri recommended)
|
||||||
|
- NetworkManager (for WiFi functionality)
|
||||||
|
- Material Symbols font
|
||||||
|
- Inter and Fira Code fonts (recommended)
|
||||||
|
|
||||||
|
**Distribution Support:**
|
||||||
|
- Compatible with any Linux distribution
|
||||||
|
- Installation examples provided for Arch Linux and Fedora
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Install required dependencies
|
### Core Dependencies
|
||||||
|
|
||||||
This shell was primarily built for [niri](https://github.com/YaLTeR/niri), but only for workspaces and the active window widget in TopBar. So it could be used on any other wayland compositor with minimal changes.
|
#### Material Symbols Font
|
||||||
|
|
||||||
|
**Manual Installation:**
|
||||||
```bash
|
```bash
|
||||||
# 1 --- Material Symbols Font (if not present)
|
mkdir -p ~/.local/share/fonts
|
||||||
mkdir -p ~/.local/share/fonts && curl -L "https://github.com/google/material-design-icons/raw/master/variablefont/MaterialSymbolsRounded%5BFILL%2CGRAD%2Copsz%2Cwght%5D.ttf" -o ~/.local/share/fonts/MaterialSymbolsRounded.ttf && fc-cache -f
|
curl -L "https://github.com/google/material-design-icons/raw/master/variablefont/MaterialSymbolsRounded%5BFILL%2CGRAD%2Copsz%2Cwght%5D.ttf" -o ~/.local/share/fonts/MaterialSymbolsRounded.ttf
|
||||||
# Arch: paru -S ttf-material-symbols-variable-git
|
fc-cache -f
|
||||||
# Fedora: Use manual installation (Fedora packages contain legacy Material Icons, not Material Symbols)
|
```
|
||||||
|
|
||||||
# 2 --- Inter Variable (recommended font)
|
**Package Installation:**
|
||||||
mkdir -p ~/.local/share/fonts && curl -L "https://github.com/rsms/inter/releases/download/v4.0/Inter-4.0.zip" -o /tmp/Inter.zip && unzip -j /tmp/Inter.zip "InterVariable.ttf" "InterVariable-Italic.ttf" -d ~/.local/share/fonts/ && rm /tmp/Inter.zip && fc-cache -f
|
```bash
|
||||||
# Arch: pacman -S inter-font
|
# Arch Linux
|
||||||
# Fedora: sudo dnf install rsms-inter-fonts
|
paru -S ttf-material-symbols-variable-git
|
||||||
|
|
||||||
# 3 --- Fira Code (recommended monospace font)
|
|
||||||
mkdir -p ~/.local/share/fonts && curl -L "https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip" -o /tmp/FiraCode.zip && unzip -j /tmp/FiraCode.zip "ttf/*.ttf" -d ~/.local/share/fonts/ && rm /tmp/FiraCode.zip && fc-cache -f
|
|
||||||
# Arch: pacman -S ttf-fira-code
|
|
||||||
# Fedora: sudo dnf install fira-code-fonts
|
|
||||||
|
|
||||||
# 4 --- QuickShell (recommended to use a git build)
|
|
||||||
# Arch
|
|
||||||
paru -S quickshell-git
|
|
||||||
|
|
||||||
# Fedora
|
# Fedora
|
||||||
|
# Use manual installation - Fedora packages contain legacy Material Icons
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Typography
|
||||||
|
|
||||||
|
**Inter Variable Font:**
|
||||||
|
```bash
|
||||||
|
# Manual
|
||||||
|
mkdir -p ~/.local/share/fonts
|
||||||
|
curl -L "https://github.com/rsms/inter/releases/download/v4.0/Inter-4.0.zip" -o /tmp/Inter.zip
|
||||||
|
unzip -j /tmp/Inter.zip "InterVariable.ttf" "InterVariable-Italic.ttf" -d ~/.local/share/fonts/
|
||||||
|
rm /tmp/Inter.zip && fc-cache -f
|
||||||
|
|
||||||
|
# Package managers
|
||||||
|
# Arch: pacman -S inter-font
|
||||||
|
# Fedora: sudo dnf install rsms-inter-fonts
|
||||||
|
```
|
||||||
|
|
||||||
|
**Fira Code Font:**
|
||||||
|
```bash
|
||||||
|
# Manual
|
||||||
|
mkdir -p ~/.local/share/fonts
|
||||||
|
curl -L "https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip" -o /tmp/FiraCode.zip
|
||||||
|
unzip -j /tmp/FiraCode.zip "ttf/*.ttf" -d ~/.local/share/fonts/
|
||||||
|
rm /tmp/FiraCode.zip && fc-cache -f
|
||||||
|
|
||||||
|
# Package managers
|
||||||
|
# Arch: pacman -S ttf-fira-code
|
||||||
|
# Fedora: sudo dnf install fira-code-fonts
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Quickshell
|
||||||
|
|
||||||
|
**Arch Linux:**
|
||||||
|
```bash
|
||||||
|
paru -S quickshell-git
|
||||||
|
```
|
||||||
|
|
||||||
|
**Fedora:**
|
||||||
|
```bash
|
||||||
sudo dnf copr enable errornointernet/quickshell
|
sudo dnf copr enable errornointernet/quickshell
|
||||||
sudo dnf install quickshell
|
sudo dnf install quickshell
|
||||||
# or
|
# or for git version
|
||||||
sudo dnf install quickshell-git
|
sudo dnf install quickshell-git
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Install optional dependencies to unlock certain features
|
### Optional Dependencies
|
||||||
|
|
||||||
| Dependency | Purpose | If Missing |
|
| Component | Purpose | Missing Functionality |
|
||||||
|------------|---------|------------|
|
|-----------|---------|----------------------|
|
||||||
| matugen | Allows dynamic themes based on wallpaper and system app theming | Just can choose from preconfigured themes instead of dynamic colors |
|
| matugen | Dynamic wallpaper-based theming | Limited to preconfigured themes |
|
||||||
| ddcutil | Allows controlling brightness of external monitors via DDC/CI | No external monitor brightness control |
|
| ddcutil | External monitor brightness control | No DDC/CI brightness control |
|
||||||
| brightnessctl | Allows controlling brightness of laptop displays via backlight | No laptop display brightness control |
|
| brightnessctl | Laptop display brightness control | No backlight control |
|
||||||
| wl-clipboard | Unlocks copy functionality of certain elements, such as process PIDs | No copy |
|
| wl-clipboard | Copy functionality for PIDs and other elements | No clipboard operations |
|
||||||
| qt5ct + qt6ct | Icon theme and Qt app theming | Setting icon theme in settings won't work for QT5 or QT6 applications, no Qt theming |
|
| qt5ct + qt6ct | Qt application theming | No Qt theme integration |
|
||||||
| gsettings | GTK theme management | No GTK theming |
|
| gsettings | GTK application theming | No GTK theme integration |
|
||||||
|
|
||||||
|
#### Installation by Distribution
|
||||||
|
|
||||||
|
**Arch Linux:**
|
||||||
```bash
|
```bash
|
||||||
# Arch
|
# Core optional packages
|
||||||
# Core dependencies
|
pacman -S cava wl-clipboard cliphist ddcutil brightnessctl gsettings-desktop-schemas qt5ct qt6ct
|
||||||
pacman -S inter-font ttf-fira-code cava wl-clipboard cliphist
|
|
||||||
paru -S ttf-material-symbols-variable-git # AUR package
|
|
||||||
|
|
||||||
# Optional: Brightness control
|
# AUR packages
|
||||||
pacman -S ddcutil # For external monitors
|
|
||||||
pacman -S brightnessctl # For laptop displays
|
|
||||||
|
|
||||||
# Optional: App theming (only if you use GTK/Qt applications)
|
|
||||||
pacman -S qt5ct qt6ct gsettings-desktop-schemas
|
|
||||||
|
|
||||||
# Third-party packages (AUR)
|
|
||||||
paru -S matugen
|
paru -S matugen
|
||||||
|
```
|
||||||
|
|
||||||
# Fedora
|
**Fedora:**
|
||||||
# Core dependencies
|
```bash
|
||||||
sudo dnf install cava wl-clipboard
|
# Core packages
|
||||||
|
sudo dnf install cava wl-clipboard ddcutil brightnessctl gsettings-desktop-schemas qt5ct qt6ct
|
||||||
|
|
||||||
# COPR packages (core dependencies from third-party repositories)
|
# COPR repositories
|
||||||
sudo dnf copr enable wef/cliphist && sudo dnf install cliphist
|
sudo dnf copr enable wef/cliphist && sudo dnf install cliphist
|
||||||
|
|
||||||
# Optional: Brightness control
|
|
||||||
sudo dnf install ddcutil # For external monitors
|
|
||||||
sudo dnf install brightnessctl # For laptop displays
|
|
||||||
|
|
||||||
# Optional: App theming (only if you use GTK/Qt applications)
|
|
||||||
sudo dnf install theme qt5ct qt6ct gsettings-desktop-schemas
|
|
||||||
|
|
||||||
# Optional third-party packages (COPR repositories)
|
|
||||||
sudo dnf copr enable heus-sueh/packages && sudo dnf install matugen
|
sudo dnf copr enable heus-sueh/packages && sudo dnf install matugen
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note on networking:** This shell requires NetworkManager for WiFi functionality.
|
### Shell Installation
|
||||||
|
|
||||||
**Note on system app theming:** DankMaterialShell can automatically theme GTK and Qt applications to match your dynamic wallpaper colors. This requires:
|
1. **Create configuration directory:**
|
||||||
- For GTK apps: A compatible theme and `gsettings`, a compatible theme is one that respects standard color definitions - e.g. [Colloid](https://github.com/vinceliuice/Colloid-gtk-theme).
|
```bash
|
||||||
- For Qt apps: `qt5ct` and/or `qt6ct`
|
mkdir -p ~/.config/quickshell
|
||||||
|
```
|
||||||
|
|
||||||
**Recommended GTK base theme:** Use [Colloid](https://github.com/vinceliuice/Colloid-gtk-theme). Install with your preferences, e.g. `./install.sh -s standard -l --tweaks normal`. Configure in `~/.config/gtk-3.0/settings.ini` and `~/.config/gtk-4.0/settings.ini` and set Colloid as the theme:
|
2. **Clone the repository:**
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/bbedward/DankMaterialShell.git ~/.config/quickshell/DankMaterialShell
|
||||||
|
```
|
||||||
|
|
||||||
|
3. **Launch the shell:**
|
||||||
|
```bash
|
||||||
|
qs -c DankMaterialShell
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
### Theme Configuration
|
||||||
|
|
||||||
|
#### GTK Applications
|
||||||
|
|
||||||
|
Install a compatible theme like [Colloid](https://github.com/vinceliuice/Colloid-gtk-theme):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Install Colloid theme
|
||||||
|
./install.sh -s standard -l --tweaks normal
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Configure in `~/.config/gtk-3.0/settings.ini` and `~/.config/gtk-4.0/settings.ini`:
|
||||||
|
```ini
|
||||||
[Settings]
|
[Settings]
|
||||||
gtk-theme-name=Colloid
|
gtk-theme-name=Colloid
|
||||||
```
|
```
|
||||||
|
|
||||||
**Recommended QT base them:** Breeze is recommended, on arch it can be installed with `pacman -S breeze breeze5` and then in `~/.confg/qt6ct/qt6ct.conf` and `~/.confg/qt5ct/qt5ct.conf` set the following:
|
#### Qt Applications
|
||||||
|
|
||||||
|
**Install Breeze theme:**
|
||||||
|
```bash
|
||||||
|
# Arch
|
||||||
|
pacman -S breeze breeze5
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Configure Qt5 and Qt6:**
|
||||||
|
|
||||||
|
In `~/.config/qt5ct/qt5ct.conf` and `~/.config/qt6ct/qt6ct.conf`:
|
||||||
|
```ini
|
||||||
[Appearance]
|
[Appearance]
|
||||||
style=Breeze
|
style=Breeze
|
||||||
```
|
```
|
||||||
|
|
||||||
Enable these features in Settings → Appearance → System App Theming after installing the dependencies.
|
#### KDE Applications
|
||||||
|
|
||||||
3. Install DankMaterialShell
|
Create `~/.config/kdeglobals`:
|
||||||
|
```ini
|
||||||
```
|
[UiSettings]
|
||||||
mkdir -p ~/.config/quickshell
|
ColorScheme=qt6ct
|
||||||
git clone https://github.com/bbedward/DankMaterialShell.git ~/.config/quickshell/DankMaterialShell
|
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Enable
|
### App Theming Setup
|
||||||
|
|
||||||
```
|
Enable system app theming in **Settings → Appearance → System App Theming** after installing the required dependencies.
|
||||||
qs -c DankMaterialShell
|
|
||||||
|
|
||||||
# In niri config
|
## Usage
|
||||||
spawn-at-startup "qs" "-c" "DankMaterialShell"
|
|
||||||
|
|
||||||
# Optionally at bindings for spotlight launcher and clipboard history
|
### Basic Controls
|
||||||
Mod+Space hotkey-overlay-title="Run an Application: Spotlight" { spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "spotlight" "toggle"; }
|
|
||||||
Mod+V hotkey-overlay-title="Open Clipboard History" { spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "clipboard" "toggle"; }
|
|
||||||
```
|
|
||||||
|
|
||||||
# Available IPC Events
|
#### Niri Configuration
|
||||||
|
|
||||||
IPC Events are events that can be triggered with `qs` cli.
|
Add to your niri configuration:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
qs -c DankMaterialShell ipc call <target> <function>
|
# Auto-start
|
||||||
|
spawn-at-startup "qs" "-c" "DankMaterialShell"
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
Mod+Space hotkey-overlay-title="Run an Application: Spotlight" {
|
||||||
|
spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "spotlight" "toggle";
|
||||||
|
}
|
||||||
|
|
||||||
|
Mod+V hotkey-overlay-title="Open Clipboard History" {
|
||||||
|
spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "clipboard" "toggle";
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## System Controls
|
### IPC Commands
|
||||||
|
|
||||||
| Target | Function | Parameters | Description |
|
The shell provides extensive IPC (Inter-Process Communication) functionality:
|
||||||
|--------|----------|------------|-------------|
|
|
||||||
| audio | setvolume | percentage (string) | Set audio volume to specific percentage (0-100) |
|
|
||||||
| audio | increment | step (string, default: "5") | Increase volume by step percentage |
|
|
||||||
| audio | decrement | step (string, default: "5") | Decrease volume by step percentage |
|
|
||||||
| audio | mute | none | Toggle audio mute |
|
|
||||||
| audio | setmic | percentage (string) | Set microphone volume to specific percentage |
|
|
||||||
| audio | micmute | none | Toggle microphone mute |
|
|
||||||
| audio | status | none | Get current audio status (output/input levels and mute states) |
|
|
||||||
|
|
||||||
## Application Controls
|
|
||||||
|
|
||||||
| Target | Function | Parameters | Description |
|
|
||||||
|--------|----------|------------|-------------|
|
|
||||||
| spotlight | open | none | Open spotlight (app launcher) |
|
|
||||||
| spotlight | close | none | Close spotlight (app launcher) |
|
|
||||||
| spotlight | toggle | none | Toggle spotlight (app launcher) |
|
|
||||||
| clipboard | open | none | Open clipboard history view |
|
|
||||||
| clipboard | close | none | Close clipboard history view |
|
|
||||||
| clipboard | toggle | none | Toggle clipboard history view |
|
|
||||||
| processlist | open | none | Open process list (task manager) |
|
|
||||||
| processlist | close | none | Close process list (task manager) |
|
|
||||||
| processlist | toggle | none | Toggle process list (task manager) |
|
|
||||||
| lock | lock | none | Activate lockscreen |
|
|
||||||
| lock | demo | none | Show lockscreen in demo mode |
|
|
||||||
| lock | isLocked | none | Returns whether screen is currently locked |
|
|
||||||
|
|
||||||
## Media Controls
|
|
||||||
|
|
||||||
| Target | Function | Parameters | Description |
|
|
||||||
|--------|----------|------------|-------------|
|
|
||||||
| mpris | list | none | Get list of available media players |
|
|
||||||
| mpris | play | none | Start media playback on active player |
|
|
||||||
| mpris | pause | none | Pause media playback on active player |
|
|
||||||
| mpris | playPause | none | Toggle play/pause state on active player |
|
|
||||||
| mpris | previous | none | Skip to previous track on active player |
|
|
||||||
| mpris | next | none | Skip to next track on active player |
|
|
||||||
| mpris | stop | none | Stop media playback on active player |
|
|
||||||
|
|
||||||
## System Services
|
|
||||||
|
|
||||||
| Target | Function | Parameters | Description |
|
|
||||||
|--------|----------|------------|-------------|
|
|
||||||
| wallpaper | get | none | Get current wallpaper path |
|
|
||||||
| wallpaper | set | path (string) | Set wallpaper to image path and refresh theme |
|
|
||||||
| wallpaper | clear | none | Clear current wallpaper |
|
|
||||||
| theme | get | none | Get current theme mode (light/dark) |
|
|
||||||
| theme | toggle | none | Toggle between light and dark mode |
|
|
||||||
| theme | light | none | Set theme to light mode |
|
|
||||||
| theme | dark | none | Set theme to dark mode |
|
|
||||||
| notifs | clear | none | Clear all notifications |
|
|
||||||
|
|
||||||
|
|
||||||
## (Optional) Setup Calendar events (Google, Microsoft, other Caldev, etc.)
|
|
||||||
|
|
||||||
1. Install [khal](https://github.com/pimutils/khal), [vdirsyncer](https://github.com/pimutils/vdirsyncer), and `aiohttp-oauthlib`
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
qs -c DankMaterialShell ipc call <target> <function> [parameters]
|
||||||
```
|
```
|
||||||
# Arch
|
|
||||||
|
#### Audio Controls
|
||||||
|
|
||||||
|
| Command | Function |
|
||||||
|
|---------|----------|
|
||||||
|
| `audio setvolume 50` | Set volume to 50% |
|
||||||
|
| `audio increment 10` | Increase volume by 10% |
|
||||||
|
| `audio decrement 5` | Decrease volume by 5% |
|
||||||
|
| `audio mute` | Toggle audio mute |
|
||||||
|
| `audio setmic 75` | Set microphone to 75% |
|
||||||
|
| `audio micmute` | Toggle microphone mute |
|
||||||
|
| `audio status` | Get current audio status |
|
||||||
|
|
||||||
|
#### Application Controls
|
||||||
|
|
||||||
|
| Command | Function |
|
||||||
|
|---------|----------|
|
||||||
|
| `spotlight toggle` | Toggle application launcher |
|
||||||
|
| `clipboard toggle` | Toggle clipboard history |
|
||||||
|
| `processlist toggle` | Toggle process manager |
|
||||||
|
| `lock lock` | Activate lockscreen |
|
||||||
|
|
||||||
|
#### Media Controls
|
||||||
|
|
||||||
|
| Command | Function |
|
||||||
|
|---------|----------|
|
||||||
|
| `mpris list` | List available media players |
|
||||||
|
| `mpris playPause` | Toggle play/pause |
|
||||||
|
| `mpris next` | Next track |
|
||||||
|
| `mpris previous` | Previous track |
|
||||||
|
|
||||||
|
#### System Services
|
||||||
|
|
||||||
|
| Command | Function |
|
||||||
|
|---------|----------|
|
||||||
|
| `wallpaper set /path/to/image.jpg` | Set wallpaper and refresh theme |
|
||||||
|
| `theme toggle` | Toggle light/dark mode |
|
||||||
|
| `notifs clear` | Clear all notifications |
|
||||||
|
|
||||||
|
## Calendar Integration
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
Install required packages:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Arch Linux
|
||||||
pacman -S vdirsyncer khal python-aiohttp-oauthlib
|
pacman -S vdirsyncer khal python-aiohttp-oauthlib
|
||||||
|
|
||||||
# Fedora
|
# Fedora
|
||||||
sudo dnf install python3-vdirsyncer khal python3-aiohttp-oauthlib
|
sudo dnf install python3-vdirsyncer khal python3-aiohttp-oauthlib
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Configure vdirsyncer
|
### Configuration
|
||||||
|
|
||||||
Follow the [documentation](https://vdirsyncer.pimutils.org/en/stable/config.html), you will have different steps depending on which calendars you want to sync with.
|
1. **Create vdirsyncer directory:**
|
||||||
|
```bash
|
||||||
|
mkdir -p ~/.vdirsyncer
|
||||||
|
```
|
||||||
|
|
||||||
```
|
2. **Configure calendar sync** in `~/.vdirsyncer/config`:
|
||||||
mkdir -p ~/.vdirsyncer
|
```ini
|
||||||
|
[general]
|
||||||
|
status_path = "~/.calendars/status"
|
||||||
|
|
||||||
# Create ~/.vdirsyncer/config (a single google calendar would look like)
|
[pair personal_sync]
|
||||||
[general]
|
a = "personal"
|
||||||
status_path = "~/.calendars/status"
|
b = "personallocal"
|
||||||
|
collections = ["from a", "from b"]
|
||||||
|
conflict_resolution = "a wins"
|
||||||
|
metadata = ["color"]
|
||||||
|
|
||||||
[pair personal_sync]
|
[storage personal]
|
||||||
a = "personal"
|
type = "google_calendar"
|
||||||
b = "personallocal"
|
token_file = "~/.vdirsyncer/google_calendar_token"
|
||||||
collections = ["from a", "from b"]
|
client_id = "your_client_id"
|
||||||
conflict_resolution = "a wins"
|
client_secret = "your_client_secret"
|
||||||
metadata = ["color"]
|
|
||||||
|
|
||||||
[storage personal]
|
[storage personallocal]
|
||||||
type = "google_calendar"
|
type = "filesystem"
|
||||||
token_file = "~/.vdirsyncer/google_calendar_token"
|
path = "~/.calendars/Personal"
|
||||||
client_id = "...."
|
fileext = ".ics"
|
||||||
client_secret = "...."
|
```
|
||||||
|
|
||||||
[storage personallocal]
|
3. **Initial sync:**
|
||||||
type = "filesystem"
|
```bash
|
||||||
path = "~/.calendars/Personal"
|
vdirsyncer sync
|
||||||
fileext = ".ics"
|
```
|
||||||
|
|
||||||
# Sync
|
4. **Configure automatic sync:**
|
||||||
vdirsyncer sync
|
```bash
|
||||||
|
crontab -e
|
||||||
# Create crontab
|
# Add: */5 * * * * /usr/bin/vdirsyncer sync
|
||||||
crontab -e
|
```
|
||||||
# e.g., this syncs every 5 minutes
|
|
||||||
*/5 * * * * /usr/bin/vdirsyncer sync
|
|
||||||
```
|
|
||||||
|
|
||||||
3. Configure khal
|
|
||||||
|
|
||||||
```
|
|
||||||
# Run this
|
|
||||||
khal configure
|
|
||||||
|
|
||||||
# Choose option 2 for month/day/year
|
|
||||||
# Time format, doesnt matter
|
|
||||||
# Choose option 1 for use calendar already on this computer
|
|
||||||
```
|
|
||||||
|
|
||||||
|
5. **Configure khal:**
|
||||||
|
```bash
|
||||||
|
khal configure
|
||||||
|
# Follow the interactive setup
|
||||||
|
```
|
||||||
@@ -5,15 +5,15 @@
|
|||||||
|
|
||||||
WALLPAPER_PATH="$1"
|
WALLPAPER_PATH="$1"
|
||||||
SHELL_DIR="$2"
|
SHELL_DIR="$2"
|
||||||
HOME_DIR="$3"
|
CONFIG_DIR="$3" # Config directory (typically ~/.config)
|
||||||
MODE="$4" # "generate" or "restore"
|
MODE="$4" # "generate" or "restore"
|
||||||
IS_LIGHT="$5" # "true" for light mode, "false" for dark mode
|
IS_LIGHT="$5" # "true" for light mode, "false" for dark mode
|
||||||
ICON_THEME="$6" # Icon theme name
|
ICON_THEME="$6" # Icon theme name
|
||||||
GTK_THEMING="$7" # "true" to enable GTK theming, "false" to disable
|
GTK_THEMING="$7" # "true" to enable GTK theming, "false" to disable
|
||||||
QT_THEMING="$8" # "true" to enable Qt theming, "false" to disable
|
QT_THEMING="$8" # "true" to enable Qt theming, "false" to disable
|
||||||
|
|
||||||
if [ -z "$SHELL_DIR" ] || [ -z "$HOME_DIR" ]; then
|
if [ -z "$SHELL_DIR" ] || [ -z "$CONFIG_DIR" ]; then
|
||||||
echo "Usage: $0 <wallpaper_path> <shell_dir> <home_dir> [mode] [is_light] [icon_theme] [gtk_theming] [qt_theming]" >&2
|
echo "Usage: $0 <wallpaper_path> <shell_dir> <config_dir> [mode] [is_light] [icon_theme] [gtk_theming] [qt_theming]" >&2
|
||||||
echo " For restore mode, wallpaper_path can be empty" >&2
|
echo " For restore mode, wallpaper_path can be empty" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -55,13 +55,13 @@ update_theme_settings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
update_gtk_css() {
|
update_gtk_css() {
|
||||||
local home_dir="$1"
|
local config_dir="$1"
|
||||||
local import_line="@import url(\"$home_dir/.config/gtk-4.0/dank-colors.css\");"
|
local import_line="@import url(\"$config_dir/gtk-4.0/dank-colors.css\");"
|
||||||
|
|
||||||
echo "Updating GTK CSS imports..."
|
echo "Updating GTK CSS imports..."
|
||||||
|
|
||||||
# Update GTK-4.0
|
# Update GTK-4.0
|
||||||
local gtk4_css="$home_dir/.config/gtk-4.0/gtk.css"
|
local gtk4_css="$config_dir/gtk-4.0/gtk.css"
|
||||||
if [ -f "$gtk4_css" ]; then
|
if [ -f "$gtk4_css" ]; then
|
||||||
# Remove existing import if present
|
# Remove existing import if present
|
||||||
sed -i '/^@import url.*dank-colors\.css.*);$/d' "$gtk4_css"
|
sed -i '/^@import url.*dank-colors\.css.*);$/d' "$gtk4_css"
|
||||||
@@ -74,8 +74,8 @@ update_gtk_css() {
|
|||||||
echo "Updated GTK-4.0 CSS import"
|
echo "Updated GTK-4.0 CSS import"
|
||||||
|
|
||||||
# Update GTK-3.0 with its own path
|
# Update GTK-3.0 with its own path
|
||||||
local gtk3_import="@import url(\"$home_dir/.config/gtk-3.0/dank-colors.css\");"
|
local gtk3_import="@import url(\"$config_dir/gtk-3.0/dank-colors.css\");"
|
||||||
local gtk3_css="$home_dir/.config/gtk-3.0/gtk.css"
|
local gtk3_css="$config_dir/gtk-3.0/gtk.css"
|
||||||
if [ -f "$gtk3_css" ]; then
|
if [ -f "$gtk3_css" ]; then
|
||||||
# Remove existing import if present
|
# Remove existing import if present
|
||||||
sed -i '/^@import url.*dank-colors\.css.*);$/d' "$gtk3_css"
|
sed -i '/^@import url.*dank-colors\.css.*);$/d' "$gtk3_css"
|
||||||
@@ -89,8 +89,7 @@ update_gtk_css() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
update_qt_config() {
|
update_qt_config() {
|
||||||
local home_dir="$1"
|
local config_dir="$1"
|
||||||
local username=$(basename "$home_dir")
|
|
||||||
|
|
||||||
echo "Updating Qt configuration..."
|
echo "Updating Qt configuration..."
|
||||||
|
|
||||||
@@ -98,46 +97,69 @@ update_qt_config() {
|
|||||||
update_qt_color_config() {
|
update_qt_color_config() {
|
||||||
local config_file="$1"
|
local config_file="$1"
|
||||||
local version="$2"
|
local version="$2"
|
||||||
local color_scheme_path="$home_dir/.config/qt${version}ct/colors/matugen.conf"
|
local color_scheme_path="$config_dir/qt${version}ct/colors/matugen.conf"
|
||||||
|
|
||||||
if [ -f "$config_file" ]; then
|
if [ -f "$config_file" ]; then
|
||||||
# Update existing config with awk - properly handle existing [Appearance] section
|
# Read the entire file and carefully update only what we need
|
||||||
awk -v scheme_path="$color_scheme_path" '
|
python3 -c "
|
||||||
BEGIN { in_appearance = 0; custom_palette_set = 0; color_scheme_set = 0 }
|
import sys
|
||||||
/^\[Appearance\]/ {
|
import re
|
||||||
in_appearance = 1;
|
|
||||||
print;
|
config_file = '$config_file'
|
||||||
next
|
color_scheme_path = '$color_scheme_path'
|
||||||
}
|
|
||||||
/^\[/ && !/^\[Appearance\]/ {
|
try:
|
||||||
# End of [Appearance] section - add missing settings before next section
|
with open(config_file, 'r') as f:
|
||||||
if (in_appearance) {
|
content = f.read()
|
||||||
if (!custom_palette_set) { print "custom_palette=true" }
|
|
||||||
if (!color_scheme_set) { print "color_scheme_path=" scheme_path }
|
lines = content.split('\n')
|
||||||
}
|
result = []
|
||||||
in_appearance = 0;
|
in_appearance = False
|
||||||
print;
|
custom_palette_found = False
|
||||||
next
|
color_scheme_found = False
|
||||||
}
|
|
||||||
in_appearance && /^custom_palette=/ {
|
for line in lines:
|
||||||
print "custom_palette=true"
|
stripped = line.strip()
|
||||||
custom_palette_set = 1
|
|
||||||
next
|
if stripped == '[Appearance]':
|
||||||
}
|
in_appearance = True
|
||||||
in_appearance && /^color_scheme_path=/ {
|
result.append(line)
|
||||||
print "color_scheme_path=" scheme_path
|
elif stripped.startswith('[') and stripped != '[Appearance]':
|
||||||
color_scheme_set = 1
|
# End of [Appearance] section, add missing settings if needed
|
||||||
next
|
if in_appearance:
|
||||||
}
|
if not custom_palette_found:
|
||||||
{ print }
|
result.append('custom_palette=true')
|
||||||
END {
|
if not color_scheme_found:
|
||||||
# Handle case where [Appearance] is the last section
|
result.append('color_scheme_path=' + color_scheme_path)
|
||||||
if (in_appearance) {
|
in_appearance = False
|
||||||
if (!custom_palette_set) print "custom_palette=true"
|
result.append(line)
|
||||||
if (!color_scheme_set) print "color_scheme_path=" scheme_path
|
elif in_appearance and stripped.startswith('custom_palette='):
|
||||||
}
|
custom_palette_found = True
|
||||||
}
|
result.append('custom_palette=true')
|
||||||
' "$config_file" > "$config_file.tmp" && mv "$config_file.tmp" "$config_file"
|
elif in_appearance and stripped.startswith('color_scheme_path='):
|
||||||
|
color_scheme_found = True
|
||||||
|
result.append('color_scheme_path=' + color_scheme_path)
|
||||||
|
else:
|
||||||
|
result.append(line)
|
||||||
|
|
||||||
|
# Handle case where [Appearance] is the last section
|
||||||
|
if in_appearance:
|
||||||
|
if not custom_palette_found:
|
||||||
|
result.append('custom_palette=true')
|
||||||
|
if not color_scheme_found:
|
||||||
|
result.append('color_scheme_path=' + color_scheme_path)
|
||||||
|
|
||||||
|
# If no [Appearance] section exists, create one
|
||||||
|
if not any('[Appearance]' in line for line in lines):
|
||||||
|
result.extend(['', '[Appearance]', 'custom_palette=true', 'color_scheme_path=' + color_scheme_path])
|
||||||
|
|
||||||
|
with open(config_file, 'w') as f:
|
||||||
|
f.write('\n'.join(result))
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print(f'Error updating {config_file}: {e}', file=sys.stderr)
|
||||||
|
sys.exit(1)
|
||||||
|
"
|
||||||
else
|
else
|
||||||
# Create new config file
|
# Create new config file
|
||||||
printf '[Appearance]\ncustom_palette=true\ncolor_scheme_path=%s\n' "$color_scheme_path" > "$config_file"
|
printf '[Appearance]\ncustom_palette=true\ncolor_scheme_path=%s\n' "$color_scheme_path" > "$config_file"
|
||||||
@@ -146,13 +168,13 @@ update_qt_config() {
|
|||||||
|
|
||||||
# Update Qt5ct if available
|
# Update Qt5ct if available
|
||||||
if command -v qt5ct >/dev/null 2>&1; then
|
if command -v qt5ct >/dev/null 2>&1; then
|
||||||
update_qt_color_config "$home_dir/.config/qt5ct/qt5ct.conf" "5"
|
update_qt_color_config "$config_dir/qt5ct/qt5ct.conf" "5"
|
||||||
echo "Updated Qt5ct configuration"
|
echo "Updated Qt5ct configuration"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Update Qt6ct if available
|
# Update Qt6ct if available
|
||||||
if command -v qt6ct >/dev/null 2>&1; then
|
if command -v qt6ct >/dev/null 2>&1; then
|
||||||
update_qt_color_config "$home_dir/.config/qt6ct/qt6ct.conf" "6"
|
update_qt_color_config "$config_dir/qt6ct/qt6ct.conf" "6"
|
||||||
echo "Updated Qt6ct configuration"
|
echo "Updated Qt6ct configuration"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -185,7 +207,7 @@ if [ ! -d "$SHELL_DIR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Create necessary directories
|
# Create necessary directories
|
||||||
mkdir -p "$HOME_DIR/.config/gtk-3.0" "$HOME_DIR/.config/gtk-4.0" "$HOME_DIR/.config/qt5ct/colors" "$HOME_DIR/.config/qt6ct/colors" "$HOME_DIR/.local/share/color-schemes"
|
mkdir -p "$CONFIG_DIR/gtk-3.0" "$CONFIG_DIR/gtk-4.0" "$CONFIG_DIR/qt5ct/colors" "$CONFIG_DIR/qt6ct/colors" "$(dirname "$CONFIG_DIR")/.local/share/color-schemes"
|
||||||
|
|
||||||
# Change to shell directory where matugen-config.toml is located
|
# Change to shell directory where matugen-config.toml is located
|
||||||
cd "$SHELL_DIR" || exit 1
|
cd "$SHELL_DIR" || exit 1
|
||||||
@@ -218,7 +240,7 @@ update_theme_settings "$color_scheme" "$ICON_THEME"
|
|||||||
|
|
||||||
# Update GTK CSS imports if GTK theming is enabled
|
# Update GTK CSS imports if GTK theming is enabled
|
||||||
if [ "$GTK_THEMING" = "true" ]; then
|
if [ "$GTK_THEMING" = "true" ]; then
|
||||||
update_gtk_css "$HOME_DIR"
|
update_gtk_css "$CONFIG_DIR"
|
||||||
echo "GTK theming updated"
|
echo "GTK theming updated"
|
||||||
else
|
else
|
||||||
echo "GTK theming disabled - skipping GTK CSS updates"
|
echo "GTK theming disabled - skipping GTK CSS updates"
|
||||||
@@ -226,7 +248,7 @@ fi
|
|||||||
|
|
||||||
# Update Qt configuration if Qt theming is enabled
|
# Update Qt configuration if Qt theming is enabled
|
||||||
if [ "$QT_THEMING" = "true" ]; then
|
if [ "$QT_THEMING" = "true" ]; then
|
||||||
update_qt_config "$HOME_DIR"
|
update_qt_config "$CONFIG_DIR"
|
||||||
echo "Qt theming updated"
|
echo "Qt theming updated"
|
||||||
else
|
else
|
||||||
echo "Qt theming disabled - skipping Qt configuration updates"
|
echo "Qt theming disabled - skipping Qt configuration updates"
|
||||||
@@ -234,8 +256,8 @@ fi
|
|||||||
|
|
||||||
echo "System theme files generated successfully"
|
echo "System theme files generated successfully"
|
||||||
if [ "$GTK_THEMING" = "true" ]; then
|
if [ "$GTK_THEMING" = "true" ]; then
|
||||||
echo "dank-colors.css files should be available in $HOME_DIR/.config/gtk-3.0/ and $HOME_DIR/.config/gtk-4.0/"
|
echo "dank-colors.css files should be available in $CONFIG_DIR/gtk-3.0/ and $CONFIG_DIR/gtk-4.0/"
|
||||||
fi
|
fi
|
||||||
if [ "$QT_THEMING" = "true" ]; then
|
if [ "$QT_THEMING" = "true" ]; then
|
||||||
echo "Qt color schemes should be available in $HOME_DIR/.config/qt5ct/colors/ and $HOME_DIR/.config/qt6ct/colors/"
|
echo "Qt color schemes should be available in $CONFIG_DIR/qt5ct/colors/ and $CONFIG_DIR/qt6ct/colors/"
|
||||||
fi
|
fi
|
||||||
@@ -8,10 +8,6 @@ output_path = '~/.config/gtk-3.0/dank-colors.css'
|
|||||||
input_path = './templates/gtk-colors.css'
|
input_path = './templates/gtk-colors.css'
|
||||||
output_path = '~/.config/gtk-4.0/dank-colors.css'
|
output_path = '~/.config/gtk-4.0/dank-colors.css'
|
||||||
|
|
||||||
[templates.qt]
|
|
||||||
input_path = './templates/qt-colors.colors'
|
|
||||||
output_path = '~/.local/share/color-schemes/Matugen.colors'
|
|
||||||
|
|
||||||
[templates.qt5ct]
|
[templates.qt5ct]
|
||||||
input_path = './templates/qtct-colors.conf'
|
input_path = './templates/qtct-colors.conf'
|
||||||
output_path = '~/.config/qt5ct/colors/matugen.conf'
|
output_path = '~/.config/qt5ct/colors/matugen.conf'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[ColorScheme]
|
[ColorScheme]
|
||||||
active_colors={{colors.on_background.default.hex}}, {{colors.surface.default.hex}}, #ffffff, #cacaca, #9f9f9f, #b8b8b8, {{colors.on_background.default.hex}}, #ffffff, {{colors.on_surface.default.hex}}, {{colors.background.default.hex}}, {{colors.background.default.hex}}, {{colors.shadow.default.hex}}, {{colors.primary_container.default.hex}}, {{colors.on_primary_container.default.hex}}, {{colors.secondary.default.hex}}, {{colors.primary.default.hex}}, {{colors.surface.default.hex}}, {{colors.scrim.default.hex}}, {{colors.surface.default.hex}}, {{colors.on_surface.default.hex}}, {{colors.secondary.default.hex}}
|
active_colors={{colors.on_surface.default.hex}}, {{colors.surface_container.default.hex}}, {{colors.surface_container_high.default.hex}}, {{colors.outline.default.hex}}, {{colors.surface_variant.default.hex}}, {{colors.outline_variant.default.hex}}, {{colors.on_surface.default.hex}}, {{colors.on_primary.default.hex}}, {{colors.on_surface.default.hex}}, {{colors.surface.default.hex}}, {{colors.background.default.hex}}, {{colors.shadow.default.hex}}, {{colors.primary.default.hex}}, {{colors.on_primary.default.hex}}, {{colors.secondary.default.hex}}, {{colors.secondary.default.hex}}, {{colors.surface_container_low.default.hex}}, {{colors.surface_container.default.hex}}, {{colors.surface_container.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}
|
||||||
disabled_colors={{colors.on_background.default.hex}}, {{colors.surface.default.hex}}, #ffffff, #cacaca, #9f9f9f, #b8b8b8, {{colors.on_background.default.hex}}, #ffffff, {{colors.on_surface.default.hex}}, {{colors.background.default.hex}}, {{colors.background.default.hex}}, {{colors.shadow.default.hex}}, {{colors.primary_container.default.hex}}, {{colors.on_primary_container.default.hex}}, {{colors.secondary.default.hex}}, {{colors.primary.default.hex}}, {{colors.surface.default.hex}}, {{colors.scrim.default.hex}}, {{colors.surface.default.hex}}, {{colors.on_surface.default.hex}}, {{colors.secondary.default.hex}}
|
disabled_colors={{colors.on_surface_variant.default.hex}}, {{colors.surface_variant.default.hex}}, {{colors.surface_container_high.default.hex}}, {{colors.outline.default.hex}}, {{colors.surface_variant.default.hex}}, {{colors.outline_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.surface_variant.default.hex}}, {{colors.surface_variant.default.hex}}, {{colors.shadow.default.hex}}, {{colors.surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.surface_variant.default.hex}}, {{colors.surface_variant.default.hex}}, {{colors.surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}
|
||||||
inactive_colors={{colors.on_background.default.hex}}, {{colors.surface.default.hex}}, #ffffff, #cacaca, #9f9f9f, #b8b8b8, {{colors.on_background.default.hex}}, #ffffff, {{colors.on_surface.default.hex}}, {{colors.background.default.hex}}, {{colors.background.default.hex}}, {{colors.shadow.default.hex}}, {{colors.primary_container.default.hex}}, {{colors.on_primary_container.default.hex}}, {{colors.secondary.default.hex}}, {{colors.primary.default.hex}}, {{colors.surface.default.hex}}, {{colors.scrim.default.hex}}, {{colors.surface.default.hex}}, {{colors.on_surface.default.hex}}, {{colors.secondary.default.hex}}
|
inactive_colors={{colors.on_surface_variant.default.hex}}, {{colors.surface_container.default.hex}}, {{colors.surface_container_high.default.hex}}, {{colors.outline.default.hex}}, {{colors.surface_variant.default.hex}}, {{colors.outline_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.surface_container.default.hex}}, {{colors.surface_container.default.hex}}, {{colors.shadow.default.hex}}, {{colors.secondary.default.hex}}, {{colors.on_secondary.default.hex}}, {{colors.secondary.default.hex}}, {{colors.secondary.default.hex}}, {{colors.surface_container_low.default.hex}}, {{colors.surface_container.default.hex}}, {{colors.surface_container.default.hex}}, {{colors.on_surface_variant.default.hex}}, {{colors.on_surface_variant.default.hex}}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user