✨ ags: make osd work, new window management system, lots of improvements
This commit is contained in:
@@ -62,6 +62,7 @@ export const QuickActions: Widget.Box = new Widget.Box({
|
||||
orientation: Gtk.Orientation.VERTICAL,
|
||||
halign: Gtk.Align.START,
|
||||
hexpand: true,
|
||||
className: "left",
|
||||
children: [
|
||||
new Widget.Label({
|
||||
className: "hostname",
|
||||
@@ -77,7 +78,7 @@ export const QuickActions: Widget.Box = new Widget.Box({
|
||||
} as Widget.BoxProps),
|
||||
new Widget.Box({
|
||||
orientation: Gtk.Orientation.HORIZONTAL,
|
||||
className: "button-row",
|
||||
className: "right button-row",
|
||||
halign: Gtk.Align.END,
|
||||
hexpand: true,
|
||||
children: [
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
import { bind } from "astal";
|
||||
import { Gtk, Widget } from "astal/gtk3";
|
||||
import { Wireplumber } from "../../scripts/volume";
|
||||
|
||||
export const Sliders: Gtk.Widget = new Widget.Box({
|
||||
className: "sliders",
|
||||
orientation: Gtk.Orientation.VERTICAL,
|
||||
expand: true,
|
||||
children: [
|
||||
new Widget.Box({
|
||||
className: "sink speaker",
|
||||
children: [
|
||||
new Widget.Icon({
|
||||
icon: "audio-volume-high-symbolic"
|
||||
} as Widget.IconProps),
|
||||
new Widget.Slider({
|
||||
drawValue: false,
|
||||
hexpand: true,
|
||||
value: bind(Wireplumber.getDefault().getDefaultSink(), "volume").as((volume: number) =>
|
||||
Math.floor(volume * 100)),
|
||||
max: Wireplumber.getDefault().getMaxSinkVolume(),
|
||||
onDragged: (slider: Gtk.Scale) => Wireplumber.getDefault().setSinkVolume(slider.get_value())
|
||||
} as Widget.SliderProps)
|
||||
]
|
||||
} as Widget.BoxProps),
|
||||
new Widget.Box({
|
||||
className: "source microphone",
|
||||
children: [
|
||||
new Widget.Icon({
|
||||
icon: "microphone-sensitivity-high-symbolic"
|
||||
} as Widget.IconProps),
|
||||
new Widget.Slider({
|
||||
drawValue: false,
|
||||
hexpand: true,
|
||||
value: bind(Wireplumber.getDefault().getDefaultSource(), "volume").as((volume: number) =>
|
||||
Math.floor(volume * 100)),
|
||||
max: Wireplumber.getDefault().getMaxSourceVolume(),
|
||||
onDragged: (slider: Gtk.Scale) => Wireplumber.getDefault().setSourceVolume(slider.get_value())
|
||||
} as Widget.SliderProps)
|
||||
]
|
||||
} as Widget.BoxProps),
|
||||
/*new Widget.Box({
|
||||
className: "brightness screen",
|
||||
children: [
|
||||
new Widget.Slider({
|
||||
drawValue: false,
|
||||
hexpand: true,
|
||||
value: 216,
|
||||
max: 255
|
||||
} as Widget.SliderProps)
|
||||
]
|
||||
} as Widget.BoxProps)*/
|
||||
]
|
||||
} as Widget.BoxProps);
|
||||
Reference in New Issue
Block a user