Restrict dimensions of gtk3 file chooser on phone screens

Signed-off-by: Stacy Harper <contact@stacyharper.net>
This commit is contained in:
Maarten van Gompel 2021-07-23 23:23:39 +02:00 committed by Stacy Harper
parent 8658534ace
commit 41e66a0164
No known key found for this signature in database
GPG key ID: 5BAC92328B7C5D65

View file

@ -47,6 +47,11 @@ xdefaults() {
done
[ -e "$HOME"/.Xresources ] && xrdb -merge "$HOME"/.Xresources
synclient TapButton1=1 TapButton2=3 TapButton3=2 MinSpeed=0.25
SCREENWIDTH=$(xrandr | grep "Screen 0" | cut -d" " -f 8)
SCREENHEIGHT=$(xrandr | grep "Screen 0" | cut -d" " -f 10 | tr -d ",")
if [ "$SCREENWIDTH" -lt 1024 ] || [ "$SCREENHEIGHT" -lt 768 ]; then
gsettings set org.gtk.Settings.FileChooser window-size "($SCREENWIDTH,$((SCREENHEIGHT / 2)))"
fi
}
defaultkeyboard() {