A clean and modern polybar configuration.
- Workspace indicator: Shows the current workspace and allows you to switch between them.
- Window title: Displays the title of the current active window.
- Microphone status: Shows the current microphone volume and mute status.
- Audio control: Shows the current volume level and allows you to mute/unmute.
- System monitoring: Displays CPU and RAM usage.
- Battery status: Shows the current battery level and charging status.
- Network information: Displays wireless network information.
- Date and time: Shows the current date and time.
polybarxrandr(for multi-monitor support)pactl(for microphone and volume control)MesloLGS Nerd Font Mono(or any other Nerd Font for the icons)
-
Clone the Repository
Open your terminal and clone the repository to your local machine:
git clone https://github.com/Hadi493/cg-polybar.git cd cg-polybar -
Copy Configuration Files
Next, copy the configuration files into Polybar's default directory (
~/.config/polybar/).mkdir -p ~/.config/polybar cp -r ./* ~/.config/polybar/
-
Set Script Permissions
The launch and microphone scripts require executory permissions to run.
chmod +x ~/.config/polybar/launch_polybar.sh chmod +x ~/.config/polybar/mic-input.sh
To test the Polybar configuration, you can launch it manually from your terminal. This is useful for debugging and ensuring that all modules load correctly.
~/.config/polybar/launch_polybar.shFor Polybar to start automatically when you log in, you need to add the launch script to your window manager's startup configuration file.
For i3:
Add the following line to your ~/.config/i3/config file:
exec_always --no-startup-id ~/.config/polybar/launch_polybar.sh
For bspwm:
Add the following line to your ~/.config/bspwm/bspwmrc file:
~/.config/polybar/launch_polybar.sh &After adding the line, ensure that the bspwmrc file is executable:
chmod +x ~/.config/bspwm/bspwmrcconfig.ini: The main polybar configuration file. You can customize the modules, colors, and fonts here.launch_polybar.sh: A script to launch the polybar. It includes support for multiple monitors usingxrandr.mic-input.sh: A script to get the microphone volume and mute status.
