parent
8f82b1885a
commit
6bc32a8d8e
11 changed files with 388 additions and 68 deletions
modules/ags/config/widgets/bar/items
|
@ -1,8 +1,11 @@
|
|||
import { bind, Variable } from 'astal';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { App, Gtk } from 'astal/gtk3';
|
||||
|
||||
import AstalNetwork from 'gi://AstalNetwork';
|
||||
|
||||
/* Types */
|
||||
import PopupWindow from '../../misc/popup-window';
|
||||
|
||||
|
||||
export default () => {
|
||||
const network = AstalNetwork.get_default();
|
||||
|
@ -16,6 +19,17 @@ export default () => {
|
|||
|
||||
onHover={() => Hovered.set(true)}
|
||||
onHoverLost={() => Hovered.set(false)}
|
||||
|
||||
onButtonReleaseEvent={(self) => {
|
||||
const win = App.get_window('win-network') as PopupWindow;
|
||||
|
||||
win.set_x_pos(
|
||||
self.get_allocation(),
|
||||
'right',
|
||||
);
|
||||
|
||||
win.visible = !win.visible;
|
||||
}}
|
||||
>
|
||||
{bind(network, 'primary').as((primary) => {
|
||||
if (primary === AstalNetwork.Primary.UNKNOWN) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue