https://github.com/javiorfo/xtatusbar
Configurable statusbar for Xorg server using xsetroot
https://github.com/javiorfo/xtatusbar
c dwm linux xorg xsetroot
Last synced: about 1 year ago
JSON representation
Configurable statusbar for Xorg server using xsetroot
- Host: GitHub
- URL: https://github.com/javiorfo/xtatusbar
- Owner: javiorfo
- License: other
- Created: 2024-04-08T00:16:16.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-14T02:22:51.000Z (almost 2 years ago)
- Last Synced: 2024-08-14T03:59:16.339Z (almost 2 years ago)
- Topics: c, dwm, linux, xorg, xsetroot
- Language: C
- Homepage:
- Size: 57.6 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# xtatusbar
*Configurable statusbar for Xorg server using xsetroot*
# ⚠️ Attention
## This project is no longer maintained in favor of [ztatusbar](https://github.com/javiorfo/ztatusbar)
## Caveats
- Dependencies: `xsetroot`, `asoundlib` and `libcurl`
- Influenced by suckless software (changes are doing by config.h file and recompilation).
- This library has been developed on and for Linux following open source philosophy.
## Installation
- First step:
```bash
git clone https://github.com/javiorfo/xtatusbar
cd xtatusbar
sudo make clean install
```
- In your **~/.xinitrc** to start in every login
```bash
xtatusbar &
```
## Overview
| Component | xtatusbar | NOTE |
| ------- | ------------- | ---- |
| CPU usage | :heavy_check_mark: | percentage |
| RAM usage | :heavy_check_mark: | percentage |
| TEMPERATURE | :heavy_check_mark: | Celcious |
| DISK USAGE | :heavy_check_mark: | percentage |
| VOLUME LEVEL | :heavy_check_mark: | Level and Mute status |
| BATTERY LEVEL | :heavy_check_mark: | percentage |
| WEATHER | :x: | |
| NETWORK STATUS | :heavy_check_mark: | Receive and send packages |
| DATE | :heavy_check_mark: | could be custimizable |
| CUSTOM COMPONENT | :heavy_check_mark: | coding in C |
## Customizable config.h
- Edit [config.h](https://github.com/javiorfo/xtatusbar/blob/master/config.h) to change values or configurations (then recompile)
- By default the values by parameters are the following:
```c
// First element is a string interpolation
// Second element is the time in miliseconds in which every component will execute the function in the third element
// Third element is the function to be executed
static Component components[] = {
{ " CPU %hd%% | ", 1000, get_cpu_usage },
{ " RAM %hd%% | ", 1000, get_ram_usage },
{ " TEMP %hd°C | ", 1000, get_cpu_temperature },
{ " DISK %hd%% | ", 5000, get_disk_usage },
{ " VOL %s | ", 100, get_volume },
{ "%s NET | ", 5000, network_is_connected },
{ " %s ", 60000, get_date },
// { " BAT %hd%% | ", 5000, get_battery_status },
// { "CUSTOM %s ", 1000, execute_script },
};
// File where to get PC temperature
// static const char *TEMPERATURE_FILE = "/sys/class/thermal/thermal_zone0/temp";
static const char* TEMPERATURE_FILE = "/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input";
// File where to get battery info
static const char* BATTERY_FILE = "/sys/class/power_supply/BAT0/uevent";
// Date format calendar
static const char* DATE_FORMAT = "%A %d/%m/%Y %H:%M";
// Path to a script if execute_script function is used
static const char* SCRIPT = "./path/to/script";
```
## Screenshots

---
### Donate
- **Bitcoin** [(QR)](https://raw.githubusercontent.com/javiorfo/img/master/crypto/bitcoin.png) `1GqdJ63RDPE4eJKujHi166FAyigvHu5R7v`
- [Paypal](https://www.paypal.com/donate/?hosted_button_id=FA7SGLSCT2H8G)