/polybar-diskspace-module

A polybar Module which shows disk space in 4 different modes.

Primary LanguageShell

polybar-diskspace-module

A polybar Module which shows disk space in 4 different modes.

Table of Contents

Introduction

A polybar Module which shows disk space in 4 different modes.

Getting Started

Dependencies

  • python
  • pip
  • vizex - vizex is the terminal program for the UNIX/Linux systems which helps the user to visualize the disk space usage for every partition and media on the user's machine.
  • Nerd Fonts

Installing Dependencies

pip

vizex can be installed through your terminal and requires Python >= 3.9 and the pip package manager. Here's how to set up Python on your machine.

If you don't have PyPackage Index (PyPI or just pip) installed, Here's the guide on how to install it. Install vizex with the following command:

pip install vizex

If you already have vizex install you'll need to upgrade it:

pip install vizex --upgrade

If you encounter any problems during installation, know that some vizex dependencies require a Python 3 development package on Linux and you need to set up that manually.

For Debian and other derived systems (Ubuntu, Mint, Kali, etc.) you can install this with the following command:

sudo apt-get install python3-dev

For Red Hat derived systems (Fedora, RHEL, CentOS, etc.) you can install this with the following command:

sudo yum install python3-devel

AUR

vizex is available as a package on the AUR (Arch user repository), distributions with AUR support may install directly from the command line using their favorite pacman helper.

Example using yay:

yay -S vizex

Installation Instructions for Nerd Fonts Provided on their Github. NOTE: Arch Users can install using AUR

yay -S nerd-fonts-*

Write desired fonts in place of *

Configuration

disk module contains 4 different functions
Below given is the default module

[module/disk]
type = custom/script
; Script
; exec = /path/to/script <<< display_method
; display_methods can be used_total , free , used , all
exec = $HOME/.config/polybar/scripts/diskspace/diskspace.sh <<< used_total
; Update interval
interval = 600
; Label
label            = %{T2} %output%
label-foreground = ${colors.foreground}
label-padding    = 1 

The default config(used_total) shows gives output like this
used_total config

free config - It shows free space available in the disk. free config

used config - It shows used space in the disk. used config

all config - It shows all info i.e Total disk storage, used and available. all config

Installation

  1. Clone the repository
https://github.com/iamcodernitesh/polybar-diskspace-module.git
  1. Give the script sudo permissions
chmod 755 install.sh
  1. Cd into the directory
cd polybar-diskspace-module
  1. Run the script
./install.sh

Follow Me on

linkedin github