[AGS] GTK 4 Migration: Done, Start adding QuickActions
Probably gonna abandon the QuickActions, as that is just way too much effort for what it does. Will be providing keybinds for doing what I wanted to do there in Hyprland
This commit is contained in:
31
config/astal/components/bar/ui/QuickActions/QuickActions.tsx
Normal file
31
config/astal/components/bar/ui/QuickActions/QuickActions.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
import { Astal, App } from "astal/gtk4";
|
||||
import PowerProfiles from "gi://AstalPowerProfiles";
|
||||
import { Variable } from "astal";
|
||||
import { Sliders } from "./modules/Sliders";
|
||||
import { Toggles } from "./modules/Toggles";
|
||||
import { PowerProfileBox } from "./modules/PowerProfileBox";
|
||||
import { BatteryBox } from "./modules/BatteryBox";
|
||||
|
||||
export default function QuickActions() {
|
||||
const powerprofiles = PowerProfiles.get_default();
|
||||
const hasProfiles = powerprofiles?.get_profiles()?.length > 0;
|
||||
const { TOP, RIGHT } = Astal.WindowAnchor;
|
||||
const visible = Variable(false);
|
||||
return (
|
||||
<window
|
||||
name="system-menu"
|
||||
application={App}
|
||||
layer={Astal.Layer.OVERLAY}
|
||||
anchor={TOP | RIGHT}
|
||||
keymode={Astal.Keymode.ON_DEMAND}
|
||||
visible={visible()}
|
||||
>
|
||||
<box cssClasses={["system-menu"]} vertical>
|
||||
<Toggles />
|
||||
{hasProfiles && <PowerProfileBox />}
|
||||
<Sliders />
|
||||
<BatteryBox />
|
||||
</box>
|
||||
</window>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user