Skip to content

Commit b82cf50

Browse files
authored
Merge branch 'amnweb:main' into center_label
2 parents 6f36a7a + d6b9ee4 commit b82cf50

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+3829
-573
lines changed

.github/workflows/windows-dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717
contents: read
1818

1919
env:
20-
PYTHON_VERSION: '3.12'
20+
PYTHON_VERSION: '3.14'
2121

2222
jobs:
2323
build:
@@ -74,7 +74,7 @@ jobs:
7474
.\venv\Scripts\Activate
7575
python -m pip install --upgrade pip
7676
pip install --force --no-cache .
77-
pip install --force --no-cache --upgrade cx_Freeze==7.2.10
77+
pip install --extra-index-url https://test.pypi.org/simple/ cx_Freeze --pre --no-cache
7878
shell: pwsh
7979

8080
- name: Build EXE

.github/workflows/windows.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions:
77
contents: read
88

99
env:
10-
PYTHON_VERSION: '3.12'
10+
PYTHON_VERSION: '3.14'
1111

1212
jobs:
1313
build:
@@ -36,7 +36,7 @@ jobs:
3636
.\venv\Scripts\Activate
3737
python -m pip install --upgrade pip
3838
pip install --force --no-cache .
39-
pip install --force --no-cache --upgrade cx_Freeze==7.2.10
39+
pip install --force --no-cache --upgrade cx_Freeze
4040
shell: pwsh
4141

4242
- name: Build EXE

docs/Configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ YASB_WEATHER_LOCATION=your_location_here
2828
# Some Qt settings
2929
QT_SCREEN_SCALE_FACTORS="1.25;1"
3030
QT_SCALE_FACTOR_ROUNDING_POLICY="PassThrough"
31-
# OpenGL settings, Use "desktop" for hardware acceleration, "software" for software rendering
32-
QT_OPENGL="desktop"
33-
QT_OPENGL="software"
3431
```
3532

3633
## YASB Font Engine
@@ -79,12 +76,15 @@ Valid options are:
7976
| `alignment` | object | [See below](#bar-alignment) | The alignment settings for the status bar. |
8077
| `blur_effect` | object | [See below](#blur-effect-configuration) | The blur effect settings for the status bar. |
8178
| `window_flags` | object | [See below](#window-flags-configuration) | The window flags for the status bar. |
82-
| `dimensions` | object | `{width: "100%", height: 36}` | The dimensions of the status bar. |
79+
| `dimensions` | object | `{width: "100%", height: 36}` | The dimensions of the status bar. Width can be a number (pixels), percentage string (e.g., `"100%"`, `"50%"`), or `"auto"` to resize based on content. When using `"auto"`, the bar will automatically resize as widget content changes, with a maximum width of the available screen width minus padding. |
8380
| `padding` | object | `{top: 4, left: 0, bottom: 4, right: 0}` | The padding for the status bar. |
8481
| `animation` | object | `{enabled: true, duration: 500}` | The animation settings for the status bar. Duration is in milliseconds. Animation is used to show/hide the bar smoothly. |
8582
| `widgets` | list | `left[], center[], right[]` | Active widgets and position. |
8683
| `layouts` | object | [See below](#layouts-configuration) | Configuration for widget layouts in each section (left, center, right). |
8784

85+
> **note:**
86+
> Setting the width to `"auto"` is not recommended for widgets that constantly update data, such as CPU, memory, clock, etc. This can cause the bar to constantly resize, which may lead to flickering or performance issues.
87+
8888
> **Note:**
8989
> `screens` can be specified as a list of monitor names. If you want the bar to appear on all screens, use `['*']`. To specify a single screen, use `['DELL P2419H (1)']` or a similar name based on your monitor setup. To show the bar only and always on the primary screen, use `['primary']`.
9090
@@ -139,7 +139,7 @@ layouts:
139139
140140
# Multiple Bars Example
141141
> **Note:**
142-
> If you want to have different bars on each screen you will need to define on which screen the bar should be displayed, `screens` inside bar config is your monitor name. You can find your monitor name inside device manager or click on YASB tray icon and select Debug > Information to show all available screens.
142+
> If you want to have different bars on each screen you will need to define on which screen the bar should be displayed, `screens` inside bar config is your monitor name. You can find your monitor names using `yasbc monitor-information` or inside device manager.
143143

144144
```
145145
bars:

