All Projects → 38 → i3monkit

38 / i3monkit

Licence: MIT license
The toolkit to create customized I3 status bar

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to i3monkit

Xsuspender
👀 💻 💤 🔋 Save battery by auto-suspending unfocused X11 applications.
Stars: ✭ 53 (+70.97%)
Mutual labels:  tiling-window-manager, i3wm
Dotfiles
🌸 Configuration for i3, kitty, picom, ZSH, gtk, qutebrowser, qbittorrent and more... (All tools for an arch linux new installation)
Stars: ✭ 15 (-51.61%)
Mutual labels:  i3status, i3wm
axyl-iso
Axyl is a Linux distro centered on tiling window managers. Choose from i3, bspwm, dwm and more.
Stars: ✭ 348 (+1022.58%)
Mutual labels:  tiling-window-manager, i3wm
i3
Archivos de configuraciones de i3
Stars: ✭ 32 (+3.23%)
Mutual labels:  i3status, i3wm
i3status
Simple status bar for i3 / i3-gaps / sway written in bash and python
Stars: ✭ 69 (+122.58%)
Mutual labels:  i3bar, i3wm
I3 Config
i3wm configuration files
Stars: ✭ 81 (+161.29%)
Mutual labels:  tiling-window-manager, i3wm
i3altlayout
i3wm efficient screen real estate
Stars: ✭ 40 (+29.03%)
Mutual labels:  tiling-window-manager, i3wm
I3scripts
My scripts for enhancing i3wm
Stars: ✭ 127 (+309.68%)
Mutual labels:  tiling-window-manager, i3wm
i3blocks-modules
Custom modules for i3blocks status bar
Stars: ✭ 36 (+16.13%)
Mutual labels:  i3bar, i3wm
i3blocks-crypto
💵 View your favorite coins' ticker prices with i3blocks.
Stars: ✭ 30 (-3.23%)
Mutual labels:  i3bar, i3wm
Dotfiles
My dotfiles repo, here you can find all my window manager configs as well as documentation and a guide on how to make your own desktop environment.
Stars: ✭ 208 (+570.97%)
Mutual labels:  tiling-window-manager
Dewm
A pure go autotiling window manager written with literate programming
Stars: ✭ 225 (+625.81%)
Mutual labels:  tiling-window-manager
unixbar
Rust library for creating output for UNIX-style desktop bars like i3bar/swaybar, dzen2, lemonbar | now on https://codeberg.org/valpackett/unixbar
Stars: ✭ 119 (+283.87%)
Mutual labels:  i3bar
awesome
my Awesome(window management) configuration for Arch/Ubuntu
Stars: ✭ 34 (+9.68%)
Mutual labels:  tiling-window-manager
Frankenwm
🖼️ Fast dynamic tiling X11 window manager
Stars: ✭ 209 (+574.19%)
Mutual labels:  tiling-window-manager
Waybar
Highly customizable Wayland bar for Sway and Wlroots based compositors. ✌️ 🎉
Stars: ✭ 2,037 (+6470.97%)
Mutual labels:  i3status
Nixpkgs Wayland
Automated, pre-built packages for Wayland (sway/wlroots) tools for NixOS.
Stars: ✭ 178 (+474.19%)
Mutual labels:  tiling-window-manager
Awesome Config
📕 Example awesome wm configuration. Includes personalization support (personal.vim), theme, polyglot unicode taglists, mpd support.
Stars: ✭ 162 (+422.58%)
Mutual labels:  tiling-window-manager
Polybar Themes
A huge collection of polybar themes with different styles, colors and variants.
Stars: ✭ 3,687 (+11793.55%)
Mutual labels:  i3status
Durden
Desktop Environment for Arcan
Stars: ✭ 158 (+409.68%)
Mutual labels:  tiling-window-manager

i3monkit - The i3 Status Bar Monitor Toolkit

Latest Version

Overview

This is a toolkit for building customized status bar program for the i3 tiling window manager. i3 has its default status bar program called i3status, but it's somehow limited and hard to extend and customize. This crate gives you the ability to reimplement an status bar program for i3 quickly.

Screen Shot

It comes with a set of builtin widget as well, such as, CPU usage bar, Network speed meter, etc.

How to build the status bar program

You can crate your own status bar with just a few lines of code in Rust.

First, you need to crate a crate and import this crate

[dependencies]
i3monkit = "*"

Then, config your customized i3 status bar

use i3monkit::*;                                                              
use i3monkit::widgets::*;                                                     

fn main() {
    let mut bar = WidgetCollection::new();

    //Add realtime stock prices, for example: Microsoft, AMD and Facebook
    let stock_client = StockClient::new("your-alphavantage-API-key");         
    bar.push(StockClient::create_widget(&stock_client, "MSFT"));              
    bar.push(StockClient::create_widget(&stock_client, "AMD"));               
    bar.push(StockClient::create_widget(&stock_client, "FB"));
                                                                              
    //Realtime upload/download rate for a interface                           
    bar.push(NetworkSpeedWidget::new("wlp58s0"));
                                                                              
    //Display all the cpu usage for each core                                 
    for i in 0..4 {                                                           
        bar.push(CpuWidget::new(i));                                          
    }
                                                                              
    //Volume widget                                                           
    bar.push(VolumeWidget::new("default", "Master", 0));
                                                                              
    //Battery status                                                          
    bar.push(BatteryWidget::new(0));
                                                                              
    //Time                                                                    
    bar.push(DateTimeWidget::new());
                                                                              
    // Then start updating the satus bar                                      
    bar.update_loop(I3Protocol::new(Header::new(1), std::io::stdout()));
}

Finally, you can change ~/.config/i3/config to make i3wm uses your status bar program

 # Start i3bar to display a workspace bar (plus the system information i3status
 # finds out, if available)
 bar {
 	status_command path/to/your/customized/status/program
 	tray_output primary
 	colors {
 	   background #222222
 	   statusline #00ee22
 	   separator #666666
 	   #                  border  backgr. text
 	   focused_workspace  #4c7899 #285577 #ffffff
 	   inactive_workspace #333333 #222222 #888888
 	   urgent_workspace   #2f343a #900000 #ffffff
 	}                                                           
  }

Write your own widget

You can also add your customized widget to the framework by implementing the Widget trait.

use i3monkit::{Block, Widget, WidgetUpdate};
struct Greeter(&'static str);
impl Widget for Greeter {
    fn update(&mut self) -> Option<WidgetUpdate> {
        Some(WidgetUpdate{
            refresh_interval: std::time::Duration::new(3600,0),
            data: Some(Block::new().append_full_text(self.0).clone())
        })
    }
}

fn main() {
    let bar = WidgetCollection::new();
    bar.push(Greeter("hello world"));
    .....
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].