Coder Social home page Coder Social logo

onemorebyte / i3status-rust Goto Github PK

View Code? Open in Web Editor NEW

This project forked from greshake/i3status-rust

0.0 3.0 0.0 510 KB

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust

License: GNU General Public License v3.0

Rust 100.00%

i3status-rust's Introduction

i3status-rust

demo1

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust

For available blocks and detailed documentation visit the Wiki

About this project

This is a replacement for i3status, aiming to provide the most feature-complete and resource friendly implementation of the i3bar protocol available. We are currently looking for help in implementing more Blocks and Themes! It supports:

  • flexibility through theming
  • icons (optional)
  • individual update intervals per block to reduce system calls
  • click actions
  • blocks can trigger updates asynchronously, which allows for things like dbus signaling, to avoid periodic refreshing of data that rarely changes (example: music block)

Requirements

i3, rustc, libdbus-dev and cargo. Only tested on Arch Linux. Compilation is only tested with the latest Rust stable version. If you use a distro with old Rust packages (looking at you, Ubuntu!), fall back to rustup or find a precompiled package for your distro.

Optional:

  • alsa-utils For the volume block
  • lm_sensors For the temperature block
  • speedtest-cli For the speedtest block
  • Font Awesome, for icons="awesome". Version 5 of the font is causing some issues (see #130), so for now we recommend version 4. If you have access to the AUR, check out ttf-font-awesome-4.
  • gperftools For dev builds, needed to profile block performance and bottlenecks.
  • powerline-fonts For all themes using the powerline arrow char. Recommended. See powerline on GitHub

How to use it

  1. If you are using Arch Linux, you can install from the AUR: i3status-rust-git and proceed to step 3. Otherwise, clone the repository: git clone https://github.com/XYunknown/i3status-rust.git

  2. run cd i3status-rust && cargo build --release

  3. Edit example_config.toml to your liking and put it to a sensible place (e.g. ~/.config/i3/status.toml)

  4. Edit your i3 bar configuration to use i3status-rust. For example:

    bar {
          font pango:DejaVu Sans Mono, FontAwesome 12
          position top
          status_command path/to/i3status-rs path/to/config.toml
          colors {
                separator #666666
                background #222222
                statusline #dddddd
                focused_workspace #0088CC #0088CC #ffffff
                active_workspace #333333 #333333 #ffffff
                inactive_workspace #333333 #333333 #888888
                urgent_workspace #2f343a #900000 #ffffff
          }
    }
    

    In order to use the built-in support for the Font Awesome icon set, you will need to include it in the font parameter, as above. Check to make sure that "FontAwesome" will correctly identify the font by using fc-match, e.g.

    $ fc-match FontAwesome
    fontawesome-webfont.ttf: "FontAwesome" "Regular"

    (Note that the name of the Font Awesome font may have changed in version 5. See #130 for some discussion.)

  5. Reload i3: i3 reload

Breaking changes

i3status-rs is very much still in development, so breaking changes before a 1.0.0 release will occur. Following are guides on how to update your configurations to match breaking changes.

Battery block changed

The battery block now uses the device name (usually BAT0) instead of the number after 'BAT'. This makes the block compatible with device names not starting with 'BAT'. To see your battery device(s) execute ls /sys/class/power_supply

Configuration changed

Recently, the configuration has been changed:

  • Switched from JSON to TOML
  • Inlined the themes and icons configurations into the new main configuration
  • Removed the command-line arguments --theme and --icons

Update your configuration to match the structure of the current example_config.toml:

theme = "solarized-dark"
icons = "awesome"

[[block]]
block = "disk_space"
path = "/"
alias = "/"
info_type = "available"
unit = "GB"
interval = 20

[[block]]
block = "memory"
display_type = "memory"
format_mem = "{Mup}%"
format_swap = "{SUp}%"

[[block]]
block = "cpu"
interval = 1

[[block]]
block = "load"
interval = 1
format = "{1m}"

[[block]]
block = "sound"

[[block]]
block = "time"
interval = 60
format = "%a %d/%m %R"

Things to note:

i3status-rust's People

Contributors

1wilkens avatar adeschamps avatar ammgws avatar anthonynguyen avatar atheriel avatar draoncc avatar drogglbecher avatar etrombly avatar greshake avatar jheyens avatar jonascir avatar keeslinp avatar matthiaskrgr avatar onemorebyte avatar pitkley avatar polyzen avatar se-spiess avatar soft avatar svmnotn avatar

Watchers

 avatar  avatar  avatar

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.