About

Cortex is a simple application to keep track and browse through reddit article lists where one would usually need to open a web browser and possibly use a mouse to navigate.

Since rss readers can get cluttered and are not the same as the actual reddit homepage, cortex will allow you to stop refreshing the reddit page all the time while sticking to the same paradigm as the usual reddit frontpage would.

Configuring cortex to display your personal frontpage and monitor your unread messages is easy, just create a file called ~/.cortex/config, retrieve your personal reddit json links (Located in Preferences -> RSS feeds) and put them in the config. It will look something like this:

  [config]
  frontpage=http://www.reddit.com/.json?feed=my-long-personal-hash&user=my-username
  inbox=http://www.reddit.com/message/unread/.json?feed=my-long-personal-hash&user=my-username
        

Of course you can also just keep cortex as it is and browse the global reddit frontpage as usual.

Installation

If you are an arch linux user, there is a package available at the arch user repository at http://aur.archlinux.org/packages.php?ID=34292

You can also clone the git repository and simply copy the cortex binary to a folder in your path.

Github repository: https://github.com/GGLucas/cortex

Contact

Cortex is written and maintained by Lucas de Vries. Feel free to send over an email for any bug reports or suggestions.

Screenshots

Manual

Note that all of this information can be accessed by invoking cortex --help as well.

  Usage: cortex [SUBREDDIT]
  An ncurses reddit browser and monitor.

  You can optionally specify a subreddit to display initially over the
  commandline.

  Keys:
      q
          Quit cortex and go back to the terminal.

      r
          Update/Refresh the cortex listing from reddit.

      m
          Toggle between full and minimal display mode.

      o / Return
          Open the currently selected link in the browser.

      c
          Open the comments page for the currently selected link
          in the browser.

      t
          Open both the currently selected link and the comments
          page in the browser.

      i
          Open the reddit messages inbox in the browser.

      h
          Jump to the frontpage listing.

      s
          Prompt for a subreddit to display the listing for.

      f
          Jump to the subreddit the currently selected article is
          in. Alternatively, when already viewing a subreddit,
          jump back to the frontpage.

      l
          Mark all articles in the list as read.

      /
          Prompt for searching reddit.

      Up / k
          Move one entry up the list.

      Down / j
          Move one entry down the list.

      0 / g / Home
          Go to the first entry in the list.

      $ / G / End
          Go to the last entry in the list.

      Control+B / Page Up
          Move one page up the list.

      Control+F / Page Down
          Move one page down the list.

  Configuration:
      See config.example for an example configuration file to put in ~/.cortex/config,
      the following options are available:

      frontpage=http://reddit.com/.json
          Frontpage json url, substitute your personal one here if you want
          cortex to display your own subreddit subscriptions.

      inbox=
          Unread messages json url, put your personal one here if you want
          cortex to display your unread message count.

      sort=-read
          Field to sort the entries by. A "-" in front of the field name
          indicates a reverse sort order.

          Some fields that can be sorted by:
              created: Article creation time
              title: Article title alphabetically
              score: Article total score
              read: Whether the article is marked read or not

      title-format= Cortex -- Reddit/{title}: {total} articles, {new} new
          Format used in the application title bar.

          Available variables:
              {title}: Title of the current subreddit or "Frontpage".
              {total}: Total amount of articles in the listing.
              {new}: Amount of unread articles in the listing.

      entry-format-minimal= {title} %> {subreddit:<13} | {num_comments:4}
      entry-format-full= {title} %n  [{score:4}] {read} {nsfw} %> {domain:30}
                         {subreddit:<13}   {num_comments:4} comments
          Formats used for entries in the list in minimal and full mode 
          respectively.

          Available variables:
              {title}: Article title.
              {subreddit}: Article subreddit.
              {num_comments}: Amount of comments the article has.
              {score}: Article score
              {ups}: Article total upvotes
              {downs}: Article total downvotes
              {domain}: Article domain
              {author}: Article submitter/author

              {read}: "[New]" if the article is new, empty otherwise.
              {nsfw}: "NSFW" if the article in not safe for work, empty otherwise.

          You can use %> to indicate that the rest of the line should be aligned
          to the right of the screen.

          In the full entry format, you can use one "%n" to indicate the separation
          between the top and bottom lines in the listing.

      seen-size=500
          Amount of articles to save seen/read status for.

      browser-command=
          Command to invoke the webbrowser. The {0} will be replaced by the url 
          to open.

        If left empty, cortex will try to autodetect the default browser for
        the system.

      update-interval=10
          Amount of minutes between automatic updates/refreshes.

  Color Configuration:
      You can also change the colors used in the configuration, the colors
      available are: black,red,green,yellow,blue,magenta,cyan,white and their
      respective bright- versions.


      Colors are specified in (foreground, background) pairs, the available
      items to set the colors for are:

          title=brightyellow,blue
              The titlebar on top of the interface.

          normal=white,black
              Normal text.

          entry=white,black
              The main part of an entry.

          entry-data=yellow,black
              The right/data part of an entry.

          entry-selected=brightyellow,magenta
              The main part of a selected entry.

          entry-data-selected=brightyellow,magenta
              The right/data part of a selected entry.

          entry-bottom=green,black
              The main part of the bottom line of an entry in full mode.

          entry-bottom-selected=brightyellow,magenta
              The main part of the bottom line of a selected entry
              in full mode.

          entry-bottom-data=yellow,black
              The right/data part of the bottom line of an entry in full mode.

          entry-bottom-data-selected=brightyellow,magenta
              The right/data part of the bottom line of a selected entry in full 
              mode.

          messages=brightgreen,blue
              The unread messages count in the top right of the application.

        

Example Configuration

  ### Put this in ~/.cortex/config for configuration.
  [config]
  ## Frontpage json url, substitute your personal one here if you want
  ## cortex to display your own subreddit subscriptions.
  #frontpage=http://reddit.com/.json
  ## Unread messages json url, put your personal one here if you want
  ## cortex to display your unread message count
  #inbox=
  ## The field to sort the entries by. A "-" in front indicated a reverse sort order.
  #sort=-read
  ## Format used in the application title bar
  ### See `cortex --help` for the format specification.
  #title-format= Cortex -- Reddit/{title}: {total} articles, {new} new
  ## Format used for an entry in minimal mode
  ### See `cortex --help` for the format specification.
  #entry-format-minimal= {title} %> {subreddit:<13} | {num_comments:4}
  ## Format used for an entry in full mode
  ### See `cortex --help` for the format specification.
  #entry-format-full= {title} %n  [{score:4}] {read} {nsfw} %> {domain:30}   {subreddit:<13}   {num_comments:4} comments
  ## Amount of articles to save seen/read status for
  #seen-size=500
  ## Command to invoke the webbrowser
  ## If left empty will try to autodetect the system default browser
  ##browser-command=firefox '{0}'
  #browser-command=
  ## Amount of minutes between automatic updates/refreshes
  #update-interval=10

  [color]
  ## Item=Foreground,Background
  #title=brightyellow,blue
  #normal=white,black
  #entry=white,black
  #entry-data=yellow,black
  #entry-selected=brightyellow,magenta
  #entry-data-selected=brightyellow,magenta
  #entry-bottom=green,black
  #entry-bottom-selected=brightyellow,magenta
  #entry-bottom-data=yellow,black
  #entry-bottom-data-selected=brightyellow,magenta
  #messages=brightgreen,blue