diff --git a/AUTHORS b/AUTHORS index 96c3db1..0b034db 100644 --- a/AUTHORS +++ b/AUTHORS @@ -13,3 +13,4 @@ Patches and Suggestions - Jimmy Selgen Nielsen - Patrik Kernstock +- Krishna Glick diff --git a/WakaTime.py b/WakaTime.py index e2d787e..2a78f90 100644 --- a/WakaTime.py +++ b/WakaTime.py @@ -462,6 +462,7 @@ class SendHeartbeatsThread(threading.Thread): self.debug = SETTINGS.get('debug') self.api_key = SETTINGS.get('api_key', '') self.ignore = SETTINGS.get('ignore', []) + self.include = SETTINGS.get('include', []) self.hidefilenames = SETTINGS.get('hidefilenames') self.proxy = SETTINGS.get('proxy') @@ -520,6 +521,8 @@ class SendHeartbeatsThread(threading.Thread): cmd.extend(['--cursorpos', heartbeat['cursorpos']]) for pattern in self.ignore: cmd.extend(['--exclude', pattern]) + for pattern in self.include: + cmd.extend(['--include', pattern]) if self.debug: cmd.append('--verbose') if self.hidefilenames: diff --git a/WakaTime.sublime-settings b/WakaTime.sublime-settings index 14f3987..5746ef6 100644 --- a/WakaTime.sublime-settings +++ b/WakaTime.sublime-settings @@ -17,6 +17,9 @@ // POSIX regular expressions will not be logged. "ignore": ["^/tmp/", "^/etc/", "^/var/(?!www/).*", "COMMIT_EDITMSG$", "PULLREQ_EDITMSG$", "MERGE_MSG$", "TAG_EDITMSG$"], + // Include files; Files (including absolute paths) that match one of these + "include": [".*"], + // Status bar message. Set to false to hide status bar message. // Defaults to true. "status_bar_message": true,