Skip to content

Commit 9769de1

Browse files
committed
Make the command run a setting and change to flatpak
1 parent 19306e6 commit 9769de1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

data/gala.gschema.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@
7676
<summary></summary>
7777
<description></description>
7878
</key>
79+
<key type="s" name="interactive-screenshot-action">
80+
<default>'flatpak run io.elementary.screenshot'</default>
81+
<summary>Interactive screenshot action</summary>
82+
<description>Sets the command to run when the interactive-screenshot keybinding is pressed.</description>
83+
</key>
7984
<key type="b" name="move-maximized-workspace">
8085
<default>false</default>
8186
<summary>Automatically move maximized windows to a new workspace</summary>

src/WindowManager.vala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,7 @@ namespace Gala {
518518
screenshot_screen.begin ();
519519
break;
520520
case "interactive-screenshot":
521-
try {
522-
Process.spawn_command_line_async ("io.elementary.screenshot");
523-
} catch (Error e) {
524-
warning ("Failed to launch interactive screenshot: %s", e.message);
525-
}
521+
launch_action ("interactive-screenshot-action");
526522
break;
527523
case "area-screenshot":
528524
screenshot_area.begin ();

0 commit comments

Comments
 (0)