mirror of
https://github.com/aclist/dztui.git
synced 2024-12-29 13:52:03 +01:00
feat: set im module
This commit is contained in:
parent
359d57a3ef
commit
86d35c7868
1 changed files with 11 additions and 1 deletions
12
dzgui.sh
12
dzgui.sh
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
version=5.0.0.rc-22
|
version=5.0.0.rc-23
|
||||||
|
|
||||||
#CONSTANTS
|
#CONSTANTS
|
||||||
aid=221100
|
aid=221100
|
||||||
|
@ -63,6 +63,15 @@ releases_url="https://github.com/$author/$repo/releases/download/browser"
|
||||||
km_helper_url="$releases_url/latlon"
|
km_helper_url="$releases_url/latlon"
|
||||||
geo_file_url="$releases_url/ips.csv.gz"
|
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(){
|
logger(){
|
||||||
local date="$(date "+%F %T,%3N")"
|
local date="$(date "+%F %T,%3N")"
|
||||||
local tag="$1"
|
local tag="$1"
|
||||||
|
@ -812,6 +821,7 @@ initial_setup(){
|
||||||
main(){
|
main(){
|
||||||
local zenv=$(zenity --version 2>/dev/null)
|
local zenv=$(zenity --version 2>/dev/null)
|
||||||
[[ -z $zenv ]] && { echo "Requires zenity <= 3.44.1"; exit 1; }
|
[[ -z $zenv ]] && { echo "Requires zenity <= 3.44.1"; exit 1; }
|
||||||
|
set_im_module
|
||||||
|
|
||||||
printf "Initializing setup...\n"
|
printf "Initializing setup...\n"
|
||||||
initial_setup
|
initial_setup
|
||||||
|
|
Loading…
Reference in a new issue