@@ -30,6 +30,7 @@ public class Workspaces.Application : Gtk.Application {
3030 public const string APP_VERSION = " 1.2.0" ;
3131 public const string APP_ID = " com.github.devalien.workspaces" ;
3232 public const string SHOW_WORKSPACES_CMD = APP_ID ;
33+ public const string FLATPAK_SHOW_WORKSPACES_CMD = " flatpak run " + APP_ID ;
3334 private const string SHOW_WORKSPACES_SHORTCUT = " <Control><Alt>w" ;
3435
3536 private bool show_quick_launch = false ;
@@ -195,15 +196,26 @@ public class Workspaces.Application : Gtk.Application {
195196 private void set_default_shortcut () {
196197 CustomShortcutSettings . init ();
197198 foreach (var shortcut in CustomShortcutSettings . list_custom_shortcuts ()) {
198- if (shortcut. command == SHOW_WORKSPACES_CMD ) {
199- CustomShortcutSettings . edit_shortcut (shortcut. relocatable_schema, SHOW_WORKSPACES_SHORTCUT );
200- return ;
199+ if (is_flatpak ()) {
200+ if (shortcut. command == FLATPAK_SHOW_WORKSPACES_CMD ) {
201+ CustomShortcutSettings . edit_shortcut (shortcut. relocatable_schema, SHOW_WORKSPACES_SHORTCUT );
202+ return ;
203+ }
204+ } else {
205+ if (shortcut. command == SHOW_WORKSPACES_CMD ) {
206+ CustomShortcutSettings . edit_shortcut (shortcut. relocatable_schema, SHOW_WORKSPACES_SHORTCUT );
207+ return ;
208+ }
201209 }
202210 }
203211 var shortcut = CustomShortcutSettings . create_shortcut ();
204212 if (shortcut != null ) {
205213 CustomShortcutSettings . edit_shortcut (shortcut, SHOW_WORKSPACES_SHORTCUT );
206- CustomShortcutSettings . edit_command (shortcut, SHOW_WORKSPACES_CMD );
214+ if (is_flatpak ()) {
215+ CustomShortcutSettings . edit_command (shortcut, FLATPAK_SHOW_WORKSPACES_CMD );
216+ } else {
217+ CustomShortcutSettings . edit_command (shortcut, SHOW_WORKSPACES_CMD );
218+ }
207219 }
208220 }
209221
0 commit comments