[Spectacle] Implement Tasks feature (WiP)
Needs ReviewPublic

Authored by aprcela on Aug 22 2019, 10:33 PM.

Details

Summary

Implement Tasks, so a user can run custom stuff after an screenshot has been made

Is currently under heavy work. Much more I'd like to add.
This arc patch can be used if you're impatient or want to add / change something :)

Test Plan

Configure -> Tasks -> enable checkbox and set a path for a custom script or program

Diff Detail

Repository
R166 Spectacle
Branch
arcpatch-D23366
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 25564
Build 25582: arc lint + arc unit
aprcela created this revision.Aug 22 2019, 10:33 PM
Restricted Application added a project: Spectacle. · View Herald TranscriptAug 22 2019, 10:33 PM
Restricted Application added a subscriber: Spectacle. · View Herald Transcript
aprcela requested review of this revision.Aug 22 2019, 10:33 PM
aprcela edited the summary of this revision. (Show Details)Aug 22 2019, 10:41 PM
aprcela edited the test plan for this revision. (Show Details)
aprcela updated this revision to Diff 64379.Aug 22 2019, 10:43 PM
  • Check if the file is valid
aprcela updated this revision to Diff 64399.Aug 23 2019, 8:46 AM
  • Use OR instead of AND

Hm, looks like I borked my branches..
Now it shows the diff from the last two patches :/

aprcela updated this revision to Diff 64400.EditedAug 23 2019, 8:51 AM
  • Fix git branch mashup

And still including more than it should..
Can someone help me out with this one?

aprcela updated this revision to Diff 64523.Aug 24 2019, 10:39 PM
  • proper rebase. hopefully
ngraham added a subscriber: ngraham.

Oh gosh, how did this get missed? Sorry about that.

Oh gosh, how did this get missed? Sorry about that.

A lot of merge conflicts now hehe
I'll look into this and fix the conflicts.

aprcela updated this revision to Diff 80712.Apr 20 2020, 9:46 PM

Merge and fix conflicts

aprcela edited the test plan for this revision. (Show Details)Apr 20 2020, 9:54 PM

I love the idea. However is it likely that the user will always want to run the same task on every screenshot? It feels more like this should be a list of tasks, and the user should be able to choose which one to run, optionally marking one as an overridable default task.

Thoughts?

I love the idea. However is it likely that the user will always want to run the same task on every screenshot? It feels more like this should be a list of tasks, and the user should be able to choose which one to run, optionally marking one as an overridable default task.

Thoughts?

ShareX has an interesting approach, where one can set up multiple tasks. And after capture a new window appears with a bunch of options. But whatever on sets, that will be run - always. So a user has to know that task(s) x, y, z, will be run after every screenshot. By default, this would be off and I'd assume that only power users would use this feature.

Yes, I agree that there should be more tasks available and I'd like to hear suggestions to what kind of preconfigured Tasks should be available. And, as mentioned above, default would be nothing.

alex added a subscriber: alex.Apr 21 2020, 3:32 PM

First of all this feature sounds great!

I am just a bit confused about how we define "tasks" now:
In your current implementation it looks like they should be executed after the file gets saved.

And after capture a new window appears with a bunch of options

This seems like an action gets executed after the screenshot is taken.

In D23366#653823, @alex wrote:

First of all this feature sounds great!

I am just a bit confused about how we define "tasks" now:
In your current implementation it looks like they should be executed after the file gets saved.

And after capture a new window appears with a bunch of options

This seems like an action gets executed after the screenshot is taken.

It shouldn't be a big issue to make it either after the screenshot has been taken or after the image has been saved. An user could set that easily with a checkbox.

alex added a comment.Apr 22 2020, 5:13 AM

Sound good👍.

But I can't think of any predefined tasks, because there are quite a few ones implemented with the Tools and Export button.
But maybe a nice example script with KDialog.