Skip to content

Latest commit

 

History

History
84 lines (65 loc) · 5.6 KB

README.md

File metadata and controls

84 lines (65 loc) · 5.6 KB

IMPORTANT: READ THE 'SAFETY INFORMATION' PARAGRAPH


ifetch


ifetch is a simple tool for Linux systems to display network interface information.

Installation

Clone the repository and run

# make install

Removal

# make uninstall

If you want to uninstall ifetch and remove the configuration options stored in /etc/ifetch run

# make purge

Options

Options are passed as arguments through the command line or extracted from a configuration file, necessarily named ifetchrc. Configuration files can be placed in /etc/ifetch/ and ~/.config/ifetch/, the latter takes precedence over the former.

While command line arguments have a standard -{option} {value} syntax, in configuration files the {option}={value} syntax is used.

If a configuration file is used and command line arguments are passed to ifetch, the command line arguments specified will take precedence over the corresponding ones in the configuration file. This means that a configuration file can be used and individual options can be specified through the command line to only change what is needed from the configuration file options.

Below is a cheatsheet displaying all currently available options, plus the data items and allowed colors table

Option Allowed values Description
/ Interface names Selects which interface to fetch data from
-if Interface names Selects which interface to fetch data from
-lo Logo file name1 Selects the logo
-loc Color code Selects the logo color
-fc Color code Selects the fields color
-sc Color code Selects the separator color
-vc Color code Selectes the values color
-s String Selects the separator
-ns / Selects a single space character as the separator
-mld Integer Selects the minimum logo-field distance allowed
-mp Integer Selects the minimum padding2 allowed
-{data item}l String Selects the label for the specified data item
-{data item} {show | s | hide | h} Selects whether the specified data item will be showed or not

1 Allowed logo file names are names of text files in either the /etc/ifetch/logos/ or ~/.config/ifetch/logos/ directory. As with configuration files, the latter takes precedence over the former

2 Padding here represents the distance between the logo and the last character of the data label (field)

Data item Description
if Interface name
mac MAC address of the selected interface
ip4 IPv4(s) assigned to the selected interface
ip6 IPv6(s) assigned to the selected interface
rx Received bytes on the selected interface
tx Transimtted bytes on the selected interface

Options and data items can be mixed (except for the -mld and -mp options) to only have colors or separators on specific data rows. For instance, -ifvc G would make ifetch print the value (vc) of the if data item (interface name) in bold green, while -vc G would make ifetch print all values in bold green. For more examples, take a look at assets/configs/arlecchino_cfg, the configuration file used to produce the output in the image above

Color code Color
r Red
g Green
y Yellow
b Blue
m Magenta
c Cyan
w White

Any of these color codes capitalized represents the bold version of the corresponding color

Safety information

ifetch prints information relative to network interfaces, this includes the IP addresses they are assigned. These can be private or public, depending on your network setup.

Make sure not to leak your public IP address(es) if you are somehow sharing the output of ifetch (e.g. in a social media post, livestream, etc). If you don't know the difference between a public and private IP address, just hide the IP addresses data from the output using options in the configuration file or using the arguments passed through the command line.

I do not take any responsibility for any damage you might cause by leaking your public IP address(es) when sharing this software's output.