Repository navigation
Expand file tree
/
Copy pathshell.qml
More file actions
76 lines (65 loc) · 2.59 KB
/
Copy pathshell.qml
File metadata and controls
76 lines (65 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//@ pragma Env QS_CRASHREPORT_URL=https://github.com/aToom13/Atom-Shell/issues
//@ pragma DefaultEnv QS_NO_RELOAD_POPUP=1
//@ pragma DefaultEnv QS_DROP_EXPENSIVE_FONTS=1
//@ pragma DefaultEnv QSG_RENDER_LOOP=threaded
//@ pragma DefaultEnv QT_QUICK_FLICKABLE_WHEEL_DECELERATION=10000
import "modules"
import "modules/drawers"
import "modules/background"
import "modules/areapicker"
import "modules/lock"
import QtQuick
import Quickshell
import Quickshell.Io
import Caelestia
import qs.services
ShellRoot {
id: root
property alias hibernation: hibernation
HibernationController {
id: hibernation
sessionLock: lock.lock
onFailed: message => Toaster.toast(I18n.t("Hibernate"), message, "bedtime", Toast.Error)
onDialogActionPreviewed: stage => Toaster.toast(I18n.t("UI preview"), stage === "reserve" ? I18n.t("Shutdown button previewed") : I18n.t("Hibernate button previewed"), "bedtime")
}
IpcHandler {
target: "hibernation"
function arm(): void { hibernation.arm(); }
function disarm(): void { hibernation.disarm(); }
function previewPrompt(): void { hibernation.previewDialog("prompt"); }
function previewReserve(): void { hibernation.previewDialog("reserve"); }
function closeDialog(): void { hibernation.closeDialog(); }
function dismiss(): void { hibernation.dialogDismiss(); }
function status(): string { return JSON.stringify({armed: hibernation.armed, policyEnabled: hibernation.policyEnabled, onBattery: hibernation.onBattery, measuredPercentage: hibernation.measuredBatteryPercentage, displayedPercentage: hibernation.batteryPercentage, batteryAvailable: hibernation.batteryAvailable, busy: hibernation.busy, availability: hibernation.availability, reason: hibernation.reason}); }
function dialogStatus(): string { return JSON.stringify({visible: hibernation.dialogVisible, stage: hibernation.dialogStage, countdown: hibernation.dialogCountdown, previewOnly: hibernation.dialogPreviewOnly}); }
}
Loader {
active: Quickshell.env("CAELESTIA_CHECK_DRAWERS") === "1"
source: "utils/CheckDrawers.qml"
}
settings.watchFiles: false
Binding {
target: ShellState
property: "shellRoot"
value: root
}
GSFLoader {}
ServiceLoader {}
Background {}
Drawers {}
HibernationDialogs {
hibernation: root.hibernation
}
AreaPicker {}
Lock {
id: lock
}
ConfigToasts {}
Shortcuts {}
BatteryMonitor {}
GameHud {}
Dictation { locked: lock.lock.locked }
IdleMonitors {
lock: lock
}
}