ag
github.com/alectic/archey-go
go get github.com/alectic/archey-go
ag

github.com/alectic/archey-go

A tool to display prettified system info on Arch Linux

by Alexandru Dreptu

v0.0.0-20210122180613-f535d6c007c2 (see all)License:MIT
go get github.com/alectic/archey-go
Readme

Archey-go

Build Status GoDoc Platform License

Build is currently broken due to recent refactoring of the sysinfo module upon which this depends. I'll refactor this as well soon.

About

Archey is traditionally a Linux tool for displaying system info in a pretty way on Arch Linux. It was originally written in Python 2 and then rewriten in Python 3. Archey-go is written from scratch in Go and it compiles to a single statically linked binary. It's fast, it has no external dependencies and doesn't call any system utilities to gather the information. It also allows a decent amount of customization to satisfy your unixporn addiction.

Installing

To install Archey-go you must have Go installed and set up to be able to compile it first.

On Arch Linux you can install Go with pacman -S go go-tools.

Clone the repository and build it.

git clone git@github.com:alexdreptu/archey-go.git
cd archey-go
go build

The result is a binary called archey-go that you can move wherever you want afterwards.

Alternatively you can install Archey-go via go tooling.

You need to export $GOPATH and $GOBIN then add $GOBIN to $PATH

E.g. if you're using bash add to ~/.bashrc

export GOPATH=$HOME/.gocode
export GOBIN=$GOPATH/bin
export PATH+=:$GOBIN

where .gocode can be replaced with any directory name. Then source ~/.bashrc.

Assuming you have that set up, you install Archey-go by executing

go get github.com/alexdreptu/archey-go

NOTE: From Go 1.8 onwards you don't need to manually set $GOPATH and $GOBIN. $GOPATH automatically defaults to $HOME/go.

The archey-go binary will be located in $GOBIN

alectic@particular $ echo $GOBIN
/home/alectic/.gocode/bin
alectic@particular $ which archey-go
/home/alectic/.gocode/bin/archey-go
alectic@particular $

Usage

Archey-go can be used with or without a config file. The configuration file format is toml. Each flag responsible for configuration has an equivalent variable in its configuration file. See sample_config.toml.

NOTE: Archey-go doesn't include an option to take a screenshot, as I think this shouldn't be handled by Archey-go. Instead you can use scrot. If you just want to take a screenshot of the terminal window, you scrot -s -q 100 screenshot1.png after which you click on the terminal window. The next window you click your mouse pointer on after you run the command, will be screenshotted. For convenience run it from a command runner, usually set to alt+F2 or directly from the terminal window in which Archey-go was executed. Otherwise without -s or with a counter -cd 5 to screenshot the whole display after 5 seconds.

To install scrot you pacman -S scrot.

Flags

--no-os

Don't show OS name as read from /etc/os-release.

--no-arch

Don't show architecture e.g. x86_64 which is displayed next to OS name on the same line.

--no-kernel

Don't show kernel version.

--no-hostname

Don't show hostname.

--no-uptime

Don't show system uptime.

--no-up-since

Don't show "Up since" - the time and date when the system booted.

--no-wm

Don't show Window Manager name.

--no-de

Don't show Desktop Environment name.

--no-gtk2-theme

Don't show GTK2 theme name. The theme name is read from $HOME/.gtkrc-2.0, if it doesn't exist it's read from /etc/gtk-2.0/gtkrc. If neither one of them exists, None is displayed.

--no-gtk2-icon-theme

Don't show GTK2 icon theme name. The icon theme name is read the same way GTK2 theme name is.

--no-gtk2-font

Don't show GTK2 font name. The font name is read the same way GTK2 theme name is.

--no-gtk2-cursor-theme

Don't show GTK2 cursor theme name. The cursor theme name is read the same way GTK2 theme name is.

--no-gtk3-theme

Don't show GTK3 theme name. The GTK3 theme name is read from $HOME/.config/gtk-3.0/settings.ini, if it doesn't exist it's read from /etc/gtk-3.0/settings.ini. If neither one of them exists, None is displayed.

--no-gtk3-icon-theme

Don't show GTK3 icon theme name. The icon thene name is read the same way GTK3 theme name is.

--no-gtk3-font

Don't show GTK3 font name. The font name is read the same way GTK3 theme name is.

--no-gtk3-cursor-theme

Don't show GTK3 cursor theme name. The cursor theme name is read the same way GTK3 theme name is.

--no-terminal

Don't show terminal name.

--no-editor

Don't show the default editor's name.

--no-packages

Don't show package count on Arch Linux and Arch Linux based distributions. The package count is set by reading the /var/lib/pacman/local directory. If the directory doesn't exist (on other distributions), the package count is set to zero.

