Added support for the PrefersNonDefaultGPU desktop entry flag
This commit is contained in:
parent
27ae55ad6c
commit
37aa2a3b9b
@ -412,6 +412,10 @@ void wofi_drun_exec(const gchar* cmd) {
|
||||
printf("%s\n", g_app_info_get_commandline(G_APP_INFO(info)));
|
||||
exit(0);
|
||||
} else {
|
||||
bool dri_prime = g_desktop_app_info_get_boolean(info, "PrefersNonDefaultGPU");
|
||||
if(dri_prime) {
|
||||
setenv("DRI_PRIME", "1", true);
|
||||
}
|
||||
g_app_info_launch_uris_async(G_APP_INFO(info), NULL, NULL, NULL, launch_done, (gchar*) cmd);
|
||||
}
|
||||
} else if(strrchr(cmd, ' ') != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user