SYNOPSIS

feedcommas

Configuration

Feed Commas can be configured by setting several options in a standard ini-style configuration file. The file is searched in a filesystem in a way described by XDG Base Directory Specification. In practice it means that for most users it will be located in ~/.config/feed-commas/config.ini. However, any of below files can be read if the none of the previous ones was found:

  1. $XDG_CONFIG_HOME/feed-commas/config.ini. If $XDG_CONFIG_HOME is not set, it defaults to $HOME/.config.

  2. any of $XDG_DATA_DIRS/feed-commas/config.ini. $XDG_DATA_DIRS is colon-separated list of directories to check. If it is not set, it defaults to /etc/xdg.

If configuration file is not found, Feed Commas will create one with default parameters filled in a first suitable directory ($XDG_CONFIG_HOME/feed-commas).

Before Feed Commas terminates, previously read configuration file is saved back to a filesystem.

Structure

INI files are made up of sections, and so is the one Feed Commas uses. Below is example (but not complete) of file, which has [server] and [keys] sections.

[server]
address = https://commafeed.com
workers = 2

[keys]
nav-up = k
nav-down = j

Server

[server] contains options for configuring access to CommaFeed server.

Table 1. Available options for [server] section
Option Default value Description

address

https://commafeed.com

Address of CommaFeed instance with which Feed Commas will communicate.

username

name used to login to CommaFeed instance.

password

Plain text password which will be used to login to CommaFeed. Due to security reasons, it is not recommended leave passwords as plain text in any configuration file. Use password-cmd instead, which will dynamically get needed password.

password-cmd

A command used to get password to login to CommaFeed. It takes precedence over password, even if the latter is set.

workers

2

Number of worker processes used to communicate with CommaFeed. If it is unset, workers will be spawned in a number equal to available CPU cores.

Keys

[keys] contains key mappings used in Feed Commas.

Table 2. Available options for [keys] section
Option Default value Description

nav-up

kbd:[k]

Navigates and scrolls up. It is used e.g. to navigate a menu and scroll article list.

nav-down

kbd:[j]

Navigates and scrolls down. It is used e.g. to navigate a menu and scroll article list.

nav-right

kbd:[l]

Navigates right. It is used e.g. to switch used panel from menu to article list.

nav-right

kbd:[h]

Navigates right. It is used e.g. to switch used panel from article list to menu.

toggle-read

kbd:[r]

Toggles between read and unread state for currently selected article.

toggle-star

kbd:[s]

Stars or unstars currently selected article.

show-all

Shows both unread and read entries.

show-unread

Shows only unread entries.

refresh

kbd:[F5]

Refreshes list of articles. Also clears a cache.

sync

Downloads all feeds and categories for offline read. Only works if cache if cache-time is enabled (i.e. is set to non-negative value).

open-browser

kbd:[ctrl+\]]

Opens selected article in a default web browser. Refer to the documentation of your Operating System how to configure one. Usually setting $BROWSER environment variable should be sufficient.

quit

kbd:[q]

Quits Feed Commas.

Key values can contain modifiers, but they heavily depend on what keycodes terminal sends. For example, terminals usually won’t explicitly send kbd:[shift], but uppercase letters instead (so instead of mapping kbd:[shift+e], map kbd:[E]).

Any combination of kbd:[ctrl] and kbd:[alt] modifiers is available as c- and a- prefixes. Other keys are also available:

Table 3. Special keys
Key on keyboard config.ini notation

kbd:[ctrl]

c-

kbd:[alt]

a-

kbd:[shift]

s-

kbd:[↑]

up

kbd:[↓]

down

kbd:[←]

left

kbd:[→]

right

kbd:[Enter]

enter

kbd:[Return]

enter

kbd:[Page Up]

page up

kbd:[Page Down]

page down

kbd:[F5]

f5

Examples

kbd:[ctrl+a]

c-a

kbd:[alt+a]

a-a