--no-memory

Don't show memory usage.

--no-swap

Don't show swap usage.

--no-cpu

Don't show CPU model.

--no-root

Don't show root partition disk usage.

--no-home

Don't show home partition disk usage.

--sep

Set the string that separates the variable name from the value (default is ":"). E.g. OS: Arch Linux.

--memory-unit

Set the unit (MB or GB) to show memory usage in (default is GB). Case is insensitive.

--swap-unit

Same as --memory-unit.

--disk-unit

Same as --memory-unit.

--paths

Set additional paths to be showed to disk usage info. Paths are separated by ",".

E.g. --paths /some/path1,/some/path2,/some/path3.

--path-full

Show full paths for root, home and the additionally added paths instead of just their basename.

--shell-full

Show full shell path instead of just its basename.

--up-since-format

Set the time and date format to be used for "Up since". The format used is strftime.

Supported strftime formats

CodeExampleDescription
%ASundayFull weekday name
%aSunAbbreviated weekday name
%BSeptemberFull month name
%bSepAbbreviated month name
%C20(year / 100) as number. Single digits are preceded by zero
%D09/21/14Equivalent to %m/%d/%y
%d21Day of month as number. Single digits are preceded by zero
%e21Day of month as number. Single digits are preceded by a blank
%f001234Microsecond as a six digit decimal number, zero-padded on the left
%F2014-09-21Equivalent to %Y-%m-%d
%H15The hour (24 hour clock) as a number. Single digits are preceded by zero
%hSepSame as %b
%I03The hour (12 hour clock) as a number. Single digits are preceded by zero
%j264The day of the year as a decimal number. Single digits are preced by zeros
%k15The hour (24 hour clock) as a number. Single digits are preceded by a blank
%L001Millisecond as a three digit decimal number, zero-padded on the left
%l11Replaced by the hour (12 hour clock) as a number. Single digits are preceded by blank
%M32Replaced by the minute as a decimal number. Single digits are preceded by a zero
%m09Replaced by the month as a decimal number. Single digits are preceded by a zero
%N001234567Nanosecond as a 9 digit decimal number, zero-padded on the left
%n\nA newline
%Pamam or pm as appropriate
%pAMAM or PM as appropriate
%R15:32Equivalent to %H:%M
%r03:32:05 AMEquivalent to %I:%M:%S %p
%S05The second as a number. Single digits are preceded by a zero
%s1461497457The number of seconds since the Epoch, UTC
%T15:32:05Equivalant to %H:%M:%S
%t\tA tab
%v21-Sep-2014Equivalent to %e-%b-%Y
%w0The weekday (Sunday as first day of the week) as a number
%Y2014Replaced by the year with century as a number
%y14Year without century as a number. Single digits are preceded by zero
%ZUTCTime zone name
%z-0700The time zone offset from UTC
--name-color

Set the color for the variable name. The format is foregroundColor+attributes:backgroundColor+attributes.

--text-color

Set the color for the text value. Same as --name-color.

--sep-color

Set the color for the separator string. Same as --name-color.

--body-color

Set the color for the logo body.

The color format is: foregroundColor+attributes:backgroundColor+attributes,foregroundColor+attributes:backgroundColor+attributes.

There are two sections of the body, upper and lower separated by ",".

E.g. --body-color red+h:red,green+h:green

Parts of the format can be omitted. If only colors for the upper body are specified, they will be used to color the whole body.

Set only foreground color: --body-color red

Set only background color: --body-color :green

Set upper and lower body colors without background colors: --body-color red,green

Set only upper foreground and background colors which will colorize the whole body with the same colors: --body-color red+h:red

Set upper foreground and background colors with only lower foreground color: --body-color red+h:red,green

Colors

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • 0...255 (256 colors)

Attributes

  • b = bold foreground

  • B = Blink foreground

  • u = underline foreground

  • i = inverse

  • h = high intensity (bright) foreground, background

    does not work with 256 colors

--list-colors

Show colors and styles

--no-color

Disable colors

--config

Specify config file. The configuration file is optional, archey-go can be configured via flags. By default archey-go looks first in the current directory for config.toml, if it's not there then it looks for $HOME/.archey-go/config.toml or $HOME/.config/archey-go/config.toml in this order. If neither one of them is there, it looks for /etc/archey-go/config.toml.

GitHub Stars

12

LAST COMMIT

1yr ago

MAINTAINERS

0

CONTRIBUTORS

2

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v0.0.0-20210122180613-f535d6c007c2
1yr ago
No alternatives found
No tutorials found
Add a tutorial