mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
add pywalfox for matugen
This commit is contained in:
@@ -267,7 +267,7 @@ PanelWindow {
|
||||
|
||||
transform: Translate {
|
||||
id: topBarSlide
|
||||
y: Math.round(topBarCore.reveal ? 0 : -(root.effectiveBarHeight + (SettingsData.topBarGothCornersEnabled ? root._wingR : 0)))
|
||||
y: Math.round(topBarCore.reveal ? 0 : -root.implicitHeight)
|
||||
|
||||
Behavior on y {
|
||||
NumberAnimation {
|
||||
|
||||
15
README.md
15
README.md
@@ -491,6 +491,21 @@ Nevigate to dms settings -> themes & colors -> and click "Apply QT Themes"
|
||||
|
||||
#### Firefox
|
||||
|
||||
There are two theme paths for Firefox, using with [pywalfox](https://github.com/Frewacom/pywalfox) or [material fox](https://github.com/edelvarden/material-fox-updated)
|
||||
|
||||
**(Option 1) - pywalfox
|
||||
|
||||
1. **Install [pywalfox](https://github.com/Frewacom/pywalfox) on system.
|
||||
- Available in AUR via `paru -S python-pywalfox`
|
||||
|
||||
2. **Install [pywalfox extension](https://addons.mozilla.org/firefox/addon/pywalfox/) in firefox.
|
||||
|
||||
3. **Restart dms to generate palette and then enable dank colors.
|
||||
- Run `ln -sf ~/.cache/wal/dank-pywalfox.json ~/.cache/wal/colors.json`
|
||||
|
||||
|
||||
**(Option 2) - Chrome-like theme with dynamic colors**
|
||||
|
||||
Firefox does use the GTK3 theme, but it doesn't look that good on the stock theme IMO. A separate matugen css is generated for the [material fox](https://github.com/edelvarden/material-fox-updated) theme, you can configure that theme with dynamic colors by following the steps below.
|
||||
|
||||
1. **In firefox, navigate to `about:config`**
|
||||
|
||||
3
matugen/configs/pywalfox.toml
Normal file
3
matugen/configs/pywalfox.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
[templates.pywalfox]
|
||||
input_path = './matugen/templates/pywalfox-colors.json'
|
||||
output_path = '~/.cache/wal/dank-pywalfox.json'
|
||||
22
matugen/templates/pywalfox-colors.json
Normal file
22
matugen/templates/pywalfox-colors.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"wallpaper": "{{image}}",
|
||||
"alpha": "100",
|
||||
"colors": {
|
||||
"color0": "{{colors.background.default.hex}}",
|
||||
"color1": "",
|
||||
"color2": "",
|
||||
"color3": "",
|
||||
"color4": "",
|
||||
"color5": "",
|
||||
"color6": "",
|
||||
"color7": "",
|
||||
"color8": "",
|
||||
"color9": "",
|
||||
"color10": "{{colors.primary.default.hex}}",
|
||||
"color11": "",
|
||||
"color12": "",
|
||||
"color13": "{{colors.surface_bright.default.hex}}",
|
||||
"color14": "",
|
||||
"color15": "{{colors.on_surface.default.hex}}"
|
||||
}
|
||||
}
|
||||
@@ -89,6 +89,11 @@ build_once() {
|
||||
cat "$SHELL_DIR/matugen/configs/firefox.toml" >> "$TMP_CFG"
|
||||
echo "" >> "$TMP_CFG"
|
||||
fi
|
||||
|
||||
if command -v pywalfox >/dev/null 2>&1; then
|
||||
cat "$SHELL_DIR/matugen/configs/pywalfox.toml" >> "$TMP_CFG"
|
||||
echo "" >> "$TMP_CFG"
|
||||
fi
|
||||
|
||||
# GTK3 colors based on colloid
|
||||
COLLOID_TEMPLATE="$SHELL_DIR/matugen/templates/gtk3-colors.css"
|
||||
@@ -193,6 +198,11 @@ build_once() {
|
||||
fi
|
||||
}
|
||||
|
||||
# if pywalfox is installed and ~/.cache/wal/colors.json exists, run update
|
||||
if command -v pywalfox >/dev/null 2>&1 && [[ -f "$HOME/.cache/wal/colors.json" ]]; then
|
||||
pywalfox update >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
while :; do
|
||||
DESIRED="$(read_desired)"
|
||||
WANT_KEY="$(key_of "$DESIRED")"
|
||||
|
||||
Reference in New Issue
Block a user