From c3bfe46e79222556f36eb4a2033c98ccecad7d72 Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Wed, 27 Mar 2024 23:17:46 -0400 Subject: [PATCH 1/2] add basic hidpi --- hypr/conf/hidpi.conf | 6 ++++++ hypr/conf/monitors/4k.conf | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 hypr/conf/hidpi.conf create mode 100644 hypr/conf/monitors/4k.conf diff --git a/hypr/conf/hidpi.conf b/hypr/conf/hidpi.conf new file mode 100644 index 0000000..12ac8ca --- /dev/null +++ b/hypr/conf/hidpi.conf @@ -0,0 +1,6 @@ +xwayland { + force_zero_scaling = true +} + +env = GDK_SCALE,2 +env = QT_SCALE_FACTOR=2 diff --git a/hypr/conf/monitors/4k.conf b/hypr/conf/monitors/4k.conf new file mode 100644 index 0000000..8fa8a3c --- /dev/null +++ b/hypr/conf/monitors/4k.conf @@ -0,0 +1,6 @@ +# ----------------------------------------------------- +# Monitor Setup +# name: "Default" +# ----------------------------------------------------- + +monitor=,preferred,auto,2 From 943cb53c93015f5e290199aab3c639393498764d Mon Sep 17 00:00:00 2001 From: Yingjie Wang Date: Thu, 28 Mar 2024 01:45:39 -0400 Subject: [PATCH 2/2] add hidpi in install.sh --- .install/hidpi.sh | 18 ++++++++++++++++++ install.sh | 1 + 2 files changed, 19 insertions(+) create mode 100644 .install/hidpi.sh diff --git a/.install/hidpi.sh b/.install/hidpi.sh new file mode 100644 index 0000000..f52a17f --- /dev/null +++ b/.install/hidpi.sh @@ -0,0 +1,18 @@ + +# ------------------------------------------------------ +# hidpi support +# ------------------------------------------------------ + +echo -e "${GREEN}" +figlet "hidpi" +echo -e "${NONE}" + +if [! -d ~/dotfiles ]; then + hidpiconfirm="Do you want 2x hidpi scale?" + if gum confirm "$hidpiconfirm"; then + sed -E 's/size = [0-9]+(\.[0-9]+)?/size = 18/' alacritty/alacritty.toml + sed -E 's/[0-9]+(\.[0-9]+)?/16/' .settings/rofi-font.rasi + echo '\n# hidpi scale\nsource = ~/dotfiles/hypr/conf/hidpi.conf' >> hypr/conf/custom.conf + sed -E 's/1/2' hypr/conf/monitors/default.conf +fi + diff --git a/install.sh b/install.sh index 102f6e7..73487f8 100755 --- a/install.sh +++ b/install.sh @@ -60,6 +60,7 @@ if [[ $profile == *"Qtile"* ]]; then source .install/install-packages.sh fi source .install/wallpaper.sh +source .install/hidpi.sh source .install/displaymanager.sh source .install/issue.sh source .install/restore.sh