Giter Club home page Giter Club logo

fetchit's Introduction

fetchit

A system fetch tool for Linux, written in Rust.

fetchit is a simple system info tool, written in Rust, for Linux based operating systems. It offers a few customization options, which are demonstrated in the screenshots below,

  • You can change the colors for the top and bottom part of the ascii art, as well as the color for the bounding box.
  • The path to a custom ascii text file can be passed to fetchit using the -f option.

For a custom ascii text file, it is recommended that the ascii art should be contained in a box of 10x28, i.e. 28 spaces wide, and 10 lines in height. If this condition is not met (especially, the height, which should be greater than or equal to 9, i.e. the number of lines) then fetchit will fall back to the default ascii asrt. See Usage for more details.

Examples

 


 



Installation

You can install fetchit using any of the following methods,

Arch Linux

fetchit is available in the AUR. If you have an AUR helper (for example paru),

$ paru -S fetchit-git

Or alternatively,

# Clone the AUR Package.
$ git clone https://aur.archlinux.org/fetchit-git.git

# Change directory into the repo.
$ cd fetchit-git

# Install it, using `makepkg`.
$ makepkg -si

Install from Releases

Head over to Releases to grab a binary for fetchit. Once downloaded,

# Navigate to the directory where you have downloaded the tar file.
$ tar -xvf fetchit-0.1.1-x86_64.tar.gz

# Copy the executable to `~/.local/bin/`, and if this directory doesn't exist create it.
$ if [[ ! -d ~/.local/bin ]] ; then mkdir -p ~/.local/bin/ ; fi
$ cp ./fetchit ~/.local/bin/

Finally, make sure, you add ~/.local/bin/ to PATH, if you haven't already.

Building from Source

# First of all install Rust, see "https://www.rust-lang.org/tools/install".
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Clone the git repo.
$ git clone https://github.com/Ruturajn/fetchit.git

# Change directory into the repo.
$ cd ./fetchit

# Build the package.
$ cargo build --release

# Create ~/.cargo/bin/ if it does not exist.
$ if [[ ! -d ~/.cargo/bin ]] ; then mkdir -p ~/.cargo/bin/ ; fi

# Copy the executable to `~/.cargo/bin/`.
$ cp ./target/release/fetchit ~/.cargo/bin/

Note: Please feel free to open Issues and Pull requests, if you feel something is out of order, or if you are facing any problems.


Usage

fetchit 0.1.1
Ruturajn <[email protected]>
A System fetch tool for Linux written in Rust

USAGE:
    fetchit [OPTIONS]

OPTIONS:
    -b, --bottom-color <BOTTOM_COLOR>
            Color for the bottom part of the ascii art : black, red, yellow, blue, magenta, cyan,
            white, green

    -f, --file-path <FILE_PATH>
            File path for the ascii text file

    -h, --help
            Print help information

    -o, --outer-box-color <OUTER_BOX_COLOR>
            Color for the box : black, red, yellow, blue, magenta, cyan, white, green

    -t, --top-color <TOP_COLOR>
            Color for the top part of the ascii art : black, red, yellow, blue, magenta, cyan,
            white, green

    -V, --version
            Print version information

References

fetchit's People

Contributors

ruturajn avatar tripleab avatar bdejean avatar mainrs avatar rtkay123 avatar

Stargazers

jeff avatar Malte Kyhos avatar Anna avatar  avatar L I N U X ( リナックス ) avatar yofri avatar kup1o avatar  avatar Marco Cardone avatar bpetit avatar Sam Schlinkert avatar Wesley Moore avatar Ryan Brink avatar Linus Walker avatar Bastian Meissner avatar  avatar Cody avatar Eduardo Navarro avatar Alvaro avatar  avatar Oleg Pykhalov avatar Kyra the Donkey avatar Jorge López avatar  avatar  avatar Sawyer Ruch avatar  avatar Michael Garcia-Rivas avatar Seven avatar Jay avatar OutofRange avatar Patrick Fruh avatar  avatar Filip avatar Elliot ⋇ avatar Gabriel avatar Akarsh avatar Faustino avatar Alistair Foggin avatar  avatar mojamuto avatar

Watchers

 avatar  avatar

fetchit's Issues

README update

I think the README should contain a hint that custom logos have to be at least 9 lines long (i had to look at the source code to figure out why my logo didn't show up).

`cargo test` failing `fallback_session`

When running cargo test, I get the error message:

running 3 tests
test tests::xdg_current ... ok
test tests::xdg_session ... ok
test tests::fallback_session ... FAILED

failures:

---- tests::fallback_session stdout ----
thread 'tests::fallback_session' panicked at 'assertion failed: `(left == right)`
  left: `"i3"`,
 right: `"LG3D"`', src/lib.rs:229:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    tests::fallback_session

I'm using i3wm, which explains why the call to get_session_name is returning i3 for the left of the comparison. However, I don't understand how the fallback_session test is supposed to succeed, as no environment variables are set to the value LG3D. It seems to me like the fallback_session test should be changed on line 221, to set the environment variable DESKTOP_SESSION to LG3D, in order to test whether get_session_name works with the DESKTOP_SESSION environment variable.

For testing the fallback value, the expected fallback should be Unknown if I'm not mistaken, however the environment variables aren't being cleared in order to test that (since get_session_name still seems to be returning i3wm, which seems like a different issue altogether.

Sorry if I'm completely misinterpreting the situation, as I'm not totally sure what the intention is with the tests, hence why I have created an issue rather than fixing the test myself and submitting a pull request. Although with some further info I'm happy to fix this issue and submit a pull request (provided there is an issue at all)

Many thanks again!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.