kbd:[ctrl+alt+←]

c-a-left

kbd:[alt+Enter]

a-enter

Warning
Non-character keys should be written lower-case! Instead of typing F5, type f5, page down, enter and so on.

Settings

[settings] section contains options affecting various behaviours of Feed Commas.

Table 4. Available options for [settings] section
Option Default value Description

mark-read-time

2

Time (in seconds) after which currently selected article will be marked as read. If set to 0, articles will be marked as read immediately. If set to -1, articles won’t be automatically marked as read.

Usually it’s advised to be kept as positive integer, which will prevent marking articles as unread when scrolling through an article list.

show-read

false

If set to true, all articles will be shown on the article list. If set to false, only unread articles will be shown. Using toggle-read automatically changes this setting so after application restart, the last state is used.

supported-colors

256

Number of colors supported by terminal. Most terminals nowdays support at least 256 colors, so if things work for you, don’t change this setting.

Valid values: 1, 16, 88, 256

bright-bold

false

Display bright colors as bold (some terminals work that way). Change it to true if you don’t see a difference when using bright colors.

html-filter

builtin

Method of filtering HTML in received entries so they’re readable. Can be either of the following:

  • builtin - simple (and inaccurate) builtin filtering method. Quite fast and doesn’t need any additional dependencies.

  • none or unset option - filtering is disabled and HTML is printed exactly as received

  • any filter command - external command, which accepts HTML on its stdin and converts it to a readable output on its stdout. Some text-based browsers (lynx, elinks) support such mode. Make sure to read a tip about commands if you want to use this option.

cache-time

0

Time (in minutes) for which each request to CommaFeed will be cached. If not set or set to 0, caching is disabled.

Tip
html-filter commands usage

Both lynx and elinks work very well as html-filter. Keep in mind however that they can slow down obtaining entries a little because an external process must be started separately for each entry.

The best results are achieved when they are configured with a dump wide enough, so that Feed Commas can take care of line wrapping:

html-filter = elinks -dump -dump-width 500
html-filter = lynx -dump -width 500 -stdin

Colors

Different parts of Feed Commas can be colorized to your liking by setting different options in [colors] section. Default values are sensible, but the end-result depends on terminal’s color capabilities. Color can be empty, in which case

Table 5. Available options for [settings] section
Option Default value Affected elements

article-title

yellow

Color of article’s title.

article-title-focus

light blue

Color of currently selected article’s title.

article-border-focus

light blue

Color of currently selected article’s border.

metadata

light gray

Various meta data information: article’s publication date, article’s header, various indicators on articles list, number of unread articles in menu etc.

menu-focus-fg

white

Foreground color of currently selected menu item.

menu-focus-bg

light blue

Background color of currently selected menu item.

menu-selected

dark gray

Color of currently active feed or category.

menu-line

dark gray

Color of line separating menu and article list.

error-fg

white

Foreground color of errors displayed in commandline.

error-bg

dark red

Background color of errors displayed in commandline.

Monochrome, 16-, 88- and 256-color terminals are supported. As a color name you can use any of standard color values: black, dark red, dark green, brown, dark blue, dark magenta, dark cyan, light gray, dark gray, light red, light green, yellow, light blue, light magenta, light cyan, white. For terminals which support that, you can also use other notations:

  • #fcc: hex like HTML color;

  • g40: decimal value: 40% of gray

  • g#cc: hex value: 80% of gray

  • h255: color number 255

For different terminals colors are configured in different ways, but most often they’re defined in ~/.Xresources file. Consult your terminal’s documentation for details.

Apart from color name, you can specify some text attributes, which should be placed after comma. These attributes include bold, underline, blink and standout. Color value can be omitted, in which case a default foreground or background color for your terminal will be used.

Table 6. Color setting examples
Setting Description

dark gray

Set color to "dark gray" standard color.

#f00,bold

Set font to bold red.

bold

Set font to bold. Default color will be used (depending on which option is set)