• Updates IDE settings for improved file nesting and exclusions • Introduces biome configuration file for consistent project formatting • Implements brightness service and UI component for monitor brightness control • Refactors layout and code formatting for consistency across components
13 lines
440 B
TypeScript
13 lines
440 B
TypeScript
import { bind } from 'astal'
|
|
import Wp from 'gi://AstalWp'
|
|
|
|
export default function VolumeStatus() {
|
|
const speaker = Wp.get_default()?.audio.defaultSpeaker!
|
|
|
|
return (
|
|
<box onScroll={(_, __, dy) => (dy < 0 ? (speaker.volume += 0.01) : (speaker.volume += -0.01))} spacing={2}>
|
|
<image iconName={bind(speaker, 'volumeIcon')} />
|
|
<label label={bind(speaker, 'volume').as((p) => `${Math.floor(p * 100)}%`)} />
|
|
</box>
|
|
)
|
|
}
|