ℹ️ HackerTray is a minimalist Hacker News app for Linux
Go to file
2020-06-15 18:09:11 +05:30
hackertray Switches to a label to make points take fixed-width 2020-06-15 18:09:11 +05:30
test [tests] Fix tests on Travis 2020-06-15 00:44:33 +05:30
.editorconfig Adds editorconfig to take care of indentation. 2014-10-03 18:58:04 +05:30
.gitignore [ci] Adds coveralls 2020-06-15 03:16:01 +05:30
.travis.yml [ci] Adds coveralls 2020-06-15 03:16:01 +05:30
CHANGELOG.md Minor README updates for v4 2020-06-15 01:41:37 +05:30
MANIFEST.in Excludes screenshot in the python package. 2013-12-07 21:49:10 +05:30
README.md [ci] Adds coveralls 2020-06-15 03:16:01 +05:30
screenshot.png Adds screenshot. 2013-11-28 13:19:19 +05:30
setup.py Do a minor 4.0.1 release 2020-06-15 01:35:07 +05:30


HackerTray on PyPi HackerTray on PyPi Build Status Coverage Status

HackerTray is a simple Hacker News Linux application 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.

The inspiration for this came from Hacker Bar, which is Mac-only.


HackerTray Screenshot in elementaryOS


HackerTray is distributed as a python package. Do the following to install:

sudo pip install hackertray
sudo easy_install hackertray
#Download Source and cd to it
sudo python setup.py install

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 access it via:

  1. System > Preferences > Sessions (OR)
  2. System > Preferences > Startup Applications

depending on your Ubuntu Version. Or put it in ~/.config/openbox/autostart if you are running OpenBox. Here is how the configuration should look like in Ubuntu and its derivatives.


The latest stable version is the one on PyPi

You can check which version you have installed with hackertray --version.

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

HackerTray will automatically check the latest version on startup, and inform you if there is an update available.


HackerTray accepts its various options via the command line. Run hackertray -h to see all options. Currently the following switches are supported:

  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.
  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.

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).

Google Chrome Profile Path

Where your Profile is stored depends on which version of chrome you are using:

  • [Chrome Stable] ~/.config/google-chrome/Default
  • [Chrome Beta] ~/.config/google-chrome-beta/Default
  • [Chrome Dev] ~/.config/google-chrome-unstable/Default
  • [Chromium] ~/.config/chromium/Default

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/).

Firefox Profile Path

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.


  1. Minimalist Approach to HN
  2. Opens links in your default browser
  3. Remembers which links you opened, even if you opened them outside of HackerTray
  4. Shows Points/Comment count in a simple format
  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)


If the app indicator fails to show in Ubuntu versions, consider installing python-appindicator with

sudo apt-get install python-appindicator

Note that appindicator is no longer supported in non-Ubuntu distros, because it only works on Python2.


To develop on hackertray, or to test out experimental versions, do the following:

  • Clone the project
  • Run (sudo) python setup.py develop in the hackertray root directory
  • Run hackertray with the required command line options from anywhere.


On every launch, a request is made to https://pypi.python.org/pypi/hackertray/json to check the latest version.

No more tracking. All data every collected for this project has been deleted. You can see the wiki for what all was collected earlier (Version < 4.0.0).



Licenced under the MIT Licence.