usable
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
{ ... }: {
|
{ self, ... }: {
|
||||||
|
|
||||||
|
|
||||||
perSystem = { self', pkgs, system, ... }: {
|
perSystem = { self', pkgs, system, ... }: {
|
||||||
@@ -24,6 +24,46 @@
|
|||||||
cp -r $src/* $out/share
|
cp -r $src/* $out/share
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
aurora-greeter-hypr-conf = pkgs.writeText "greeter-conf" ''
|
||||||
|
exec-once=${self.packages.${system}.aurora-greeter}/bin/aurora-greeter
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
options.services.aurora-greeter = with lib; {
|
||||||
|
enable = mkEnableOption "aurora-greeter";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
cfg = config.services.aurora-greeter;
|
||||||
|
|
||||||
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
|
in {
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
self.packages.${system}.aurora-greeter
|
||||||
|
|
||||||
|
self.packages.${system}.aurora-greeter-hypr-conf
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
services.greetd = {
|
||||||
|
enable = cfg.enable;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
|
||||||
|
terminal.vt = 5;
|
||||||
|
|
||||||
|
default_session = {
|
||||||
|
command = "Hyprland -c ${self.packages.${system}.aurora-greeter-hypr-conf}/greeter-conf";
|
||||||
|
#user = "greeter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import Quickshell.Widgets
|
|||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Services.Greetd
|
import Quickshell.Services.Greetd
|
||||||
import Quickshell.Services.Pam
|
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
|
|
||||||
@@ -19,23 +18,63 @@ ClippingWrapperRectangle {
|
|||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
Text {
|
||||||
|
id: error
|
||||||
|
text: ""
|
||||||
|
color: Pywal.colors.color13
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
Text {
|
Text {
|
||||||
text: "User"
|
text: "User"
|
||||||
|
color: Pywal.special.foreground
|
||||||
}
|
}
|
||||||
TextInput {
|
TextInput {
|
||||||
|
id: username
|
||||||
text: "guest"
|
text: "guest"
|
||||||
|
color: Pywal.special.foreground
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
text: "Password"
|
text: "Password"
|
||||||
|
color: Pywal.special.foreground
|
||||||
}
|
}
|
||||||
TextInput {
|
TextInput {
|
||||||
|
id: password
|
||||||
text: "test"
|
text: "test"
|
||||||
echoMode: TextInput.Password
|
echoMode: TextInput.Password
|
||||||
|
color: Pywal.special.foreground
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: "Login"
|
text: "Login"
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
if(Greetd.available) {
|
||||||
|
Greetd.authMessage.connect((m, e, rr, er) => {
|
||||||
|
console.log(m)
|
||||||
|
if(e) {
|
||||||
|
if(er) {
|
||||||
|
error.visible = true
|
||||||
|
error.text = m
|
||||||
|
}
|
||||||
|
} else if(rr) {
|
||||||
|
console.log("send password")
|
||||||
|
Greetd.respond(password.text)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
Greetd.authFailure.connect((m) => {
|
||||||
|
error.visible = true
|
||||||
|
error.text = m
|
||||||
|
})
|
||||||
|
|
||||||
|
Greetd.readyToLaunch.connect(() => {
|
||||||
|
console.log("readyToLaunch")
|
||||||
|
Greetd.launch([ "Hyprland" ])
|
||||||
|
})
|
||||||
|
console.log("createSession")
|
||||||
|
Greetd.createSession(username.text)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ ... }: {
|
{ self, inputs, ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.flakeModules.home-manager
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
perSystem = { self', pkgs, system, ... }: {
|
perSystem = { self', pkgs, system, ... }: {
|
||||||
@@ -27,4 +32,85 @@
|
|||||||
default = self'.packages.aurora;
|
default = self'.packages.aurora;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
config = {
|
||||||
|
|
||||||
|
services = {
|
||||||
|
upower.enable = true;
|
||||||
|
gvfs.enable = true;
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.etc."pam.d/aurora-lock.conf".text = ''
|
||||||
|
auth required pam_unix.so
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.homeModules.default = { config, lib, pkgs, ... }: {
|
||||||
|
|
||||||
|
options.programs.aurora = with lib; {
|
||||||
|
enable = mkEnableOption "aurora";
|
||||||
|
|
||||||
|
package = mkPackageOption self.packages.${pkgs.stdenv.hostPlatform.system} "aurora" {
|
||||||
|
default = [ "aurora" ];
|
||||||
|
|
||||||
|
example = ''aurora.packages."x86_64-linux".hybar'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
enable = mkEnableOption "aurora systemd unit";
|
||||||
|
|
||||||
|
target = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "hyprland-session.target";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
cfg = config.programs.aurora;
|
||||||
|
|
||||||
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
|
in {
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
swww
|
||||||
|
|
||||||
|
bluez
|
||||||
|
bluez-tools
|
||||||
|
|
||||||
|
wl-clipboard
|
||||||
|
|
||||||
|
brightnessctl
|
||||||
|
|
||||||
|
hyprpicker
|
||||||
|
|
||||||
|
hyprsunset
|
||||||
|
|
||||||
|
wf-recorder
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.quickshell = {
|
||||||
|
enable = cfg.enable;
|
||||||
|
|
||||||
|
package = cfg.package;
|
||||||
|
|
||||||
|
activeConfig = "aurora";
|
||||||
|
|
||||||
|
configs = {
|
||||||
|
default = "${self.packages.${system}.aurora-dots}/share";
|
||||||
|
aurora = "${self.packages.${system}.aurora-dots}/share";
|
||||||
|
hybar = "${self.packages.${system}.hybar-dots}/share";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd = {
|
||||||
|
enable = cfg.systemd.enable;
|
||||||
|
target = cfg.systemd.target;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,22 @@ PanelWindow {
|
|||||||
|
|
||||||
property real radius: 10
|
property real radius: 10
|
||||||
|
|
||||||
onRadiusChanged: Hyprland.dispatch("exec hyprctl keyword decoration:rounding " + radius)
|
property list<string> hyprcmds: [
|
||||||
|
"exec hyprctl --batch '" +
|
||||||
|
"keyword general:gaps_out 5;" +
|
||||||
|
"keyword general:border_size 1;" +
|
||||||
|
"keyword windowrule match:title lockscreen, no_blur on, fullscreen on;" +
|
||||||
|
"keyword misc:session_lock_xray true;" +
|
||||||
|
"keyword decoration:blur:enabled true;" +
|
||||||
|
"keyword decoration:active_opacity 0.96;" +
|
||||||
|
"keyword decoration:inactive_opacity 0.96;" +
|
||||||
|
"keyword decoration:rounding " + radius + ";" +
|
||||||
|
"keyword monitor " + Hyprland.monitorFor(root.screen).name + ",1920x1080@60,0x0,1" + ";" +
|
||||||
|
"keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx + ";" +
|
||||||
|
"'"
|
||||||
|
]
|
||||||
|
|
||||||
|
onRadiusChanged: root.hyprcmds.forEach((c) => Hyprland.dispatch(c))
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
top: true
|
top: true
|
||||||
@@ -21,32 +36,10 @@ PanelWindow {
|
|||||||
bottom: true
|
bottom: true
|
||||||
}
|
}
|
||||||
|
|
||||||
Lock {
|
|
||||||
id: lock
|
|
||||||
bg_path: "/tmp/nathan/tmp.jpg"
|
|
||||||
//locked: true
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: lt
|
|
||||||
interval: 30000
|
|
||||||
|
|
||||||
running: false
|
|
||||||
|
|
||||||
repeat: false
|
|
||||||
|
|
||||||
onTriggered: lock.locked = false
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
||||||
Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
|
root.hyprcmds.forEach((c) => { Hyprland.dispatch(c) })
|
||||||
Hyprland.dispatch("exec hyprctl keyword decoration:rounding " + radius)
|
|
||||||
|
|
||||||
for(let toplv = 0; toplv < Hyprland.toplevels.values.length; toplv++) {
|
|
||||||
//console.log(Hyprland.toplevels.values[toplv].title)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property int topEx: topRect.reserve
|
property int topEx: topRect.reserve
|
||||||
@@ -55,6 +48,7 @@ PanelWindow {
|
|||||||
property int leftEx: leftRect.reserve
|
property int leftEx: leftRect.reserve
|
||||||
property int rightEx: rightRect.reserve
|
property int rightEx: rightRect.reserve
|
||||||
|
|
||||||
|
property color bg: (Pywal.special.background)
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
@@ -81,43 +75,47 @@ PanelWindow {
|
|||||||
Region {
|
Region {
|
||||||
item: dash.visible ? dash : leftRect
|
item: dash.visible ? dash : leftRect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Region {
|
||||||
|
item: botRect
|
||||||
|
}
|
||||||
|
|
||||||
|
Region {
|
||||||
|
item: botRect.midFO.visible ? botRect.midFO : botRect
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BarBottom {
|
BarBottom {
|
||||||
id: botRect
|
id: botRect
|
||||||
|
radius: root.radius
|
||||||
|
hyprcmds: root.hyprcmds
|
||||||
|
x: leftRect.x + leftRect.width
|
||||||
|
implicitWidth: rightRect.x - (leftRect.x + leftRect.width)
|
||||||
|
color: root.bg
|
||||||
}
|
}
|
||||||
|
|
||||||
BarLeft {
|
BarLeft {
|
||||||
id: leftRect
|
id: leftRect
|
||||||
window: root
|
window: root
|
||||||
|
color: root.bg
|
||||||
Button {
|
|
||||||
implicitWidth: 30
|
|
||||||
implicitHeight: 30
|
|
||||||
|
|
||||||
x: leftRect.x + leftRect.width / 2 - width / 2
|
|
||||||
y: 200
|
|
||||||
onClicked: {
|
|
||||||
lock.locked = true
|
|
||||||
lt.running = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BarRight {
|
BarRight {
|
||||||
id: rightRect
|
id: rightRect
|
||||||
|
color: root.bg
|
||||||
}
|
}
|
||||||
|
|
||||||
Shape {
|
Shape {
|
||||||
|
|
||||||
x: leftRect.x + leftRect.width - 1
|
x: leftRect.cornerX
|
||||||
y: topRect.cornerY
|
y: topRect.cornerY
|
||||||
|
|
||||||
ShapePath {
|
ShapePath {
|
||||||
strokeWidth: 4
|
strokeWidth: 1
|
||||||
strokeColor: Pywal.special.background
|
|
||||||
fillColor: Pywal.special.background
|
strokeColor: "transparent"
|
||||||
|
fillColor: Pywal.argb(Pywal.special.background)
|
||||||
startX: 0; startY: 0
|
startX: 0; startY: 0
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: radius }
|
PathLine { relativeX: 0; relativeY: radius }
|
||||||
@@ -132,13 +130,15 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
Shape {
|
Shape {
|
||||||
|
|
||||||
x: rightRect.x + 1
|
x: rightRect.x
|
||||||
y: topRect.cornerY
|
y: topRect.cornerY
|
||||||
|
|
||||||
ShapePath {
|
ShapePath {
|
||||||
strokeWidth: 4
|
strokeWidth: 1
|
||||||
strokeColor: Pywal.special.background
|
|
||||||
fillColor: Pywal.special.background
|
strokeColor: "transparent"
|
||||||
|
fillColor: Pywal.argb(Pywal.special.background)
|
||||||
|
|
||||||
startX: 0; startY: 0
|
startX: 0; startY: 0
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: radius }
|
PathLine { relativeX: 0; relativeY: radius }
|
||||||
@@ -154,13 +154,15 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
Shape {
|
Shape {
|
||||||
|
|
||||||
x: leftRect.x + leftRect.width - 1
|
x: leftRect.cornerX
|
||||||
y: botRect.y + 1
|
y: botRect.cornerY
|
||||||
|
|
||||||
ShapePath {
|
ShapePath {
|
||||||
strokeWidth: 4
|
strokeWidth: 1
|
||||||
strokeColor: Pywal.special.background
|
|
||||||
fillColor: Pywal.special.background
|
strokeColor: "transparent"
|
||||||
|
fillColor: Pywal.argb(Pywal.special.background)
|
||||||
|
|
||||||
startX: 0; startY: 0
|
startX: 0; startY: 0
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: -radius }
|
PathLine { relativeX: 0; relativeY: -radius }
|
||||||
@@ -176,13 +178,14 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
Shape {
|
Shape {
|
||||||
|
|
||||||
x: rightRect.x + 1
|
x: rightRect.x
|
||||||
y: botRect.y + 1
|
y: botRect.cornerY
|
||||||
|
|
||||||
ShapePath {
|
ShapePath {
|
||||||
strokeWidth: 4
|
strokeWidth: 1
|
||||||
strokeColor: Pywal.special.background
|
strokeColor: "transparent"
|
||||||
fillColor: Pywal.special.background
|
fillColor: Pywal.argb(Pywal.special.background)
|
||||||
|
|
||||||
startX: 0; startY: 0
|
startX: 0; startY: 0
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: -radius }
|
PathLine { relativeX: 0; relativeY: -radius }
|
||||||
@@ -203,6 +206,7 @@ PanelWindow {
|
|||||||
//y: topRect.y + topRect.height - 1
|
//y: topRect.y + topRect.height - 1
|
||||||
window: root
|
window: root
|
||||||
radius: root.radius
|
radius: root.radius
|
||||||
|
color: root.bg
|
||||||
|
|
||||||
onShowDashChanged: dash.visible = showDash
|
onShowDashChanged: dash.visible = showDash
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,49 @@ import Quickshell.Wayland
|
|||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
ColumnLayout {
|
||||||
property real reserve: height
|
id: root
|
||||||
id: botRect
|
|
||||||
|
property real reserve: botRectArea.height
|
||||||
|
|
||||||
|
required property real radius
|
||||||
|
required property color color
|
||||||
|
|
||||||
|
property real cornerY: y + botRectArea.y
|
||||||
|
|
||||||
|
required property list<string> hyprcmds
|
||||||
|
|
||||||
|
property Item midFO: midFO
|
||||||
|
|
||||||
y: parent.height - height
|
y: parent.height - height
|
||||||
color: Pywal.special.background
|
|
||||||
implicitHeight: 10
|
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
|
spacing: -10
|
||||||
|
|
||||||
|
Launcher {
|
||||||
|
id: midFO
|
||||||
|
radius: root.radius
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
hyprcmds: root.hyprcmds
|
||||||
|
color: root.color
|
||||||
|
}
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
id: botRectArea
|
||||||
|
Rectangle {
|
||||||
|
id: botRect
|
||||||
|
color: root.color
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
implicitHeight: 10
|
||||||
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
midFO.visible = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ Rectangle {
|
|||||||
id: leftRect
|
id: leftRect
|
||||||
|
|
||||||
property real reserve: width
|
property real reserve: width
|
||||||
|
property real cornerX: width
|
||||||
|
|
||||||
required property QsWindow window
|
required property QsWindow window
|
||||||
|
|
||||||
@@ -21,10 +22,7 @@ Rectangle {
|
|||||||
|
|
||||||
implicitWidth: 40
|
implicitWidth: 40
|
||||||
|
|
||||||
color: Pywal.special.background
|
LauncherButton {
|
||||||
|
|
||||||
|
|
||||||
Launcher {
|
|
||||||
id: launcher
|
id: launcher
|
||||||
x: parent.width / 2 - implicitWidth / 2
|
x: parent.width / 2 - implicitWidth / 2
|
||||||
y: implicitWidth / 3
|
y: implicitWidth / 3
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ Rectangle {
|
|||||||
property real reserve: width
|
property real reserve: width
|
||||||
id: rightRect
|
id: rightRect
|
||||||
x: parent.width - width
|
x: parent.width - width
|
||||||
color: Pywal.special.background
|
|
||||||
implicitWidth: 10
|
implicitWidth: 10
|
||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,15 +10,16 @@ import Quickshell.Hyprland
|
|||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
||||||
spacing: -1
|
spacing: 0
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
|
required property color color
|
||||||
|
|
||||||
WrapperMouseArea {
|
WrapperMouseArea {
|
||||||
id: topRectArea
|
id: topRectArea
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: topRect
|
id: topRect
|
||||||
color: Pywal.special.background
|
color: root.color
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
}
|
}
|
||||||
implicitHeight: 10
|
implicitHeight: 10
|
||||||
@@ -34,7 +35,7 @@ ColumnLayout {
|
|||||||
|
|
||||||
required property real radius
|
required property real radius
|
||||||
|
|
||||||
property real cornerY: topRectArea.height - 1
|
property real cornerY: topRectArea.height
|
||||||
|
|
||||||
//property real reserve: midFO.visible ? root.height : topRectArea.height
|
//property real reserve: midFO.visible ? root.height : topRectArea.height
|
||||||
property real reserve: topRectArea.height
|
property real reserve: topRectArea.height
|
||||||
@@ -52,7 +53,7 @@ ColumnLayout {
|
|||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
color: Pywal.special.background
|
color: root.color
|
||||||
|
|
||||||
visible: true
|
visible: true
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ ClippingWrapperRectangle {
|
|||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: text
|
id: text
|
||||||
text: UPower.displayDevice.percentage * 100 + "%"
|
text: Math.round(UPower.displayDevice.percentage * 100) + "%"
|
||||||
|
|
||||||
padding: 10
|
padding: 10
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ WrapperMouseArea {
|
|||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
text: Qt.formatDateTime(clock.date, "dddd HH:mm:ss MM/dd/yyyy")
|
text: Qt.formatDateTime(clock.date, "dddd HH:mm:ss MM/dd/yyyy")
|
||||||
font.pointSize: 11
|
font.pointSize: 11
|
||||||
|
color: Pywal.special.background
|
||||||
|
|
||||||
SystemClock {
|
SystemClock {
|
||||||
id: clock
|
id: clock
|
||||||
|
|||||||
@@ -23,6 +23,19 @@ Item {
|
|||||||
|
|
||||||
property int selected: 0
|
property int selected: 0
|
||||||
|
|
||||||
|
IpcHandler {
|
||||||
|
target: "dashboard"
|
||||||
|
|
||||||
|
function show() { root.visible = true; }
|
||||||
|
function hide() { root.visible = false; }
|
||||||
|
function toggle() { root.visible = !root.visible; }
|
||||||
|
}
|
||||||
|
|
||||||
|
Power {
|
||||||
|
id: power
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
VFlyoutDown {
|
VFlyoutDown {
|
||||||
|
|
||||||
@@ -68,7 +81,7 @@ Item {
|
|||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
radius: root.radius
|
radius: root.radius
|
||||||
color: index == selected ? Pywal.colors.color13 : Pywal.colors.color4
|
color: index == selected ? Pywal.colors.color13 : Pywal.colors.color4
|
||||||
//Launcher { anchors.centerIn: parent }
|
//LauncherButton { anchors.centerIn: parent }
|
||||||
Text {
|
Text {
|
||||||
font.pointSize: 14
|
font.pointSize: 14
|
||||||
text: switch(index) {
|
text: switch(index) {
|
||||||
@@ -128,27 +141,29 @@ Item {
|
|||||||
|
|
||||||
onNotification: (n) => {
|
onNotification: (n) => {
|
||||||
n.tracked = !n.transient
|
n.tracked = !n.transient
|
||||||
|
n.closed.connect(() => { console.log("notif closed") })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
readonly property Component launcher: Launcher {}
|
readonly property Component launcher: LauncherButton {}
|
||||||
readonly property Component notifs: Notifications { server: nserver }
|
readonly property Component notifs: Notifications { server: nserver }
|
||||||
|
|
||||||
readonly property Component bt: Bluetooth {}
|
readonly property Component bt: Bluetooth {}
|
||||||
readonly property Component vol: Volume {}
|
readonly property Component vol: Volume {}
|
||||||
|
|
||||||
readonly property Component bat: PowerMode {}
|
readonly property Component bat: PowerMode {}
|
||||||
readonly property Component mon: Launcher {}
|
readonly property Component mon: LauncherButton {}
|
||||||
|
|
||||||
readonly property Component net: Launcher {}
|
readonly property Component net: LauncherButton {}
|
||||||
readonly property Component mus: Launcher {}
|
readonly property Component mus: LauncherButton {}
|
||||||
|
|
||||||
readonly property Component clk: Clock {}
|
readonly property Component clk: Clock {}
|
||||||
readonly property Component wal: Launcher {}
|
readonly property Component wal: LauncherButton {}
|
||||||
|
|
||||||
sourceComponent: switch(selected) {
|
sourceComponent: switch(selected) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -191,7 +206,7 @@ Item {
|
|||||||
radius: root.radius
|
radius: root.radius
|
||||||
property bool use: false
|
property bool use: false
|
||||||
color: use ? Pywal.colors.color13 : Pywal.colors.color4
|
color: use ? Pywal.colors.color13 : Pywal.colors.color4
|
||||||
//Launcher { anchors.centerIn: parent }
|
//LauncherButton { anchors.centerIn: parent }
|
||||||
Text {
|
Text {
|
||||||
font.pointSize: 14
|
font.pointSize: 14
|
||||||
text: switch(index) {
|
text: switch(index) {
|
||||||
@@ -235,6 +250,7 @@ Item {
|
|||||||
case 6:
|
case 6:
|
||||||
case 7:
|
case 7:
|
||||||
case 8:
|
case 8:
|
||||||
|
power.visible = true
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +1,37 @@
|
|||||||
import Quickshell // for PanelWindow
|
import Quickshell // for PanelWindow
|
||||||
import QtQuick // for Text
|
import QtQuick // for Text
|
||||||
|
import QtQuick.Shapes
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Wayland
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
|
||||||
WrapperMouseArea {
|
|
||||||
ClippingWrapperRectangle {
|
|
||||||
radius: 3
|
|
||||||
implicitWidth: 30; implicitHeight: 30
|
|
||||||
Text {
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
anchors.fill: parent
|
|
||||||
text: " "
|
|
||||||
font.pointSize: 16
|
|
||||||
|
|
||||||
color: Pywal.special.foreground
|
VFlyoutUp {
|
||||||
}
|
id: midFO
|
||||||
color: {
|
|
||||||
containsMouse
|
required property list<string> hyprcmds
|
||||||
? Pywal.colors.color12
|
|
||||||
: Pywal.colors.color1
|
visible: false
|
||||||
|
|
||||||
|
item: content
|
||||||
|
|
||||||
|
onExited: visible = false
|
||||||
|
|
||||||
|
ClippingRectangle {
|
||||||
|
id: content
|
||||||
|
radius: root.radius
|
||||||
|
implicitWidth: 700
|
||||||
|
implicitHeight: 450
|
||||||
|
|
||||||
|
color: Pywal.colors.color1
|
||||||
|
|
||||||
|
Wallpaper {
|
||||||
|
implicitWidth: 700
|
||||||
|
//implicitHeight: 350
|
||||||
|
hyprcmds: midFO.hyprcmds
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hoverEnabled: true
|
|
||||||
|
|
||||||
Process {
|
|
||||||
id: launcher
|
|
||||||
running: false
|
|
||||||
command: ["rofi", "-show", "drun", "-show-icons" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: launcher.running = true
|
|
||||||
}
|
}
|
||||||
|
|||||||
36
config/aurora/modules/LauncherButton.qml
Normal file
36
config/aurora/modules/LauncherButton.qml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import Quickshell // for PanelWindow
|
||||||
|
import QtQuick // for Text
|
||||||
|
import QtQuick.Controls
|
||||||
|
import Quickshell.Io
|
||||||
|
import Quickshell.Widgets
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 3
|
||||||
|
implicitWidth: 30; implicitHeight: 30
|
||||||
|
Text {
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
anchors.fill: parent
|
||||||
|
text: " "
|
||||||
|
font.pointSize: 16
|
||||||
|
|
||||||
|
color: Pywal.special.foreground
|
||||||
|
}
|
||||||
|
color: {
|
||||||
|
containsMouse
|
||||||
|
? Pywal.colors.color12
|
||||||
|
: Pywal.colors.color1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
|
Process {
|
||||||
|
id: launcher
|
||||||
|
running: false
|
||||||
|
command: ["rofi", "-show", "drun", "-show-icons" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: launcher.running = true
|
||||||
|
}
|
||||||
@@ -15,17 +15,19 @@ Item {
|
|||||||
|
|
||||||
property bool locked: false
|
property bool locked: false
|
||||||
|
|
||||||
onLockedChanged: lock.locked = locked
|
onLockedChanged: {
|
||||||
|
lock.locked = locked
|
||||||
|
}
|
||||||
|
|
||||||
required property string bg_path
|
required property string bg_path
|
||||||
|
|
||||||
property color fieldColor: ctx.failed ? "red" : Pywal.colors.color1
|
property color fieldColor: ctx.failed ? Pywal.colors.color6 : Pywal.colors.color1
|
||||||
|
|
||||||
IpcHandler {
|
IpcHandler {
|
||||||
target: "lockscreen"
|
target: "lockscreen"
|
||||||
|
|
||||||
function lock() { lock.locked = true; }
|
function lock() { root.locked = true; }
|
||||||
function unlock() { lock.locked = false; }
|
function unlock() { root.locked = false; }
|
||||||
}
|
}
|
||||||
|
|
||||||
LockCtx {
|
LockCtx {
|
||||||
@@ -34,6 +36,11 @@ Item {
|
|||||||
onShouldUnlock: lock.locked = false
|
onShouldUnlock: lock.locked = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LockScreen {
|
||||||
|
id: lockscreen
|
||||||
|
visible: root.locked
|
||||||
|
}
|
||||||
|
|
||||||
WlSessionLock {
|
WlSessionLock {
|
||||||
|
|
||||||
id: lock
|
id: lock
|
||||||
@@ -47,50 +54,52 @@ Item {
|
|||||||
|
|
||||||
WlSessionLockSurface {
|
WlSessionLockSurface {
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
Image {
|
/*Image {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
source: Qt.resolvedUrl(bg_path)
|
source: Qt.resolvedUrl(bg_path)
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
}*/
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
radius: 10
|
radius: 10
|
||||||
|
|
||||||
color: Pywal.special.background
|
color: Pywal.special.background
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
color: root.fieldColor
|
color: root.fieldColor
|
||||||
implicitWidth: 200
|
implicitWidth: 200
|
||||||
TextInput {
|
TextInput {
|
||||||
text: ""
|
text: ""
|
||||||
|
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
ctx.pass = text
|
ctx.pass = text
|
||||||
}
|
|
||||||
|
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
|
||||||
|
|
||||||
font.pointSize: 30
|
|
||||||
//echoMode: TextInput.Password
|
|
||||||
color: Pywal.special.foreground
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
echoMode: TextInput.Password
|
||||||
text: "unlock"
|
|
||||||
onClicked: {
|
|
||||||
ctx.doUnlock()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
text: "exit"
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
onClicked: root.locked = false
|
|
||||||
|
font.pointSize: 30
|
||||||
|
color: Pywal.special.foreground
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "unlock"
|
||||||
|
onClicked: {
|
||||||
|
ctx.doUnlock()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "exit"
|
||||||
|
onClicked: root.locked = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
17
config/aurora/modules/LockScreen.qml
Normal file
17
config/aurora/modules/LockScreen.qml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import Quickshell // for PanelWindow
|
||||||
|
import QtQuick // for Text
|
||||||
|
import QtQuick.Shapes
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Quickshell.Io
|
||||||
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Wayland
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
|
||||||
|
FloatingWindow {
|
||||||
|
title: "lockscreen"
|
||||||
|
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
}
|
||||||
@@ -1,120 +1,126 @@
|
|||||||
import Quickshell
|
import Quickshell // for PanelWindow
|
||||||
import QtQuick // for Text
|
import QtQuick // for Text
|
||||||
|
import QtQuick.Shapes
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import Quickshell.Hyprland
|
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Wayland
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
|
||||||
Item {
|
PanelWindow {
|
||||||
width: 30
|
|
||||||
height: 30
|
anchors {
|
||||||
|
top: true
|
||||||
|
left: true
|
||||||
|
right: true
|
||||||
|
bottom: true
|
||||||
|
}
|
||||||
|
|
||||||
|
exclusionMode: ExclusionMode.Ignore
|
||||||
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property PanelWindow window
|
mask: Region {
|
||||||
required property real popupOffset
|
item: out
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
|
||||||
radius: 5
|
|
||||||
width: 30; height: 30
|
|
||||||
Button {
|
|
||||||
id: button
|
|
||||||
text: " "
|
|
||||||
font.pointSize: 16
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
menu.visible = true
|
|
||||||
grab.active = true
|
|
||||||
}
|
|
||||||
implicitHeight: parent.height
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PopupWindow {
|
color: "#99000000"
|
||||||
|
|
||||||
id: menu
|
Lock {
|
||||||
|
id: lock
|
||||||
|
bg_path: "/tmp/nathan/tmp.jpg"
|
||||||
|
//locked: true
|
||||||
|
}
|
||||||
|
|
||||||
anchor.window: window
|
MouseArea {
|
||||||
anchor.rect.x: popupOffset
|
|
||||||
anchor.rect.y: 50
|
|
||||||
implicitWidth: 150
|
|
||||||
implicitHeight: 250
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
color: "transparent"
|
id: out
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
anchors.fill: parent
|
||||||
radius: 5
|
|
||||||
|
|
||||||
implicitHeight: parent.height - 20
|
onClicked: {
|
||||||
implicitWidth: parent.width
|
root.visible = false
|
||||||
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ClippingRectangle {
|
||||||
|
implicitWidth: 200
|
||||||
|
implicitHeight: 200
|
||||||
|
id: main
|
||||||
|
anchors.centerIn: parent
|
||||||
|
radius: 10
|
||||||
|
color: "transparent"
|
||||||
|
GridLayout {
|
||||||
|
columns: 2
|
||||||
|
rows: 2
|
||||||
|
|
||||||
spacing: 0
|
Repeater {
|
||||||
|
model: 4
|
||||||
|
WrapperMouseArea {
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 10
|
||||||
|
Text {
|
||||||
|
text: switch(index) {
|
||||||
|
case 0:
|
||||||
|
return ""
|
||||||
|
case 1:
|
||||||
|
return " "
|
||||||
|
case 2:
|
||||||
|
return " "
|
||||||
|
case 3:
|
||||||
|
return " "
|
||||||
|
default:
|
||||||
|
return " "
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
font.pointSize: 16
|
||||||
|
|
||||||
Button {
|
horizontalAlignment: Text.AlignHCenter
|
||||||
Layout.topMargin: 5
|
verticalAlignment: Text.AlignVCenter
|
||||||
x: (parent.width - width) / 2
|
|
||||||
implicitWidth: parent.width - 10
|
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
|
||||||
|
|
||||||
text: 'shutdown'
|
color: Pywal.special.foreground
|
||||||
onClicked: shutdown.running = true
|
}
|
||||||
Process {
|
|
||||||
id: shutdown
|
|
||||||
running: false
|
|
||||||
command: ["systemctl", "poweroff"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
implicitHeight: 60
|
||||||
x: (parent.width - width) / 2
|
implicitWidth: 60
|
||||||
implicitWidth: parent.width - 10
|
color: parent.contansMouse ? Pywal.colors.color12 : Pywal.colors.color4
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
}
|
||||||
text: 'reboot'
|
|
||||||
onClicked: reboot.running = true
|
|
||||||
Process {
|
|
||||||
id: reboot
|
|
||||||
running: false
|
|
||||||
command: ["systemctl", "reboot"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
hoverEnabled: true
|
||||||
x: (parent.width - width) / 2
|
|
||||||
implicitWidth: parent.width - 10
|
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
|
||||||
text: 'logout'
|
|
||||||
onClicked: logout.running = true
|
|
||||||
Process {
|
|
||||||
id: logout
|
|
||||||
running: false
|
|
||||||
command: ["loginctl", "kill-session", "self" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
onEntered: {
|
||||||
Layout.bottomMargin: 10
|
child.color = Pywal.colors.color12
|
||||||
x: (parent.width - width) / 2
|
}
|
||||||
implicitWidth: parent.width - 10
|
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
onExited: {
|
||||||
text: 'sleep'
|
child.color = Pywal.colors.color4
|
||||||
onClicked: sleep.running = true
|
}
|
||||||
Process {
|
|
||||||
id: sleep
|
onClicked: {
|
||||||
running: false
|
root.visible = false
|
||||||
command: ["systemctl", "sleep"]
|
switch(index) {
|
||||||
|
case 0:
|
||||||
|
Hyprland.dispatch("exec loginctl kill-session self")
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
Hyprland.dispatch("exec systemctl reboot")
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
Hyprland.dispatch("exec loginctl lock-session")
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
Hyprland.dispatch("exec systemctl poweroff")
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
lock.locked = true
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HyprlandFocusGrab {
|
|
||||||
id: grab
|
|
||||||
windows: [ menu ]
|
|
||||||
onCleared: menu.visible = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ ColumnLayout {
|
|||||||
text: 'performance'
|
text: 'performance'
|
||||||
onClicked: PowerProfiles.profile = PowerProfile.Performance
|
onClicked: PowerProfiles.profile = PowerProfile.Performance
|
||||||
visible: PowerProfiles.hasPerformanceProfile
|
visible: PowerProfiles.hasPerformanceProfile
|
||||||
|
|
||||||
|
background: Rectangle { color: PowerProfiles.profile == PowerProfile.Performance ? Pywal.colors.color13 : Pywal.colors.color4 }
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
Layout.topMargin: 5
|
Layout.topMargin: 5
|
||||||
@@ -29,6 +31,7 @@ ColumnLayout {
|
|||||||
|
|
||||||
text: 'balanced'
|
text: 'balanced'
|
||||||
onClicked: PowerProfiles.profile = PowerProfile.Balanced
|
onClicked: PowerProfiles.profile = PowerProfile.Balanced
|
||||||
|
background: Rectangle { color: PowerProfiles.profile == PowerProfile.Balanced ? Pywal.colors.color13 : Pywal.colors.color4 }
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
Layout.topMargin: 5
|
Layout.topMargin: 5
|
||||||
@@ -38,5 +41,6 @@ ColumnLayout {
|
|||||||
|
|
||||||
text: 'power saver'
|
text: 'power saver'
|
||||||
onClicked: PowerProfiles.profile = PowerProfile.PowerSaver
|
onClicked: PowerProfiles.profile = PowerProfile.PowerSaver
|
||||||
|
background: Rectangle { color: PowerProfiles.profile == PowerProfile.PowerSaver ? Pywal.colors.color13 : Pywal.colors.color4 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,11 +7,15 @@ Singleton {
|
|||||||
|
|
||||||
property string wallpaper: json.wallpaper
|
property string wallpaper: json.wallpaper
|
||||||
|
|
||||||
property string alpha: json.alpha
|
property string alpha: Math.round(parseInt(json.alpha, 10) * 0xFF / 100).toString(16)
|
||||||
|
|
||||||
property JsonObject special: json.special
|
property JsonObject special: json.special
|
||||||
property JsonObject colors: json.colors
|
property JsonObject colors: json.colors
|
||||||
|
|
||||||
|
function argb(c) {
|
||||||
|
return c.slice(0, 1) + Pywal.alpha + c.slice(1)
|
||||||
|
}
|
||||||
|
|
||||||
FileView {
|
FileView {
|
||||||
|
|
||||||
path: "/home/nathan/.cache/wal/colors.json"
|
path: "/home/nathan/.cache/wal/colors.json"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ MouseArea {
|
|||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
||||||
item.y = pad
|
item.y = root.y + pad
|
||||||
}
|
}
|
||||||
|
|
||||||
width: shape.width
|
width: shape.width
|
||||||
@@ -30,8 +30,8 @@ MouseArea {
|
|||||||
ShapePath {
|
ShapePath {
|
||||||
id: path
|
id: path
|
||||||
|
|
||||||
strokeWidth: 4
|
strokeWidth: 1
|
||||||
strokeColor: root.color
|
strokeColor: "transparent"
|
||||||
fillColor: root.color
|
fillColor: root.color
|
||||||
|
|
||||||
startX: -root.radius - pad; startY: 0
|
startX: -root.radius - pad; startY: 0
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ MouseArea {
|
|||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
||||||
item.y = pad
|
item.x = pad
|
||||||
}
|
}
|
||||||
|
|
||||||
width: shape.width
|
width: shape.width
|
||||||
@@ -34,7 +34,18 @@ MouseArea {
|
|||||||
strokeColor: root.color
|
strokeColor: root.color
|
||||||
fillColor: root.color
|
fillColor: root.color
|
||||||
|
|
||||||
startX: -root.radius - pad; startY: 0
|
startX: 0; startY: -root.radius - pad
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: root.radius
|
||||||
|
|
||||||
|
direction: PathArc.Counterclockwise
|
||||||
|
|
||||||
|
relativeX: root.radius
|
||||||
|
relativeY: root.radius
|
||||||
|
}
|
||||||
|
PathLine { x: item.width + 2 * pad - root.radius; relativeY: 0 }
|
||||||
|
|
||||||
PathArc {
|
PathArc {
|
||||||
radiusX: root.radius
|
radiusX: root.radius
|
||||||
@@ -50,13 +61,13 @@ MouseArea {
|
|||||||
radiusX: root.radius
|
radiusX: root.radius
|
||||||
radiusY: root.radius
|
radiusY: root.radius
|
||||||
|
|
||||||
direction: PathArc.Counterclockwise
|
relativeX: -root.radius
|
||||||
|
|
||||||
relativeX: root.radius
|
|
||||||
relativeY: root.radius
|
relativeY: root.radius
|
||||||
}
|
}
|
||||||
|
|
||||||
PathLine { x: item.width + pad - root.radius; relativeY: 0 }
|
PathLine { relativeX: -item.width - 2 * pad + 2 * root.radius; relativeY: 0 }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PathArc {
|
PathArc {
|
||||||
radiusX: root.radius
|
radiusX: root.radius
|
||||||
@@ -64,21 +75,12 @@ MouseArea {
|
|||||||
|
|
||||||
direction: PathArc.Counterclockwise
|
direction: PathArc.Counterclockwise
|
||||||
|
|
||||||
relativeX: root.radius
|
relativeX: -root.radius
|
||||||
relativeY: -root.radius
|
relativeY: root.radius
|
||||||
}
|
}
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: -item.height + 2 * root.radius - 2 * pad }
|
|
||||||
|
|
||||||
PathArc {
|
PathLine { x: 0; y: -root.radius - pad }
|
||||||
radiusX: root.radius
|
|
||||||
radiusY: root.radius
|
|
||||||
|
|
||||||
relativeX: root.radius
|
|
||||||
relativeY: -root.radius
|
|
||||||
}
|
|
||||||
|
|
||||||
PathLine { x: -root.radius - pad; y: 0 }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ MouseArea {
|
|||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
||||||
item.y = pad
|
item.x = pad
|
||||||
}
|
}
|
||||||
|
|
||||||
width: shape.width
|
width: shape.width
|
||||||
@@ -34,29 +34,17 @@ MouseArea {
|
|||||||
strokeColor: root.color
|
strokeColor: root.color
|
||||||
fillColor: root.color
|
fillColor: root.color
|
||||||
|
|
||||||
startX: -root.radius - pad; startY: 0
|
startX: 0; startY: pad
|
||||||
|
|
||||||
PathArc {
|
PathArc {
|
||||||
radiusX: root.radius
|
radiusX: root.radius
|
||||||
radiusY: root.radius
|
radiusY: root.radius
|
||||||
|
|
||||||
relativeX: root.radius
|
relativeX: root.radius
|
||||||
relativeY: root.radius
|
relativeY: -root.radius
|
||||||
}
|
}
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: 2 * pad + item.height - 2 * root.radius }
|
PathLine { x: item.width + 2 * pad - root.radius; relativeY: 0 }
|
||||||
|
|
||||||
PathArc {
|
|
||||||
radiusX: root.radius
|
|
||||||
radiusY: root.radius
|
|
||||||
|
|
||||||
direction: PathArc.Counterclockwise
|
|
||||||
|
|
||||||
relativeX: root.radius
|
|
||||||
relativeY: root.radius
|
|
||||||
}
|
|
||||||
|
|
||||||
PathLine { x: item.width + pad - root.radius; relativeY: 0 }
|
|
||||||
|
|
||||||
PathArc {
|
PathArc {
|
||||||
radiusX: root.radius
|
radiusX: root.radius
|
||||||
@@ -68,17 +56,31 @@ MouseArea {
|
|||||||
relativeY: -root.radius
|
relativeY: -root.radius
|
||||||
}
|
}
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: -item.height + 2 * root.radius - 2 * pad }
|
PathLine { relativeX: 0; relativeY: 2 * pad + item.height + 2 * root.radius }
|
||||||
|
|
||||||
PathArc {
|
PathArc {
|
||||||
radiusX: root.radius
|
radiusX: root.radius
|
||||||
radiusY: root.radius
|
radiusY: root.radius
|
||||||
|
|
||||||
relativeX: root.radius
|
direction: PathArc.Counterclockwise
|
||||||
|
|
||||||
|
relativeX: -root.radius
|
||||||
relativeY: -root.radius
|
relativeY: -root.radius
|
||||||
}
|
}
|
||||||
|
|
||||||
PathLine { x: -root.radius - pad; y: 0 }
|
PathLine { relativeX: -item.width - 2 * pad + 2 * root.radius; relativeY: 0 }
|
||||||
|
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: root.radius
|
||||||
|
|
||||||
|
relativeX: -root.radius
|
||||||
|
relativeY: -root.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
PathLine { x: 0; y: pad }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,65 +17,71 @@ MouseArea {
|
|||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
||||||
item.y = pad
|
item.y = root.y - pad
|
||||||
|
|
||||||
|
//console.log(height)
|
||||||
}
|
}
|
||||||
|
|
||||||
width: shape.width
|
width: shape.width
|
||||||
height: shape.height
|
height: item.height + 2 * pad
|
||||||
|
|
||||||
Shape {
|
Shape {
|
||||||
id: shape
|
id: shape
|
||||||
|
|
||||||
|
y: root.y + root.item.height
|
||||||
|
|
||||||
//anchors.centerIn: parent
|
//anchors.centerIn: parent
|
||||||
ShapePath {
|
ShapePath {
|
||||||
id: path
|
id: path
|
||||||
|
|
||||||
strokeWidth: 4
|
strokeWidth: 1
|
||||||
strokeColor: root.color
|
strokeColor: "transparent"
|
||||||
fillColor: root.color
|
fillColor: root.color
|
||||||
|
|
||||||
startX: -root.radius - pad; startY: 0
|
startX: -root.radius - pad; startY: 0
|
||||||
|
|
||||||
PathArc {
|
PathArc {
|
||||||
radiusX: root.radius
|
radiusX: root.radius
|
||||||
radiusY: root.radius
|
radiusY: -root.radius
|
||||||
|
|
||||||
relativeX: root.radius
|
relativeX: root.radius
|
||||||
relativeY: root.radius
|
relativeY: -root.radius
|
||||||
|
direction: PathArc.Counterclockwise
|
||||||
}
|
}
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: 2 * pad + item.height - 2 * root.radius }
|
PathLine { relativeX: 0; relativeY: -(2 * pad + item.height - 2 * root.radius) }
|
||||||
|
|
||||||
PathArc {
|
PathArc {
|
||||||
radiusX: root.radius
|
radiusX: root.radius
|
||||||
radiusY: root.radius
|
radiusY: -root.radius
|
||||||
|
|
||||||
direction: PathArc.Counterclockwise
|
//direction: PathArc.Counterclockwise
|
||||||
|
|
||||||
relativeX: root.radius
|
relativeX: root.radius
|
||||||
relativeY: root.radius
|
relativeY: -root.radius
|
||||||
}
|
}
|
||||||
|
|
||||||
PathLine { x: item.width + pad - root.radius; relativeY: 0 }
|
PathLine { x: item.width + pad - root.radius; relativeY: 0 }
|
||||||
|
|
||||||
PathArc {
|
PathArc {
|
||||||
radiusX: root.radius
|
radiusX: root.radius
|
||||||
radiusY: root.radius
|
radiusY: -root.radius
|
||||||
|
|
||||||
direction: PathArc.Counterclockwise
|
//direction: PathArc.Counterclockwise
|
||||||
|
|
||||||
relativeX: root.radius
|
relativeX: root.radius
|
||||||
relativeY: -root.radius
|
relativeY: root.radius
|
||||||
}
|
}
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: -item.height + 2 * root.radius - 2 * pad }
|
PathLine { relativeX: 0; relativeY: -(-item.height + 2 * root.radius - 2 * pad) }
|
||||||
|
|
||||||
PathArc {
|
PathArc {
|
||||||
radiusX: root.radius
|
radiusX: root.radius
|
||||||
radiusY: root.radius
|
radiusY: -root.radius
|
||||||
|
|
||||||
relativeX: root.radius
|
relativeX: root.radius
|
||||||
relativeY: -root.radius
|
relativeY: root.radius
|
||||||
|
direction: PathArc.Counterclockwise
|
||||||
}
|
}
|
||||||
|
|
||||||
PathLine { x: -root.radius - pad; y: 0 }
|
PathLine { x: -root.radius - pad; y: 0 }
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
import Quickshell // for PanelWindow
|
||||||
|
import QtQuick // for Text
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Quickshell.Io
|
||||||
|
import Quickshell.Widgets
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import Quickshell.Services.Pipewire
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
//anchors.fill: parent
|
||||||
|
|
||||||
|
required property list<string> hyprcmds
|
||||||
|
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property string dir: "/home/nathan/Pictures/Wallpaper/"
|
||||||
|
|
||||||
|
ScrollBar.horizontal.policy: ScrollBar.AlwaysOn
|
||||||
|
|
||||||
|
Process {
|
||||||
|
id: ls
|
||||||
|
//command: ["find", root.dir + "*"]
|
||||||
|
command: ["ls", dir]
|
||||||
|
running: true
|
||||||
|
stdout: StdioCollector {
|
||||||
|
onStreamFinished: {
|
||||||
|
rep.model = text.split("\n").filter((s) => { return s != ""; })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
id: rep
|
||||||
|
model: 0
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
radius: 10
|
||||||
|
implicitWidth: 192 * 2; implicitHeight: 108 * 2
|
||||||
|
Image {
|
||||||
|
width: 192 * 2; height: 108 * 2
|
||||||
|
source: Qt.resolvedUrl(root.dir + rep.model[index])
|
||||||
|
fillMode: Image.PreserveAspectCrop
|
||||||
|
sourceSize.width: 192 * 2
|
||||||
|
sourceSize.height: 108 * 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
property Process sw: Process {
|
||||||
|
command: ["setWallpaper", root.dir + rep.model[index]]
|
||||||
|
running: false
|
||||||
|
onRunningChanged: {
|
||||||
|
root.hyprcmds.forEach((c) => Hyprland.dispatch(c))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
sw.running = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,13 +19,15 @@ Item {
|
|||||||
Repeater {
|
Repeater {
|
||||||
id: rep
|
id: rep
|
||||||
|
|
||||||
property var ws: {
|
model: Hyprland.workspaces.values.filter((w) => {
|
||||||
let arr = [];
|
if(w != null) {
|
||||||
Hyprland.workspaces.values.forEach((w) => { if(w.id > 0) arr.push(w) })
|
if(w.id > 0) {
|
||||||
return arr;
|
return true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
})
|
||||||
|
|
||||||
model: ws
|
|
||||||
WrapperMouseArea {
|
WrapperMouseArea {
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
@@ -34,7 +36,7 @@ Item {
|
|||||||
implicitWidth: 24
|
implicitWidth: 24
|
||||||
implicitHeight: 24
|
implicitHeight: 24
|
||||||
color: {
|
color: {
|
||||||
Hyprland.focusedWorkspace.id == rep.model[index].id
|
Hyprland?.focusedWorkspace?.id == rep.model[index].id
|
||||||
? Pywal.colors.color13
|
? Pywal.colors.color13
|
||||||
: containsMouse
|
: containsMouse
|
||||||
? Pywal.colors.color12
|
? Pywal.colors.color12
|
||||||
@@ -48,7 +50,7 @@ Item {
|
|||||||
text: rep.model[index].id
|
text: rep.model[index].id
|
||||||
|
|
||||||
color: {
|
color: {
|
||||||
Hyprland.focusedWorkspace.id == rep.model[index].id
|
Hyprland?.focusedWorkspace?.id == rep.model[index].id
|
||||||
? Pywal.colors.color1
|
? Pywal.colors.color1
|
||||||
: Pywal.special.foreground
|
: Pywal.special.foreground
|
||||||
}
|
}
|
||||||
@@ -56,7 +58,9 @@ Item {
|
|||||||
}
|
}
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
rep.model[index].activate()
|
if(Hyprland?.focusedWorkspace?.id != rep.model[index].id) {
|
||||||
|
rep.model[index].activate()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,71 +0,0 @@
|
|||||||
{ self, inputs, ... }: {
|
|
||||||
|
|
||||||
imports = [
|
|
||||||
inputs.home-manager.flakeModules.home-manager
|
|
||||||
];
|
|
||||||
|
|
||||||
flake.homeModules.default = { config, lib, pkgs, ... }: {
|
|
||||||
|
|
||||||
options.programs.aurora = with lib; {
|
|
||||||
enable = mkEnableOption "aurora";
|
|
||||||
|
|
||||||
package = mkPackageOption self.packages.${pkgs.stdenv.hostPlatform.system} "aurora" {
|
|
||||||
default = [ "aurora" ];
|
|
||||||
|
|
||||||
example = "aurora.packages.hybar";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd = {
|
|
||||||
enable = mkEnableOption "aurora systemd unit";
|
|
||||||
|
|
||||||
target = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "hyprland-session.target";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = let
|
|
||||||
cfg = config.programs.aurora;
|
|
||||||
|
|
||||||
system = pkgs.stdenv.hostPlatform.system;
|
|
||||||
in {
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
swww
|
|
||||||
|
|
||||||
bluez
|
|
||||||
bluez-tools
|
|
||||||
|
|
||||||
wl-clipboard
|
|
||||||
|
|
||||||
brightnessctl
|
|
||||||
|
|
||||||
hyprpicker
|
|
||||||
|
|
||||||
hyprsunset
|
|
||||||
|
|
||||||
wf-recorder
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.quickshell = {
|
|
||||||
enable = cfg.enable;
|
|
||||||
|
|
||||||
package = cfg.package;
|
|
||||||
|
|
||||||
activeConfig = "aurora";
|
|
||||||
|
|
||||||
configs = {
|
|
||||||
default = "${self.packages.${system}.aurora-dots}/share";
|
|
||||||
aurora = "${self.packages.${system}.aurora-dots}/share";
|
|
||||||
hybar = "${self.packages.${system}.hybar-dots}/share";
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd = {
|
|
||||||
enable = cfg.systemd.enable;
|
|
||||||
target = cfg.systemd.target;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
{ self, ... }: {
|
|
||||||
|
|
||||||
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
|
||||||
|
|
||||||
options.services.aurora-greeter = with lib; {
|
|
||||||
enable = mkEnableOption "aurora-greeter";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = let
|
|
||||||
cfg = config.services.aurora-greeter;
|
|
||||||
|
|
||||||
system = pkgs.stdenv.hostPlatform.system;
|
|
||||||
|
|
||||||
greeter-conf = pkgs.writeText "greeter.conf" ''
|
|
||||||
exec-once=${self.packages.${system}.aurora-greeter}/bin/aurora-greeter
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
|
|
||||||
services = {
|
|
||||||
upower.enable = true;
|
|
||||||
gvfs.enable = true;
|
|
||||||
power-profiles-daemon.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
self.packages.${system}.aurora-greeter
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.etc."pam.d/aurora-lock.conf".text = ''
|
|
||||||
auth required pam_unix.so
|
|
||||||
'';
|
|
||||||
|
|
||||||
services.greetd = {
|
|
||||||
enable = cfg.enable;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
|
|
||||||
terminal.vt = 5;
|
|
||||||
|
|
||||||
default_session = {
|
|
||||||
command = "Hyprland -c ${greeter-conf}/greeter.conf";
|
|
||||||
#user = "greeter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user