feat: window activation with xdotool

This commit is contained in:
Umbrix Developer
2026-01-18 05:31:59 +03:00
parent b0e23312d8
commit d8cdee91fe

View File

@@ -19,8 +19,12 @@ void main() async {
final result = await Process.run('ps', ['-p', pid.toString()]);
if (result.exitCode == 0) {
// Process alive - just exit without trying to activate
print('Umbrix уже запущен');
// Process alive - try to focus existing window
try {
await Process.run('xdotool', ['search', '--name', 'Umbrix', 'windowactivate']);
} catch (_) {
// xdotool not available, just exit
}
exit(0);
} else {
// Stale lock - remove it