Krolyxon
Commit f2d7765

Branches

Refs →

aurora.configquickshellauroraSetShell.qml

76 lines · 3.2 KB · QML

1import QtQuick
2import QtQuick.Layouts
3
4// Settings app > Shell: desktop widgets, dock, OSD, notifications.
5Flickable {
6 id: flick
7 clip: true
8 contentWidth: width
9 contentHeight: col.implicitHeight
10 boundsBehavior: Flickable.StopAtBounds
11
12 ColumnLayout {
13 id: col
14 width: flick.width
15 spacing: 8
16
17 SectionLabel { text: "desktop" }
18 Switch { label: "clock"; hint: "big clock + stats on the wallpaper"; checked: Settings.desktopClock; onToggled: on => Settings.desktopClock = on }
19 Switch { label: "visualizer"; hint: "cava bars while music plays"; checked: Settings.desktopViz; onToggled: on => Settings.desktopViz = on }
20 Knob { label: "visualizer bars"; from: 16; to: 128; value: Settings.vizBars; onMoved: v => Settings.vizBars = v }
21
22 SectionLabel { text: "dock" }
23 Switch { label: "dock"; hint: "autohides at the bottom edge"; checked: Settings.dock; onToggled: on => Settings.dock = on }
24 Text {
25 text: "pinned apps (pin more from the dock's right-click)"
26 color: Theme.dim
27 font.family: Theme.font
28 font.pixelSize: Theme.fontSize - 1
29 }
30 Flow {
31 Layout.fillWidth: true
32 spacing: 4
33 Repeater {
34 model: Settings.dockPinned
35 delegate: IconBtn {
36 required property string modelData
37 implicitHeight: 26
38 icon: Theme.iClose
39 iconSize: 11
40 label: modelData
41 onClicked: Settings.togglePin(modelData)
42 }
43 }
44 }
45
46 SectionLabel { text: "on-screen display" }
47 Knob { label: "osd timeout"; unit: "ms"; from: 500; to: 4000; value: Settings.osdTimeout; onMoved: v => Settings.osdTimeout = Math.round(v / 100) * 100 }
48
49 SectionLabel { text: "network" }
50 Switch { label: "captive portals"; hint: "open the login page in the browser when a network needs one"; checked: Settings.portalAutoOpen; onToggled: on => Settings.portalAutoOpen = on }
51
52 SectionLabel { text: "notifications" }
53 Switch { label: "do not disturb"; hint: "hide popups and mute the sound (critical ones still show)"; checked: Notifs.dnd; onToggled: on => Notifs.dnd = on }
54 Switch { label: "sound"; checked: Settings.notifSound; onToggled: on => Settings.notifSound = on }
55 RowLayout {
56 Layout.fillWidth: true
57 spacing: 8
58 Knob { label: "sound volume"; from: 0; to: 1; decimals: 2; value: Settings.notifVolume; onMoved: v => Settings.notifVolume = v }
59 IconBtn { icon: Theme.iPlay; implicitHeight: 26; onClicked: Notifs.playSound() }
60 }
61
62 Item { Layout.preferredHeight: 6 }
63 RowLayout {
64 Layout.fillWidth: true
65 Text {
66 Layout.fillWidth: true
67 text: "~/.config/aurora/settings.json"
68 elide: Text.ElideLeft
69 color: Theme.dim
70 font.family: Theme.font
71 font.pixelSize: Theme.fontSize - 2
72 }
73 IconBtn { icon: Theme.iRefresh; label: "reset shell settings"; onClicked: Settings.reset() }
74 }
75 }
76}