Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cawa0505/5bb7c83a9a69cadc689cb60db5b26dd1 to your computer and use it in GitHub Desktop.
Save cawa0505/5bb7c83a9a69cadc689cb60db5b26dd1 to your computer and use it in GitHub Desktop.
Sway HiDPI settings (GTK/QT/Sway) - How to
set $cursor_size 54
```
# GTK
# This is the only place where you must set GTK scaling
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'Matcha-dark-sea'
gsettings set $gnome-schema icon-theme 'Numix-Square'
gsettings set org.gnome.desktop.interface text-scaling-factor 2.73
gsettings set org.gnome.desktop.interface cursor-size $cursor_size
}
# Mouse
seat seat0 xcursor_theme breeze 54
# Fonts (For sway window titles only)
font pango:Cantarell 48
# QTK SCALING
# See:
# ~/.zshrc and
# ~/.local/bin/wofi-hidpi
```
That's the important part. With that sway config alone you should have fixed almost everything. The only thing left is to fix QT applications:
.zshrc
```
# DESCRIPTION: This will apply the right size to the QT/Java programs you open from terminal.
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=2.7 export ELM_SCALE=2.7
```
~./local/bin/wofi-hidpi
```
# DESCRIPTION: From now on, you call rofi using this binary. This way any QT/Java progam you open will have the right env vars applied (without having to source your entire zshrc, which would make wofi noticeable slow)
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCALE_FACTOR=2.7 export ELM_SCALE=2.7 exec wofi
```
Things to consider
* On wayland, apps can decide the mouse cursor. For exacple: To this date, running google-chrome-beta in wayland mode, will make the cursor tiny. Just wait untill they fix it.
* If my method is too hard for you, you could just set scaling for your monitor instead, which is way easier to setup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment