waybar.py
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
waybar.py
- HyDE Waybar configuration management script
Synopsis
Section titled “Synopsis”waybar.py [-h] [--set SET] [-n] [-p] [-u] [-g] [-i] [-b] [-G] [-c CONFIG] [-s STYLE] [-w] [--json] [--select] [--kill] [--hide [{0,1,toggle}]]
Description
Section titled “Description”waybar.py
is a comprehensive Waybar configuration management script that is part of the HyDE, your Development Environment.
The script manages Waybar configurations stored in ~/.config/waybar/layouts/
and their corresponding styles in ~/.config/waybar/styles/
. It automatically handles the generation of includes files, icon sizing, border radius updates, and provides seamless switching between different Waybar configurations.
Options
Section titled “Options”Layout Management
Section titled “Layout Management”--set SET
: Set a specific layout by name. The layout file should exist in ~/.config/waybar/layouts/
with a .jsonc
extension.
-n, --next
: Switch to the next available layout in alphabetical order. Cycles through all layouts in the layouts directory.
-p, --prev
: Switch to the previous available layout in alphabetical order. Cycles through all layouts in the layouts directory.
Update Operations
Section titled “Update Operations”-u, --update
: Perform a complete update of all Waybar components including:
- Icon size configurations in JSON files
- Border radius in CSS files
- Includes.json file generation
- Configuration and style synchronization
-g, --update-global-css
: Update only the global.css file. This file contains dynamic font-size and font-family configurations that can be overridden by themes via hypr.theme
>> $BAR_FONT
.
-i, --update-icon-size
: Update icon size configurations in JSON files. This resolves icon sizing that cannot be handled directly by Waybar’s CSS.
-b, --update-border-radius
: Update border radius configurations in CSS files. This creates dynamic border radius for groups that adapts to Hyprland’s corner rounding settings.
-G, --generate-includes
: Generate the includes.json
file. This file contains:
- All modules from
~/.config/waybar/modules/
- Dynamic configurations that Waybar doesn’t provide natively
- Icon size resolutions for proper styling
Configuration Paths
Section titled “Configuration Paths”-c CONFIG, --config CONFIG
: Specify the path to a source config.jsonc
file. This allows using configurations outside the standard layouts directory.
-s STYLE, --style STYLE
: Specify the path to a source style.css
file. This allows using styles outside the standard styles directory.
Process Management
Section titled “Process Management”-w, --watch
: Enable watch mode. Continuously monitor Waybar and automatically restart it if the process dies. Useful for maintaining a persistent Waybar instance.
--kill, -k
: Kill all running Waybar instances and any associated watcher scripts. This provides a clean way to terminate all Waybar processes.
--hide [{0,1,toggle}]
: Control Waybar visibility:
--hide 0
or--hide show
: Show Waybar--hide 1
or--hide hide
: Hide Waybar--hide
or--hide toggle
: Toggle current visibility state
Information and Listing
Section titled “Information and Listing”--json, -j
: List all available layouts in JSON format. Useful for scripting and integration with other tools.
--select, -S
: Open an interactive rofi menu to select and switch between available layouts. This provides a visual interface for browsing and selecting from all layout configurations in ~/.config/waybar/layouts/
.
-h, --help
: Display help message with all available options and exit.
~/.config/waybar/
: Main Waybar configuration directory for user customizations
~/.config/waybar/layouts/
: Directory containing Waybar layout configuration files (.jsonc
format)
~/.config/waybar/styles/
: Directory containing CSS style files corresponding to layouts
~/.config/waybar/modules/
: Directory containing individual module configurations
~/.config/waybar/includes/
: Directory containing generated include files and dynamic configurations
~/.config/waybar/includes/includes.json
: Auto-generated file containing all module definitions and dynamic configurations
~/.config/waybar/config.jsonc
: Current active Waybar configuration (transient file, copy of selected layout)
~/.config/waybar/style.css
: Current active Waybar style (auto-generated, imports multiple CSS files)
~/.local/share/waybar/
: HyDE-provided Waybar configurations (read-only, do not edit)
Examples
Section titled “Examples”Basic Layout Management
Section titled “Basic Layout Management”Select a layout interactively:
waybar.py --select # Opens rofi layout selector
Switch to a specific layout:
waybar.py --set khing
Cycle through layouts:
waybar.py --next # Next layoutwaybar.py --prev # Previous layout
Configuration Updates
Section titled “Configuration Updates”Update all configurations:
waybar.py --update
Update specific components:
waybar.py --update-icon-size # Update icon sizes onlywaybar.py --update-border-radius # Update border radius onlywaybar.py --generate-includes # Regenerate includes.json
Process Management
Section titled “Process Management”Start Waybar with watch mode:
waybar.py --watch
Control Waybar visibility:
waybar.py --hide 1 # Hide Waybarwaybar.py --hide 0 # Show Waybarwaybar.py --hide toggle # Toggle visibility
Kill all waybar.py
processes which effectively kill --watch
mode:
waybar.py --kill
Information Gathering
Section titled “Information Gathering”Interactive layout selection:
waybar.py --select # Opens rofi menu for layout selection
List available layouts:
waybar.py --json # JSON format for scripting
Custom Configuration Paths
Section titled “Custom Configuration Paths”Use custom configuration files:
waybar.py --config /path/to/custom-config.jsonc --style /path/to/custom-style.css
Configuration Workflow
Section titled “Configuration Workflow”-
Browse and select layouts: Use
waybar.py --select
to open an interactive rofi menu and preview available layouts -
Create or copy a layout: Start with an existing layout from
~/.local/share/waybar/layouts/
or create a new one in~/.config/waybar/layouts/
-
Generate includes: Run
waybar.py --generate-includes
to ensure all modules are available -
Set the layout: Use
waybar.py --set <layout-name>
to activate your configuration, or use the interactive selector withwaybar.py --select
-
Update configurations: Run
waybar.py --update
after making changes to ensure all components are synchronized
Integration with HyDE
Section titled “Integration with HyDE”waybar.py
is tightly integrated with the HyDE ecosystem:
- Theme Integration: Automatically adapts to current HyDE theme settings
- Dynamic Styling: Updates border radius based on Hyprland window rounding
- Font Management: Synchronizes fonts with HyDE theme configurations
- Module System: Manages HyDE-specific Waybar modules and configurations
- Always use
~/.config/waybar/
for custom configurations, never edit files in~/.local/share/waybar/
- The
includes.json
file is auto-generated and should not be manually edited - Layout names correspond to filenames without the
.jsonc
extension - Style files should match layout names for automatic pairing (e.g.,
khing.jsonc
useskhing.css
)