Configurable statusbar for Xorg server using xsetroot
- Dependencies:
xsetroot
,asoundlib
andlibcurl
- 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.
- First step:
git clone https://github.com/javiorfo/xtatusbar
cd xtatusbar
sudo make clean install
- In your ~/.xinitrc to start in every login
xtatusbar &
Component | xtatusbar | NOTE |
---|---|---|
CPU usage | ✔️ | percentage |
RAM usage | ✔️ | percentage |
TEMPERATURE | ✔️ | Celcious |
DISK USAGE | ✔️ | percentage |
VOLUME LEVEL | ✔️ | Level and Mute status |
BATTERY LEVEL | ✔️ | percentage |
WEATHER | ❌ | |
NETWORK STATUS | ✔️ | Receive and send packages |
DATE | ✔️ | could be custimizable |
CUSTOM COMPONENT | ✔️ | coding in C |
- Edit config.h to change values or configurations (then recompile)
- By default the values by parameters are the following:
// 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";
- Bitcoin (QR)
1GqdJ63RDPE4eJKujHi166FAyigvHu5R7v