This repository has been archived by the owner on May 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
add watch command #41
Open
HalfVoxel
wants to merge
4
commits into
sourcegraph:master
Choose a base branch
from
HalfVoxel:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A common use case for 'thyme' is to record the active windows at regular intervals. To make this easier, the command 'watch' can now be used instead of 'track'. $ thyme watch -n <value> -o thyme.json should be equivalent to $ watch -n <value> thyme track -o thyme.json or $ while true; do thyme track -o thyme.json; sleep <value>s; done; but is also usable on systems that do not have 'watch' installed and easier to use than a shell loop. If no interval is specified (-n or --interval) then it defaults to 30 seconds. This was originally suggested by @keegancsmith.
func (t *LinuxTracker) CheckDependencies() { | ||
deps := map[string]string{ | ||
"xdpyinfo": "x11-utils", | ||
"xwininfo": "x11-utils", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that package names are different for RPM, as in #48
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, hence the 'usually'. Might be a good idea to add those names too I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #48 for the RPM names
Yes you can have multiple PRs by using multiple branches aka |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A common use case for 'thyme' is to record the active windows at regular intervals.
To make this easier, the command 'watch' can now be used instead of 'track'.
$ thyme watch -n [value] -o thyme.json
should be equivalent to
$ watch -n [value] thyme track -o thyme.json
or
$ while true; do thyme track -o thyme.json; sleep [value]s; done;
but is also usable on systems that do not have 'watch' installed and easier
to use than a shell loop.
If no interval is specified (-n or --interval) then it defaults to 30 seconds.
This was originally suggested by @keegancsmith.
Partially fixes #17
Possibly the track command behavior should simply be replaced by the watch command behavior. Thoughts?
I also added some other fixes to this pull request which addresses #36 (as there doesn't seem to be a way to have multiple different pull requests active from the same source repository... though maybe one can do it by creating new branches... I am not sure).
Generally the dep command seems to have caused a lot of confusion (as indicated by #39, #29 and #36) so these commits remove that command and instead checks are done when the program is started. I did not find a way to check if accessibility privileges were available, so for that it simply adds a more descriptive error message when it detects that error after an applescript has been executed.