hfc

Hosts file client
git clone git://git.marlonivo.com/hfc
Log | Files | Refs | LICENSE

hfc.1 (3436B)


      1 .TH HFC 1 hfc\-VERSION
      2 .SH NAME
      3 hfc \- hosts file client
      4 .SH SYNOPSIS
      5 .B hfc
      6 [ \fIOPTION\fR ]
      7 .SH DESCRIPTION
      8 \fBhfc\fR is a TUI/CLI program for managing entries in the linux hosts file.
      9 It's primarely usecase is to view entries by custom or remote (https://...) lists as well as having update indicators which one could merge.
     10 .P
     11 When adding remote hosts entries make sure to run the software with root. Then, while downloading into the hosts file, all empty lines and full-line comments are removed, whereas those after domains:
     12 .br
     13 .B 0.0.0.0 domain.tld # comment
     14 are preserved as they may contain useful metadata.
     15 .P
     16 To automate updates of your added hosts sources, use
     17 .B hfc \-U
     18 in your crontab or systemd timer, merging though must be done manually from the TUI.
     19 .SH OPTIONS
     20 .TP
     21 \fB\-h, \-\-help\fR
     22 Show usage information.
     23 .TP
     24 \fB\-a, \-\-add\fR \fI<url/list>\fR
     25 Add a remote url (https://...) or custom list.
     26 .TP
     27 \fB\-l, \-\-list\fR
     28 List all entries.
     29 .TP
     30 \fB\-r, \-\-remove\fR \fI<url/list>\fR
     31 Remove a remote url or custom list.
     32 .TP
     33 \fB\-e, \-\-edit\fR \fI<list>\fR
     34 Edit a custom list section using your \fB$EDITOR\fR.
     35 .br
     36 ! Changes to remote urls will be overwritten
     37 .TP
     38 \fB\-U, \-\-update_all\fR
     39 Check all remote sources for available updates.
     40 .SH FILES
     41 .TP
     42 .B /etc/hosts
     43 The system hosts file where domain entries are stored.
     44 .br
     45 This file is read, copied and modified by the program and therefore needs root execution.
     46 .TP
     47 .B /tmp/hosts_temp, /tmp/hosts_merge_temp
     48 Temporary files used to store a modified version of the hosts file.
     49 .TP
     50 .B $HOME/.config/hfc/urls
     51 Data file for storing list names.
     52 .TP
     53 .B $HOME/.config/hfc/fetch.lock
     54 Lock file used for cross-session downloads.
     55 .TP
     56 .B $HOME/.config/hfc/conf
     57 Config file to change key bindings and color of the TUI.
     58 .TP
     59 .B $HOME/.local/state/hfc/counts
     60 Data file for storing entry counters, which is used to recognize and inform about updates.
     61 .SH CONFIGURATION
     62 Configuration is done in the common format seperated by spaces:
     63 .br
     64 .B <config-command> <arg1> <arg2>...
     65 with self-explanatory arguments.
     66 .br
     67 Actions can be bound to multiple keys.
     68 .TP
     69 .B Default
     70 .nf
     71 [keys]
     72 bind j down
     73 bind k up
     74 bind q quit
     75 bind a add
     76 bind r remove
     77 bind e edit
     78 bind u update_selected
     79 bind U update_all
     80 bind o order
     81 bind m merge
     82 bind L refresh
     83 bind + select_all
     84 bind - unselect_all
     85 bind space select
     86 bind ? help
     87 
     88 [ui]
     89 color header white
     90 color footer white
     91 color entry_highlight white
     92 color table_header white
     93 color entry_default white
     94 .fi
     95 .TP
     96 .B Available [keys]
     97 .TS
     98 tab(|);
     99 l l l 1.
    100 bind|<key>|<action>
    101 \&|key_up             |down
    102 \&|key_down           |up
    103 \&|key_left           |quit
    104 \&|key_right          |add
    105 \&|key_home           |remove
    106 \&|key_end            |edit
    107 \&|key_npage          |update_selected
    108 \&|key_ppage          |update_all
    109 \&|key_enter          |order
    110 \&|space              |merge
    111 \&|a–z, A–Z, 0–9      |refresh
    112 \&|!#$%&'()*+,-./:;<=>?@[]^_`{}~)      |help
    113 .TE
    114 .TP
    115 .B Available [ui]
    116 .TS
    117 tab(|);
    118 l l l l l.
    119 color|<element>|<foreground>|<background>|bold
    120 \&|header         |black   |white   |\&
    121 \&|footer         |red     |blue    |\&
    122 \&|entry_highlight|gray    |yellow  |\&
    123 \&|table_header   |green   |cyan    |\&
    124 \&|entry_default  |magenta |black   |\&
    125 .TE
    126 .TP
    127 The optional bold attribute makes the text \fBbold\fR.
    128 .SH COMMANDS DURING USE
    129 Press '\fB?\fP' during use to get a list of commands.
    130 .SH BUGS
    131 Send all bug reports with patch trough xmpp to chat@marlonivo.com.