macbook: lock directly before sleep; restyle lockscreen off-center
This commit is contained in:
parent
a9ea4c1f10
commit
960ee94e81
2 changed files with 31 additions and 15 deletions
|
|
@ -435,7 +435,12 @@ in
|
||||||
settings = {
|
settings = {
|
||||||
general = {
|
general = {
|
||||||
lock_cmd = "qs ipc call lock lock";
|
lock_cmd = "qs ipc call lock lock";
|
||||||
before_sleep_cmd = "loginctl lock-session";
|
# Lock directly, not via `loginctl lock-session`: hypridle waits
|
||||||
|
# for before_sleep_cmd to exit before releasing its sleep
|
||||||
|
# inhibitor, but the loginctl → logind Lock signal → lock_cmd
|
||||||
|
# detour is async and the box can suspend unlocked. Lid close
|
||||||
|
# (HandleLidSwitch=suspend) goes through here too.
|
||||||
|
before_sleep_cmd = "qs ipc call lock lock";
|
||||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
};
|
};
|
||||||
listener = [
|
listener = [
|
||||||
|
|
|
||||||
|
|
@ -549,45 +549,56 @@ in
|
||||||
FastBlur {
|
FastBlur {
|
||||||
anchors.fill: wall
|
anchors.fill: wall
|
||||||
source: wall
|
source: wall
|
||||||
radius: 48
|
radius: 20
|
||||||
|
}
|
||||||
|
// Lighter blur means less natural contrast, so the scrim
|
||||||
|
// is a left-weighted gradient instead of a flat 0.4 wash:
|
||||||
|
// dark under the text column, near-clear on the right.
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
gradient: Gradient {
|
||||||
|
orientation: Gradient.Horizontal
|
||||||
|
GradientStop { position: 0.0; color: "#b0000000" }
|
||||||
|
GradientStop { position: 0.55; color: "#59000000" }
|
||||||
|
GradientStop { position: 1.0; color: "#33000000" }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Rectangle { anchors.fill: parent; color: "black"; opacity: 0.4 }
|
|
||||||
|
|
||||||
SystemClock {
|
SystemClock {
|
||||||
id: lockClock
|
id: lockClock
|
||||||
precision: SystemClock.Minutes
|
precision: SystemClock.Minutes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Lower-left, not centred: clock/date/password stack left
|
||||||
|
// aligned against a 10% margin, sitting below the middle.
|
||||||
Column {
|
Column {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: Math.round(parent.width * 0.10)
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.verticalCenterOffset: -60
|
anchors.verticalCenterOffset: Math.round(parent.height * 0.14)
|
||||||
spacing: 8
|
spacing: 6
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
text: lockClock.date.toLocaleTimeString(Qt.locale(), "HH:mm")
|
text: lockClock.date.toLocaleTimeString(Qt.locale(), "HH:mm")
|
||||||
color: Theme.base05
|
color: Theme.base05
|
||||||
font.family: Theme.fontFamily
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 72
|
font.pixelSize: 104
|
||||||
font.weight: Font.Medium
|
font.weight: Font.DemiBold
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
text: lockClock.date.toLocaleDateString(Qt.locale(), "dddd, d MMMM")
|
text: lockClock.date.toLocaleDateString(Qt.locale(), "dddd, d MMMM")
|
||||||
color: Theme.base04
|
color: Theme.base04
|
||||||
font.family: Theme.fontFamily
|
font.family: Theme.fontFamily
|
||||||
font.pixelSize: 16
|
font.pixelSize: 18
|
||||||
}
|
}
|
||||||
|
|
||||||
Item { width: 1; height: 32 }
|
Item { width: 1; height: 28 }
|
||||||
|
|
||||||
// Password pill: dots for typed chars; border tracks
|
// Password pill: dots for typed chars; border tracks
|
||||||
// state (accent while checking, red on failure).
|
// state (accent while checking, red on failure).
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
width: 300
|
||||||
width: 280
|
height: 46
|
||||||
height: 44
|
|
||||||
radius: Theme.radiusCard
|
radius: Theme.radiusCard
|
||||||
color: Theme.cardBg
|
color: Theme.cardBg
|
||||||
border.width: Theme.borderWidth
|
border.width: Theme.borderWidth
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue