|
| 1 | +#Systray Widget |
| 2 | +| Option| Type| Default| Description| |
| 3 | +|----------------------|---------|-------------|-----------------------------------------------------------------------------------------| |
| 4 | +|`class_name`| string|`'systray'`| The class name for the base widget.| |
| 5 | +|`label_collapsed`| string|`'▼'`| Label used for the collapse button when unpinned container is hidden.| |
| 6 | +|`label_expanded`| string|`'▶'`| Label used for the collapse button when unpinned container is shown.| |
| 7 | +|`label_position`| string|`'left'`| The position of the button that collapses unpinned container. Can be "left" or "right".| |
| 8 | +|`icon_size`| integer|`16`| The size of the icons in the systray. Can be any integer between 8 and 64.| |
| 9 | +|`pin_click_modifier`| string|`'alt'`| The modifier key used to pin/unpin icons. Can be "ctrl", "alt" or "shift".| |
| 10 | +|`show_unpinned`| boolean|`true`| Whether to show unpinned container on startup.| |
| 11 | +|`show_battery`| boolean|`false`| Whether to show battery icon (from the original systray).| |
| 12 | +|`show_volume`| boolean|`false`| Whether to show volume icon (from the original systray).| |
| 13 | + |
| 14 | + |
| 15 | +##Example Configuration |
| 16 | +```yaml |
| 17 | +systray: |
| 18 | +type:"yasb.systray.SystrayWidget" |
| 19 | +options: |
| 20 | +class_name:"systray" |
| 21 | +label_collapsed:"▼" |
| 22 | +label_expanded:"▶" |
| 23 | +label_position:"left"# Can be "left" or "right" |
| 24 | +icon_size:16# Can be any integer between 8 and 64 |
| 25 | +pin_click_modifier:"alt"# Can be "ctrl", "alt" or "shift" |
| 26 | +show_unpinned:true |
| 27 | +show_battery:false |
| 28 | +show_volume:false |
| 29 | +``` |
| 30 | +
|
| 31 | +## Important Notes: |
| 32 | +There are some limitations with the systray widget: |
| 33 | +- Systray widget will not show icons for apps if they ignore "TaskbarCreated" message. Meaning that if the original developers decided to ignore this message - their systray icons will not be shown. It's rare, but there are such cases (NVIDIA App for example). This is NOT a YASB bug. |
| 34 | +- In rare cases systray icon might ignore click events if the original application was already running before YASB was started. Example: Epic Games Launcher. No solution for this so far. |
| 35 | +
|
| 36 | +## Description of Options |
| 37 | +- **class_name:** The class name for the base widget. Can be changed if multiple systray widgets need to have different styling. |
| 38 | +- **label_collapsed:** Label used for the collapse button when unpinned container is hidden. |
| 39 | +- **label_expanded:** Label used for the collapse button when unpinned container is shown. |
| 40 | +- **label_position:** The position of the button that collapses unpinned container. |
| 41 | +- **icon_size:** The size of the icons in the systray. Can be any integer between 8 and 64. |
| 42 | +- **pin_click_modifier:** The modifier key used to pin/unpin icons. Can be "ctrl", "alt" or "shift". |
| 43 | +- **show_unpinned:** Whether to show unpinned container on startup. |
| 44 | +- **show_battery:** Whether to show battery icon (from the original systray). |
| 45 | +- **show_volume:** Whether to show volume icon (from the original systray). |
| 46 | +
|
| 47 | +## Style |
| 48 | +```css |
| 49 | +.systray {} /* The base widget style */ |
| 50 | +.systray .unpinned-container {} /* Style for unpinned container */ |
| 51 | +.systray .pinned-container {} /* Style for pinned container */ |
| 52 | +.systray .pinned-container[forceshow=true] {} /* Style for pinned container when it is forced to show during dragging operation */ |
| 53 | +.systray .button {} /* Style for the individual systray buttons/icons */ |
| 54 | +.systray .button[dragging=true] {} /* Style for systray buttons/icons when dragging operation is in progress */ |
| 55 | +.systray .unpinned-visibility-btn {} /* Style for the 'collapse unpinned icons' button */ |
| 56 | +``` |
| 57 | + |
| 58 | +##Example CSS |
| 59 | +```css |
| 60 | +.systray { |
| 61 | +background:transparent; |
| 62 | +border:None; |
| 63 | +margin:0; |
| 64 | +} |
| 65 | + |
| 66 | +.systray.unpinned-container { |
| 67 | +background:darkblue; |
| 68 | +border-radius:8px; |
| 69 | +} |
| 70 | + |
| 71 | +.systray.pinned-container { |
| 72 | +background:transparent; |
| 73 | +} |
| 74 | + |
| 75 | +.systray.pinned-container[forceshow=true] { |
| 76 | +background:red; |
| 77 | +} |
| 78 | + |
| 79 | +.systray.button { |
| 80 | +border-radius:4px; |
| 81 | +padding:2px2px; |
| 82 | +} |
| 83 | + |
| 84 | +.systray.button:hover { |
| 85 | +background:#727272; |
| 86 | +} |
| 87 | + |
| 88 | +.systray.button[dragging=true] { |
| 89 | +background:orange; |
| 90 | +border-color:#FF8800; |
| 91 | +} |
| 92 | + |
| 93 | +.systray.unpinned-visibility-btn { |
| 94 | +border-radius:4px; |
| 95 | +height:20px; |
| 96 | +width:16px; |
| 97 | +} |
| 98 | + |
| 99 | +.systray.unpinned-visibility-btn:checked { |
| 100 | +background:darkblue; |
| 101 | +} |
| 102 | + |
| 103 | +.systray.unpinned-visibility-btn:hover { |
| 104 | +border:1pxsolid#AAAAAA; |
| 105 | +border-radius:4px; |
| 106 | +border-color:#AAAAAA; |
| 107 | +} |
| 108 | +``` |