mirror of
https://github.com/duma799/hyprduma-config.git
synced 2026-05-14 06:31:00 +00:00
Added caelestia shell + pywal full integration and much more.
This commit is contained in:
+213
@@ -0,0 +1,213 @@
|
|||||||
|
# Pywal Color Integration Setup
|
||||||
|
|
||||||
|
This dotfiles repository includes pywal integration for dynamic color theming based on your wallpaper. The setup works with both Hyprland borders and Caelestia shell.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- `pywal` (python-pywal) installed
|
||||||
|
- Hyprland window manager
|
||||||
|
- Caelestia shell (optional, for full integration)
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### 1. Install pywal
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Arch Linux
|
||||||
|
sudo pacman -S python-pywal
|
||||||
|
|
||||||
|
# Or via pip
|
||||||
|
pip install pywal
|
||||||
|
```
|
||||||
|
|
||||||
|
### 2. Copy Template Files
|
||||||
|
|
||||||
|
Copy the pywal template files to your config directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Create templates directory if it doesn't exist
|
||||||
|
mkdir -p ~/.config/wal/templates
|
||||||
|
|
||||||
|
# Copy Hyprland border colors template
|
||||||
|
cp wal/templates/hyprland-colors.conf ~/.config/wal/templates/
|
||||||
|
|
||||||
|
# Copy Caelestia color scheme template (if using Caelestia)
|
||||||
|
cp wal/templates/caelestia-scheme.json ~/.config/wal/templates/
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Copy the Apply Script
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Copy the color application script to your hypr config
|
||||||
|
cp apply-pywal-colors.sh ~/.config/hypr/
|
||||||
|
|
||||||
|
# Make it executable
|
||||||
|
chmod +x ~/.config/hypr/apply-pywal-colors.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### 4. Link Hyprland Config
|
||||||
|
|
||||||
|
If you haven't already, link the Hyprland config:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Backup existing config if needed
|
||||||
|
mv ~/.config/hypr/hyprland.conf ~/.config/hypr/hyprland.conf.backup
|
||||||
|
|
||||||
|
# Link the new config
|
||||||
|
ln -s ~/hyprduma-config/hyprland.conf ~/.config/hypr/hyprland.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Generate Colors from Wallpaper
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Generate color palette from a wallpaper
|
||||||
|
wal -i /path/to/your/wallpaper.png
|
||||||
|
|
||||||
|
# Apply the generated colors to Hyprland and Caelestia
|
||||||
|
~/.config/hypr/apply-pywal-colors.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Quick Apply (One Command)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Generate and apply in one go
|
||||||
|
wal -i /path/to/wallpaper.png && ~/.config/hypr/apply-pywal-colors.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
### Regenerate from Current Wallpaper
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Regenerate colors from cached wallpaper
|
||||||
|
wal -R && ~/.config/hypr/apply-pywal-colors.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## What Gets Themed
|
||||||
|
|
||||||
|
### Hyprland
|
||||||
|
- **Active window borders**: Gradient using pywal colors 4 and 6
|
||||||
|
- **Inactive window borders**: Using pywal color 8 (muted gray tone)
|
||||||
|
|
||||||
|
### Caelestia Shell (if installed)
|
||||||
|
- Complete Material Design 3 color scheme
|
||||||
|
- Terminal colors (color0-color15)
|
||||||
|
- Background, surface, and accent colors
|
||||||
|
- All UI elements adapt to wallpaper colors
|
||||||
|
|
||||||
|
## Files Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
hyprduma-config/
|
||||||
|
├── hyprland.conf # Main config with pywal integration
|
||||||
|
├── apply-pywal-colors.sh # Script to apply colors
|
||||||
|
└── wal/
|
||||||
|
└── templates/
|
||||||
|
├── hyprland-colors.conf # Hyprland border colors template
|
||||||
|
└── caelestia-scheme.json # Caelestia color scheme template
|
||||||
|
```
|
||||||
|
|
||||||
|
## Customization
|
||||||
|
|
||||||
|
### Changing Border Color Mapping
|
||||||
|
|
||||||
|
Edit `~/.config/wal/templates/hyprland-colors.conf`:
|
||||||
|
|
||||||
|
```conf
|
||||||
|
# Example: Use different colors for borders
|
||||||
|
general {
|
||||||
|
col.active_border = rgba({color2.strip}ee) rgba({color5.strip}ee) 45deg
|
||||||
|
col.inactive_border = rgba({color0.strip}aa)
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Available variables:
|
||||||
|
- `{color0}` through `{color15}` - Palette colors
|
||||||
|
- `{background}` - Background color
|
||||||
|
- `{foreground}` - Foreground/text color
|
||||||
|
- `{cursor}` - Cursor color
|
||||||
|
|
||||||
|
After editing, regenerate colors with `wal -R`.
|
||||||
|
|
||||||
|
### Modifying Caelestia Colors
|
||||||
|
|
||||||
|
Edit `~/.config/wal/templates/caelestia-scheme.json` to change how pywal colors map to Caelestia's Material Design 3 scheme.
|
||||||
|
|
||||||
|
## Automation
|
||||||
|
|
||||||
|
### Auto-apply on Hyprland Startup
|
||||||
|
|
||||||
|
The colors are automatically loaded via the `source` directive in `hyprland.conf`. However, to regenerate on startup:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Add to hyprland.conf autostart section
|
||||||
|
exec-once = wal -R -n
|
||||||
|
```
|
||||||
|
|
||||||
|
### Integrate with Wallpaper Managers
|
||||||
|
|
||||||
|
If using `waypaper`, `hyprpaper`, or similar:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Create a wrapper script that sets wallpaper and applies colors
|
||||||
|
#!/bin/bash
|
||||||
|
# Set wallpaper with your tool of choice
|
||||||
|
hyprctl hyprpaper wallpaper "eDP-1,/path/to/wallpaper.png"
|
||||||
|
|
||||||
|
# Generate and apply pywal colors
|
||||||
|
wal -i /path/to/wallpaper.png && ~/.config/hypr/apply-pywal-colors.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Colors not updating in Hyprland
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Reload Hyprland configuration
|
||||||
|
hyprctl reload
|
||||||
|
```
|
||||||
|
|
||||||
|
### Colors not updating in Caelestia
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Restart Caelestia shell
|
||||||
|
pkill caelestia && sleep 0.5 && caelestia shell -d &
|
||||||
|
```
|
||||||
|
|
||||||
|
### Hyprland fails to start (source file not found)
|
||||||
|
|
||||||
|
If pywal hasn't been run yet, the source file won't exist. Either:
|
||||||
|
|
||||||
|
1. Run `wal -i /path/to/wallpaper.png` once to generate initial colors
|
||||||
|
2. Or comment out the `source` line in `hyprland.conf` until you set up pywal
|
||||||
|
|
||||||
|
### Check Generated Files
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# View generated Hyprland colors
|
||||||
|
cat ~/.cache/wal/hyprland-colors.conf
|
||||||
|
|
||||||
|
# View generated Caelestia scheme
|
||||||
|
cat ~/.cache/wal/caelestia-scheme.json
|
||||||
|
|
||||||
|
# View pywal color palette
|
||||||
|
cat ~/.cache/wal/colors.json
|
||||||
|
```
|
||||||
|
|
||||||
|
## Pywal Backend Options
|
||||||
|
|
||||||
|
Pywal supports different color extraction backends:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Use imagemagick (default)
|
||||||
|
wal -i /path/to/wallpaper.png
|
||||||
|
|
||||||
|
# Use colorz (more vibrant colors)
|
||||||
|
wal -i /path/to/wallpaper.png --backend colorz
|
||||||
|
|
||||||
|
# Use colorthief
|
||||||
|
wal -i /path/to/wallpaper.png --backend colorthief
|
||||||
|
|
||||||
|
# Use haishoku
|
||||||
|
wal -i /path/to/wallpaper.png --backend haishoku
|
||||||
|
```
|
||||||
@@ -14,6 +14,7 @@ Personal Hyprland configuration focused on productivity and ergonomics.
|
|||||||
- Smooth custom animations with bezier curves
|
- Smooth custom animations with bezier curves
|
||||||
- Automatic floating for file pickers and dialogs (in progress)
|
- Automatic floating for file pickers and dialogs (in progress)
|
||||||
- Picture-in-Picture auto-positioning (in progress)
|
- Picture-in-Picture auto-positioning (in progress)
|
||||||
|
- **Pywal integration** - Dynamic colors from wallpaper (optional)
|
||||||
|
|
||||||
### Input
|
### Input
|
||||||
- 3-finger gestures (horizontal: workspace, vertical: fullscreen)
|
- 3-finger gestures (horizontal: workspace, vertical: fullscreen)
|
||||||
@@ -79,6 +80,26 @@ nvim ~/.config/hypr/hyprland.conf
|
|||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
- **[KEYBINDS.md](KEYBINDS.md)** - Complete keybindings reference
|
- **[KEYBINDS.md](KEYBINDS.md)** - Complete keybindings reference
|
||||||
|
- **[PYWAL-SETUP.md](PYWAL-SETUP.md)** - Pywal color integration setup guide (optional)
|
||||||
|
|
||||||
|
## Optional: Pywal Integration
|
||||||
|
|
||||||
|
This config includes optional pywal integration for dynamic theming based on your wallpaper. See [PYWAL-SETUP.md](PYWAL-SETUP.md) for installation and usage instructions.
|
||||||
|
|
||||||
|
**Quick setup:**
|
||||||
|
```bash
|
||||||
|
# Install pywal
|
||||||
|
sudo pacman -S python-pywal
|
||||||
|
|
||||||
|
# Copy templates and script
|
||||||
|
mkdir -p ~/.config/wal/templates
|
||||||
|
cp wal/templates/* ~/.config/wal/templates/
|
||||||
|
cp apply-pywal-colors.sh ~/.config/hypr/
|
||||||
|
chmod +x ~/.config/hypr/apply-pywal-colors.sh
|
||||||
|
|
||||||
|
# Generate colors from wallpaper
|
||||||
|
wal -i /path/to/wallpaper.png && ~/.config/hypr/apply-pywal-colors.sh
|
||||||
|
```
|
||||||
|
|
||||||
## Note
|
## Note
|
||||||
|
|
||||||
|
|||||||
Executable
+24
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Script to apply pywal colors to Hyprland and Caelestia shell
|
||||||
|
|
||||||
|
echo "Applying pywal colors to Hyprland and Caelestia..."
|
||||||
|
|
||||||
|
if [ -f ~/.cache/wal/caelestia-scheme.json ]; then
|
||||||
|
mkdir -p ~/.local/state/caelestia
|
||||||
|
cp ~/.cache/wal/caelestia-scheme.json ~/.local/state/caelestia/scheme.json
|
||||||
|
echo "✓ Caelestia colors updated"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v hyprctl &> /dev/null; then
|
||||||
|
hyprctl reload
|
||||||
|
echo "✓ Hyprland configuration reloaded"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if pgrep -x "caelestia" > /dev/null; then
|
||||||
|
pkill caelestia
|
||||||
|
sleep 0.5
|
||||||
|
caelestia shell -d &
|
||||||
|
echo "✓ Caelestia shell restarted"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Done! Colors applied successfully."
|
||||||
+10
-11
@@ -57,8 +57,10 @@ input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Gestures
|
# Gestures
|
||||||
#gesture = 3, horizontal, workspace
|
gesture = 3, horizontal, workspace
|
||||||
#gesture = 3, vertical, fullscreen
|
gesture = 3, vertical, fullscreen
|
||||||
|
|
||||||
|
source = ~/.cache/wal/hyprland-colors.conf
|
||||||
|
|
||||||
# General settings
|
# General settings
|
||||||
general {
|
general {
|
||||||
@@ -72,9 +74,6 @@ general {
|
|||||||
|
|
||||||
layout = dwindle
|
layout = dwindle
|
||||||
|
|
||||||
# Border colors (Caelestia style)
|
|
||||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
|
||||||
col.inactive_border = rgba(595959aa)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Decoration settings (borders)
|
# Decoration settings (borders)
|
||||||
@@ -85,12 +84,12 @@ decoration {
|
|||||||
active_opacity = 0.985
|
active_opacity = 0.985
|
||||||
inactive_opacity = 0.85
|
inactive_opacity = 0.85
|
||||||
|
|
||||||
#shadow {
|
shadow {
|
||||||
# enabled = true
|
enabled = true
|
||||||
# range = 4
|
range = 4
|
||||||
# render_power = 3
|
render_power = 3
|
||||||
# color = rgba(1a1a1aee)
|
color = rgba(1a1a1aee)
|
||||||
#}
|
}
|
||||||
|
|
||||||
blur {
|
blur {
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
{{
|
||||||
|
"name": "pywal",
|
||||||
|
"flavour": "pywal",
|
||||||
|
"mode": "dark",
|
||||||
|
"variant": "tonalspot",
|
||||||
|
"colours": {{
|
||||||
|
"primary_paletteKeyColor": "{color4.strip}",
|
||||||
|
"secondary_paletteKeyColor": "{color5.strip}",
|
||||||
|
"tertiary_paletteKeyColor": "{color6.strip}",
|
||||||
|
"neutral_paletteKeyColor": "{color8.strip}",
|
||||||
|
"neutral_variant_paletteKeyColor": "{color8.strip}",
|
||||||
|
"background": "{background.strip}",
|
||||||
|
"onBackground": "{foreground.strip}",
|
||||||
|
"surface": "{background.strip}",
|
||||||
|
"surfaceDim": "{background.strip}",
|
||||||
|
"surfaceBright": "{color8.strip}",
|
||||||
|
"surfaceContainerLowest": "{color0.strip}",
|
||||||
|
"surfaceContainerLow": "{color0.strip}",
|
||||||
|
"surfaceContainer": "{color0.strip}",
|
||||||
|
"surfaceContainerHigh": "{color8.strip}",
|
||||||
|
"surfaceContainerHighest": "{color8.strip}",
|
||||||
|
"onSurface": "{foreground.strip}",
|
||||||
|
"surfaceVariant": "{color8.strip}",
|
||||||
|
"onSurfaceVariant": "{color7.strip}",
|
||||||
|
"inverseSurface": "{foreground.strip}",
|
||||||
|
"inverseOnSurface": "{background.strip}",
|
||||||
|
"outline": "{color8.strip}",
|
||||||
|
"outlineVariant": "{color8.strip}",
|
||||||
|
"shadow": "000000",
|
||||||
|
"scrim": "000000",
|
||||||
|
"surfaceTint": "{color4.strip}",
|
||||||
|
"primary": "{color4.strip}",
|
||||||
|
"onPrimary": "{background.strip}",
|
||||||
|
"primaryContainer": "{color4.strip}",
|
||||||
|
"onPrimaryContainer": "{foreground.strip}",
|
||||||
|
"inversePrimary": "{color12.strip}",
|
||||||
|
"secondary": "{color5.strip}",
|
||||||
|
"onSecondary": "{background.strip}",
|
||||||
|
"secondaryContainer": "{color5.strip}",
|
||||||
|
"onSecondaryContainer": "{foreground.strip}",
|
||||||
|
"tertiary": "{color6.strip}",
|
||||||
|
"onTertiary": "{background.strip}",
|
||||||
|
"tertiaryContainer": "{color6.strip}",
|
||||||
|
"onTertiaryContainer": "{foreground.strip}",
|
||||||
|
"error": "{color1.strip}",
|
||||||
|
"onError": "{background.strip}",
|
||||||
|
"errorContainer": "{color1.strip}",
|
||||||
|
"onErrorContainer": "{foreground.strip}",
|
||||||
|
"primaryFixed": "{color12.strip}",
|
||||||
|
"primaryFixedDim": "{color4.strip}",
|
||||||
|
"onPrimaryFixed": "{background.strip}",
|
||||||
|
"onPrimaryFixedVariant": "{color0.strip}",
|
||||||
|
"secondaryFixed": "{color13.strip}",
|
||||||
|
"secondaryFixedDim": "{color5.strip}",
|
||||||
|
"onSecondaryFixed": "{background.strip}",
|
||||||
|
"onSecondaryFixedVariant": "{color0.strip}",
|
||||||
|
"tertiaryFixed": "{color14.strip}",
|
||||||
|
"tertiaryFixedDim": "{color6.strip}",
|
||||||
|
"onTertiaryFixed": "{background.strip}",
|
||||||
|
"onTertiaryFixedVariant": "{color0.strip}",
|
||||||
|
"term0": "{color0.strip}",
|
||||||
|
"term1": "{color1.strip}",
|
||||||
|
"term2": "{color2.strip}",
|
||||||
|
"term3": "{color3.strip}",
|
||||||
|
"term4": "{color4.strip}",
|
||||||
|
"term5": "{color5.strip}",
|
||||||
|
"term6": "{color6.strip}",
|
||||||
|
"term7": "{color7.strip}",
|
||||||
|
"term8": "{color8.strip}",
|
||||||
|
"term9": "{color9.strip}",
|
||||||
|
"term10": "{color10.strip}",
|
||||||
|
"term11": "{color11.strip}",
|
||||||
|
"term12": "{color12.strip}",
|
||||||
|
"term13": "{color13.strip}",
|
||||||
|
"term14": "{color14.strip}",
|
||||||
|
"term15": "{color15.strip}",
|
||||||
|
"rosewater": "{color7.strip}",
|
||||||
|
"flamingo": "{color7.strip}",
|
||||||
|
"pink": "{color5.strip}",
|
||||||
|
"mauve": "{color4.strip}",
|
||||||
|
"red": "{color1.strip}",
|
||||||
|
"maroon": "{color1.strip}",
|
||||||
|
"peach": "{color3.strip}",
|
||||||
|
"yellow": "{color3.strip}",
|
||||||
|
"green": "{color2.strip}",
|
||||||
|
"teal": "{color6.strip}",
|
||||||
|
"sky": "{color6.strip}",
|
||||||
|
"sapphire": "{color4.strip}",
|
||||||
|
"blue": "{color4.strip}",
|
||||||
|
"lavender": "{color4.strip}",
|
||||||
|
"klink": "{color4.strip}",
|
||||||
|
"klinkSelection": "{color12.strip}",
|
||||||
|
"kvisited": "{color5.strip}",
|
||||||
|
"kvisitedSelection": "{color13.strip}",
|
||||||
|
"knegative": "{color1.strip}",
|
||||||
|
"knegativeSelection": "{color9.strip}",
|
||||||
|
"kneutral": "{color3.strip}",
|
||||||
|
"kneutralSelection": "{color11.strip}",
|
||||||
|
"kpositive": "{color2.strip}",
|
||||||
|
"kpositiveSelection": "{color10.strip}",
|
||||||
|
"text": "{foreground.strip}",
|
||||||
|
"subtext1": "{color7.strip}",
|
||||||
|
"subtext0": "{color8.strip}",
|
||||||
|
"overlay2": "{color8.strip}",
|
||||||
|
"overlay1": "{color8.strip}",
|
||||||
|
"overlay0": "{color8.strip}",
|
||||||
|
"surface2": "{color8.strip}",
|
||||||
|
"surface1": "{color0.strip}",
|
||||||
|
"surface0": "{color0.strip}",
|
||||||
|
"base": "{background.strip}",
|
||||||
|
"mantle": "{background.strip}",
|
||||||
|
"crust": "{color0.strip}",
|
||||||
|
"success": "{color2.strip}",
|
||||||
|
"onSuccess": "{background.strip}",
|
||||||
|
"successContainer": "{color2.strip}",
|
||||||
|
"onSuccessContainer": "{foreground.strip}"
|
||||||
|
}}
|
||||||
|
}}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# Pywal generated color configuration for Hyprland
|
||||||
|
# This file is automatically generated by pywal
|
||||||
|
|
||||||
|
# Border colors using pywal palette
|
||||||
|
$pywal_color1 = rgb({color1.strip})
|
||||||
|
$pywal_color2 = rgb({color2.strip})
|
||||||
|
$pywal_color3 = rgb({color3.strip})
|
||||||
|
$pywal_color4 = rgb({color4.strip})
|
||||||
|
$pywal_color5 = rgb({color5.strip})
|
||||||
|
$pywal_color6 = rgb({color6.strip})
|
||||||
|
$pywal_color8 = rgb({color8.strip})
|
||||||
|
$pywal_background = rgb({background.strip})
|
||||||
|
$pywal_foreground = rgb({foreground.strip})
|
||||||
|
|
||||||
|
# Active border: gradient from color4 to color6
|
||||||
|
general {{
|
||||||
|
col.active_border = rgba({color4.strip}ee) rgba({color6.strip}ee) 45deg
|
||||||
|
col.inactive_border = rgba({color8.strip}aa)
|
||||||
|
}}
|
||||||
Reference in New Issue
Block a user