Made easier access for Pywal shell script, added light theme

This commit is contained in:
duma97
2025-11-22 17:37:45 +04:00
parent b25f4c90a1
commit 73a9afce88
5 changed files with 144 additions and 27 deletions
+101
View File
@@ -0,0 +1,101 @@
# Light Theme with Pywal
Your shell, Kitty terminal, Hyprland, and Caelestia are now fully integrated with pywal!
## How to Switch Between Light and Dark Themes
### Dark Theme (Default)
```bash
# Generate dark theme from wallpaper
wal -i /path/to/wallpaper.png && ~/pywal.sh
```
### Light Theme
```bash
# Generate light theme from wallpaper (use -l flag)
wal -i /path/to/wallpaper.png -l && ~/pywal.sh
```
## Examples with Your Wallpapers
### Light Theme Examples
```bash
# Bright wallpapers work best for light themes
wal -i ~/.config/hypr/wallpapers/nix-white.png -l && ~/pywal.sh
wal -i ~/.config/hypr/wallpapers/clouds.jpg -l && ~/pywal.sh
wal -i ~/.config/hypr/wallpapers/blue_mountains.JPG -l && ~/pywal.sh
wal -i ~/.config/hypr/wallpapers/mountain_snow_white_clouds_fog.jpg -l && ~/pywal.sh
```
### Dark Theme Examples
```bash
# Dark wallpapers work best for dark themes
wal -i ~/.config/hypr/wallpapers/windows-11-dark.jpg && ~/pywal.sh
wal -i ~/.config/hypr/wallpapers/black-hole-wallpaper.png && ~/pywal.sh
wal -i ~/.config/hypr/wallpapers/berserk-manga.png && ~/pywal.sh
```
## What Gets Themed
When you run `~/pywal.sh`, colors are applied to:
**Kitty Terminal** - Background, foreground, and all 16 terminal colors
**Bash Shell** - Terminal colors via sequences
**Hyprland** - Window borders (active and inactive)
**Caelestia Shell** - Complete Material Design 3 color scheme
## Testing Light Mode Right Now
Try this with a bright wallpaper:
```bash
wal -i ~/.config/hypr/wallpapers/nix-white.png -l && ~/pywal.sh
```
Your terminal should switch to a light theme with dark text on light background!
## Switching Back to Dark
If you want to go back to dark theme:
```bash
# Restore from cache (last used theme)
wal -R && ~/pywal.sh
# Or pick a dark wallpaper
wal -i ~/.config/hypr/wallpapers/windows-11-dark.jpg && ~/pywal.sh
```
## Backend Options for Better Colors
Pywal has different backends that can generate different color palettes:
```bash
# Try different backends for better light theme colors
wal -i /path/to/wallpaper.png -l --backend colorz && ~/pywal.sh
wal -i /path/to/wallpaper.png -l --backend colorthief && ~/pywal.sh
wal -i /path/to/wallpaper.png -l --backend haishoku && ~/pywal.sh
```
## Pro Tips
1. **Light wallpapers** → Use `-l` flag
2. **Dark wallpapers** → Don't use `-l` flag
3. **Kitty colors reload instantly** - No need to restart terminal!
4. **Shell colors apply on new terminal** - Open a new terminal or run: `cat ~/.cache/wal/sequences`
5. **Want consistent theme on login?** Add to your `~/.config/hypr/hyprland.conf`:
```
exec-once = wal -R && ~/pywal.sh
```
## Adjusting Kitty Opacity for Light Themes
If the light theme is too transparent, you can adjust opacity in `~/.config/kitty/kitty.conf`:
```conf
# For light themes, you might want less transparency
background_opacity 0.95
# Or make it fully opaque
background_opacity 1.0
```
Then reload: `killall -SIGUSR1 kitty`
+6 -6
View File
@@ -6,7 +6,7 @@ This setup automatically applies pywal-generated colors to both Hyprland borders
1. **`~/.config/wal/templates/hyprland-colors.conf`** - Template for Hyprland border colors
2. **`~/.config/wal/templates/caelestia-scheme.json`** - Template for Caelestia color scheme
3. **`~/.config/hypr/apply-pywal-colors.sh`** - Script to apply colors to both systems
3. **`~/pywal.sh`** - Easy-to-use script to apply colors to both systems
## How It Works
@@ -25,8 +25,8 @@ Already done! Your Hyprland config now sources pywal colors automatically.
# Generate colors from a wallpaper
wal -i /path/to/your/wallpaper.png
# Apply colors to Hyprland and Caelestia
~/.config/hypr/apply-pywal-colors.sh
# Apply colors to Hyprland and Caelestia (from anywhere!)
~/pywal.sh
```
### Regenerate from Current Wallpaper
@@ -35,13 +35,13 @@ wal -i /path/to/your/wallpaper.png
wal -R
# Apply colors
~/.config/hypr/apply-pywal-colors.sh
~/pywal.sh
```
### Quick Apply
```bash
# One-liner to generate and apply colors
wal -i /path/to/wallpaper.png && ~/.config/hypr/apply-pywal-colors.sh
wal -i /path/to/wallpaper.png && ~/pywal.sh
```
## What Gets Colored
@@ -72,7 +72,7 @@ After editing templates, run `wal -R` to regenerate colors.
To automatically apply pywal colors on wallpaper change, you can add this to your autostart:
```bash
# In your ~/.config/hypr/hyprland.conf
exec-once = ~/.config/hypr/apply-pywal-colors.sh
exec-once = ~/pywal.sh
```
Or create a wallpaper script that calls pywal automatically.
+12 -8
View File
@@ -39,10 +39,14 @@ cp wal/templates/caelestia-scheme.json ~/.config/wal/templates/
```bash
# Copy the color application script to your hypr config
cp apply-pywal-colors.sh ~/.config/hypr/
cp pywal.sh ~/.config/hypr/
# Make it executable
chmod +x ~/.config/hypr/apply-pywal-colors.sh
chmod +x ~/.config/hypr/pywal.sh
# Also copy to home directory for easier access
cp pywal.sh ~/pywal.sh
chmod +x ~/pywal.sh
```
### 4. Link Hyprland Config
@@ -65,22 +69,22 @@ ln -s ~/hyprduma-config/hyprland.conf ~/.config/hypr/hyprland.conf
# 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
# Apply the generated colors to Hyprland and Caelestia (from anywhere)
~/pywal.sh
```
### Quick Apply (One Command)
```bash
# Generate and apply in one go
wal -i /path/to/wallpaper.png && ~/.config/hypr/apply-pywal-colors.sh
wal -i /path/to/wallpaper.png && ~/pywal.sh
```
### Regenerate from Current Wallpaper
```bash
# Regenerate colors from cached wallpaper
wal -R && ~/.config/hypr/apply-pywal-colors.sh
wal -R && ~/pywal.sh
```
## What Gets Themed
@@ -100,7 +104,7 @@ wal -R && ~/.config/hypr/apply-pywal-colors.sh
```
hyprduma-config/
├── hyprland.conf # Main config with pywal integration
├── apply-pywal-colors.sh # Script to apply colors
├── pywal.sh # Script to apply colors (easy name!)
└── wal/
└── templates/
├── hyprland-colors.conf # Hyprland border colors template
@@ -155,7 +159,7 @@ If using `waypaper`, `hyprpaper`, or similar:
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
wal -i /path/to/wallpaper.png && ~/pywal.sh
```
## Troubleshooting
+15 -11
View File
@@ -77,13 +77,13 @@ sudo pacman -S telegram-desktop spotify code
yay -S google-chrome zen-browser-bin # or your preferred browser
```
### Step 3: Install Caelestia Shell (Optional)
### Step 3: Install Caelestia Shell (Recommended)
Caelestia is a modern shell with AI features that integrates with the pywal theming system.
```bash
# Install Caelestia via cargo
cargo install caelestia
# Install Caelestia via yay
yay -S caelestia-shell # caelestia-shell-git is bleeding edge & unstable one
# Start Caelestia daemon (it will auto-restart when pywal colors change)
caelestia shell -d &
@@ -159,16 +159,20 @@ mkdir -p ~/.config/wal/templates
cp -r wal/templates/* ~/.config/wal/templates/
# Copy the color application and wallpaper sync scripts
cp apply-pywal-colors.sh ~/.config/hypr/
cp pywal.sh ~/.config/hypr/
cp sync-caelestia-wallpaper.sh ~/.config/hypr/
chmod +x ~/.config/hypr/apply-pywal-colors.sh
chmod +x ~/.config/hypr/pywal.sh
chmod +x ~/.config/hypr/sync-caelestia-wallpaper.sh
# Also copy to home directory for easier access
cp pywal.sh ~/pywal.sh
chmod +x ~/pywal.sh
# Test pywal with a wallpaper
wal -i /path/to/your/wallpaper.png
# Apply colors to Hyprland and Caelestia
~/.config/hypr/apply-pywal-colors.sh
# Apply colors to Hyprland and Caelestia (from anywhere)
~/pywal.sh
```
**What this does:**
@@ -223,10 +227,10 @@ nvim ~/.config/hypr/hyprland.conf
```bash
# Generate colors and apply them
wal -i /path/to/wallpaper.png && ~/.config/hypr/apply-pywal-colors.sh
wal -i /path/to/wallpaper.png && ~/pywal.sh
# Or use the wallpapers included in this repo
wal -i ~/.config/hypr/wallpapers/sakura.jpg && ~/.config/hypr/apply-pywal-colors.sh
wal -i ~/.config/hypr/wallpapers/sakura.jpg && ~/pywal.sh
```
**Note about waypaper and Caelestia:**
@@ -278,9 +282,9 @@ kb_layout = us, ru # Change to your layouts
- Check if the applications are actually installed
### Pywal colors not applying
- Ensure the script is executable: `chmod +x ~/.config/hypr/apply-pywal-colors.sh`
- Ensure the script is executable: `chmod +x ~/pywal.sh`
- Check if pywal cache exists: `ls ~/.cache/wal/`
- Manually reload: `~/.config/hypr/apply-pywal-colors.sh`
- Manually reload: `~/pywal.sh`
### Caelestia colors not updating
```bash
+10 -2
View File
@@ -1,10 +1,10 @@
#!/bin/bash
# Script to apply pywal colors to Hyprland and Caelestia shell
# Script to apply pywal colors to Hyprland, Caelestia shell, and Kitty terminal
# Generate pywal colors (this assumes you've already run 'wal -i /path/to/wallpaper')
# The templates will be automatically processed
echo "Applying pywal colors to Hyprland and Caelestia..."
echo "Applying pywal colors to Hyprland, Caelestia, and Kitty..."
# Update Caelestia's wallpaper reference to match the one pywal used
if [ -f ~/.cache/wal/wal ]; then
@@ -36,4 +36,12 @@ if pgrep -x "caelestia" > /dev/null; then
echo "✓ Caelestia shell restarted"
fi
# Reload all running Kitty instances
if command -v kitty &> /dev/null; then
if pgrep -x "kitty" > /dev/null; then
killall -SIGUSR1 kitty 2>/dev/null
echo "✓ Kitty terminal colors reloaded"
fi
fi
echo "Done! Colors applied successfully."