Skip to content

Modules

thnikk edited this page Jun 3, 2024 · 5 revisions

This is a list of all available modules for pybar as well as all available configuration options. All modules except for workspaces and volume accept the interval option if you'd like to set a custom interval.

Workspaces

The workspaces module shows a list of open sway workspaces and highlights the focused one. If you're using hyprland, use the hyprland module instead.

Configuration

Option Type default description
icons dict Icons to use for workspaces

Clock

The clock module shows a clock with a widget to show the current month's calendar.

Configuration

Option Type Default Decription
format string %I:%M %d/%y date string (use man date to find available options)

Widget

The calendar shows events from $XDG_CONFIG_HOME/calendar-events.json formatted as follows:

{
    "6/12": "Someone's birthday",
    "12/25": "Christmas Day"
}

Volume

The volume module shows the current volume for the default output device. The icon shown is customizable based on the default output device. Right-clicking on the module will cycle through output devices. It also features a mixer widget by clicking on the module.

Configuration

Option Type Default Decription
icons dict key: value pair where key is a part of the output name to match against and value is the icon

Example

"volume": {
    "icons": {
        "arctis": ""
    }
}

Backlight

The backlight module shows the current backlight level. It is scrollable and clicking on it opens a widget with a slider to easily set the value.

Battery

The battery module looks for all /sys/class/power_supply/BAT* devices and shows the weighted percentage. It features a widget to show the battery individual battery level of multiple batteries.

Power

The power module is a clickable button that opens a power menu widget. This currently isn't customizable, but gives quick shortcuts for locking and power options like suspend and shut-down.

Weather

The weather module shows the current temperature with an icon for the weather conditions. It features a clickable widget for today's weather as well as an hourly and daily forecast.

Configuration

Option Type Default Decription
zip_code string The zip code of your city
night_icons bool true or false value to show different icons for night
hourly_hours int Number of hours to show for hourly forecast

Resin

The resin module shows the current level of resin in Genshin Impact. The widget shows the amount of time until you hit the next 40 resin as well as some other useful information like dailies completed, realm currency, weekly boss rewards claimed, and Spiral Abyss completion.

Configuration

Option Type Default Decription
ltuid string ltuid browser cookie (check the genshin.py docs here)
ltoken string Same as above but for ltoken
uid string Your UID in-game

UPS

The ups module is made for use with a CyberPower UPS. It shows the current power draw on the UPS as well as some other useful stats in the widget like remaining runtime.

Configuration

Option Type Default Decription
vendor string Vendor ID of the UPS
product string Product ID of the UPS
offset int Amount to subtract from value shown on the bar

Git

The git module can be used to track a git repo like pybar, and allow for easy updating.

Configuration

Option Type Default Decription
path string Path to the git repo

Network

The network module shows the current network connection status using NetworkManager. The widget shows the interface, IP, and SSID of the active connection.

Configuration

Option Type Default Decription
always_show bool true Setting to false will only show the module when there's no active connection

Updates

The update module shows the number of available system updates through various package managers. This currently shows packages for pacman (using checkupdates), the AUR (using paru), and flatpak. The widget shows a full list of available packages along with the package versions and a button to update all.

Configuration

Option Type Default Decription
terminal string kitty Terminal emulator to use for updating
alerts array ["linux", "discord", "qemu", "libvirt"] Packages to move to the top of the list when an update is available.

XDrip

The xdrip module shows your current blood sugar by using the XDrip+ android app's web API.

Configuration

Option Type Default Decription
ip string IP of the server
port string Port of the server
api_secret string API secret set through XDrip+

VM

The vm module shows the number of currently running VMs along with a list of the running VMs in the widget.

Privacy

The privacy module shows when your microphone, webcam, and screenshare are used. The widget shows what devices are in use by what program.

Systemd

The systemd module shows the number of systemd services that failed to launch. The widget shows lists for system and user services.

Configuration

Option Type Default Decription
blacklist array Services to ignore

Sales

The sales module shows the number of today's Etsy sales along with order information and a total made excluding tax and shipping. This uses a very specific email setup and currently doesn't allow for any configuration, so I don't expect anyone else to use this.

Toggle

The toggle module allows you to toggle a program. This is convenient in situations where you want to easily start a program but don't want to fully automate it. I made this for use with scrcpy, where I don't always want my phone mirrored to my computer, but I want it to be easy to start.

Configuration

Option Type Default Decription
icon str ? Icon for module
command array ["tail", "-f", "/dev/null"] Command to run when toggled on

Custom

You can make a custom module with any name as long as it has a command section in the module configuration. This is made to be compatable with waybar-style modules. It supports showing generic widgets using the generic widget by adding a widget section to the output. The output of command should be as follows:

{
    "text": "<What shows up on the bar>",
    "tooltip": "<timestamp>",
    "module": {
        "title": [
            "box item 1",
            "box item 2"
        ]
    }
}

Configuration

Option Type Default Decription
command array Command to run
interval int Interval to update module