diff --git a/po/es.po b/po/es.po index 38fea0c..ea47743 100644 --- a/po/es.po +++ b/po/es.po @@ -225,3 +225,13 @@ msgstr "Atrás" msgid "Forward" msgstr "Adelante" + +msgid "Using Wayland" +msgstr "Se está utilizando Wayland" + +msgid "" +"Touché and Touchégg are designed to work on X11. Some actions might or might " +"not work on Wayland." +msgstr "" +"Touché y Touchégg fueron diseñados para funcionar en X11. Algunas " +"configuraciones podrían no funcionar en Wayland." diff --git a/src/main-view/index.js b/src/main-view/index.js index 22306d8..f1a26c0 100644 --- a/src/main-view/index.js +++ b/src/main-view/index.js @@ -21,7 +21,7 @@ import { ALL_ID, isAll } from '~/config/all-apps'; import Sidebar from './sidebar'; import Content from './content'; -const { Adw, GObject } = imports.gi; +const { Adw, GLib, GObject } = imports.gi; class MainView extends Adw.Bin { _init() { @@ -43,6 +43,8 @@ class MainView extends Adw.Bin { this.sidebar.connect('appSelected', (self, appName) => this.content.appSelected(appName)); this.sidebar.connect('addApp', () => this.emit('addApp')); this.sidebar.connect('removeApp', (self, appName) => this.removeApp(appName)); + + this.warnAboutWayland(); } showAppGestures(appName) { @@ -60,6 +62,19 @@ class MainView extends Adw.Bin { model.saveToFile(); this.showAppGestures(ALL_ID); } + + warnAboutWayland() { + if (GLib.getenv('XDG_SESSION_TYPE').toLowerCase() !== 'wayland') { + return; + } + + const dialog = new Adw.AlertDialog({ + heading: _('Using Wayland'), + body: _('Touché and Touchégg are designed to work on X11. Some actions might or might not work on Wayland.'), + }); + dialog.add_response('ok', 'OK'); + dialog.present(this); + } } export default GObject.registerClass(