To make LibreWolf appear smaller, you'll need to adjust both system-level settings and internal LibreWolf preferences, since your current configuration scales elements globally. Here's a step-by-step solution:
1. Reduce System-Wide DPI (Recommended)
Your Xft.dpi: 150 forces larger UI elements. Revert to the standard DPI (96) or a lower custom value:
bash
# Edit ~/.Xresources or ~/.Xdefaults
Xft.dpi: 96 # Standard DPI (reset scaling)
Apply changes:
bash
xrdb ~/.Xresources
2. Adjust Qt Scaling (If Needed)
If Qt apps become too small after reducing DPI, tweak the scale factors instead:
bash
# Remove or lower QT_SCALE_FACTOR in your shell RC (e.g., ~/.bashrc)
export QT_SCALE_FACTOR=1.0 # Default scale
export QT_AUTO_SCREEN_SCALE_FACTOR=0 # Disable auto-scaling
3. Override Scaling in LibreWolf
LibreWolf inherits system DPI but has its own scaling control:
Open LibreWolf and navigate to about:config.
Search for layout.css.devPixelsPerPx.
Set it to a decimal value (e.g., 1.0 for 100%, 0.8 for 80%):
plaintext
1.0 = 100% (matches 96 DPI)
0.7 = 70% (smaller than your current setup)
Example: To approximate 96 DPI while keeping your system at 150 DPI, calculate: 96 / 150 = 0.64 → set layout.css.devPixelsPerPx to 0.64.
4. Zoom Out Web Content
Press Ctrl+- (minus) to reduce webpage zoom globally. To persist zoom per-site:
LibreWolf uses GTK3. Override its scaling independently:
bash
# Add to ~/.profile or ~/.bashrc
export GDK_SCALE=1
export GDK_DPI_SCALE=0.75 # Compensates for high DPI (e.g., 150 → 112.5 effective DPI)
Summary of Changes
Component
Setting
Recommended Value
Effect
System Fonts/DPI
Xft.dpi in ~/.Xresources
96
Reduces global text/element size
LibreWolf Internal
layout.css.devPixelsPerPx (via about:config)
0.8 (or custom)
Shrinks UI independently
Qt Apps
QT_SCALE_FACTOR
1.0 (or remove)
Prevents over-scaling Qt apps
GTK3 Fallback
GDK_DPI_SCALE
0.75
Fine-tunes LibreWolf UI size
Restart LibreWolf and your session after making changes. If elements are still too large, gradually decrease layout.css.devPixelsPerPx (e.g., from 0.8 → 0.7).