docs/Installation.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,31 @@
1010

1111
### Winget
1212
Install YASB using [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/):
13-
```
13+
```powershell
1414
winget install --id AmN.yasb
1515
```
1616

1717
***
1818

1919
### Scoop
2020
Install YASB using [Scoop](https://scoop.sh/):
21-
```
21+
```powershell
2222
scoop bucket add extras
2323
scoop install extras/yasb
2424
```
2525

2626
***
2727

28+
### Chocolatey
29+
Install YASB using [Chocolatey](https://chocolatey.org/):
30+
```powershell
31+
choco install yasb
32+
```
33+
34+
***
35+
2836
### Using Python
29-
- Install Python 3.12
37+
- Install Python >= 3.12
3038
- Install the application and its dependencies:
3139
- `pip install .` (for regular installation)
3240
- `pip install -e .[dev]` (for development installation)
@@ -36,4 +44,13 @@ scoop install extras/yasb
3644
- run `python src/main.py` in your terminal (or click [yasb.vbs](https://github.com/amnweb/yasb/blob/main/src/yasb.vbs))
3745

3846

39-
47+
### Build from source
48+
- Clone the repository: `git clone https://github.com/amnweb/yasb`
49+
- Navigate to the project directory: `cd yasb`
50+
- Install the required dependencies: `pip install -e .[dev]`
51+
- Navigate to the `src` directory: `cd src`
52+
- Build the installer using following command:
53+
```powershell
54+
python build.py build
55+
python build.py bdist_msi
56+
```
48.5 KB
Loading

docs/widgets/(Widget)-Power-Menu.md

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ power_menu:
1919
type: "yasb.power_menu.PowerMenuWidget"
2020
options:
2121
label: "\uf011"
22-
uptime: True
23-
blur: False
24-
blur_background: True
25-
animation_duration: 300 # Milliseconds
26-
button_row: 3 # Number of buttons in a row, min 1 max 5
22+
uptime: true
23+
blur: false
24+
blur_background: true
25+
animation_duration: 200 # Milliseconds
26+
button_row: 5 # Number of buttons in a row, min 1 max 5
2727
buttons:
2828
lock: ["\uea75", "Lock"]
2929
sleep: ["\u23fe","Sleep"]
@@ -33,7 +33,7 @@ power_menu:
3333
hibernate: ["\uf28e", "Hibernate"]
3434
cancel: ["\udb81\udf3a", "Cancel"]
3535
label_shadow:
36-
enabled: true
36+
enabled: false
3737
color: "black"
3838
radius: 3
3939
offset: [ 1, 1 ]
@@ -50,7 +50,7 @@ power_menu:
5050
- **container_shadow:** Container shadow options.
5151
- **label_shadow:** Label shadow options.
5252

53-
## Example Style
53+
## Available Styles
5454
```css
5555
.uptime {}
5656
.power-menu-widget .label { /*icon on the bar*/ }
@@ -69,6 +69,66 @@ power_menu:
6969
.power-menu-popup .button.force_shutdown {}
7070
.power-menu-popup .button.force_restart {}
7171
72+
```
73+
## Example Styles
74+
```css
75+
.power-menu-widget .label {
76+
color: #f38ba8;
77+
font-size: 13px;
78+
}
79+
.power-menu-popup {
80+
background-color: transparent
81+
}
82+
.power-menu-popup .button {
83+
padding: 0;
84+
width: 180px;
85+
height: 230px;
86+
border-radius: 8px;
87+
background-color: #191919;
88+
border: 4px solid transparent;
89+
margin: 0px;
90+
}
91+
.power-menu-popup .button.hover {
92+
background-color: #1d1d1d;
93+
border: 4px solid #1d1d1d;
94+
}
95+
.power-menu-popup .button .label {
96+
margin-bottom: 8px;
97+
font-size: 16px;
98+
font-weight: 500;
99+
color: #9399b2
100+
}
101+
.power-menu-popup .button .icon {
102+
font-size: 64px;
103+
padding-top: 32px;
104+
color: #7f849c
105+
}
106+
.power-menu-popup .button.hover .label,
107+
.power-menu-popup .button.hover .icon {
108+
color: rgba(255, 255, 255, 0.808)
109+
}
110+
.power-menu-popup .button.cancel .icon {
111+
padding: 0;
112+
margin: 0;
113+
max-height: 0;
114+
}
115+
.power-menu-popup .button.cancel .label {
116+
color: #f38ba8;
117+
margin: 0;
118+
}
119+
.power-menu-popup .button.cancel {
120+
height: 40px;
121+
border-radius: 4px;
122+
}
123+
.power-menu-popup .button.cancel.hover .label {
124+
color: rgb(255, 255, 255)
125+
}
126+
.uptime {
127+
font-size: 14px;
128+
margin-bottom: 10px;
129+
color: #7f849c;
130+
font-weight: 600;
131+
}
72132
```
73133

74134
> [!NOTE]

docs/widgets/(Widget)-Taskbar.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| `title_label` | dict | `{'enabled': False, 'show': 'focused', 'min_length': 10, 'max_length': 30}` | Title label configuration for displaying window titles. |
1010
| `monitor_exclusive` | boolean | `False` | Whether the application should be exclusive to the monitor. |
1111
| `hide_empty` | boolean | `False` | Whether to hide the taskbar widget when there are no applications to display. |
12-
| `callbacks` | dict | `{'on_left': 'toggle_window', 'on_middle': 'do_nothing', 'on_right': 'close_app'}` | Callbacks for mouse events on the widget. |
12+
| `callbacks` | dict | `{'on_left': 'toggle_window', 'on_middle': 'do_nothing', 'on_right': 'context_menu'}` | Callbacks for mouse events on the widget. |
1313
| `animation` | dict | `{'enabled': True, 'type': 'fadeInOut', 'duration': 200}` | Animation settings for the widget. |
1414
| `preview` | dict | `{'enabled': False, 'width': 240, 'delay': 400, 'padding': 8, 'margin': 8}` | Configuration for window preview thumbnails. |
1515

@@ -60,7 +60,7 @@ taskbar:
6060
- titles: A list of window titles to ignore.
6161
- classes: A list of window classes to ignore.
6262
- **hide_empty:** A boolean indicating whether to hide the taskbar widget when there are no applications to display. If set to `True`, the taskbar will automatically hide itself when there are no open applications that meet the filtering criteria.
63-
- **callbacks:** A dictionary specifying the callbacks for mouse events. The keys are `on_left`, `on_middle`, and `on_right`, and the values are the names of the callback functions, which can be `toggle_window`, `do_nothing`, or `close_app`.
63+
- **callbacks:** A dictionary specifying the callbacks for mouse events. The keys are `on_left`, `on_middle`, and `on_right`, and the values are the names of the callback functions, which can be `toggle_window`, `do_nothing`, `close_app` or `context_menu`.
6464
- **animation:** A dictionary specifying the animation settings for the widget. It contains three keys: `enabled`, `type`, and `duration`. The `type` can be `fadeInOut` and the `duration` is the animation duration in milliseconds. When animation is enabled, it will be used both for click effects and for animating the addition or removal of applications in the taskbar (such as when apps are opened or closed).
6565
- **preview:** A dictionary specifying the configuration for window preview thumbnails. It includes:
6666
- enabled: A boolean flag to enable or disable window previews.
@@ -80,6 +80,7 @@ taskbar:
8080
.taskbar-widget .app-container {} /* container for each app */
8181
.taskbar-widget .app-container.foreground {} /* container for the focused app */
8282
.taskbar-widget .app-container.flashing {} /* flashing container for the app (window is flashing) */
83+
.taskbar-widget .app-container.running {} /* container for running apps (not focused) */
8384
.taskbar-widget .app-container .app-icon {} /* Icon inside the container */
8485
.taskbar-widget .app-container .app-title {} /* Label inside the container */
8586
/* Taskbar preview popup is very limited in styling options, do not use margins/paddings here */

0 commit comments

Comments
 (0)