From 86d35c7868088776d1b834e87bd792956f5d347e Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 22 Jan 2024 14:22:09 +0900 Subject: [PATCH] feat: set im module --- dzgui.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dzgui.sh b/dzgui.sh index e9416b6..6802215 100755 --- a/dzgui.sh +++ b/dzgui.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -o pipefail -version=5.0.0.rc-22 +version=5.0.0.rc-23 #CONSTANTS aid=221100 @@ -63,6 +63,15 @@ releases_url="https://github.com/$author/$repo/releases/download/browser" km_helper_url="$releases_url/latlon" geo_file_url="$releases_url/ips.csv.gz" +set_im_module(){ + pgrep -a gamescope | grep -q "generate-drm-mode" + if [[ $? -eq 0 ]]; then + GTK_IM_MODULE="" + logger INFO "Detected Steam Deck (Game Mode), unsetting GTK_IM_MODULE" + else + return + fi +} logger(){ local date="$(date "+%F %T,%3N")" local tag="$1" @@ -812,6 +821,7 @@ initial_setup(){ main(){ local zenv=$(zenity --version 2>/dev/null) [[ -z $zenv ]] && { echo "Requires zenity <= 3.44.1"; exit 1; } + set_im_module printf "Initializing setup...\n" initial_setup