36 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
import { Gtk } from "astal/gtk4";
 | 
						|
import Power from "./modules/Power";
 | 
						|
import Audio from "./modules/Audio/Audio";
 | 
						|
import Bluetooth from "./modules/Bluetooth/Bluetooth";
 | 
						|
import Brightness from "./modules/Brightness/Brightness";
 | 
						|
import Player from "./modules/Player/Player";
 | 
						|
import { BatteryBox } from "./modules/Battery";
 | 
						|
 | 
						|
const QuickActions = () => {
 | 
						|
    const popover = new Gtk.Overlay( { cssClasses: [ 'quick-actions-wrapper' ] } );
 | 
						|
    popover.set_child(renderQuickActions());
 | 
						|
    return popover;
 | 
						|
};
 | 
						|
 | 
						|
const renderQuickActions = () => {
 | 
						|
    return (
 | 
						|
        <box visible cssClasses={["quick-actions", "popover-box"]} vertical setup={ self }>
 | 
						|
            <box halign={Gtk.Align.END}>
 | 
						|
                <BatteryBox></BatteryBox>
 | 
						|
                <Power></Power>
 | 
						|
            </box>
 | 
						|
            <Bluetooth.BluetoothModule></Bluetooth.BluetoothModule>
 | 
						|
            <Gtk.Separator marginTop={10} marginBottom={10}></Gtk.Separator>
 | 
						|
            <Brightness.BrightnessModule></Brightness.BrightnessModule>
 | 
						|
            <Audio.AudioModule></Audio.AudioModule>
 | 
						|
            <Gtk.Separator marginTop={20} marginBottom={10}></Gtk.Separator>
 | 
						|
            <Player.PlayerModule></Player.PlayerModule>
 | 
						|
        </box>
 | 
						|
    );
 | 
						|
};
 | 
						|
 | 
						|
// TODO: Expose additional functions to be usable through CLI
 | 
						|
export default {
 | 
						|
    QuickActions,
 | 
						|
};
 |