Step 1. Add Xft.dpi
to ~/.Xresources
# touch ~/.Xresources
vim ~/.Xresources
Add the following:
Xft.dpi: 144
Step 2. Use xlayoutdisplay
to set a custom DPI value
alex-courtis/xlayoutdisplay - GitHub
# install xlayoutdisplay
xlayoutdisplay -p HDMI-0 -d 144
Then, copy and run the command like
xrandr \
--dpi 144 \
--output DVI-D-0 --off \
--output HDMI-0 --mode 3840x2160 --rate 60 --pos 0x0 --primary \
--output HDMI-1 --off \
--output DP-0 --off \
--output DP-1 --off \
--output DP-2 --off \
--output DP-3 --off \
--output DP-1-3 --off \
--output HDMI-1-3 --off \
--output HDMI-1-4 --off \
--output HDMI-1-5 --off \
--output DP-1-4 --off
echo "Xft.dpi: 144" | xrdb -merge
Step 3. Change the rofi
's DPI value
vim ~/.config/i3/config
- bindsym $mod+d exec --no-startup-id "rofi"
+ bindsym $mod+d exec --no-startup-id "rofi -dpi 144"
Top comments (0)