Giter Site home page Giter Site logo

sway-musli's Introduction

Sway-MÜSLI: Sway – Minimal Ültrafast Status Line

Example

sway-musli

MyWiFi | Colemak | 65% - Charging | Fri 2023-12-01 17:01:13

Features

  • Written in C for ültra speed.
    • No dependencies. Uses sockets for communication with Sway and Linux subsystems.
    • Takes 1ms to render on my machine.
    • Great performance even when running in 60 FPS möde!
    • Supports both Sway and i3.
      • Easy to adapt to any status bar which supports text input.
  • Minimal features:
    • Shows wifi connection.
    • Shows keyboard layout.
    • Shows battery status.
    • Shows date and time (even seconds!).

Installation

  1. Clone the repo and run:
make
make install # if you want to have the executable in your path
  1. Add to your Sway/i3 config file:
bar {
    ...
    status_command sway-musli
    ...
}

Usage

Usage: sway-musli [-1|--once] [-f|--fps <FPS>]
 - Print a stream of status lines to be used with swaybar.
 - If passed -1 or --once, print once and exit.
 - If passed -f or --fps, print at most <FPS> times per second.
   - Default is 30 FPS.
 - Example sway config:
    ...
    bar {
        status_command sway-musli
    }
    ...
    # Note: Make sure sway-musli is in your PATH.

FPS?

That's right. We are in high-performance territory now.

By default, sway-musli runs at 30 FPS, but you can change it with the --fps option.

  • 1 FPS is completely acceptable, but you might want more if you add some sort of dynamic content, or if you want to see keyboard layout changes reflected immediately.
  • At around 60 FPS, your processor might feel a slight tickle. If your bar is hidden by default, you might as well run it at 60 FPS because Sway/i3 won't run it while the bar is hidden.

Notes

  • Assumes your network device is wlan0. But you can change this in the source file.
  • You can take this as a sample code to help you build your personal ültrafast Sway status line.
  • See also, i3status, i3status-rust, and i3blocks
  • I ate müsli while coding this 🥣
  • Contributions welcome!

License

MIT

sway-musli's People

Contributors

sebastiancarlos avatar

Watchers

 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.