From a53389c8b5c1f4599c30a6c3de523e0a1388f9d1 Mon Sep 17 00:00:00 2001
From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>
Date: Tue, 14 Jan 2025 23:56:07 +1100
Subject: bar: power button works

Use wlogout for power menu
Add more defaults for PopupWindow
---
 modules/bar.tsx | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

(limited to 'modules/bar.tsx')

diff --git a/modules/bar.tsx b/modules/bar.tsx
index ed888db..dd576c3 100644
--- a/modules/bar.tsx
+++ b/modules/bar.tsx
@@ -1,4 +1,4 @@
-import { GLib, register, Variable } from "astal";
+import { execAsync, GLib, register, Variable } from "astal";
 import { bind, kebabify } from "astal/binding";
 import { App, Astal, astalify, Gdk, Gtk, type ConstructProps } from "astal/gtk3";
 import AstalHyprland from "gi://AstalHyprland";
@@ -251,9 +251,7 @@ const Power = () => (
         className="module power"
         label="power_settings_new"
         cursor="pointer"
-        onClicked={() => {
-            // TODO: Power menu
-        }}
+        onClicked={() => execAsync("fish -c 'pkill wlogout || wlogout -p layer-shell'").catch(console.error)}
     />
 );
 
-- 
cgit v1.2.3-freya

