mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-07 14:05:38 -05:00
Media fixes
This commit is contained in:
@@ -8,6 +8,7 @@ Install the required tools:
|
||||
|
||||
```bash
|
||||
# Required for Material-You palette generation
|
||||
# Or paru -S matugen-bin on arch
|
||||
cargo install matugen
|
||||
|
||||
# Required for JSON processing (usually pre-installed)
|
||||
@@ -16,7 +17,6 @@ sudo pacman -S jq # Arch Linux
|
||||
|
||||
# Background setters (choose one)
|
||||
sudo pacman -S swaybg # Simple and reliable
|
||||
# or: cargo install swww # Smoother transitions
|
||||
```
|
||||
|
||||
## Setup
|
||||
@@ -24,50 +24,32 @@ sudo pacman -S swaybg # Simple and reliable
|
||||
1. **Initial wallpaper setup:**
|
||||
```bash
|
||||
# Set your initial wallpaper
|
||||
./scripts/set-wallpaper.sh /path/to/your/wallpaper.jpg
|
||||
sudo cp ./set-wallpaper.sh /usr/local/bin
|
||||
sudo chmod +x /usr/local/bin/set-wallpaper.sh
|
||||
set-wallpaper.sh /path/to/your/wallpaper.jpg
|
||||
```
|
||||
|
||||
2. **Enable Niri color integration (optional):**
|
||||
Add this line to your `~/.config/niri/config.kdl`:
|
||||
```kdl
|
||||
!include "generated_colors.kdl"
|
||||
```
|
||||
Niri doesn't have a good way to just set colors, you have to edit your main `~/.config/niri/config.kdl`
|
||||
|
||||
The script generates suggestions in `~/quickshell/generated_niri_colors.kdl` you can manually configure in Niri.
|
||||
|
||||
3. **Enable Auto theme:**
|
||||
Open Control Center → Theme Picker → Click the gradient "Auto" button
|
||||
|
||||
## Usage
|
||||
4. **Configure swaybg systemd unit**
|
||||
|
||||
### Change wallpaper and auto-update theme:
|
||||
```bash
|
||||
./scripts/set-wallpaper.sh /new/wallpaper.jpg
|
||||
```
|
||||
[Unit]
|
||||
PartOf=graphical-session.target
|
||||
After=graphical-session.target
|
||||
Requisite=graphical-session.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/swaybg -m fill -i "%h/quickshell/current_wallpaper"
|
||||
Restart=on-failure
|
||||
```
|
||||
|
||||
### Manual theme switching:
|
||||
- Use the Control Center theme picker
|
||||
- Preferences persist across restarts
|
||||
- Auto theme requires wallpaper symlink to exist
|
||||
|
||||
## How it works
|
||||
|
||||
1. **Color extraction:** `Colors.qml` uses Quickshell's ColorQuantizer to extract dominant colors from the wallpaper symlink
|
||||
2. **Persistence:** `Prefs.qml` stores your theme choice using PersistentProperties
|
||||
3. **Dynamic switching:** `Theme.qml` switches between static themes and wallpaper colors
|
||||
4. **Auto-reload:** Quickshell's file watching automatically reloads when the wallpaper symlink changes
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### "Dynamic theme requires wallpaper setup!" error
|
||||
Run the setup command:
|
||||
```bash
|
||||
./scripts/set-wallpaper.sh /path/to/your/wallpaper.jpg
|
||||
```
|
||||
|
||||
### Colors don't update when changing wallpaper
|
||||
- Make sure you're using the script, not manually changing files
|
||||
- The symlink at `~/quickshell/current_wallpaper` must exist
|
||||
|
||||
### Niri colors don't change
|
||||
- Ensure `!include "generated_colors.kdl"` is in your config.kdl
|
||||
- Check that matugen and jq are installed
|
||||
- Look for `~/.config/niri/generated_colors.kdl`
|
||||
systemctl enable --user --now swaybg
|
||||
```
|
||||
Reference in New Issue
Block a user