Widgets
When creating a status bar, system monitor, or other such widget in PLWM, there's normally quite a bit of duplicated code. These classes are an attempt to consolidate this duplicated code, as well as make things easier on the user when creating complex widget collections such as a status bar.
Widget Classes
BaseWidget
attributes
- x: int - the X position of this widget relative to its parent.
- y: int - the Y position of this widget relative to its parent.
- width: int - The width of this widget when not stretching, or the minimum width when stretching.
- height: int - The height of this widget when not stretching, or the minimum height when stretching.
methods
StatusBar
Inherits BaseWidget.
MenuBar
Inherits BaseWidget.
Text
Inherits BaseWidget.
BarGraph
Inherits BaseWidget.
MenuItem
Inherits Text.
Clock
Inherits Text.
attributes
- format: string - An strftime()-compatible format string for the clock.
MediaPlayerStatus
Inherits Text.
MediaPlayerControl
Inherits BaseWidget.
Mixin Classes
Stretch
attributes
- stretchFactorX: int - If 0, (default) don't stretch to fill available space in the X direction; otherwise, use this factor for this widget when dividing available space.
- stretchFactorY: int - If 0, (default) don't stretch to fill available space in the Y direction; otherwise, use this factor for this widget when dividing available space.
Container
attributes
- orientation: HORIZONTAL or VERTICAL - Self-explanatory?
OverrideRedirect
Provides an override_redirect call for the given widget, causing the WM to ignore it when positioning, creating window decorations, etc.
