Krolyxon
Commit af47ed6

Branches

Refs →

aurora.configquickshellauroraSetShell.qml

80 lines · 3.5 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: "Doto clock, date, stats and what's playing on the desktop"; checked: Settings.desktopClock; onToggled: on => Settings.desktopClock = on }
19 Switch { label: "visualizer"; hint: "cava as columns of dots along the bottom 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.fgDim
27 font.family: Theme.ui
28 font.pixelSize: 14
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: "bar" }
53 Switch { label: "privacy indicators"; hint: "show in the bar when an app records the mic, uses the camera or shares the screen"; checked: Settings.privacyIndicators; onToggled: on => Settings.privacyIndicators = on }
54
55 SectionLabel { text: "notifications" }
56 Switch { label: "do not disturb"; hint: "hide popups and mute the sound (critical ones still show)"; checked: Notifs.dnd; onToggled: on => Notifs.dnd = on }
57 Switch { label: "sound"; checked: Settings.notifSound; onToggled: on => Settings.notifSound = on }
58 RowLayout {
59 Layout.fillWidth: true
60 spacing: 8
61 Knob { label: "sound volume"; from: 0; to: 1; decimals: 2; value: Settings.notifVolume; onMoved: v => Settings.notifVolume = v }
62 IconBtn { icon: Theme.iPlay; implicitHeight: 26; onClicked: Notifs.playSound() }
63 }
64
65 Item { Layout.preferredHeight: 6 }
66 RowLayout {
67 Layout.fillWidth: true
68 Text {
69 Layout.fillWidth: true
70 Layout.leftMargin: 18
71 text: "~/.config/aurora/settings.json"
72 elide: Text.ElideLeft
73 color: Theme.fgDim
74 font.family: Theme.ui
75 font.pixelSize: 13
76 }
77 IconBtn { icon: Theme.iRefresh; label: "reset shell settings"; onClicked: Settings.reset() }
78 }
79 }
80}