2018-07-31 02:32:52 +00:00
# HackerTray
2013-11-27 19:17:16 +00:00
2014-01-29 14:34:10 +00:00
[](https://pypi.python.org/pypi/hackertray/)
2013-11-30 12:59:04 +00:00
[](https://pypi.python.org/pypi/hackertray/)
2020-06-14 21:37:01 +00:00
[](https://travis-ci.org/captn3m0/hackertray) [](https://coveralls.io/github/captn3m0/hackertray?branch=master)
2013-11-30 12:59:04 +00:00
2013-11-27 19:17:16 +00:00
HackerTray is a simple [Hacker News ](https://news.ycombinator.com/ ) Linux application
2020-06-14 20:11:37 +00:00
that lets you view top HN stories in your System Tray. It uses appindicator where available,
but provides a Gtk StatusIcon fallback in case AppIndicator is not available.
2013-11-27 19:17:16 +00:00
2014-09-24 07:05:33 +00:00
The inspiration for this came from [Hacker Bar ](http://hackerbarapp.com ), which is Mac-only.
2013-11-27 19:17:16 +00:00
2017-04-17 08:41:03 +00:00
## Screenshot
2013-11-28 07:49:19 +00:00

2017-04-17 08:41:03 +00:00
## Installation
2018-07-31 02:32:52 +00:00
2013-11-28 08:59:11 +00:00
HackerTray is distributed as a python package. Do the following to install:
2018-07-31 02:32:52 +00:00
```sh
2013-11-28 08:59:11 +00:00
sudo pip install hackertray
OR
sudo easy_install hackertray
OR
#Download Source and cd to it
2013-11-28 17:53:57 +00:00
sudo python setup.py install
2013-11-28 08:59:11 +00:00
```
After that, you can run `hackertray` from anywhere and it will run. You can
now add it to your OS dependent session autostart method. In Ubuntu, you can
2018-07-31 02:32:52 +00:00
access it via:
2013-11-28 08:59:11 +00:00
2020-06-14 17:08:14 +00:00
1. System > Preferences > Sessions
2018-07-31 02:32:52 +00:00
(OR)
2. System > Preferences > Startup Applications
2013-11-28 08:59:11 +00:00
2018-07-31 02:32:52 +00:00
depending on your Ubuntu Version. Or put it in `~/.config/openbox/autostart`
if you are running OpenBox. [Here ](http://imgur.com/mnhIzDK ) is how the
configuration should look like in Ubuntu and its derivatives.
2013-11-28 08:59:11 +00:00
2017-04-17 08:41:03 +00:00
### Upgrade
2018-07-31 02:32:52 +00:00
2014-09-25 16:52:02 +00:00
The latest stable version is [](https://pypi.python.org/pypi/hackertray/)
You can check which version you have installed with `hackertray --version` .
2013-11-28 13:51:13 +00:00
To upgrade, run `pip install -U hackertray` . In some cases (Ubuntu), you might
need to clear the pip cache before upgrading:
`sudo rm -rf /tmp/pip-build-root/hackertray`
2013-11-28 08:59:11 +00:00
2014-09-25 16:52:02 +00:00
HackerTray will automatically check the latest version on startup, and inform you if there is an update available.
2017-04-17 08:41:03 +00:00
## Options
2018-07-31 02:32:52 +00:00
2014-06-07 07:01:18 +00:00
HackerTray accepts its various options via the command line. Run `hackertray -h` to see all options. Currently the following switches are supported:
2018-07-31 02:32:52 +00:00
1. `-c` : Enables comments support. Clicking on links will also open the comments page on HN. Can be switched off via the UI, but the setting is not remembered.
2. `--chrome PROFILE-PATH` : Specifying a profile path to a chrome directory will make HackerTray read the Chrome History file to mark links as read. Links are checked once every 5 minutes, which is when the History file is copied (to override the lock in case Chrome is open), searched using sqlite and deleted. This feature is still experimental.
2020-06-14 18:50:14 +00:00
3. `--firefox PROFILE-PATH` : Specify path to a firefox profile directory. HackerTray will read your firefox history from this profile, and use it to mark links as read. Pass `auto` as PROFILE-PATH to automatically read the default profile and use that.
2014-10-03 13:38:10 +00:00
Note that the `--chrome` and `--firefox` options are independent, and can be used together. However, they cannot be specified multiple times (so reading from 2 chrome profiles is not possible).
2014-06-07 07:01:18 +00:00
2017-04-17 08:41:03 +00:00
### Google Chrome Profile Path
2014-06-07 07:15:01 +00:00
2020-06-14 19:00:05 +00:00
Where your Profile is stored depends on [which version of chrome you are using ](https://chromium.googlesource.com/chromium/src.git/+/62.0.3202.58/docs/user_data_dir.md#linux ):
2014-06-07 07:15:01 +00:00
2020-06-14 19:00:05 +00:00
- [Chrome Stable] `~/.config/google-chrome/Default`
- [Chrome Beta] `~/.config/google-chrome-beta/Default`
- [Chrome Dev] `~/.config/google-chrome-unstable/Default`
- [Chromium] `~/.config/chromium/Default`
2014-06-07 07:15:01 +00:00
2014-10-14 09:52:58 +00:00
Replace `Default` with `Profile 1` , `Profile 2` or so on if you use multiple profiles on Chrome. Note that the `--chrome` option accepts a `PROFILE-PATH` , not the History file itself. Also note that sometimes `~` might not be set, so you might need to use the complete path (such as `/home/nemo/.config/google-chrome/Default/` ).
2014-06-07 07:15:01 +00:00
2017-04-17 08:41:03 +00:00
### Firefox Profile Path
2018-07-31 02:32:52 +00:00
2020-06-14 18:50:14 +00:00
The default firefox profile path is `~/.mozilla/firefox/*.default` , where `*` denotes a random 8 digit string. You can also read `~/.mozilla/firefox/profiles.ini` to get a list of profiles. Alternatively, just pass `auto` and HackerTray will pick the default profile automatically.
2014-10-03 13:38:10 +00:00
2017-04-17 08:41:03 +00:00
## Features
2018-07-31 02:32:52 +00:00
1. Minimalist Approach to HN
2. Opens links in your default browser
2020-06-14 18:50:14 +00:00
3. Remembers which links you opened, even if you opened them outside of HackerTray
2018-07-31 02:32:52 +00:00
4. Shows Points/Comment count in a simple format
2020-06-14 18:50:14 +00:00
5. Reads your Google Chrome/Firefox History file to determine which links you've already read (even if you may not have opened them via HackerTray)
2013-11-27 19:17:16 +00:00
2017-04-17 08:41:03 +00:00
### Troubleshooting
2014-05-04 05:25:43 +00:00
2018-07-31 02:32:52 +00:00
If the app indicator fails to show in Ubuntu versions, consider installing
2014-05-04 05:25:43 +00:00
python-appindicator with
`sudo apt-get install python-appindicator`
2020-06-14 18:50:14 +00:00
Note that appindicator is no longer supported in non-Ubuntu distros, because it only works on Python2.
2017-04-17 08:41:03 +00:00
### Development
2014-06-07 07:15:01 +00:00
To develop on hackertray, or to test out experimental versions, do the following:
2018-07-31 02:32:52 +00:00
- Clone the project
- Run `(sudo) python setup.py develop` in the hackertray root directory
- Run `hackertray` with the required command line options from anywhere.
2014-06-07 07:15:01 +00:00
2017-04-17 08:41:03 +00:00
## Analytics
2018-07-31 02:32:52 +00:00
2020-06-14 18:57:10 +00:00
On every launch, a request is made to `https://pypi.python.org/pypi/hackertray/json` to check the latest version.
2020-06-14 20:11:37 +00:00
**No more tracking**. All data every collected for this project has been deleted. You can see [the wiki ](https://github.com/captn3m0/hackertray/wiki/Analytics ) for what all was collected earlier (Version `< 4.0.0` ).
2014-10-01 01:10:05 +00:00
2017-04-17 08:41:03 +00:00
## Credits
2014-06-07 15:29:24 +00:00
2020-06-14 18:50:14 +00:00
- Mark Rickert for [Hacker Bar ](http://hackerbarapp.com/ ) (No longer active)
2018-07-31 02:32:52 +00:00
- [Giridaran Manivannan ](https://github.com/ace03uec ) for troubleshooting instructions.
2020-06-14 19:00:05 +00:00
- [@cheeaun ](https://github.com/cheeaun ) for the [Unofficial Hacker News API ](https://github.com/cheeaun/node-hnapi/ )
2013-11-28 13:41:31 +00:00
2017-04-17 08:41:03 +00:00
## Licence
2014-10-14 09:52:58 +00:00
2020-06-14 18:50:14 +00:00
Licenced under the [MIT Licence ](https://nemo.mit-license.org/ ).