summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-14 23:56:07 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-01-14 23:56:07 +1100
commita53389c8b5c1f4599c30a6c3de523e0a1388f9d1 (patch)
tree02ccb843bfc88f5077ca208cf7c3f744d256cf90
parentbetter config + notifpopups max popups (diff)
downloadcaelestia-shell-a53389c8b5c1f4599c30a6c3de523e0a1388f9d1.tar.gz
caelestia-shell-a53389c8b5c1f4599c30a6c3de523e0a1388f9d1.tar.bz2
caelestia-shell-a53389c8b5c1f4599c30a6c3de523e0a1388f9d1.zip
bar: power button works
Use wlogout for power menu Add more defaults for PopupWindow
-rw-r--r--modules/bar.tsx6
-rw-r--r--modules/launcher.tsx1
-rw-r--r--utils/widgets.tsx2
3 files changed, 4 insertions, 5 deletions
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)}
/>
);
diff --git a/modules/launcher.tsx b/modules/launcher.tsx
index 20b7c0d..0768539 100644
--- a/modules/launcher.tsx
+++ b/modules/launcher.tsx
@@ -363,7 +363,6 @@ export default class Launcher extends PopupWindow {
super({
name: "launcher",
keymode: Astal.Keymode.EXCLUSIVE,
- exclusivity: Astal.Exclusivity.IGNORE,
onKeyPressEvent(_, event) {
const keyval = event.get_keyval()[1];
// Focus entry on typing
diff --git a/utils/widgets.tsx b/utils/widgets.tsx
index 57c08cb..033a4e2 100644
--- a/utils/widgets.tsx
+++ b/utils/widgets.tsx
@@ -100,6 +100,8 @@ export class PopupWindow extends Widget.Window {
sProps.namespace = `caelestia-${props.name}`;
sProps.anchor =
Astal.WindowAnchor.TOP | Astal.WindowAnchor.LEFT | Astal.WindowAnchor.BOTTOM | Astal.WindowAnchor.RIGHT;
+ sProps.exclusivity = Astal.Exclusivity.IGNORE;
+ if (!sProps.keymode) sProps.keymode = Astal.Keymode.ON_DEMAND;
sProps.onKeyPressEvent = (self, event) => {
// Close window on escape
if (event.get_keyval()[1] === Gdk.KEY_Escape) self.hide();