Skip to content

Commit

Permalink
Add tag for disabling screenshots (Part of the Better Exam Support Pr…
Browse files Browse the repository at this point in the history
…oject) (#1470)

Add the tag user.disable_screenshots to make it easier for users to
disable screenshot commands in certain circumstances. This was part of
the project discussed in a community meeting to add built in
functionality to community itself to make it easier to disable certain
commands under specific circumstances, such as when taking an exam.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 772d51e commit 4e4bfe8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugin/screenshot/screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

mod = Module()

mod.tag("screenshot_disabled", desc="Activating this tag disables screenshot commands")

default_folder = ""
if app.platform == "windows":
default_folder = os.path.expanduser(os.path.join("~", r"OneDrive\\Pictures"))
Expand Down
3 changes: 3 additions & 0 deletions plugin/screenshot/screenshot.talon
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
not tag: user.screenshot_disabled
-

^grab screen$: user.screenshot()
^grab screen <number_small>$: user.screenshot(number_small)
^grab window$: user.screenshot_window()
Expand Down

0 comments on commit 4e4bfe8

Please sign in to comment.