diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-29 15:44:51 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-29 15:44:51 +1100 |
| commit | 5823a43aaf52dba351686ddb013dbb4d3bc583e5 (patch) | |
| tree | 64198955ded18ce927d8e8969d1c67bf93ef3eef /src | |
| parent | notifpopups: more difference between urgencies (diff) | |
| download | caelestia-shell-5823a43aaf52dba351686ddb013dbb4d3bc583e5.tar.gz caelestia-shell-5823a43aaf52dba351686ddb013dbb4d3bc583e5.tar.bz2 caelestia-shell-5823a43aaf52dba351686ddb013dbb4d3bc583e5.zip | |
bar: hide tray when no items
Diffstat (limited to 'src')
| -rw-r--r-- | src/modules/bar.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/bar.tsx b/src/modules/bar.tsx index 5faee7a..eb42d0b 100644 --- a/src/modules/bar.tsx +++ b/src/modules/bar.tsx @@ -220,7 +220,11 @@ const TrayItem = (item: AstalTray.TrayItem) => { ); }; -const Tray = () => <box className="module tray">{bind(AstalTray.get_default(), "items").as(i => i.map(TrayItem))}</box>; +const Tray = () => ( + <box className="module tray" visible={bind(AstalTray.get_default(), "items").as(i => i.length > 0)}> + {bind(AstalTray.get_default(), "items").as(i => i.map(TrayItem))} + </box> +); const Network = () => ( <button |