Compare commits
5 Commits
76a5bf5917
...
1f42ca1eae
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f42ca1eae | |||
| e7de1ccb63 | |||
| 18403d3ddf | |||
| be1318c3cb | |||
| f4b032e96f |
@@ -26,9 +26,64 @@
|
||||
};
|
||||
|
||||
aurora-greeter-hypr-conf = pkgs.writeText "greeter-conf" ''
|
||||
exec-once=${self.packages.${system}.aurora-greeter}/bin/aurora-greeter
|
||||
exec-once=${self'.packages.aurora-set-wallpaper}/bin/aurora-set-wallpaper; ${self'.packages.aurora-greeter}/bin/aurora-greeter; hyprctl dispatch exit
|
||||
exec-shutdown = rm ~/.config/wal/colorschemes/dark/wallpaper*
|
||||
'';
|
||||
|
||||
|
||||
aurora-change-colors = (pkgs.writeShellScriptBin "aurora-change-colors" ''
|
||||
|
||||
img=''$(realpath "''$1")
|
||||
alpha=''${2:-80}
|
||||
|
||||
if [[ ''$alpha -lt 0 ]]; then
|
||||
alpha=0
|
||||
elif [[ ''$alpha -gt 100 ]]; then
|
||||
alpha=100
|
||||
fi
|
||||
|
||||
if [[ -f ~/.config/wal/colorschemes/dark/''$(basename "''$img")-''$alpha.json ]]; then
|
||||
${pkgs.pywal16}/bin/wal -n -f "''$(basename "''$img")-''$alpha"
|
||||
else
|
||||
${pkgs.pywal16}/bin/wal -n -i "''$img" -a "''$alpha" --cols16 -p "''$(basename "''$img")-''$alpha"
|
||||
fi
|
||||
'');
|
||||
|
||||
aurora-set-wallpaper = (pkgs.writeShellScriptBin "aurora-set-wallpaper" ''
|
||||
|
||||
if [[ ! -d /tmp/aurora/wallpaper ]]; then
|
||||
mkdir -p /tmp/aurora/wallpaper
|
||||
fi
|
||||
|
||||
src=''$(realpath "''${1:-$(find /tmp/aurora/wallpaper/*)}")
|
||||
n=''$(basename "''$src")
|
||||
ext="''${n''\#''\#*.}"
|
||||
out=''${3:-/dev/null}
|
||||
|
||||
if [[ ! -z $1 ]]; then
|
||||
rm -rf /tmp/aurora/wallpaper/*
|
||||
cp ''$src /tmp/aurora/wallpaper/wallpaper.$ext
|
||||
chmod 666 /tmp/aurora/wallpaper/wallpaper.$ext
|
||||
fi
|
||||
|
||||
img="/tmp/aurora/wallpaper/wallpaper.$ext"
|
||||
|
||||
if [[ ''$ext == "gif" || ''$ext == "mp4" ]]; then
|
||||
yes | ${pkgs.ffmpeg}/bin/ffmpeg -i "''$img" -vframes 1 /tmp/aurora/tmp.jpg >> ''$out
|
||||
pidof mpvpaper >> $out && pkill mpvpaper
|
||||
${pkgs.swww}/bin/swww img /tmp/aurora/tmp.jpg -t wipe >> ''$out
|
||||
sleep 0.6
|
||||
hyprctl dispatch exec "${pkgs.mpvpaper}/bin/mpvpaper ALL ''$img -o loop" >> ''$out
|
||||
else
|
||||
yes | ${pkgs.ffmpeg}/bin/ffmpeg -i "''$img" /tmp/aurora/tmp.jpg >> ''$out
|
||||
pidof mpvpaper >> $out && pkill mpvpaper
|
||||
hyprctl dispatch exec "${pkgs.swww}/bin/swww img ''$img -t wipe" >> ''$out
|
||||
fi
|
||||
|
||||
${self'.packages.aurora-change-colors}/bin/aurora-change-colors "''$src" "''$2" >> ''$out
|
||||
'');
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
@@ -44,9 +99,27 @@
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
in {
|
||||
|
||||
environment.systemPackages = [
|
||||
self.packages.${system}.aurora-greeter
|
||||
];
|
||||
users.users.aurora = {
|
||||
|
||||
createHome = true;
|
||||
|
||||
home = "/tmp/aurora/home";
|
||||
|
||||
packages = with pkgs; [
|
||||
self.packages.${system}.aurora-greeter
|
||||
self.packages.${system}.aurora-set-wallpaper
|
||||
|
||||
swww
|
||||
mpvpaper
|
||||
ffmpeg
|
||||
];
|
||||
|
||||
isNormalUser = true;
|
||||
|
||||
group = "aurora";
|
||||
};
|
||||
|
||||
users.groups.aurora = {};
|
||||
|
||||
services.greetd = {
|
||||
enable = cfg.enable;
|
||||
@@ -54,8 +127,8 @@
|
||||
settings = {
|
||||
|
||||
default_session = {
|
||||
command = "Hyprland -c ${self.packages.${system}.aurora-greeter-hypr-conf}";
|
||||
#user = "greeter";
|
||||
command = "start-hyprland -- -c ${self.packages.${system}.aurora-greeter-hypr-conf}";
|
||||
user = "aurora";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -14,34 +14,40 @@ ClippingWrapperRectangle {
|
||||
anchors.fill: parent
|
||||
radius: 10
|
||||
|
||||
color: Pywal.special.background
|
||||
color: "black"
|
||||
//color: Settings.special.background
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
id: error
|
||||
text: ""
|
||||
color: Pywal.colors.color13
|
||||
color: "red"
|
||||
//color: Settings.colors.color13
|
||||
visible: false
|
||||
}
|
||||
Text {
|
||||
text: "User"
|
||||
color: Pywal.special.foreground
|
||||
color: "white"
|
||||
//color: Settings.special.foreground
|
||||
}
|
||||
TextInput {
|
||||
id: username
|
||||
text: "guest"
|
||||
color: Pywal.special.foreground
|
||||
color: "white"
|
||||
//color: Settings.special.foreground
|
||||
}
|
||||
Text {
|
||||
text: "Password"
|
||||
color: Pywal.special.foreground
|
||||
color: "white"
|
||||
//color: Settings.special.foreground
|
||||
}
|
||||
TextInput {
|
||||
id: password
|
||||
text: "test"
|
||||
echoMode: TextInput.Password
|
||||
color: Pywal.special.foreground
|
||||
color: "white"
|
||||
//color: Settings.special.foreground
|
||||
}
|
||||
|
||||
Button {
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
Singleton {
|
||||
|
||||
property string wallpaper: json.wallpaper
|
||||
|
||||
property string alpha: Math.round(parseInt(json.alpha, 10) * 0xFF / 100).toString(16)
|
||||
|
||||
property JsonObject special: json.special
|
||||
property JsonObject colors: json.colors
|
||||
|
||||
function argb(c) {
|
||||
return c.slice(0, 1) + Pywal.alpha + c.slice(1)
|
||||
}
|
||||
|
||||
FileView {
|
||||
|
||||
path: "/home/nathan/.cache/wal/colors.json"
|
||||
|
||||
watchChanges: true
|
||||
|
||||
onFileChanged: reload()
|
||||
|
||||
JsonAdapter {
|
||||
id: json
|
||||
property string wallpaper: "/home/nathan/Pictures/Wallpaper/bluescape.jpg"
|
||||
|
||||
property string alpha: "100"
|
||||
|
||||
property JsonObject special: JsonObject {
|
||||
property string background: "transparent"
|
||||
property string foreground: "transparent"
|
||||
property string cursor: "transparent"
|
||||
}
|
||||
|
||||
property JsonObject colors: JsonObject {
|
||||
property string color0: "transparent"
|
||||
property string color1: "transparent"
|
||||
property string color2: "transparent"
|
||||
property string color3: "transparent"
|
||||
|
||||
property string color4: "transparent"
|
||||
property string color5: "transparent"
|
||||
property string color6: "transparent"
|
||||
property string color7: "transparent"
|
||||
|
||||
property string color8: "transparent"
|
||||
property string color9: "transparent"
|
||||
property string color10: "transparent"
|
||||
property string color11: "transparent"
|
||||
|
||||
property string color12: "transparent"
|
||||
property string color13: "transparent"
|
||||
property string color14: "transparent"
|
||||
property string color15: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
109
config/aurora-greeter/modules/Settings.qml
Normal file
109
config/aurora-greeter/modules/Settings.qml
Normal file
@@ -0,0 +1,109 @@
|
||||
pragma Singleton
|
||||
|
||||
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
|
||||
|
||||
|
||||
Singleton {
|
||||
|
||||
property bool launcherOpen: false
|
||||
|
||||
property string colorsDir: s_json.colorsDir
|
||||
|
||||
property string wallpaperDir: s_json.wallpaperDir
|
||||
|
||||
property string settingsDir: "/home/" + Quickshell.env("USER") + "/.config/aurora"
|
||||
onSettingsDirChanged: reload()
|
||||
|
||||
function reload() {
|
||||
settings.reload()
|
||||
root.wallpaperDir = Qt.binding(() => s_json.wallpaperDir)
|
||||
root.colorsDir = Qt.binding(() => s_json.colorsDir)
|
||||
root.wallpaper = Qt.binding(() => c_json.wallpaper)
|
||||
root.colors = Qt.binding(() => c_json.colors)
|
||||
}
|
||||
|
||||
id: root
|
||||
|
||||
FileView {
|
||||
|
||||
id: settings
|
||||
|
||||
path: root.settingsDir + "/settings.json"
|
||||
|
||||
watchChanges: true
|
||||
|
||||
onFileChanged: reload()
|
||||
|
||||
JsonAdapter {
|
||||
id: s_json
|
||||
property string wallpaperDir
|
||||
|
||||
property string colorsDir
|
||||
}
|
||||
}
|
||||
|
||||
property string wallpaper: c_json.wallpaper
|
||||
|
||||
property string alpha: Math.round(parseInt(c_json.alpha, 10) * 0xFF / 100).toString(16)
|
||||
|
||||
property JsonObject special: c_json.special
|
||||
property JsonObject colors: c_json.colors
|
||||
|
||||
function argb(c) {
|
||||
return c.slice(0, 1) + Settings.alpha + c.slice(1)
|
||||
}
|
||||
|
||||
FileView {
|
||||
|
||||
id: pywal
|
||||
|
||||
path: root.colorsDir
|
||||
|
||||
watchChanges: true
|
||||
|
||||
onFileChanged: reload()
|
||||
|
||||
JsonAdapter {
|
||||
id: c_json
|
||||
property string wallpaper
|
||||
|
||||
property string alpha: "100"
|
||||
|
||||
property JsonObject special: JsonObject {
|
||||
property string background: "transparent"
|
||||
property string foreground: "transparent"
|
||||
property string cursor: "transparent"
|
||||
}
|
||||
|
||||
property JsonObject colors: JsonObject {
|
||||
property string color0: "transparent"
|
||||
property string color1: "transparent"
|
||||
property string color2: "transparent"
|
||||
property string color3: "transparent"
|
||||
|
||||
property string color4: "transparent"
|
||||
property string color5: "transparent"
|
||||
property string color6: "transparent"
|
||||
property string color7: "transparent"
|
||||
|
||||
property string color8: "transparent"
|
||||
property string color9: "transparent"
|
||||
property string color10: "transparent"
|
||||
property string color11: "transparent"
|
||||
|
||||
property string color12: "transparent"
|
||||
property string color13: "transparent"
|
||||
property string color14: "transparent"
|
||||
property string color15: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,8 @@ PanelWindow {
|
||||
root.hyprcmds.forEach((c) => { Hyprland.dispatch(c) })
|
||||
}
|
||||
})
|
||||
|
||||
Settings.reload()
|
||||
}
|
||||
|
||||
property int topEx: topRect.reserve
|
||||
@@ -54,14 +56,13 @@ PanelWindow {
|
||||
property int leftEx: leftRect.reserve
|
||||
property int rightEx: rightRect.reserve
|
||||
|
||||
property color bg: (Pywal.special.background)
|
||||
property color bg: (Settings.special.background)
|
||||
|
||||
id: root
|
||||
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
|
||||
//color: Pywal.special.background
|
||||
color: "transparent"
|
||||
|
||||
mask: Region {
|
||||
@@ -121,7 +122,7 @@ PanelWindow {
|
||||
strokeWidth: 1
|
||||
|
||||
strokeColor: "transparent"
|
||||
fillColor: Pywal.argb(Pywal.special.background)
|
||||
fillColor: root.bg
|
||||
startX: 0; startY: 0
|
||||
|
||||
PathLine { relativeX: 0; relativeY: radius }
|
||||
@@ -143,7 +144,7 @@ PanelWindow {
|
||||
strokeWidth: 1
|
||||
|
||||
strokeColor: "transparent"
|
||||
fillColor: Pywal.argb(Pywal.special.background)
|
||||
fillColor: root.bg
|
||||
|
||||
startX: 0; startY: 0
|
||||
|
||||
@@ -167,7 +168,7 @@ PanelWindow {
|
||||
strokeWidth: 1
|
||||
|
||||
strokeColor: "transparent"
|
||||
fillColor: Pywal.argb(Pywal.special.background)
|
||||
fillColor: root.bg
|
||||
|
||||
startX: 0; startY: 0
|
||||
|
||||
@@ -190,7 +191,7 @@ PanelWindow {
|
||||
ShapePath {
|
||||
strokeWidth: 1
|
||||
strokeColor: "transparent"
|
||||
fillColor: Pywal.argb(Pywal.special.background)
|
||||
fillColor: root.bg
|
||||
|
||||
startX: 0; startY: 0
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ ColumnLayout {
|
||||
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
midFO.visible = true
|
||||
Settings.launcherOpen = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ ClippingWrapperRectangle {
|
||||
|
||||
radius: 3
|
||||
|
||||
color: Pywal.colors.color2
|
||||
color: Settings.colors.color2
|
||||
|
||||
implicitWidth: 30
|
||||
|
||||
@@ -28,7 +28,7 @@ ClippingWrapperRectangle {
|
||||
|
||||
font.pointSize: 14
|
||||
|
||||
color: Pywal.special.foreground
|
||||
color: Settings.special.foreground
|
||||
rotation: -90
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ ColumnLayout {
|
||||
implicitHeight: 30
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
Layout.margins: 5
|
||||
color: Pywal.colors.color11
|
||||
color: Settings.colors.color11
|
||||
|
||||
RowLayout {
|
||||
Text {
|
||||
text: 'Bluetooth'
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
Layout.margins: 5
|
||||
color: Pywal.colors.color0
|
||||
color: Settings.colors.color0
|
||||
}
|
||||
|
||||
Switch {
|
||||
@@ -63,7 +63,7 @@ ColumnLayout {
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 5
|
||||
color: Pywal.colors.color4
|
||||
color: Settings.colors.color4
|
||||
|
||||
implicitWidth: root.width - 3 * scroll.x
|
||||
implicitHeight: 40
|
||||
@@ -77,7 +77,7 @@ ColumnLayout {
|
||||
Layout.margins: 5
|
||||
|
||||
text: rep.model[index].name
|
||||
color: Pywal.colors.color0
|
||||
color: Settings.colors.color0
|
||||
}
|
||||
|
||||
Button {
|
||||
|
||||
@@ -10,7 +10,7 @@ WrapperMouseArea {
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
id: rect
|
||||
color: Pywal.colors.color12
|
||||
color: Settings.colors.color12
|
||||
radius: 3
|
||||
anchors.fill: parent
|
||||
Text {
|
||||
@@ -19,7 +19,7 @@ WrapperMouseArea {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: Qt.formatDateTime(clock.date, "dddd HH:mm:ss MM/dd/yyyy")
|
||||
font.pointSize: 11
|
||||
color: Pywal.special.background
|
||||
color: Settings.special.background
|
||||
|
||||
SystemClock {
|
||||
id: clock
|
||||
|
||||
@@ -41,7 +41,7 @@ Item {
|
||||
|
||||
visible: root.visible
|
||||
|
||||
color: Pywal.special.background
|
||||
color: Settings.special.background
|
||||
radius: root.radius
|
||||
|
||||
item: main
|
||||
@@ -49,7 +49,7 @@ Item {
|
||||
WrapperMouseArea {
|
||||
ClippingRectangle {
|
||||
//anchors.fill: parent
|
||||
color: Pywal.special.background
|
||||
color: Settings.special.background
|
||||
id: main
|
||||
|
||||
radius: root.radius
|
||||
@@ -80,7 +80,7 @@ Item {
|
||||
implicitWidth: 40
|
||||
implicitHeight: 40
|
||||
radius: root.radius
|
||||
color: index == selected ? Pywal.colors.color13 : Pywal.colors.color4
|
||||
color: index == selected ? Settings.colors.color13 : Settings.colors.color4
|
||||
//LauncherButton { anchors.centerIn: parent }
|
||||
Text {
|
||||
font.pointSize: 14
|
||||
@@ -107,14 +107,14 @@ Item {
|
||||
return "";
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
color: Pywal.colors.color0
|
||||
color: Settings.colors.color0
|
||||
}
|
||||
}
|
||||
onEntered: child.color = Qt.binding(() => index == selected ? Pywal.colors.color13 : Pywal.colors.color12)
|
||||
onExited: child.color = Qt.binding(() => index == selected ? Pywal.colors.color13 : Pywal.colors.color4)
|
||||
onEntered: child.color = Qt.binding(() => index == selected ? Settings.colors.color13 : Settings.colors.color12)
|
||||
onExited: child.color = Qt.binding(() => index == selected ? Settings.colors.color13 : Settings.colors.color4)
|
||||
onClicked: {
|
||||
selected = index
|
||||
child.color = Qt.binding(() => index == selected ? Pywal.colors.color13 : Pywal.colors.color4)
|
||||
child.color = Qt.binding(() => index == selected ? Settings.colors.color13 : Settings.colors.color4)
|
||||
}
|
||||
hoverEnabled: true
|
||||
}
|
||||
@@ -126,7 +126,7 @@ Item {
|
||||
implicitWidth: parent.width - tabs.width - 2 * parent.spacing - rTabs.width - 2 * parent.spacing
|
||||
implicitHeight: parent.height
|
||||
radius: root.radius
|
||||
color: Pywal.colors.color1
|
||||
color: Settings.colors.color1
|
||||
|
||||
NotificationServer {
|
||||
id: nserver
|
||||
@@ -205,7 +205,7 @@ Item {
|
||||
implicitHeight: 40
|
||||
radius: root.radius
|
||||
property bool use: false
|
||||
color: use ? Pywal.colors.color13 : Pywal.colors.color4
|
||||
color: use ? Settings.colors.color13 : Settings.colors.color4
|
||||
//LauncherButton { anchors.centerIn: parent }
|
||||
Text {
|
||||
font.pointSize: 14
|
||||
@@ -232,11 +232,11 @@ Item {
|
||||
return "";
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
color: Pywal.colors.color0
|
||||
color: Settings.colors.color0
|
||||
}
|
||||
}
|
||||
onEntered: child.color = Qt.binding(() => child.use ? Pywal.colors.color13 : Pywal.colors.color12)
|
||||
onExited: child.color = Qt.binding(() => child.use ? Pywal.colors.color13 : Pywal.colors.color4)
|
||||
onEntered: child.color = Qt.binding(() => child.use ? Settings.colors.color13 : Settings.colors.color12)
|
||||
onExited: child.color = Qt.binding(() => child.use ? Settings.colors.color13 : Settings.colors.color4)
|
||||
onClicked: {
|
||||
child.use = !child.use
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ ClippingWrapperRectangle {
|
||||
id: root
|
||||
|
||||
radius: 3
|
||||
color: Pywal.colors.color1
|
||||
color: Settings.colors.color1
|
||||
implicitWidth: 30; height: 30
|
||||
Button {
|
||||
id: button
|
||||
@@ -19,7 +19,7 @@ ClippingWrapperRectangle {
|
||||
|
||||
background: Rectangle {
|
||||
|
||||
color: Pywal.colors.color9
|
||||
color: Settings.colors.color9
|
||||
}
|
||||
|
||||
Process {
|
||||
|
||||
@@ -14,11 +14,11 @@ VFlyoutUp {
|
||||
|
||||
required property list<string> hyprcmds
|
||||
|
||||
visible: false
|
||||
visible: Settings.launcherOpen
|
||||
|
||||
item: content
|
||||
|
||||
onExited: visible = false
|
||||
onExited: Settings.launcherOpen = false
|
||||
|
||||
ClippingRectangle {
|
||||
id: content
|
||||
@@ -26,7 +26,7 @@ VFlyoutUp {
|
||||
implicitWidth: 700
|
||||
implicitHeight: wallpaper.height
|
||||
|
||||
color: Pywal.colors.color1
|
||||
color: Settings.colors.color1
|
||||
|
||||
Wallpaper {
|
||||
id: wallpaper
|
||||
|
||||
@@ -5,6 +5,7 @@ import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
|
||||
WrapperMouseArea {
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
radius: 3
|
||||
implicitWidth: 30; implicitHeight: 30
|
||||
@@ -15,22 +16,16 @@ WrapperMouseArea {
|
||||
text: " "
|
||||
font.pointSize: 16
|
||||
|
||||
color: Pywal.special.foreground
|
||||
color: Settings.special.foreground
|
||||
}
|
||||
color: {
|
||||
containsMouse
|
||||
? Pywal.colors.color12
|
||||
: Pywal.colors.color1
|
||||
? Settings.colors.color12
|
||||
: Settings.colors.color1
|
||||
}
|
||||
}
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
Process {
|
||||
id: launcher
|
||||
running: false
|
||||
command: ["rofi", "-show", "drun", "-show-icons" ]
|
||||
}
|
||||
|
||||
onClicked: launcher.running = true
|
||||
onClicked: Settings.launcherOpen = true
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ Item {
|
||||
|
||||
required property string bg_path
|
||||
|
||||
property color fieldColor: ctx.failed ? Pywal.colors.color6 : Pywal.colors.color1
|
||||
property color fieldColor: ctx.failed ? Settings.colors.color6 : Settings.colors.color1
|
||||
|
||||
IpcHandler {
|
||||
target: "lockscreen"
|
||||
@@ -66,7 +66,7 @@ Item {
|
||||
anchors.centerIn: parent
|
||||
radius: 10
|
||||
|
||||
color: Pywal.special.background
|
||||
color: Settings.special.background
|
||||
|
||||
RowLayout {
|
||||
ClippingWrapperRectangle {
|
||||
@@ -85,7 +85,7 @@ Item {
|
||||
verticalAlignment: TextInput.AlignVCenter
|
||||
|
||||
font.pointSize: 30
|
||||
color: Pywal.special.foreground
|
||||
color: Settings.special.foreground
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ ClippingWrapperRectangle {
|
||||
implicitWidth: parent.width - 2 * Layout.margins
|
||||
implicitHeight: 100
|
||||
|
||||
color: Pywal.colors.color4
|
||||
color: Settings.colors.color4
|
||||
|
||||
required property Notification src
|
||||
|
||||
@@ -43,14 +43,14 @@ ClippingWrapperRectangle {
|
||||
Layout.topMargin: 10
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
Text {
|
||||
color: Pywal.special.background
|
||||
color: Settings.special.background
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||
text: notif.src.summary
|
||||
Layout.leftMargin: 10
|
||||
font.pointSize: 14
|
||||
}
|
||||
Text {
|
||||
color: Pywal.special.background
|
||||
color: Settings.special.background
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
text: notif.src.body
|
||||
Layout.leftMargin: 10
|
||||
|
||||
@@ -18,7 +18,7 @@ ColumnLayout {
|
||||
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
color: Pywal.colors.color11
|
||||
color: Settings.colors.color11
|
||||
radius: 5
|
||||
Layout.margins: 5
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
||||
@@ -27,7 +27,7 @@ ColumnLayout {
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Text {
|
||||
color: Pywal.colors.color0
|
||||
color: Settings.colors.color0
|
||||
Layout.margins: 5
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
text: 'Notifications'
|
||||
|
||||
@@ -79,22 +79,22 @@ PanelWindow {
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
color: Pywal.special.foreground
|
||||
color: Settings.special.foreground
|
||||
}
|
||||
|
||||
implicitHeight: 60
|
||||
implicitWidth: 60
|
||||
color: parent.contansMouse ? Pywal.colors.color12 : Pywal.colors.color4
|
||||
color: parent.contansMouse ? Settings.colors.color12 : Settings.colors.color4
|
||||
}
|
||||
|
||||
hoverEnabled: true
|
||||
|
||||
onEntered: {
|
||||
child.color = Pywal.colors.color12
|
||||
child.color = Settings.colors.color12
|
||||
}
|
||||
|
||||
onExited: {
|
||||
child.color = Pywal.colors.color4
|
||||
child.color = Settings.colors.color4
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
|
||||
@@ -21,7 +21,7 @@ ColumnLayout {
|
||||
onClicked: PowerProfiles.profile = PowerProfile.Performance
|
||||
visible: PowerProfiles.hasPerformanceProfile
|
||||
|
||||
background: Rectangle { color: PowerProfiles.profile == PowerProfile.Performance ? Pywal.colors.color13 : Pywal.colors.color4 }
|
||||
background: Rectangle { color: PowerProfiles.profile == PowerProfile.Performance ? Settings.colors.color13 : Settings.colors.color4 }
|
||||
}
|
||||
Button {
|
||||
Layout.topMargin: 5
|
||||
@@ -31,7 +31,7 @@ ColumnLayout {
|
||||
|
||||
text: 'balanced'
|
||||
onClicked: PowerProfiles.profile = PowerProfile.Balanced
|
||||
background: Rectangle { color: PowerProfiles.profile == PowerProfile.Balanced ? Pywal.colors.color13 : Pywal.colors.color4 }
|
||||
background: Rectangle { color: PowerProfiles.profile == PowerProfile.Balanced ? Settings.colors.color13 : Settings.colors.color4 }
|
||||
}
|
||||
Button {
|
||||
Layout.topMargin: 5
|
||||
@@ -41,6 +41,6 @@ ColumnLayout {
|
||||
|
||||
text: 'power saver'
|
||||
onClicked: PowerProfiles.profile = PowerProfile.PowerSaver
|
||||
background: Rectangle { color: PowerProfiles.profile == PowerProfile.PowerSaver ? Pywal.colors.color13 : Pywal.colors.color4 }
|
||||
background: Rectangle { color: PowerProfiles.profile == PowerProfile.PowerSaver ? Settings.colors.color13 : Settings.colors.color4 }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
Singleton {
|
||||
|
||||
property string wallpaper: json.wallpaper
|
||||
|
||||
property string alpha: Math.round(parseInt(json.alpha, 10) * 0xFF / 100).toString(16)
|
||||
|
||||
property JsonObject special: json.special
|
||||
property JsonObject colors: json.colors
|
||||
|
||||
function argb(c) {
|
||||
return c.slice(0, 1) + Pywal.alpha + c.slice(1)
|
||||
}
|
||||
|
||||
FileView {
|
||||
|
||||
path: "/home/nathan/.cache/wal/colors.json"
|
||||
|
||||
watchChanges: true
|
||||
|
||||
onFileChanged: reload()
|
||||
|
||||
JsonAdapter {
|
||||
id: json
|
||||
property string wallpaper: "/home/nathan/Pictures/Wallpaper/bluescape.jpg"
|
||||
|
||||
property string alpha: "100"
|
||||
|
||||
property JsonObject special: JsonObject {
|
||||
property string background: "transparent"
|
||||
property string foreground: "transparent"
|
||||
property string cursor: "transparent"
|
||||
}
|
||||
|
||||
property JsonObject colors: JsonObject {
|
||||
property string color0: "transparent"
|
||||
property string color1: "transparent"
|
||||
property string color2: "transparent"
|
||||
property string color3: "transparent"
|
||||
|
||||
property string color4: "transparent"
|
||||
property string color5: "transparent"
|
||||
property string color6: "transparent"
|
||||
property string color7: "transparent"
|
||||
|
||||
property string color8: "transparent"
|
||||
property string color9: "transparent"
|
||||
property string color10: "transparent"
|
||||
property string color11: "transparent"
|
||||
|
||||
property string color12: "transparent"
|
||||
property string color13: "transparent"
|
||||
property string color14: "transparent"
|
||||
property string color15: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
109
config/aurora/modules/Settings.qml
Normal file
109
config/aurora/modules/Settings.qml
Normal file
@@ -0,0 +1,109 @@
|
||||
pragma Singleton
|
||||
|
||||
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
|
||||
|
||||
|
||||
Singleton {
|
||||
|
||||
property bool launcherOpen: false
|
||||
|
||||
property string colorsDir: s_json.colorsDir
|
||||
|
||||
property string wallpaperDir: s_json.wallpaperDir
|
||||
|
||||
property string settingsDir: "/home/" + Quickshell.env("USER") + "/.config/aurora"
|
||||
onSettingsDirChanged: reload()
|
||||
|
||||
function reload() {
|
||||
settings.reload()
|
||||
root.wallpaperDir = Qt.binding(() => s_json.wallpaperDir)
|
||||
root.colorsDir = Qt.binding(() => s_json.colorsDir)
|
||||
root.wallpaper = Qt.binding(() => c_json.wallpaper)
|
||||
root.colors = Qt.binding(() => c_json.colors)
|
||||
}
|
||||
|
||||
id: root
|
||||
|
||||
FileView {
|
||||
|
||||
id: settings
|
||||
|
||||
path: root.settingsDir + "/settings.json"
|
||||
|
||||
watchChanges: true
|
||||
|
||||
onFileChanged: reload()
|
||||
|
||||
JsonAdapter {
|
||||
id: s_json
|
||||
property string wallpaperDir
|
||||
|
||||
property string colorsDir
|
||||
}
|
||||
}
|
||||
|
||||
property string wallpaper: c_json.wallpaper
|
||||
|
||||
property string alpha: Math.round(parseInt(c_json.alpha, 10) * 0xFF / 100).toString(16)
|
||||
|
||||
property JsonObject special: c_json.special
|
||||
property JsonObject colors: c_json.colors
|
||||
|
||||
function argb(c) {
|
||||
return c.slice(0, 1) + Settings.alpha + c.slice(1)
|
||||
}
|
||||
|
||||
FileView {
|
||||
|
||||
id: pywal
|
||||
|
||||
path: root.colorsDir
|
||||
|
||||
watchChanges: true
|
||||
|
||||
onFileChanged: reload()
|
||||
|
||||
JsonAdapter {
|
||||
id: c_json
|
||||
property string wallpaper
|
||||
|
||||
property string alpha: "100"
|
||||
|
||||
property JsonObject special: JsonObject {
|
||||
property string background: "transparent"
|
||||
property string foreground: "transparent"
|
||||
property string cursor: "transparent"
|
||||
}
|
||||
|
||||
property JsonObject colors: JsonObject {
|
||||
property string color0: "transparent"
|
||||
property string color1: "transparent"
|
||||
property string color2: "transparent"
|
||||
property string color3: "transparent"
|
||||
|
||||
property string color4: "transparent"
|
||||
property string color5: "transparent"
|
||||
property string color6: "transparent"
|
||||
property string color7: "transparent"
|
||||
|
||||
property string color8: "transparent"
|
||||
property string color9: "transparent"
|
||||
property string color10: "transparent"
|
||||
property string color11: "transparent"
|
||||
|
||||
property string color12: "transparent"
|
||||
property string color13: "transparent"
|
||||
property string color14: "transparent"
|
||||
property string color15: "transparent"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,12 +19,12 @@ FloatingWindow {
|
||||
|
||||
visible: false
|
||||
|
||||
color: Pywal.special.background
|
||||
color: Settings.special.background
|
||||
|
||||
WrapperMouseArea {
|
||||
ClippingRectangle {
|
||||
//anchors.fill: parent
|
||||
color: Pywal.special.background
|
||||
color: Settings.special.background
|
||||
id: main
|
||||
|
||||
radius: root.radius
|
||||
@@ -55,7 +55,7 @@ FloatingWindow {
|
||||
implicitWidth: 40
|
||||
implicitHeight: 40
|
||||
radius: root.radius
|
||||
color: index == selected ? Pywal.colors.color13 : Pywal.colors.color4
|
||||
color: index == selected ? Settings.colors.color13 : Settings.colors.color4
|
||||
//LauncherButton { anchors.centerIn: parent }
|
||||
Text {
|
||||
font.pointSize: 14
|
||||
@@ -82,14 +82,14 @@ FloatingWindow {
|
||||
return "";
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
color: Pywal.colors.color0
|
||||
color: Settings.colors.color0
|
||||
}
|
||||
}
|
||||
onEntered: child.color = Qt.binding(() => index == selected ? Pywal.colors.color13 : Pywal.colors.color12)
|
||||
onExited: child.color = Qt.binding(() => index == selected ? Pywal.colors.color13 : Pywal.colors.color4)
|
||||
onEntered: child.color = Qt.binding(() => index == selected ? Settings.colors.color13 : Settings.colors.color12)
|
||||
onExited: child.color = Qt.binding(() => index == selected ? Settings.colors.color13 : Settings.colors.color4)
|
||||
onClicked: {
|
||||
selected = index
|
||||
child.color = Qt.binding(() => index == selected ? Pywal.colors.color13 : Pywal.colors.color4)
|
||||
child.color = Qt.binding(() => index == selected ? Settings.colors.color13 : Settings.colors.color4)
|
||||
}
|
||||
hoverEnabled: true
|
||||
}
|
||||
@@ -101,7 +101,7 @@ FloatingWindow {
|
||||
implicitWidth: parent.width - tabs.width - 2 * parent.spacing - rTabs.width - 2 * parent.spacing
|
||||
implicitHeight: parent.height
|
||||
radius: root.radius
|
||||
color: Pywal.colors.color1
|
||||
color: Settings.colors.color1
|
||||
|
||||
Loader {
|
||||
anchors.fill: parent
|
||||
@@ -159,7 +159,7 @@ FloatingWindow {
|
||||
implicitHeight: 40
|
||||
radius: root.radius
|
||||
property bool use: false
|
||||
color: use ? Pywal.colors.color13 : Pywal.colors.color4
|
||||
color: use ? Settings.colors.color13 : Settings.colors.color4
|
||||
//LauncherButton { anchors.centerIn: parent }
|
||||
Text {
|
||||
font.pointSize: 14
|
||||
@@ -186,11 +186,11 @@ FloatingWindow {
|
||||
return "";
|
||||
}
|
||||
anchors.centerIn: parent
|
||||
color: Pywal.colors.color0
|
||||
color: Settings.colors.color0
|
||||
}
|
||||
}
|
||||
onEntered: child.color = Qt.binding(() => child.use ? Pywal.colors.color13 : Pywal.colors.color12)
|
||||
onExited: child.color = Qt.binding(() => child.use ? Pywal.colors.color13 : Pywal.colors.color4)
|
||||
onEntered: child.color = Qt.binding(() => child.use ? Settings.colors.color13 : Settings.colors.color12)
|
||||
onExited: child.color = Qt.binding(() => child.use ? Settings.colors.color13 : Settings.colors.color4)
|
||||
onClicked: {
|
||||
child.use = !child.use
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ Item {
|
||||
ClippingWrapperRectangle {
|
||||
radius: 3
|
||||
anchors.fill: parent
|
||||
color: Pywal.colors.color4
|
||||
color: Settings.colors.color4
|
||||
ColumnLayout {
|
||||
id: lay
|
||||
spacing: 4
|
||||
@@ -30,7 +30,7 @@ Item {
|
||||
implicitWidth: 20
|
||||
implicitHeight: 20
|
||||
|
||||
color: Pywal.colors.color4
|
||||
color: Settings.colors.color4
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -18,7 +18,7 @@ ScrollView {
|
||||
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
color: Pywal.colors.color11
|
||||
color: Settings.colors.color11
|
||||
radius: 5
|
||||
Layout.margins: 5
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
||||
@@ -27,7 +27,7 @@ ScrollView {
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Text {
|
||||
color: Pywal.colors.color0
|
||||
color: Settings.colors.color0
|
||||
Layout.margins: 5
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
text: 'Output'
|
||||
@@ -71,7 +71,7 @@ ScrollView {
|
||||
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
color: Pywal.colors.color11
|
||||
color: Settings.colors.color11
|
||||
radius: 5
|
||||
Layout.margins: 5
|
||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
||||
@@ -80,7 +80,7 @@ ScrollView {
|
||||
RowLayout {
|
||||
width: parent.width
|
||||
Text {
|
||||
color: Pywal.colors.color0
|
||||
color: Settings.colors.color0
|
||||
Layout.margins: 5
|
||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||
text: 'Input'
|
||||
|
||||
@@ -16,7 +16,7 @@ Flickable {
|
||||
|
||||
id: root
|
||||
|
||||
property string dir: "/home/nathan/Pictures/Wallpaper/"
|
||||
property string dir: Settings.wallpaperDir
|
||||
|
||||
implicitHeight: lay.height
|
||||
implicitWidth: 750
|
||||
@@ -26,8 +26,6 @@ Flickable {
|
||||
|
||||
flickDeceleration: 5000
|
||||
|
||||
contentX: 100
|
||||
|
||||
WheelHandler {
|
||||
target: root
|
||||
//property: "contentX"
|
||||
@@ -64,7 +62,7 @@ Flickable {
|
||||
implicitWidth: 192 * 2; implicitHeight: 108 * 2
|
||||
Image {
|
||||
width: 192 * 2; height: 108 * 2
|
||||
source: Qt.resolvedUrl(root.dir + rep.model[index])
|
||||
source: Qt.resolvedUrl(root.dir + "/" + rep.model[index])
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
sourceSize.width: 192 * 2
|
||||
sourceSize.height: 108 * 2
|
||||
@@ -72,7 +70,7 @@ Flickable {
|
||||
}
|
||||
|
||||
property Process sw: Process {
|
||||
command: ["setWallpaper", root.dir + rep.model[index]]
|
||||
command: ["aurora-set-wallpaper", root.dir + "/" + rep.model[index]]
|
||||
running: false
|
||||
onRunningChanged: {
|
||||
root.hyprcmds.forEach((c) => Hyprland.dispatch(c))
|
||||
|
||||
@@ -11,7 +11,7 @@ Item {
|
||||
Component.onCompleted: Hyprland.refreshWorkspaces()
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
color: Pywal.colors.color1
|
||||
color: Settings.colors.color1
|
||||
radius: 3
|
||||
anchors.fill: parent
|
||||
ColumnLayout {
|
||||
@@ -37,10 +37,10 @@ Item {
|
||||
implicitHeight: 24
|
||||
color: {
|
||||
Hyprland?.focusedWorkspace?.id == rep.model[index].id
|
||||
? Pywal.colors.color13
|
||||
? Settings.colors.color13
|
||||
: containsMouse
|
||||
? Pywal.colors.color12
|
||||
: Pywal.colors.color4
|
||||
? Settings.colors.color12
|
||||
: Settings.colors.color4
|
||||
}
|
||||
|
||||
Text {
|
||||
@@ -51,8 +51,8 @@ Item {
|
||||
|
||||
color: {
|
||||
Hyprland?.focusedWorkspace?.id == rep.model[index].id
|
||||
? Pywal.colors.color1
|
||||
: Pywal.special.foreground
|
||||
? Settings.colors.color1
|
||||
: Settings.special.foreground
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user