test script
This commit is contained in:
@@ -29,6 +29,7 @@ Elevation {
|
|||||||
level: root.expanded ? 2 : 0
|
level: root.expanded ? 2 : 0
|
||||||
radius: itemHeight / 2
|
radius: itemHeight / 2
|
||||||
visible: implicitHeight > 0
|
visible: implicitHeight > 0
|
||||||
|
z: root.expanded ? 100 : 0
|
||||||
|
|
||||||
Behavior on implicitHeight {
|
Behavior on implicitHeight {
|
||||||
Anim {
|
Anim {
|
||||||
@@ -68,6 +69,7 @@ Elevation {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: DynamicColors.palette.m3surfaceContainer
|
color: DynamicColors.palette.m3surfaceContainer
|
||||||
radius: parent.radius
|
radius: parent.radius
|
||||||
|
z: root.z
|
||||||
|
|
||||||
// Main visible spinner: normal/outside text color
|
// Main visible spinner: normal/outside text color
|
||||||
PathView {
|
PathView {
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ Singleton {
|
|||||||
wallust: general.color.wallust,
|
wallust: general.color.wallust,
|
||||||
mode: general.color.mode,
|
mode: general.color.mode,
|
||||||
smart: general.color.smart,
|
smart: general.color.smart,
|
||||||
|
scheduleDark: general.color.scheduleDark,
|
||||||
schemeGeneration: general.color.schemeGeneration,
|
schemeGeneration: general.color.schemeGeneration,
|
||||||
scheduleDarkStart: general.color.scheduleDarkStart,
|
scheduleDarkStart: general.color.scheduleDarkStart,
|
||||||
scheduleDarkEnd: general.color.scheduleDarkEnd,
|
scheduleDarkEnd: general.color.scheduleDarkEnd,
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ JsonObject {
|
|||||||
component Color: JsonObject {
|
component Color: JsonObject {
|
||||||
property string mode: "dark"
|
property string mode: "dark"
|
||||||
property bool neovimColors: false
|
property bool neovimColors: false
|
||||||
|
property bool scheduleDark: false
|
||||||
property int scheduleDarkEnd: 0
|
property int scheduleDarkEnd: 0
|
||||||
property int scheduleDarkStart: 0
|
property int scheduleDarkStart: 0
|
||||||
property bool schemeGeneration: true
|
property bool schemeGeneration: true
|
||||||
|
|||||||
@@ -357,7 +357,7 @@ Singleton {
|
|||||||
FileView {
|
FileView {
|
||||||
id: fileView
|
id: fileView
|
||||||
|
|
||||||
path: `${Paths.config}/config.json`
|
path: "/etc/zshell-greeter/config.json"
|
||||||
watchChanges: true
|
watchChanges: true
|
||||||
|
|
||||||
onFileChanged: {
|
onFileChanged: {
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ import Quickshell.Io
|
|||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property string lockscreenBg: `${Quickshell.shellDir}/images/greeter_bg.png`
|
property string lockscreenBg: "/etc/zshell-greeter/images/greeter_bg.png"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Item {
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
source: `${Quickshell.shellDir}/images/.face`
|
source: "/etc/zshell-greeter/images/face"
|
||||||
sourceSize.height: parent.height
|
sourceSize.height: parent.height
|
||||||
sourceSize.width: parent.width
|
sourceSize.width: parent.width
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[terminal]
|
||||||
|
vt = 1
|
||||||
|
switch = true
|
||||||
|
|
||||||
|
[default_session]
|
||||||
|
command = "/usr/bin/start-zshell-greeter"
|
||||||
|
user = "greeter"
|
||||||
@@ -7,7 +7,7 @@ export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
|||||||
export EGL_PLATFORM=gbm
|
export EGL_PLATFORM=gbm
|
||||||
|
|
||||||
if command -v start-hyprland >/dev/null 2>&1; then
|
if command -v start-hyprland >/dev/null 2>&1; then
|
||||||
exec start-hyprland -- -c /etc/xdg/quickshell/zshell-greeter/scripts/zshell-hyprland.conf
|
exec start-hyprland -- -c /etc/zshell-greeter/zshell-hyprland.conf
|
||||||
else
|
else
|
||||||
exec Hyprland -c /etc/xdg/quickshell/zshell-greeter/scripts/zshell-hyprland.conf
|
exec Hyprland -c /etc/zshell-greeter/zshell-hyprland.conf
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ SettingsPage {
|
|||||||
SettingSpinner {
|
SettingSpinner {
|
||||||
name: "Schedule dark mode"
|
name: "Schedule dark mode"
|
||||||
object: Config.general.color
|
object: Config.general.color
|
||||||
settings: ["scheduleDarkStart", "scheduleDarkEnd"]
|
settings: ["scheduleDarkStart", "scheduleDarkEnd", "scheduleDark"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,21 +62,78 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: optionLayout
|
||||||
|
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.preferredWidth: 100
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.preferredWidth: optionLayout.width
|
||||||
|
|
||||||
|
CustomText {
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Enabled: ")
|
||||||
|
}
|
||||||
|
|
||||||
|
CustomSwitch {
|
||||||
|
id: enabledSwitch
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignHCenter
|
||||||
|
checked: root.object[root.settings[2]]
|
||||||
|
|
||||||
|
onToggled: {
|
||||||
|
root.object[root.settings[2]] = checked;
|
||||||
|
Config.save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.preferredWidth: optionLayout.width
|
||||||
|
z: setting2.expanded ? -1 : 1
|
||||||
|
|
||||||
|
CustomText {
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Start: ")
|
||||||
|
}
|
||||||
|
|
||||||
SpinnerButton {
|
SpinnerButton {
|
||||||
|
id: setting1
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignHCenter
|
||||||
Layout.preferredHeight: Appearance.font.size.large + Appearance.padding.smaller * 2
|
Layout.preferredHeight: Appearance.font.size.large + Appearance.padding.smaller * 2
|
||||||
Layout.preferredWidth: height * 2
|
Layout.preferredWidth: height * 2
|
||||||
currentIndex: root.object[root.settings[0]]
|
currentIndex: root.object[root.settings[0]]
|
||||||
|
enabled: enabledSwitch.checked
|
||||||
text: root.formattedValue(root.settings[0])
|
text: root.formattedValue(root.settings[0])
|
||||||
|
|
||||||
menu.onItemSelected: item => {
|
menu.onItemSelected: item => {
|
||||||
root.commitChoice(item, root.settings[0]);
|
root.commitChoice(item, root.settings[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.preferredWidth: optionLayout.width
|
||||||
|
z: setting1.expanded ? -1 : 1
|
||||||
|
|
||||||
|
CustomText {
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignHCenter
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("End: ")
|
||||||
|
}
|
||||||
|
|
||||||
SpinnerButton {
|
SpinnerButton {
|
||||||
|
id: setting2
|
||||||
|
|
||||||
|
Layout.alignment: Qt.AlignRight | Qt.AlignHCenter
|
||||||
Layout.preferredHeight: Appearance.font.size.large + Appearance.padding.smaller * 2
|
Layout.preferredHeight: Appearance.font.size.large + Appearance.padding.smaller * 2
|
||||||
Layout.preferredWidth: height * 2
|
Layout.preferredWidth: height * 2
|
||||||
currentIndex: root.object[root.settings[1]]
|
currentIndex: root.object[root.settings[1]]
|
||||||
|
enabled: enabledSwitch.checked
|
||||||
text: root.formattedValue(root.settings[1])
|
text: root.formattedValue(root.settings[1])
|
||||||
|
|
||||||
menu.onItemSelected: item => {
|
menu.onItemSelected: item => {
|
||||||
@@ -84,4 +141,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,19 +8,21 @@ CustomRect {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
property alias currentIndex: menu.currentIndex
|
property alias currentIndex: menu.currentIndex
|
||||||
|
property bool enabled
|
||||||
property alias expanded: menu.expanded
|
property alias expanded: menu.expanded
|
||||||
property alias label: label
|
property alias label: label
|
||||||
property alias menu: menu
|
property alias menu: menu
|
||||||
property alias text: label.text
|
property alias text: label.text
|
||||||
|
|
||||||
color: DynamicColors.palette.m3primary
|
color: enabled ? DynamicColors.palette.m3primary : DynamicColors.layer(DynamicColors.palette.m3surfaceContainerHigh, 2)
|
||||||
radius: Appearance.rounding.full
|
radius: Appearance.rounding.full
|
||||||
|
z: expanded ? 100 : 0
|
||||||
|
|
||||||
CustomText {
|
CustomText {
|
||||||
id: label
|
id: label
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: DynamicColors.palette.m3onPrimary
|
color: root.enabled ? DynamicColors.palette.m3onPrimary : DynamicColors.layer(DynamicColors.palette.m3onSurface, 2)
|
||||||
font.pointSize: Appearance.font.size.large
|
font.pointSize: Appearance.font.size.large
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,6 +30,8 @@ CustomRect {
|
|||||||
function onClicked(): void {
|
function onClicked(): void {
|
||||||
SettingsDropdowns.toggle(menu, root);
|
SettingsDropdowns.toggle(menu, root);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
visible: root.enabled
|
||||||
}
|
}
|
||||||
|
|
||||||
PathViewMenu {
|
PathViewMenu {
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ Item {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
color: DynamicColors.palette.m3onSurface
|
color: DynamicColors.palette.m3onSurface
|
||||||
implicitSize: 22
|
implicitSize: 22
|
||||||
layer.enabled: DynamicColors.light
|
layer.enabled: Config.general.color.smart || Config.general.color.scheduleDark
|
||||||
source: root.item.icon
|
source: root.item.icon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-9
@@ -1,16 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
|
BINARY="../Greeter/scripts/start-zshell-greeter"
|
||||||
SCRIPT="./zshell.sh"
|
CONFIG="../Greeter/scripts/zshell-hyprland.conf"
|
||||||
|
GREETD_CONFIG="../Greeter/scripts/greeter-config.toml"
|
||||||
prepare_binary() {
|
WALLPAPER="$HOME/.local/state/zshell/lockscreen_bg.png"
|
||||||
sed -ir "s|QML_ROOT=.*|QML_ROOT=${SCRIPT_DIR}/..|" "$SCRIPT"
|
FACE="$HOME/.face"
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
prepare_binary
|
sudo mkdir -p "/etc/zshell-greeter/images"
|
||||||
|
sudo cp "$BINARY" "/usr/bin"
|
||||||
sudo cp "$SCRIPT" /usr/bin/zshell
|
sudo cp "$CONFIG" "/etc/zshell-greeter"
|
||||||
|
sudo cp "$WALLPAPER" "/etc/zshell-greeter/images/greeter_bg.png"
|
||||||
|
sudo cp "$FACE" "/etc/zshell-greeter/images/face"
|
||||||
|
sudo cp "$GREETD_CONFIG" "/etc/greetd/config.toml"
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user