Skip to content

Commit

Permalink
Version 2.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EasyG0ing1 committed May 1, 2024
1 parent 5bb36c1 commit f905c93
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ target/
/graalvm/
/OriginalArt/
/target/
/pomoriginal.xml
/pompackager.xml
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,5 +168,8 @@ right.

## Version History

* 2.1.0
* Added check for headless mode in Watch class

* 2.0.0
* Initial Release
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.simtechdata</groupId>
<artifactId>iGet</artifactId>
<version>2.0.0</version>
<version>2.1.0</version>
<packaging>jar</packaging>

<name>iGet</name>
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/com/simtechdata/actions/Watch.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ public class Watch {
private static final List<String> downloadedLinks = new ArrayList<>();

public static void start() {

if (GraphicsEnvironment.isHeadless()) {
String msg = """
\s
\tYou can only use the watch option when your terminal has been opened
\tfrom within a GUI environment. Currently you are running iget in a
\t"headless" environment. Please open a Terminal window from within your
\tGUI, then run iGet with the watch option.
\s
\s""";
System.out.println(msg);
return;
}

System.out.println("Watching Clipboard - Ctrl+C to exit");
ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(5);
clearClipboard(Toolkit.getDefaultToolkit().getSystemClipboard());
Expand Down

0 comments on commit f905c93

Please sign in to comment.