All Projects → liamg → Shox

liamg / Shox

Licence: unlicense
🍫 A customisable, universally compatible terminal status bar

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Shox

.tmux
🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
Stars: ✭ 15,594 (+2348.04%)
Mutual labels:  terminal, customization
Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (-1.88%)
Mutual labels:  terminal
Googler
🔍 Google from the terminal
Stars: ✭ 5,594 (+778.18%)
Mutual labels:  terminal
Grafterm
Metrics dashboards on terminal (a grafana inspired terminal version)
Stars: ✭ 613 (-3.77%)
Mutual labels:  terminal
Imgcat
It's like cat, but for images.
Stars: ✭ 577 (-9.42%)
Mutual labels:  terminal
Httpu
The terminal-first http client
Stars: ✭ 619 (-2.83%)
Mutual labels:  terminal
Rate.sx
💰 curl cryptocurrencies exchange rates
Stars: ✭ 563 (-11.62%)
Mutual labels:  terminal
Imagescraper
✂️ High performance, multi-threaded image scraper
Stars: ✭ 630 (-1.1%)
Mutual labels:  terminal
Progressbar
Terminal-based progress bar for Java / JVM
Stars: ✭ 625 (-1.88%)
Mutual labels:  terminal
Sngrep
Ncurses SIP Messages flow viewer
Stars: ✭ 605 (-5.02%)
Mutual labels:  terminal
Autocomplete
Autocomplete for terminals on MacOS
Stars: ✭ 569 (-10.68%)
Mutual labels:  terminal
Gui.cs
Console-based user interface toolkit for .NET applications.
Stars: ✭ 5,879 (+822.92%)
Mutual labels:  terminal
Rdrview
Firefox Reader View as a command line tool
Stars: ✭ 622 (-2.35%)
Mutual labels:  terminal
Wunderbar
Simple horizontal bar chart printer for your terminal
Stars: ✭ 572 (-10.2%)
Mutual labels:  terminal
Wechatcmd
提供微信终端版本、微信命令行版本聊天功能、微信机器人
Stars: ✭ 628 (-1.41%)
Mutual labels:  terminal
Nord Tmux
An arctic, north-bluish clean and elegant tmux color theme.
Stars: ✭ 567 (-10.99%)
Mutual labels:  terminal
Secureuxtheme
🎨 A secure boot compatible in-memory UxTheme patcher
Stars: ✭ 586 (-8.01%)
Mutual labels:  customization
Tvision
A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
Stars: ✭ 612 (-3.92%)
Mutual labels:  terminal
Tml
🌈💻🎨 A tiny markup language for terminal output. Makes formatting output in CLI apps easier!
Stars: ✭ 634 (-0.47%)
Mutual labels:  terminal
Spicetify Cli
Commandline tool to customize Spotify client. Supports Windows, MacOS and Linux.
Stars: ✭ 9,316 (+1362.48%)
Mutual labels:  customization

Shox: Terminal Status Bar

Travis Build Status GoReportCard Github Release

A customisable terminal status bar with universal shell/terminal compatibility. Currently works on Mac/Linux.

Installation

NOTE This is still very experimental. I'm using it locally without any problems right now, but there's still a lot of testing and tweaking to do. Feel free to try it out, but get ready for some potential bugginess!

curl -s "https://raw.githubusercontent.com/liamg/shox/master/scripts/install.sh" | sudo bash

If you don't like to pipe to sudo - as well you shouldn't - you can remove the sudo above, but you'll have to add the shox dir to your PATH env var manually, as instructed by the installer.

Configuration

The shox config file should be created at $XDG_CONFIG_HOME/shox/config.yaml, which is usually ~/.config/shox/config.yaml. You can alternatively create it at ~/.shox.yaml

The config file looks like the following:

shell: /bin/bash
bar:
    format: "{time}||CPU: {cpu} MEM: {memory}"
    colours: 
      bg: red
      fg: white
    padding: 0

Shox will use your SHELL environment variable to determine the shell to run if a shell is not specified in the config file, but if your SHELL is set to shox, it'll default to /bin/bash to prevent a horrible recursive mess.

Bar Configuration

Bar configuration is done using a simple string format. Helpers are encased in braces e.g. {time}, alignment is done using pipes (see below), and any other text will be written to the bar.

Alignment

You can use pipes to align content within the status bar. All content before the first pipe will be aligned to the left, all content between the first and second will be centre aligned, and all content after the second pipe will be right aligned.

For example, to display a bar that centre aligns the time, you could use |{time}|

Colours

The following colours are available: black, white, red, green, yellow, blue, magenta, cyan, darkgrey, lightgrey, lightred, lightgreen, lightyellow, lightblue, lightmagenta, lightcyan.

Helpers

Helpers create dynamic output in your status bar. You can use one by adding it to your bar format config. The following is a list of available helpers.

Helper Description Example Config Example Output
time Show current time {time} 11:58:17
cpu Show current CPU usage {cpu} 20%
memory Show current memory usage % {memory} 20%
battery Show current battery charge % {battery} 20%
bash Run a custom bash command {bash:echo hi} hi
weather Show current weather (provided by http://wttr.in) {weather:1} 🌧 +6°C
until Show time remaining until a given unix timestamp {until:1583255109} 13m26s

Ideally this list would be much longer - please feel free to PR more helpers! You can see simple examples here.

Weather

The configuration section of the weather helper holds the display format. For all available display formats please visit chubin/wttr.in#one-line-output The default value is 1 which only shows the weather

NOTE: You don't need to URL-encode the weather format, i.e. use %l: %c %t instead of %l:+%c+%t

Uninstallation

If installed with sudo

Remove the binary from /usr/local/bin

rm /usr/local/bin/shox

If installed without sudo

Remove the binary from the shox installation dir $HOME/bin

rm $HOME/bin/shox

NOTE: Don't forget to remove any configuration files you've created should you decide you don't need them

Why?

I frequently needed a way to have a quick overview of several things without cramming them into my PS1, and to update those things dynamicly.

How does it work?

Shox sits between the terminal and your shell and proxies all data sent between them. It identifies ANSI commands which contain coordinates and dimensions and adjusts them accordingly, so that the status bar can be drawn efficiently without interfering with the shell and it's child programs.

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].