import { App } from "astal/gtk3"
import Apps from "gi://AstalApps"
import Wp from "gi://AstalWp"
import { Variable, GLib, bind } from "astal"
import { subprocess, exec, execAsync } from "astal/process"
import { Astal, Gtk, Gdk } from "astal/gtk3"
import Brightness from "./Brightness"
function BrightnessSlider() {
const brightness = Brightness.get_default()
return
brightness.screen = value}
/>
}
function AudioSlider() {
const speaker = Wp.get_default()?.audio.defaultSpeaker!
return
speaker.volume = value}
value={bind(speaker, "volume")}
/>
}
function MicrophoneSlider() {
const microphone = Wp.get_default()?.audio.defaultMicrophone!
return
microphone.volume = value}
value={bind(microphone, "volume")}
/>
}
function openwelcomeapp() {
execAsync("com.ml4w.welcome")
App.get_window("sidebar")!.hide()
}
function opensettingsapp() {
execAsync("com.ml4w.dotfilessettings")
App.get_window("sidebar")!.hide()
}
function openhyprlandapp() {
execAsync("com.ml4w.hyprland.settings")
App.get_window("sidebar")!.hide()
}
function openwallpaper() {
const proc = subprocess(["bash", "-c", "waypaper"])
App.get_window("sidebar")!.hide()
}
function openwallpapereffects() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/wallpaper-effects.sh"])
App.get_window("sidebar")!.hide()
}
function openwaybarthemes() {
const proc = subprocess(["bash", "-c", "$HOME/.config/waybar/themeswitcher.sh"])
App.get_window("sidebar")!.hide()
}
function powerlock() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/power.sh lock"])
App.get_window("sidebar")!.hide()
}
function powerlogout() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/power.sh exit"])
App.get_window("sidebar")!.hide()
}
function powersuspend() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/power.sh suspend"])
App.get_window("sidebar")!.hide()
}
function powerrestart() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/power.sh reboot"])
App.get_window("sidebar")!.hide()
}
function powerexit() {
const proc = subprocess(["bash", "-c", "$HOME/.config/hypr/scripts/power.sh shutdown"])
App.get_window("sidebar")!.hide()
}
export default function Sidebar() {
const anchor = Astal.WindowAnchor.TOP
| Astal.WindowAnchor.RIGHT
return
}