Compare commits
44 Commits
17ad2959c1
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| b2ec3d9cd0 | |||
| 35fbfa3d95 | |||
| c7fe5778db | |||
| c51c9752d1 | |||
| 067ebcae93 | |||
| fac3994444 | |||
| b396a302d3 | |||
| 7179e6441f | |||
| 6902564ac1 | |||
| dbc8351e82 | |||
| 3e14569edd | |||
| 062b6d63bd | |||
| 983f0f24de | |||
| 2f00ce43be | |||
| cf4da27549 | |||
| 2fb2731383 | |||
| 37c05f2e36 | |||
| 58adc58002 | |||
| b97e9dc547 | |||
| bd134cad26 | |||
| 67c56deae2 | |||
| dc14e418f3 | |||
| 4584546301 | |||
| 3602272e4d | |||
| e153502401 | |||
| 1f42ca1eae | |||
| e7de1ccb63 | |||
| 18403d3ddf | |||
| be1318c3cb | |||
| f4b032e96f | |||
| 76a5bf5917 | |||
| bd4e2c4d1d | |||
| 2d42f93952 | |||
| d97862289b | |||
| 888a607ff7 | |||
| 7a15a983af | |||
| adcd560180 | |||
| 27db5bd480 | |||
| cecf6df20a | |||
| db4132a489 | |||
| 8c912861e3 | |||
| 02d6688a74 | |||
| 6ea4782a80 | |||
| 9871af127a |
39
config/aurora-greeter/Bar.qml
Normal file
39
config/aurora-greeter/Bar.qml
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
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
|
||||||
|
import Quickshell.Services.Greetd
|
||||||
|
import Quickshell.Services.Pam
|
||||||
|
import qs.modules
|
||||||
|
|
||||||
|
PanelWindow {
|
||||||
|
|
||||||
|
id: root
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
top: true
|
||||||
|
left: true
|
||||||
|
right: true
|
||||||
|
bottom: true
|
||||||
|
}
|
||||||
|
|
||||||
|
margins {
|
||||||
|
top: root.screen.height * 0.4
|
||||||
|
bottom: root.screen.height * 0.4
|
||||||
|
left: root.screen.width * 0.4
|
||||||
|
right: root.screen.width * 0.4
|
||||||
|
}
|
||||||
|
|
||||||
|
focusable: true
|
||||||
|
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
Lock {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
182
config/aurora-greeter/default.nix
Normal file
182
config/aurora-greeter/default.nix
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
{ self, inputs, ... }: {
|
||||||
|
|
||||||
|
|
||||||
|
perSystem = { self', pkgs, system, ... }: {
|
||||||
|
packages = {
|
||||||
|
|
||||||
|
aurora-greeter = pkgs.writeShellScriptBin "aurora-greeter" ''
|
||||||
|
${pkgs.quickshell}/bin/quickshell -p ${self'.packages.aurora-greeter-dots}/share/shell.qml
|
||||||
|
'';
|
||||||
|
|
||||||
|
aurora-greeter-dots = pkgs.stdenv.mkDerivation {
|
||||||
|
|
||||||
|
name = "aurora-greeter-dots";
|
||||||
|
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
buildInputs = [];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share
|
||||||
|
cp -r $src/* $out/share
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
aurora-greeter-hypr-conf = pkgs.writeText "greeter-conf" ''
|
||||||
|
exec-once=${self'.packages.aurora-greeter-init}/bin/aurora-greeter-init
|
||||||
|
|
||||||
|
misc {
|
||||||
|
disable_hyprland_logo = false
|
||||||
|
disable_splash_rendering = true
|
||||||
|
force_default_wallpaper = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ecosystem {
|
||||||
|
no_update_news = true
|
||||||
|
no_donation_nag = true
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
|
||||||
|
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.awww}/bin/awww 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.awww}/bin/awww img ''$img -t wipe" >> ''$out
|
||||||
|
fi
|
||||||
|
|
||||||
|
${self'.packages.aurora-change-colors}/bin/aurora-change-colors "''$src" "''$2" >> ''$out
|
||||||
|
'');
|
||||||
|
|
||||||
|
|
||||||
|
aurora-greeter-init = (pkgs.writeShellScriptBin "aurora-greeter-init" ''
|
||||||
|
|
||||||
|
if [[ ! -d /tmp/aurora ]]; then
|
||||||
|
mkdir /tmp/aurora
|
||||||
|
fi
|
||||||
|
|
||||||
|
hyprctl --batch "\
|
||||||
|
dispatch exec ${pkgs.awww}/bin/awww-daemon ;\
|
||||||
|
dispatch exec ${self'.packages.aurora-set-wallpaper}/bin/aurora-set-wallpaper;\
|
||||||
|
setcursor Bibata-Modern-Classic 16"
|
||||||
|
sleep 3
|
||||||
|
hyprctl reload
|
||||||
|
|
||||||
|
${self'.packages.aurora-greeter}/bin/aurora-greeter
|
||||||
|
rm ~/.config/wal/colorschemes/dark/wallpaper*
|
||||||
|
hyprctl dispatch exit
|
||||||
|
'');
|
||||||
|
|
||||||
|
aurora-init = (pkgs.writeShellScriptBin "aurora-init" ''
|
||||||
|
|
||||||
|
if [[ ! -d /tmp/aurora ]]; then
|
||||||
|
mkdir /tmp/aurora
|
||||||
|
fi
|
||||||
|
|
||||||
|
hyprctl --batch "\
|
||||||
|
dispatch exec ${pkgs.awww}/bin/awww-daemon ;\
|
||||||
|
dispatch exec ${self'.packages.aurora-set-wallpaper}/bin/aurora-set-wallpaper;\
|
||||||
|
setcursor Bibata-Modern-Classic 16"
|
||||||
|
sleep 3
|
||||||
|
hyprctl reload
|
||||||
|
'');
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
pkgs-a = import inputs.nixpkgs { inherit system; };
|
||||||
|
in {
|
||||||
|
|
||||||
|
users.users.aurora = {
|
||||||
|
|
||||||
|
createHome = true;
|
||||||
|
|
||||||
|
home = "/tmp/aurora/home";
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
self.packages.${system}.aurora-greeter
|
||||||
|
self.packages.${system}.aurora-greeter-init
|
||||||
|
self.packages.${system}.aurora-set-wallpaper
|
||||||
|
|
||||||
|
pkgs-a.awww
|
||||||
|
mpvpaper
|
||||||
|
ffmpeg
|
||||||
|
];
|
||||||
|
|
||||||
|
isNormalUser = true;
|
||||||
|
|
||||||
|
group = "aurora";
|
||||||
|
};
|
||||||
|
|
||||||
|
users.groups.aurora = {};
|
||||||
|
|
||||||
|
services.greetd = {
|
||||||
|
enable = cfg.enable;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
|
||||||
|
default_session = {
|
||||||
|
command = "start-hyprland -- -c ${self.packages.${system}.aurora-greeter-hypr-conf}";
|
||||||
|
user = "aurora";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
86
config/aurora-greeter/modules/Lock.qml
Normal file
86
config/aurora-greeter/modules/Lock.qml
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
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
|
||||||
|
import Quickshell.Services.Greetd
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
radius: 10
|
||||||
|
|
||||||
|
//color: "black"
|
||||||
|
color: Settings.special.background
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
Text {
|
||||||
|
id: error
|
||||||
|
text: ""
|
||||||
|
//color: "red"
|
||||||
|
color: Settings.colors.color13
|
||||||
|
visible: false
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: "User"
|
||||||
|
//color: "white"
|
||||||
|
color: Settings.special.foreground
|
||||||
|
}
|
||||||
|
TextInput {
|
||||||
|
id: username
|
||||||
|
text: "guest"
|
||||||
|
//color: "white"
|
||||||
|
color: Settings.special.foreground
|
||||||
|
}
|
||||||
|
Text {
|
||||||
|
text: "Password"
|
||||||
|
//color: "white"
|
||||||
|
color: Settings.special.foreground
|
||||||
|
}
|
||||||
|
TextInput {
|
||||||
|
id: password
|
||||||
|
text: "test"
|
||||||
|
echoMode: TextInput.Password
|
||||||
|
//color: "white"
|
||||||
|
color: Settings.special.foreground
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
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([ "start-hyprland" ])
|
||||||
|
})
|
||||||
|
console.log("createSession")
|
||||||
|
Greetd.createSession(username.text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
74
config/aurora-greeter/modules/Settings.qml
Normal file
74
config/aurora-greeter/modules/Settings.qml
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
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 {
|
||||||
|
|
||||||
|
id: root
|
||||||
|
|
||||||
|
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: "/tmp/aurora/home/.cache/wal/colors.json"
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
18
config/aurora-greeter/shell.qml
Normal file
18
config/aurora-greeter/shell.qml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
//@ pragma Env QS_NO_RELOAD_POPUP=1
|
||||||
|
//@ pragma Env QSG_RENDER_LOOP=threaded
|
||||||
|
//@ pragma Env QT_QUICK_FLICKABLE_WHEEL_DECELERATION=10000
|
||||||
|
|
||||||
|
//@ pragma UseQApplication
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import Quickshell // for ShellRoot
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import qs.modules
|
||||||
|
|
||||||
|
ShellRoot {
|
||||||
|
|
||||||
|
Bar {
|
||||||
|
id: bar
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,9 @@
|
|||||||
{ ... }: {
|
{ self, inputs, ... }: {
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.flakeModules.home-manager
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
perSystem = { self', pkgs, system, ... }: {
|
perSystem = { self', pkgs, system, ... }: {
|
||||||
@@ -27,4 +32,102 @@
|
|||||||
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = types.attrsOf types.str;
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
cfg = config.programs.aurora;
|
||||||
|
|
||||||
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
|
|
||||||
|
pkgs-a = import inputs.nixpkgs { inherit system; };
|
||||||
|
in {
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
|
||||||
|
pkgs-a.awww
|
||||||
|
mpvpaper
|
||||||
|
ffmpeg
|
||||||
|
|
||||||
|
bluez
|
||||||
|
bluez-tools
|
||||||
|
|
||||||
|
wl-clipboard
|
||||||
|
|
||||||
|
brightnessctl
|
||||||
|
|
||||||
|
hyprpicker
|
||||||
|
|
||||||
|
hyprsunset
|
||||||
|
|
||||||
|
wf-recorder
|
||||||
|
|
||||||
|
self.packages.${system}.aurora-set-wallpaper
|
||||||
|
self.packages.${system}.aurora-init
|
||||||
|
];
|
||||||
|
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/aurora/settings.json".text = builtins.toJSON cfg.settings;
|
||||||
|
|
||||||
|
systemd.user.services.quickshell.Service.Environment = [ "AURORA_SETTINGS=${config.home.homeDirectory}/${config.home.file.".config/aurora/settings.json".target}" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,23 @@ PanelWindow {
|
|||||||
|
|
||||||
property real radius: 10
|
property real radius: 10
|
||||||
|
|
||||||
|
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
|
||||||
left: true
|
left: true
|
||||||
@@ -19,33 +36,46 @@ PanelWindow {
|
|||||||
bottom: true
|
bottom: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IpcHandler {
|
||||||
|
target: "shell"
|
||||||
|
function reload() {
|
||||||
|
Quickshell.reload(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
|
||||||
//Hyprland.dispatch("exec hyprctl keyword monitor eDP-1,addreserved," + topRect.height + "," + botRect.height + "," + leftRect.width + "," + rightRect.width)
|
root.hyprcmds.forEach((c) => { Hyprland.dispatch(c) })
|
||||||
Hyprland.dispatch("exec hyprctl keyword monitor eDP-1,addreserved," + (midFO.visible ? midFO.y + midFO.height : topEx) + "," + botEx + "," + leftEx + "," + rightEx)
|
|
||||||
|
Hyprland.rawEvent.connect((e) => {
|
||||||
|
if(e.name == "configreloaded") {
|
||||||
|
root.hyprcmds.forEach((c) => { Hyprland.dispatch(c) })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
Settings.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
property int topEx: topRect.height
|
property int topEx: topRect.reserve
|
||||||
property int botEx: botRect.height
|
property int botEx: botRect.reserve
|
||||||
|
|
||||||
property int leftEx: leftRect.width
|
property int leftEx: leftRect.reserve
|
||||||
property int rightEx: rightRect.width
|
property int rightEx: rightRect.reserve
|
||||||
|
|
||||||
|
property color bg: (Settings.special.background)
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
exclusionMode: ExclusionMode.Ignore
|
exclusionMode: ExclusionMode.Ignore
|
||||||
WlrLayershell.layer: WlrLayer.Top
|
WlrLayershell.layer: WlrLayer.Top
|
||||||
|
|
||||||
//color: Pywal.special.background
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|
||||||
mask: Region {
|
mask: Region {
|
||||||
|
|
||||||
Region {
|
Region {
|
||||||
item: topRect
|
item: topRect.topRectArea
|
||||||
}
|
}
|
||||||
|
|
||||||
Region {
|
Region {
|
||||||
@@ -53,69 +83,55 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Region {
|
Region {
|
||||||
item: midFO.visible ? midFO : topRect
|
item: topRect.midFO.visible ? topRect.midFO : leftRect
|
||||||
//item: midFO
|
}
|
||||||
|
|
||||||
|
Region {
|
||||||
|
item: dash.visible ? dash : leftRect
|
||||||
|
}
|
||||||
|
|
||||||
|
Region {
|
||||||
|
item: botRect
|
||||||
|
}
|
||||||
|
|
||||||
|
Region {
|
||||||
|
item: botRect.midFO.visible ? botRect.midFO : botRect
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WrapperMouseArea {
|
|
||||||
id: topRectArea
|
|
||||||
Rectangle {
|
|
||||||
id: topRect
|
|
||||||
color: Pywal.special.background
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
implicitHeight: 10
|
|
||||||
implicitWidth: parent.width
|
|
||||||
|
|
||||||
hoverEnabled: true
|
BarBottom {
|
||||||
onEntered: {
|
|
||||||
midFO.set = !midFO.set
|
|
||||||
midFO.visible = Qt.binding(() => midFO.set)
|
|
||||||
Hyprland.dispatch("exec hyprctl keyword monitor eDP-1,addreserved," + (midFO.visible ? midFO.y + midFO.height : topEx) + "," + botEx + "," + leftEx + "," + rightEx)
|
|
||||||
}
|
|
||||||
//onEntered: midFO.visible = true
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: botRect
|
id: botRect
|
||||||
y: parent.height - height
|
radius: root.radius
|
||||||
color: Pywal.special.background
|
hyprcmds: root.hyprcmds
|
||||||
implicitHeight: 10
|
x: leftRect.x + leftRect.width
|
||||||
implicitWidth: parent.width
|
implicitWidth: rightRect.x - (leftRect.x + leftRect.width)
|
||||||
|
color: root.bg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BarLeft {
|
BarLeft {
|
||||||
id: leftRect
|
id: leftRect
|
||||||
|
window: root
|
||||||
|
color: root.bg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BarRight {
|
||||||
Rectangle {
|
|
||||||
id: rightRect
|
id: rightRect
|
||||||
x: parent.width - width
|
color: root.bg
|
||||||
color: Pywal.special.background
|
|
||||||
implicitWidth: 10
|
|
||||||
implicitHeight: parent.height
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Shape {
|
Shape {
|
||||||
|
|
||||||
x: leftRect.x + leftRect.width - 1
|
x: leftRect.cornerX
|
||||||
y: topRect.y + topRect.height - 1
|
y: topRect.cornerY
|
||||||
|
|
||||||
ShapePath {
|
ShapePath {
|
||||||
strokeWidth: 4
|
strokeWidth: 1
|
||||||
strokeColor: Pywal.special.background
|
|
||||||
fillColor: Pywal.special.background
|
strokeColor: "transparent"
|
||||||
|
fillColor: root.bg
|
||||||
startX: 0; startY: 0
|
startX: 0; startY: 0
|
||||||
|
|
||||||
onFillColorChanged: {
|
|
||||||
console.log(Pywal.special.background)
|
|
||||||
fillColor = Qt.binding(() => Pywal.special.background)
|
|
||||||
strokeColor = Qt.binding(() => Pywal.special.background)
|
|
||||||
}
|
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: radius }
|
PathLine { relativeX: 0; relativeY: radius }
|
||||||
PathArc {
|
PathArc {
|
||||||
radiusX: radius
|
radiusX: radius
|
||||||
@@ -128,13 +144,15 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
Shape {
|
Shape {
|
||||||
|
|
||||||
x: rightRect.x + 1
|
x: rightRect.x
|
||||||
y: topRect.y + topRect.height - 1
|
y: topRect.cornerY
|
||||||
|
|
||||||
ShapePath {
|
ShapePath {
|
||||||
strokeWidth: 4
|
strokeWidth: 1
|
||||||
strokeColor: Pywal.special.background
|
|
||||||
fillColor: Pywal.special.background
|
strokeColor: "transparent"
|
||||||
|
fillColor: root.bg
|
||||||
|
|
||||||
startX: 0; startY: 0
|
startX: 0; startY: 0
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: radius }
|
PathLine { relativeX: 0; relativeY: radius }
|
||||||
@@ -150,13 +168,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: root.bg
|
||||||
|
|
||||||
startX: 0; startY: 0
|
startX: 0; startY: 0
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: -radius }
|
PathLine { relativeX: 0; relativeY: -radius }
|
||||||
@@ -172,13 +192,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: root.bg
|
||||||
|
|
||||||
startX: 0; startY: 0
|
startX: 0; startY: 0
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: -radius }
|
PathLine { relativeX: 0; relativeY: -radius }
|
||||||
@@ -193,11 +214,32 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BarTop {
|
BarTop {
|
||||||
id: midFO
|
id: topRect
|
||||||
x: root.screen.width / 2 - width / 2
|
x: leftRect.x + leftRect.width
|
||||||
y: topRect.y + topRect.height - 1
|
width: rightRect.x - x
|
||||||
|
//y: topRect.y + topRect.height - 1
|
||||||
window: root
|
window: root
|
||||||
radius: root.radius
|
radius: root.radius
|
||||||
|
color: root.bg
|
||||||
|
|
||||||
|
onShowDashChanged: dash.visible = showDash
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onTopExChanged: Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
|
||||||
|
onBotExChanged: Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
|
||||||
|
onRightExChanged: Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
|
||||||
|
onLeftExChanged: Hyprland.dispatch("exec hyprctl keyword monitor " + Hyprland.monitorFor(root.screen).name + ",addreserved," + topEx + "," + botEx + "," + leftEx + "," + rightEx)
|
||||||
|
|
||||||
|
Dashboard {
|
||||||
|
id: dash
|
||||||
|
|
||||||
|
x: root.screen.width / 2 - width / 2
|
||||||
|
y: topRect.reserve - 1
|
||||||
|
|
||||||
|
onVisibleChanged: topRect.showDash = visible
|
||||||
|
//onEntered: topRect.midFO.visible = true
|
||||||
|
onHoveredChanged: topRect.midFO.visible = !hovered
|
||||||
|
|
||||||
|
radius: root.radius
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
57
config/aurora/modules/BarBottom.qml
Normal file
57
config/aurora/modules/BarBottom.qml
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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: {
|
||||||
|
Settings.launcherOpen = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -13,14 +13,16 @@ Rectangle {
|
|||||||
|
|
||||||
id: leftRect
|
id: leftRect
|
||||||
|
|
||||||
|
property real reserve: width
|
||||||
|
property real cornerX: width
|
||||||
|
|
||||||
|
required property QsWindow window
|
||||||
|
|
||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
|
|
||||||
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
|
||||||
@@ -34,5 +36,25 @@ Rectangle {
|
|||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IdleInhibitor {
|
||||||
|
x: parent.width / 2 - width / 2
|
||||||
|
y: battery.y - height - 20
|
||||||
|
id: idleInhibitor
|
||||||
|
}
|
||||||
|
|
||||||
|
Battery {
|
||||||
|
id: battery
|
||||||
|
x: parent.width / 2 - width / 2
|
||||||
|
y: tray.y - height - 20
|
||||||
|
}
|
||||||
|
|
||||||
|
Tray {
|
||||||
|
id: tray
|
||||||
|
x: parent.width / 2 - width / 2
|
||||||
|
y: leftRect.y + leftRect.height - height - 100
|
||||||
|
window: leftRect.window
|
||||||
|
popupOffset: x + leftRect.width
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
18
config/aurora/modules/BarRight.qml
Normal file
18
config/aurora/modules/BarRight.qml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
property real reserve: width
|
||||||
|
id: rightRect
|
||||||
|
x: parent.width - width
|
||||||
|
implicitWidth: 10
|
||||||
|
implicitHeight: parent.height
|
||||||
|
}
|
||||||
@@ -8,63 +8,67 @@ import Quickshell.Widgets
|
|||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
|
|
||||||
VFlyout {
|
ColumnLayout {
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
id: root
|
||||||
|
required property color color
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
id: topRectArea
|
||||||
|
Rectangle {
|
||||||
|
id: topRect
|
||||||
|
color: root.color
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
implicitHeight: 10
|
||||||
|
implicitWidth: parent.width
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: {
|
||||||
|
root.showDash = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
property bool showDash: false
|
||||||
|
|
||||||
|
required property real radius
|
||||||
|
|
||||||
|
property real cornerY: topRectArea.height
|
||||||
|
|
||||||
|
//property real reserve: midFO.visible ? root.height : topRectArea.height
|
||||||
|
property real reserve: topRectArea.height
|
||||||
|
|
||||||
|
property QsWindow window
|
||||||
|
|
||||||
|
property Item topRectArea: topRectArea
|
||||||
|
property Item midFO: midFO
|
||||||
|
|
||||||
|
|
||||||
|
VFlyoutDown {
|
||||||
id: midFO
|
id: midFO
|
||||||
|
|
||||||
color: Pywal.special.background
|
radius: root.radius
|
||||||
|
|
||||||
visible: set
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
property bool set: true
|
color: root.color
|
||||||
|
|
||||||
property QsWindow window
|
visible: true
|
||||||
|
|
||||||
property real radius
|
|
||||||
|
|
||||||
item: mid
|
item: mid
|
||||||
|
|
||||||
|
onEntered: visible = false
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: mid
|
id: mid
|
||||||
|
|
||||||
Notifications {
|
|
||||||
id: notifications
|
|
||||||
window: midFO.window
|
|
||||||
}
|
|
||||||
|
|
||||||
Battery {
|
|
||||||
window: midFO.window
|
|
||||||
popupOffset: x + midFO.x
|
|
||||||
}
|
|
||||||
|
|
||||||
Tray {
|
|
||||||
window: midFO.window
|
|
||||||
popupOffset: x + midFO.x
|
|
||||||
}
|
|
||||||
|
|
||||||
Clock {
|
Clock {
|
||||||
id: clock
|
id: clock
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleInhibitor {
|
|
||||||
id: idleInhibitor
|
|
||||||
}
|
|
||||||
|
|
||||||
Bluetooth {
|
|
||||||
window: midFO.window
|
|
||||||
popupOffset: x + midFO.x
|
|
||||||
}
|
|
||||||
|
|
||||||
Volume {
|
|
||||||
window: midFO.window
|
|
||||||
popupOffset: x + midFO.x
|
|
||||||
}
|
|
||||||
|
|
||||||
Power {
|
|
||||||
id: power
|
|
||||||
window: midFO.window
|
|
||||||
popupOffset: x + midFO.x
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
radius: radius
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,88 +8,27 @@ import Quickshell.Hyprland
|
|||||||
import Quickshell.Services.UPower
|
import Quickshell.Services.UPower
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
radius: 5
|
|
||||||
width: 100; height: 30
|
|
||||||
color: "red"
|
|
||||||
Button {
|
|
||||||
id: button
|
|
||||||
text: if(UPower.onBattery) {
|
|
||||||
" " + Math.floor(UPower.displayDevice.percentage * 100) + "%"
|
|
||||||
} else {
|
|
||||||
" " + Math.floor(UPower.displayDevice.percentage * 100) + "%"
|
|
||||||
}
|
|
||||||
font.pointSize: 12
|
|
||||||
implicitHeight: parent.height
|
|
||||||
//icon.color: "red"
|
|
||||||
//icon.source: "/nix/store/c4dcn4vl0v5njv4d587sazrad1xgyd9h-rose-pine-icon-theme-unstable-2022-09-01/share/icons/rose-pine/symbolic/devices/battery-symbolic.svg"
|
|
||||||
onClicked: {
|
|
||||||
menu.visible = true
|
|
||||||
grab.active = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
required property var window
|
radius: 3
|
||||||
required property real popupOffset
|
|
||||||
id: root
|
|
||||||
|
|
||||||
PopupWindow {
|
color: Settings.colors.color2
|
||||||
|
|
||||||
id: menu
|
|
||||||
|
|
||||||
anchor.window: window
|
implicitWidth: 30
|
||||||
anchor.rect.x: popupOffset
|
|
||||||
anchor.rect.y: 50
|
|
||||||
implicitWidth: 250
|
|
||||||
implicitHeight: 150
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
color: "transparent"
|
implicitHeight: text.contentWidth + text.padding
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
|
||||||
radius: 5
|
|
||||||
|
|
||||||
implicitHeight: parent.height - 20
|
Text {
|
||||||
implicitWidth: parent.width
|
id: text
|
||||||
|
text: (UPower.onBattery ? "" : "") + Math.round(UPower.displayDevice.percentage * 100) + "%"
|
||||||
ColumnLayout {
|
|
||||||
|
|
||||||
spacing: 0
|
padding: 10
|
||||||
|
|
||||||
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: 'performance'
|
font.pointSize: 14
|
||||||
onClicked: PowerProfiles.profile = PowerProfile.Performance
|
|
||||||
visible: PowerProfiles.hasPerformanceProfile
|
|
||||||
}
|
|
||||||
Button {
|
|
||||||
Layout.topMargin: 5
|
|
||||||
x: (parent.width - width) / 2
|
|
||||||
implicitWidth: parent.width - 10
|
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
|
||||||
|
|
||||||
text: 'balanced'
|
color: Settings.special.foreground
|
||||||
onClicked: PowerProfiles.profile = PowerProfile.Balanced
|
rotation: -90
|
||||||
}
|
|
||||||
Button {
|
|
||||||
Layout.topMargin: 5
|
|
||||||
x: (parent.width - width) / 2
|
|
||||||
implicitWidth: parent.width - 10
|
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
|
||||||
|
|
||||||
text: 'power saver'
|
|
||||||
onClicked: PowerProfiles.profile = PowerProfile.PowerSaver
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
HyprlandFocusGrab {
|
|
||||||
id: grab
|
|
||||||
windows: [ menu ]
|
|
||||||
onCleared: menu.visible = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,135 +7,94 @@ import Quickshell.Widgets
|
|||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Bluetooth
|
import Quickshell.Bluetooth
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ColumnLayout {
|
||||||
|
|
||||||
|
|
||||||
radius: 5
|
|
||||||
implicitWidth: 30; implicitHeight: 30
|
|
||||||
Button {
|
|
||||||
id: button
|
|
||||||
text: ""
|
|
||||||
font.pointSize: 16
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
menu.visible = true
|
|
||||||
grab.active = true
|
|
||||||
}
|
|
||||||
implicitHeight: parent.height
|
|
||||||
}
|
|
||||||
|
|
||||||
required property PanelWindow window
|
anchors.fill: parent
|
||||||
required property real popupOffset
|
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
PopupWindow {
|
spacing: 0
|
||||||
|
|
||||||
id: menu
|
|
||||||
|
|
||||||
anchor.window: window
|
ClippingWrapperRectangle {
|
||||||
anchor.rect.x: popupOffset - width
|
radius: 5
|
||||||
anchor.rect.y: 50
|
implicitWidth: parent.width - 2 * Layout.margins
|
||||||
implicitWidth: 250
|
implicitHeight: 30
|
||||||
implicitHeight: 150
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
visible: false
|
Layout.margins: 5
|
||||||
|
color: Settings.colors.color11
|
||||||
|
|
||||||
color: "transparent"
|
RowLayout {
|
||||||
|
Text {
|
||||||
ClippingWrapperRectangle {
|
text: 'Bluetooth'
|
||||||
radius: 5
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
Layout.margins: 5
|
||||||
|
color: Settings.colors.color0
|
||||||
|
}
|
||||||
|
|
||||||
implicitHeight: parent.height - 20
|
Switch {
|
||||||
implicitWidth: parent.width
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
|
//Layout.margins: 5
|
||||||
ColumnLayout {
|
checked: Bluetooth.defaultAdapter.enabled
|
||||||
|
onClicked: {
|
||||||
|
Bluetooth.defaultAdapter.enabled = checked
|
||||||
|
scroll.visible = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
spacing: 0
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
|
Layout.margins: 5
|
||||||
|
|
||||||
|
implicitWidth: parent.width - 4 * Layout.margins
|
||||||
|
implicitHeight: parent.height / 2
|
||||||
|
|
||||||
|
id: scroll
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
|
||||||
|
id: rep
|
||||||
|
|
||||||
|
model: Bluetooth.devices.values
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
radius: 5
|
radius: 5
|
||||||
implicitWidth: parent.width - 2 * Layout.margins
|
color: Settings.colors.color4
|
||||||
implicitHeight: 30
|
|
||||||
|
implicitWidth: root.width - 3 * scroll.x
|
||||||
|
implicitHeight: 40
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
Layout.margins: 5
|
Layout.margins: 5
|
||||||
color: "#ff3333aa"
|
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
Text {
|
Text {
|
||||||
text: 'Bluetooth'
|
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
Layout.margins: 5
|
Layout.margins: 5
|
||||||
|
|
||||||
|
text: rep.model[index].name
|
||||||
|
color: Settings.colors.color0
|
||||||
}
|
}
|
||||||
|
|
||||||
Switch {
|
Button {
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
//Layout.margins: 5
|
Layout.rightMargin: 5
|
||||||
checked: Bluetooth.defaultAdapter.enabled
|
text: 'Connect'
|
||||||
onClicked: Bluetooth.defaultAdapter.enabled = checked
|
|
||||||
|
onClicked: rep.model[index].connected = !rep.model[index].connected
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ScrollView {
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
|
||||||
Layout.margins: 5
|
|
||||||
|
|
||||||
implicitWidth: parent.width - 4 * Layout.margins
|
|
||||||
implicitHeight: menu.height / 2
|
|
||||||
|
|
||||||
id: scroll
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 0
|
|
||||||
|
|
||||||
Repeater {
|
|
||||||
|
|
||||||
id: rep
|
|
||||||
|
|
||||||
model: Bluetooth.devices.values
|
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
|
||||||
radius: 5
|
|
||||||
color: "#ff3333aa"
|
|
||||||
|
|
||||||
implicitWidth: menu.width - 3 * scroll.x
|
|
||||||
implicitHeight: 40
|
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
|
||||||
Layout.margins: 5
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
Text {
|
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
|
||||||
Layout.margins: 5
|
|
||||||
|
|
||||||
text: rep.model[index].name
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
|
||||||
Layout.rightMargin: 5
|
|
||||||
text: 'Connect'
|
|
||||||
|
|
||||||
onClicked: rep.model[index].connected = !rep.model[index].connected
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HyprlandFocusGrab {
|
|
||||||
id: grab
|
|
||||||
windows: [ menu ]
|
|
||||||
onCleared: menu.visible = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ WrapperMouseArea {
|
|||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
id: rect
|
id: rect
|
||||||
color: Pywal.colors.color12
|
color: Settings.colors.color12
|
||||||
radius: 5
|
radius: 3
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
Text {
|
Text {
|
||||||
id: t
|
id: t
|
||||||
@@ -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: Settings.special.background
|
||||||
|
|
||||||
SystemClock {
|
SystemClock {
|
||||||
id: clock
|
id: clock
|
||||||
|
|||||||
@@ -0,0 +1,277 @@
|
|||||||
|
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
|
||||||
|
import Quickshell.Services.Notifications
|
||||||
|
|
||||||
|
Item {
|
||||||
|
|
||||||
|
implicitWidth: 700
|
||||||
|
implicitHeight: 450
|
||||||
|
|
||||||
|
required property real radius
|
||||||
|
property bool hovered: false
|
||||||
|
|
||||||
|
id: root
|
||||||
|
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
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 {
|
||||||
|
|
||||||
|
visible: root.visible
|
||||||
|
|
||||||
|
color: Settings.special.background
|
||||||
|
radius: root.radius
|
||||||
|
|
||||||
|
item: main
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
ClippingRectangle {
|
||||||
|
//anchors.fill: parent
|
||||||
|
color: Settings.special.background
|
||||||
|
id: main
|
||||||
|
|
||||||
|
radius: root.radius
|
||||||
|
implicitWidth: root.width
|
||||||
|
implicitHeight: root.height
|
||||||
|
|
||||||
|
Item {
|
||||||
|
implicitWidth: root.width - 4 * lay.spacing
|
||||||
|
implicitHeight: root.height - 4 * lay.spacing
|
||||||
|
x: 2 * lay.spacing
|
||||||
|
y: 2 * lay.spacing
|
||||||
|
RowLayout {
|
||||||
|
id: lay
|
||||||
|
spacing: 2
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: tabs
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
Repeater {
|
||||||
|
id: rep
|
||||||
|
|
||||||
|
model: 9
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
ClippingRectangle {
|
||||||
|
//Layout.alignment: Qt.AlignTop
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 40
|
||||||
|
radius: root.radius
|
||||||
|
color: index == selected ? Settings.colors.color13 : Settings.colors.color4
|
||||||
|
//LauncherButton { anchors.centerIn: parent }
|
||||||
|
Text {
|
||||||
|
font.pointSize: 14
|
||||||
|
text: switch(index) {
|
||||||
|
case 0:
|
||||||
|
return " ";
|
||||||
|
case 1:
|
||||||
|
return " ";
|
||||||
|
case 2:
|
||||||
|
return " ";
|
||||||
|
case 3:
|
||||||
|
return "";
|
||||||
|
case 4:
|
||||||
|
return " ";
|
||||||
|
case 5:
|
||||||
|
return " ";
|
||||||
|
case 6:
|
||||||
|
return " ";
|
||||||
|
case 7:
|
||||||
|
return " ";
|
||||||
|
case 8:
|
||||||
|
return "";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: Settings.colors.color0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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 ? Settings.colors.color13 : Settings.colors.color4)
|
||||||
|
}
|
||||||
|
hoverEnabled: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ClippingRectangle {
|
||||||
|
id: content
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
implicitWidth: parent.width - tabs.width - 2 * parent.spacing - rTabs.width - 2 * parent.spacing
|
||||||
|
implicitHeight: parent.height
|
||||||
|
radius: root.radius
|
||||||
|
color: Settings.colors.color1
|
||||||
|
|
||||||
|
NotificationServer {
|
||||||
|
id: nserver
|
||||||
|
persistenceSupported: true
|
||||||
|
imageSupported: true
|
||||||
|
actionsSupported: true
|
||||||
|
bodyImagesSupported: true
|
||||||
|
bodySupported: true
|
||||||
|
bodyHyperlinksSupported: true
|
||||||
|
inlineReplySupported: true
|
||||||
|
actionIconsSupported: true
|
||||||
|
|
||||||
|
onNotification: (n) => {
|
||||||
|
n.tracked = !n.transient
|
||||||
|
n.closed.connect(() => { console.log("notif closed") })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
readonly property Component launcher: LauncherButton {}
|
||||||
|
readonly property Component notifs: Notifications { server: nserver }
|
||||||
|
|
||||||
|
readonly property Component bt: Bluetooth {}
|
||||||
|
readonly property Component vol: Volume {}
|
||||||
|
|
||||||
|
readonly property Component bat: PowerMode {}
|
||||||
|
readonly property Component mon: LauncherButton {}
|
||||||
|
|
||||||
|
readonly property Component net: LauncherButton {}
|
||||||
|
readonly property Component mus: LauncherButton {}
|
||||||
|
|
||||||
|
readonly property Component clk: Clock {}
|
||||||
|
readonly property Component wal: LauncherButton {}
|
||||||
|
|
||||||
|
sourceComponent: switch(selected) {
|
||||||
|
case 0:
|
||||||
|
return wal;
|
||||||
|
case 1:
|
||||||
|
return mon;
|
||||||
|
case 2:
|
||||||
|
return net;
|
||||||
|
case 3:
|
||||||
|
return bt;
|
||||||
|
case 4:
|
||||||
|
return vol;
|
||||||
|
case 5:
|
||||||
|
return notifs;
|
||||||
|
case 6:
|
||||||
|
return mus;
|
||||||
|
case 7:
|
||||||
|
return wal;
|
||||||
|
case 8:
|
||||||
|
return bat;
|
||||||
|
default:
|
||||||
|
return launcher;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: rTabs
|
||||||
|
Layout.alignment: Qt.AlignBottom
|
||||||
|
Repeater {
|
||||||
|
id: rRep
|
||||||
|
|
||||||
|
model: 9
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
ClippingRectangle {
|
||||||
|
//Layout.alignment: Qt.AlignTop
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 40
|
||||||
|
radius: root.radius
|
||||||
|
property bool use: false
|
||||||
|
color: use ? Settings.colors.color13 : Settings.colors.color4
|
||||||
|
//LauncherButton { anchors.centerIn: parent }
|
||||||
|
Text {
|
||||||
|
font.pointSize: 14
|
||||||
|
text: switch(index) {
|
||||||
|
case 0:
|
||||||
|
return " ";
|
||||||
|
case 1:
|
||||||
|
return " ";
|
||||||
|
case 2:
|
||||||
|
return " ";
|
||||||
|
case 3:
|
||||||
|
return "";
|
||||||
|
case 4:
|
||||||
|
return " ";
|
||||||
|
case 5:
|
||||||
|
return " ";
|
||||||
|
case 6:
|
||||||
|
return " ";
|
||||||
|
case 7:
|
||||||
|
return " ";
|
||||||
|
case 8:
|
||||||
|
return " ";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: Settings.colors.color0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
||||||
|
|
||||||
|
switch(index) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
power.visible = true
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hoverEnabled: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
onEntered: hovered = true
|
||||||
|
onExited: {
|
||||||
|
root.visible = false
|
||||||
|
hovered = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,12 +9,19 @@ ClippingWrapperRectangle {
|
|||||||
property real interval: 100
|
property real interval: 100
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
radius: 5
|
radius: 3
|
||||||
|
color: Settings.colors.color1
|
||||||
implicitWidth: 30; height: 30
|
implicitWidth: 30; height: 30
|
||||||
Button {
|
Button {
|
||||||
id: button
|
id: button
|
||||||
text: " "
|
text: " "
|
||||||
font.pointSize: 16
|
font.pointSize: 16
|
||||||
|
|
||||||
|
background: Rectangle {
|
||||||
|
|
||||||
|
color: Settings.colors.color9
|
||||||
|
}
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: idlent
|
id: idlent
|
||||||
running: true
|
running: true
|
||||||
|
|||||||
@@ -1,36 +1,38 @@
|
|||||||
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: 5
|
|
||||||
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: Settings.launcherOpen
|
||||||
|
|
||||||
|
item: content
|
||||||
|
|
||||||
|
onExited: Settings.launcherOpen = false
|
||||||
|
|
||||||
|
ClippingRectangle {
|
||||||
|
id: content
|
||||||
|
radius: root.radius
|
||||||
|
implicitWidth: 700
|
||||||
|
implicitHeight: wallpaper.height
|
||||||
|
|
||||||
|
color: Settings.colors.color1
|
||||||
|
|
||||||
|
Wallpaper {
|
||||||
|
id: wallpaper
|
||||||
|
implicitWidth: 700
|
||||||
|
//implicitHeight: 350
|
||||||
|
hyprcmds: midFO.hyprcmds
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hoverEnabled: true
|
|
||||||
|
|
||||||
Process {
|
|
||||||
id: launcher
|
|
||||||
running: false
|
|
||||||
command: ["rofi", "-show", "drun"]
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: launcher.running = true
|
|
||||||
}
|
}
|
||||||
|
|||||||
31
config/aurora/modules/LauncherButton.qml
Normal file
31
config/aurora/modules/LauncherButton.qml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
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: Settings.special.foreground
|
||||||
|
}
|
||||||
|
color: {
|
||||||
|
containsMouse
|
||||||
|
? Settings.colors.color12
|
||||||
|
: Settings.colors.color1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
|
onClicked: Settings.launcherOpen = true
|
||||||
|
}
|
||||||
108
config/aurora/modules/Lock.qml
Normal file
108
config/aurora/modules/Lock.qml
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
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
|
||||||
|
import Quickshell.Services.Pam
|
||||||
|
|
||||||
|
Item {
|
||||||
|
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property bool locked: false
|
||||||
|
|
||||||
|
onLockedChanged: {
|
||||||
|
lock.locked = locked
|
||||||
|
}
|
||||||
|
|
||||||
|
required property string bg_path
|
||||||
|
|
||||||
|
property color fieldColor: ctx.failed ? Settings.colors.color6 : Settings.colors.color1
|
||||||
|
|
||||||
|
IpcHandler {
|
||||||
|
target: "lockscreen"
|
||||||
|
|
||||||
|
function lock() { root.locked = true; }
|
||||||
|
function unlock() { root.locked = false; }
|
||||||
|
}
|
||||||
|
|
||||||
|
LockCtx {
|
||||||
|
id: ctx
|
||||||
|
|
||||||
|
onShouldUnlock: lock.locked = false
|
||||||
|
}
|
||||||
|
|
||||||
|
LockScreen {
|
||||||
|
id: lockscreen
|
||||||
|
visible: root.locked
|
||||||
|
}
|
||||||
|
|
||||||
|
WlSessionLock {
|
||||||
|
|
||||||
|
id: lock
|
||||||
|
|
||||||
|
locked: root.locked
|
||||||
|
|
||||||
|
onLockedChanged: {
|
||||||
|
root.locked = locked
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
WlSessionLockSurface {
|
||||||
|
color: "transparent"
|
||||||
|
/*Image {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
source: Qt.resolvedUrl(bg_path)
|
||||||
|
|
||||||
|
}*/
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
|
||||||
|
|
||||||
|
anchors.centerIn: parent
|
||||||
|
radius: 10
|
||||||
|
|
||||||
|
color: Settings.special.background
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
color: root.fieldColor
|
||||||
|
implicitWidth: 200
|
||||||
|
TextInput {
|
||||||
|
text: ""
|
||||||
|
|
||||||
|
onTextChanged: {
|
||||||
|
ctx.pass = text
|
||||||
|
}
|
||||||
|
|
||||||
|
echoMode: TextInput.Password
|
||||||
|
|
||||||
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
|
verticalAlignment: TextInput.AlignVCenter
|
||||||
|
|
||||||
|
font.pointSize: 30
|
||||||
|
color: Settings.special.foreground
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "unlock"
|
||||||
|
onClicked: {
|
||||||
|
ctx.doUnlock()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "exit"
|
||||||
|
onClicked: root.locked = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
59
config/aurora/modules/LockCtx.qml
Normal file
59
config/aurora/modules/LockCtx.qml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
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
|
||||||
|
import Quickshell.Services.Pam
|
||||||
|
|
||||||
|
Scope {
|
||||||
|
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property string pass
|
||||||
|
|
||||||
|
property bool busy: false
|
||||||
|
|
||||||
|
property bool failed: false
|
||||||
|
|
||||||
|
signal shouldUnlock()
|
||||||
|
|
||||||
|
onPassChanged: failed = false
|
||||||
|
|
||||||
|
function doUnlock() {
|
||||||
|
if(pass == "") return;
|
||||||
|
|
||||||
|
root.busy = true
|
||||||
|
pam.start()
|
||||||
|
}
|
||||||
|
|
||||||
|
PamContext {
|
||||||
|
|
||||||
|
id: pam
|
||||||
|
|
||||||
|
onPamMessage: {
|
||||||
|
if (this.responseRequired) {
|
||||||
|
this.respond(root.pass);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onCompleted: result => {
|
||||||
|
if (result == PamResult.Success) {
|
||||||
|
root.shouldUnlock()
|
||||||
|
console.log("auth Success")
|
||||||
|
root.pass = "";
|
||||||
|
} else {
|
||||||
|
root.pass = "";
|
||||||
|
root.failed = true;
|
||||||
|
abort()
|
||||||
|
}
|
||||||
|
|
||||||
|
root.busy = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
config: "aurora-lock.conf"
|
||||||
|
}
|
||||||
|
}
|
||||||
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"
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ ClippingWrapperRectangle {
|
|||||||
implicitWidth: parent.width - 2 * Layout.margins
|
implicitWidth: parent.width - 2 * Layout.margins
|
||||||
implicitHeight: 100
|
implicitHeight: 100
|
||||||
|
|
||||||
color: Pywal.colors.color2
|
color: Settings.colors.color4
|
||||||
|
|
||||||
required property Notification src
|
required property Notification src
|
||||||
|
|
||||||
@@ -43,14 +43,14 @@ ClippingWrapperRectangle {
|
|||||||
Layout.topMargin: 10
|
Layout.topMargin: 10
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||||
Text {
|
Text {
|
||||||
color: Pywal.special.background
|
color: Settings.special.background
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
|
||||||
text: notif.src.summary
|
text: notif.src.summary
|
||||||
Layout.leftMargin: 10
|
Layout.leftMargin: 10
|
||||||
font.pointSize: 14
|
font.pointSize: 14
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
color: Pywal.special.background
|
color: Settings.special.background
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
text: notif.src.body
|
text: notif.src.body
|
||||||
Layout.leftMargin: 10
|
Layout.leftMargin: 10
|
||||||
|
|||||||
@@ -7,137 +7,69 @@ import Quickshell.Io
|
|||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
|
|
||||||
Item {
|
|
||||||
width: 50
|
ColumnLayout {
|
||||||
height: 30
|
anchors.fill: parent
|
||||||
|
id: lay
|
||||||
|
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
required property NotificationServer server
|
||||||
|
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
id: barbutton
|
color: Settings.colors.color11
|
||||||
radius: 5
|
radius: 5
|
||||||
anchors.fill: parent
|
Layout.margins: 5
|
||||||
Button {
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
||||||
id: button
|
implicitWidth: lay.width - 2 * Layout.margins
|
||||||
text: ""
|
|
||||||
font.pointSize: 16
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
|
|
||||||
|
|
||||||
menu.visible = true
|
RowLayout {
|
||||||
grab.active = true
|
width: parent.width
|
||||||
|
Text {
|
||||||
|
color: Settings.colors.color0
|
||||||
|
Layout.margins: 5
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
text: 'Notifications'
|
||||||
}
|
}
|
||||||
implicitHeight: parent.height
|
Button {
|
||||||
}
|
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||||
}
|
Layout.margins: 5
|
||||||
|
implicitWidth: 20
|
||||||
|
implicitHeight: 20
|
||||||
|
|
||||||
NotificationServer {
|
text: 'x'
|
||||||
id: server
|
|
||||||
persistenceSupported: true
|
|
||||||
imageSupported: true
|
|
||||||
actionsSupported: true
|
|
||||||
bodyImagesSupported: true
|
|
||||||
bodySupported: true
|
|
||||||
bodyHyperlinksSupported: true
|
|
||||||
inlineReplySupported: true
|
|
||||||
actionIconsSupported: true
|
|
||||||
|
|
||||||
onNotification: (n) => {
|
onClicked: {
|
||||||
n.tracked = !n.transient
|
while(server.trackedNotifications.values.length > 0) {
|
||||||
}
|
server.trackedNotifications.values[0].dismiss()
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
required property PanelWindow window
|
|
||||||
id: root
|
|
||||||
|
|
||||||
PopupWindow {
|
|
||||||
|
|
||||||
id: menu
|
|
||||||
|
|
||||||
anchor.window: window
|
|
||||||
anchor.rect.x: window.width - width
|
|
||||||
anchor.rect.y: 50
|
|
||||||
implicitWidth: 400
|
|
||||||
implicitHeight: 1080 - anchor.rect.y
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
color: "transparent"
|
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
|
||||||
radius: 5
|
|
||||||
|
|
||||||
color: Pywal.special.background
|
|
||||||
|
|
||||||
implicitHeight: parent.height - 20
|
|
||||||
implicitWidth: parent.width
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: lay
|
|
||||||
|
|
||||||
spacing: 10
|
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
|
||||||
color: Pywal.colors.color2
|
|
||||||
radius: 5
|
|
||||||
Layout.margins: 5
|
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
|
||||||
implicitWidth: menu.width - 2 * Layout.margins
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
width: parent.width
|
|
||||||
Text {
|
|
||||||
color: Pywal.colors.color0
|
|
||||||
Layout.margins: 5
|
|
||||||
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
|
||||||
text: 'Notifications'
|
|
||||||
}
|
|
||||||
Button {
|
|
||||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
|
||||||
Layout.margins: 5
|
|
||||||
implicitWidth: 20
|
|
||||||
implicitHeight: 20
|
|
||||||
|
|
||||||
text: 'x'
|
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
while(server.trackedNotifications.values.length > 0) {
|
|
||||||
server.trackedNotifications.values[0].dismiss()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
|
||||||
Repeater {
|
|
||||||
id: rep
|
|
||||||
|
|
||||||
model: server.trackedNotifications.values
|
|
||||||
|
|
||||||
Notif {
|
|
||||||
required property int index
|
|
||||||
src: rep.model[index]
|
|
||||||
}
|
|
||||||
|
|
||||||
onItemAdded: (idx, it) => {
|
|
||||||
button.text = ' ' + rep.count
|
|
||||||
}
|
|
||||||
|
|
||||||
onItemRemoved: (idx, it) => {
|
|
||||||
button.text = (rep.count - 1) <= 0 ? "" : ' ' + (rep.count - 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HyprlandFocusGrab {
|
ColumnLayout {
|
||||||
id: grab
|
width: parent.width
|
||||||
windows: [ menu ]
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
||||||
onCleared: menu.visible = false
|
Repeater {
|
||||||
|
id: rep
|
||||||
|
|
||||||
|
model: server.trackedNotifications.values
|
||||||
|
|
||||||
|
Notif {
|
||||||
|
required property int index
|
||||||
|
src: rep.model[index]
|
||||||
|
}
|
||||||
|
|
||||||
|
onItemAdded: (idx, it) => {
|
||||||
|
//button.text = ' ' + rep.count
|
||||||
|
}
|
||||||
|
|
||||||
|
onItemRemoved: (idx, it) => {
|
||||||
|
//button.text = (rep.count - 1) <= 0 ? "" : ' ' + (rep.count - 1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
|
||||||
|
|
||||||
anchor.window: window
|
Lock {
|
||||||
anchor.rect.x: popupOffset
|
id: lock
|
||||||
anchor.rect.y: 50
|
bg_path: "/tmp/nathan/tmp.jpg"
|
||||||
implicitWidth: 150
|
//locked: true
|
||||||
implicitHeight: 250
|
}
|
||||||
visible: false
|
|
||||||
|
|
||||||
color: "transparent"
|
MouseArea {
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
|
||||||
radius: 5
|
|
||||||
|
|
||||||
implicitHeight: parent.height - 20
|
id: out
|
||||||
implicitWidth: parent.width
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
|
|
||||||
spacing: 0
|
anchors.fill: parent
|
||||||
|
|
||||||
Button {
|
onClicked: {
|
||||||
Layout.topMargin: 5
|
root.visible = false
|
||||||
x: (parent.width - width) / 2
|
}
|
||||||
implicitWidth: parent.width - 10
|
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
|
||||||
|
|
||||||
text: 'shutdown'
|
ClippingRectangle {
|
||||||
onClicked: shutdown.running = true
|
implicitWidth: 200
|
||||||
Process {
|
implicitHeight: 200
|
||||||
id: shutdown
|
id: main
|
||||||
running: false
|
anchors.centerIn: parent
|
||||||
command: ["systemctl", "poweroff"]
|
radius: 10
|
||||||
}
|
color: "transparent"
|
||||||
}
|
GridLayout {
|
||||||
|
columns: 2
|
||||||
Button {
|
rows: 2
|
||||||
x: (parent.width - width) / 2
|
|
||||||
implicitWidth: parent.width - 10
|
Repeater {
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
model: 4
|
||||||
text: 'reboot'
|
WrapperMouseArea {
|
||||||
onClicked: reboot.running = true
|
ClippingWrapperRectangle {
|
||||||
Process {
|
radius: 10
|
||||||
id: reboot
|
Text {
|
||||||
running: false
|
text: switch(index) {
|
||||||
command: ["systemctl", "reboot"]
|
case 0:
|
||||||
}
|
return ""
|
||||||
}
|
case 1:
|
||||||
|
return " "
|
||||||
Button {
|
case 2:
|
||||||
x: (parent.width - width) / 2
|
return " "
|
||||||
implicitWidth: parent.width - 10
|
case 3:
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
return " "
|
||||||
text: 'logout'
|
default:
|
||||||
onClicked: logout.running = true
|
return " "
|
||||||
Process {
|
break;
|
||||||
id: logout
|
}
|
||||||
running: false
|
font.pointSize: 16
|
||||||
command: ["loginctl", "kill-session", "self" ]
|
|
||||||
}
|
horizontalAlignment: Text.AlignHCenter
|
||||||
}
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
Button {
|
color: Settings.special.foreground
|
||||||
Layout.bottomMargin: 10
|
}
|
||||||
x: (parent.width - width) / 2
|
|
||||||
implicitWidth: parent.width - 10
|
implicitHeight: 60
|
||||||
implicitHeight: parent.height / 5 - parent.spacing
|
implicitWidth: 60
|
||||||
text: 'sleep'
|
color: parent.contansMouse ? Settings.colors.color12 : Settings.colors.color4
|
||||||
onClicked: sleep.running = true
|
}
|
||||||
Process {
|
|
||||||
id: sleep
|
hoverEnabled: true
|
||||||
running: false
|
|
||||||
command: ["systemctl", "sleep"]
|
onEntered: {
|
||||||
|
child.color = Settings.colors.color12
|
||||||
|
}
|
||||||
|
|
||||||
|
onExited: {
|
||||||
|
child.color = Settings.colors.color4
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
root.visible = false
|
||||||
|
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
46
config/aurora/modules/PowerMode.qml
Normal file
46
config/aurora/modules/PowerMode.qml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
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.UPower
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Button {
|
||||||
|
Layout.topMargin: 5
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
implicitWidth: parent.width - 10
|
||||||
|
implicitHeight: parent.height / 5 - parent.spacing
|
||||||
|
|
||||||
|
text: 'performance'
|
||||||
|
onClicked: PowerProfiles.profile = PowerProfile.Performance
|
||||||
|
visible: PowerProfiles.hasPerformanceProfile
|
||||||
|
|
||||||
|
background: Rectangle { color: PowerProfiles.profile == PowerProfile.Performance ? Settings.colors.color13 : Settings.colors.color4 }
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
Layout.topMargin: 5
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
implicitWidth: parent.width - 10
|
||||||
|
implicitHeight: parent.height / 5 - parent.spacing
|
||||||
|
|
||||||
|
text: 'balanced'
|
||||||
|
onClicked: PowerProfiles.profile = PowerProfile.Balanced
|
||||||
|
background: Rectangle { color: PowerProfiles.profile == PowerProfile.Balanced ? Settings.colors.color13 : Settings.colors.color4 }
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
Layout.topMargin: 5
|
||||||
|
x: (parent.width - width) / 2
|
||||||
|
implicitWidth: parent.width - 10
|
||||||
|
implicitHeight: parent.height / 5 - parent.spacing
|
||||||
|
|
||||||
|
text: 'power saver'
|
||||||
|
onClicked: PowerProfiles.profile = PowerProfile.PowerSaver
|
||||||
|
background: Rectangle { color: PowerProfiles.profile == PowerProfile.PowerSaver ? Settings.colors.color13 : Settings.colors.color4 }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
pragma Singleton
|
|
||||||
|
|
||||||
import Quickshell
|
|
||||||
import Quickshell.Io
|
|
||||||
|
|
||||||
Singleton {
|
|
||||||
|
|
||||||
property string wallpaper: json.wallpaper
|
|
||||||
|
|
||||||
property string alpha: json.alpha
|
|
||||||
|
|
||||||
property JsonObject special: json.special
|
|
||||||
property JsonObject colors: json.colors
|
|
||||||
|
|
||||||
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: "white"
|
|
||||||
property string foreground: "white"
|
|
||||||
property string cursor: "white"
|
|
||||||
}
|
|
||||||
|
|
||||||
property JsonObject colors: JsonObject {
|
|
||||||
property string color0: "white"
|
|
||||||
property string color1: "white"
|
|
||||||
property string color2: "white"
|
|
||||||
property string color3: "white"
|
|
||||||
|
|
||||||
property string color4: "white"
|
|
||||||
property string color5: "white"
|
|
||||||
property string color6: "white"
|
|
||||||
property string color7: "white"
|
|
||||||
|
|
||||||
property string color8: "white"
|
|
||||||
property string color9: "white"
|
|
||||||
property string color10: "white"
|
|
||||||
property string color11: "white"
|
|
||||||
|
|
||||||
property string color12: "white"
|
|
||||||
property string color13: "white"
|
|
||||||
property string color14: "white"
|
|
||||||
property string color15: "white"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
120
config/aurora/modules/Settings.qml
Normal file
120
config/aurora/modules/Settings.qml
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
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 wallpaperDir: s_json.wallpaperDir
|
||||||
|
|
||||||
|
property string colorsPath: s_json.colorsPath
|
||||||
|
|
||||||
|
Process {
|
||||||
|
id: cc
|
||||||
|
command: [ s_json.changeColorsCmd ]
|
||||||
|
running: false
|
||||||
|
}
|
||||||
|
|
||||||
|
property string settingsPath: Quickshell.env("AURORA_SETTINGS")
|
||||||
|
onSettingsPathChanged: reload()
|
||||||
|
|
||||||
|
function reload() {
|
||||||
|
settings.reload()
|
||||||
|
root.wallpaperDir = Qt.binding(() => s_json.wallpaperDir)
|
||||||
|
root.colorsPath = Qt.binding(() => s_json.colorsPath)
|
||||||
|
root.wallpaper = Qt.binding(() => c_json.wallpaper)
|
||||||
|
root.colors = Qt.binding(() => c_json.colors)
|
||||||
|
}
|
||||||
|
|
||||||
|
id: root
|
||||||
|
|
||||||
|
FileView {
|
||||||
|
|
||||||
|
id: settings
|
||||||
|
|
||||||
|
path: root.settingsPath
|
||||||
|
|
||||||
|
watchChanges: true
|
||||||
|
|
||||||
|
onFileChanged: reload()
|
||||||
|
|
||||||
|
JsonAdapter {
|
||||||
|
id: s_json
|
||||||
|
property string wallpaperDir
|
||||||
|
|
||||||
|
property string colorsPath
|
||||||
|
|
||||||
|
property string changeColorsCmd
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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.colorsPath
|
||||||
|
|
||||||
|
watchChanges: true
|
||||||
|
|
||||||
|
onFileChanged: {
|
||||||
|
reload()
|
||||||
|
cc.running = true
|
||||||
|
}
|
||||||
|
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,221 @@
|
|||||||
|
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 {
|
||||||
|
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property real radius: 10
|
||||||
|
property real selected: 0
|
||||||
|
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
color: Settings.special.background
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
ClippingRectangle {
|
||||||
|
//anchors.fill: parent
|
||||||
|
color: Settings.special.background
|
||||||
|
id: main
|
||||||
|
|
||||||
|
radius: root.radius
|
||||||
|
implicitWidth: root.width
|
||||||
|
implicitHeight: root.height
|
||||||
|
|
||||||
|
Item {
|
||||||
|
implicitWidth: root.width - 4 * lay.spacing
|
||||||
|
implicitHeight: root.height - 4 * lay.spacing
|
||||||
|
x: 2 * lay.spacing
|
||||||
|
y: 2 * lay.spacing
|
||||||
|
RowLayout {
|
||||||
|
id: lay
|
||||||
|
spacing: 2
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: tabs
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
Repeater {
|
||||||
|
id: rep
|
||||||
|
|
||||||
|
model: 9
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
ClippingRectangle {
|
||||||
|
//Layout.alignment: Qt.AlignTop
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 40
|
||||||
|
radius: root.radius
|
||||||
|
color: index == selected ? Settings.colors.color13 : Settings.colors.color4
|
||||||
|
//LauncherButton { anchors.centerIn: parent }
|
||||||
|
Text {
|
||||||
|
font.pointSize: 14
|
||||||
|
text: switch(index) {
|
||||||
|
case 0:
|
||||||
|
return " ";
|
||||||
|
case 1:
|
||||||
|
return " ";
|
||||||
|
case 2:
|
||||||
|
return " ";
|
||||||
|
case 3:
|
||||||
|
return "";
|
||||||
|
case 4:
|
||||||
|
return " ";
|
||||||
|
case 5:
|
||||||
|
return " ";
|
||||||
|
case 6:
|
||||||
|
return " ";
|
||||||
|
case 7:
|
||||||
|
return " ";
|
||||||
|
case 8:
|
||||||
|
return "";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: Settings.colors.color0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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 ? Settings.colors.color13 : Settings.colors.color4)
|
||||||
|
}
|
||||||
|
hoverEnabled: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ClippingRectangle {
|
||||||
|
id: content
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
implicitWidth: parent.width - tabs.width - 2 * parent.spacing - rTabs.width - 2 * parent.spacing
|
||||||
|
implicitHeight: parent.height
|
||||||
|
radius: root.radius
|
||||||
|
color: Settings.colors.color1
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
readonly property Component launcher: LauncherButton {}
|
||||||
|
|
||||||
|
readonly property Component bt: Bluetooth {}
|
||||||
|
readonly property Component vol: Volume {}
|
||||||
|
|
||||||
|
readonly property Component bat: PowerMode {}
|
||||||
|
readonly property Component mon: LauncherButton {}
|
||||||
|
|
||||||
|
readonly property Component net: LauncherButton {}
|
||||||
|
readonly property Component mus: LauncherButton {}
|
||||||
|
|
||||||
|
readonly property Component clk: Clock {}
|
||||||
|
readonly property Component wal: LauncherButton {}
|
||||||
|
|
||||||
|
sourceComponent: switch(selected) {
|
||||||
|
case 0:
|
||||||
|
return wal;
|
||||||
|
case 1:
|
||||||
|
return mon;
|
||||||
|
case 2:
|
||||||
|
return net;
|
||||||
|
case 3:
|
||||||
|
return bt;
|
||||||
|
case 4:
|
||||||
|
return vol;
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
return mus;
|
||||||
|
case 7:
|
||||||
|
return wal;
|
||||||
|
case 8:
|
||||||
|
return bat;
|
||||||
|
default:
|
||||||
|
return launcher;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: rTabs
|
||||||
|
Layout.alignment: Qt.AlignBottom
|
||||||
|
Repeater {
|
||||||
|
id: rRep
|
||||||
|
|
||||||
|
model: 9
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
ClippingRectangle {
|
||||||
|
//Layout.alignment: Qt.AlignTop
|
||||||
|
implicitWidth: 40
|
||||||
|
implicitHeight: 40
|
||||||
|
radius: root.radius
|
||||||
|
property bool use: false
|
||||||
|
color: use ? Settings.colors.color13 : Settings.colors.color4
|
||||||
|
//LauncherButton { anchors.centerIn: parent }
|
||||||
|
Text {
|
||||||
|
font.pointSize: 14
|
||||||
|
text: switch(index) {
|
||||||
|
case 0:
|
||||||
|
return " ";
|
||||||
|
case 1:
|
||||||
|
return " ";
|
||||||
|
case 2:
|
||||||
|
return " ";
|
||||||
|
case 3:
|
||||||
|
return "";
|
||||||
|
case 4:
|
||||||
|
return " ";
|
||||||
|
case 5:
|
||||||
|
return " ";
|
||||||
|
case 6:
|
||||||
|
return " ";
|
||||||
|
case 7:
|
||||||
|
return " ";
|
||||||
|
case 8:
|
||||||
|
return " ";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
anchors.centerIn: parent
|
||||||
|
color: Settings.colors.color0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
||||||
|
|
||||||
|
switch(index) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
case 8:
|
||||||
|
power.visible = true
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
hoverEnabled: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import Quickshell.Services.SystemTray
|
|||||||
import Quickshell.Widgets
|
import Quickshell.Widgets
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
implicitWidth: 10 + rep.count * (2 * lay.spacing + 20)
|
implicitHeight: 10 + rep.count * (2 * lay.spacing + 20)
|
||||||
height: 30
|
width: 30
|
||||||
visible: SystemTray.items.values.length != 0
|
visible: SystemTray.items.values.length != 0
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
@@ -14,9 +14,10 @@ Item {
|
|||||||
required property real popupOffset
|
required property real popupOffset
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
radius: 5
|
radius: 3
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
RowLayout {
|
color: Settings.colors.color4
|
||||||
|
ColumnLayout {
|
||||||
id: lay
|
id: lay
|
||||||
spacing: 4
|
spacing: 4
|
||||||
Repeater {
|
Repeater {
|
||||||
@@ -25,9 +26,12 @@ Item {
|
|||||||
model: SystemTray.items
|
model: SystemTray.items
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
radius: 10
|
radius: 3
|
||||||
implicitWidth: 20
|
implicitWidth: 20
|
||||||
implicitHeight: 20
|
implicitHeight: 20
|
||||||
|
|
||||||
|
color: Settings.colors.color4
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
@@ -49,7 +53,7 @@ Item {
|
|||||||
if(mouse.button == Qt.LeftButton) {
|
if(mouse.button == Qt.LeftButton) {
|
||||||
SystemTray.items.values[index].activate()
|
SystemTray.items.values[index].activate()
|
||||||
} else if(mouse.button == Qt.RightButton) {
|
} else if(mouse.button == Qt.RightButton) {
|
||||||
SystemTray.items.values[index].display(root.window, popupOffset, 40)
|
SystemTray.items.values[index].display(root.window, popupOffset, root.y - 100)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,85 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Shapes
|
|
||||||
|
|
||||||
import Quickshell
|
|
||||||
import Quickshell.Widgets
|
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
id: root
|
|
||||||
|
|
||||||
property real radius: 10
|
|
||||||
property real pad: 5
|
|
||||||
property color color
|
|
||||||
|
|
||||||
property Item item
|
|
||||||
|
|
||||||
hoverEnabled: true
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
|
|
||||||
item.y = pad
|
|
||||||
}
|
|
||||||
|
|
||||||
width: shape.width
|
|
||||||
height: shape.height
|
|
||||||
|
|
||||||
Shape {
|
|
||||||
id: shape
|
|
||||||
|
|
||||||
//anchors.centerIn: parent
|
|
||||||
ShapePath {
|
|
||||||
id: path
|
|
||||||
|
|
||||||
strokeWidth: 4
|
|
||||||
strokeColor: root.color
|
|
||||||
fillColor: root.color
|
|
||||||
|
|
||||||
startX: -radius - pad; startY: 0
|
|
||||||
|
|
||||||
PathArc {
|
|
||||||
radiusX: radius
|
|
||||||
radiusY: radius
|
|
||||||
|
|
||||||
relativeX: radius
|
|
||||||
relativeY: radius
|
|
||||||
}
|
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: 2 * pad + item.height - 2 * radius }
|
|
||||||
|
|
||||||
PathArc {
|
|
||||||
radiusX: radius
|
|
||||||
radiusY: radius
|
|
||||||
|
|
||||||
direction: PathArc.Counterclockwise
|
|
||||||
|
|
||||||
relativeX: radius
|
|
||||||
relativeY: radius
|
|
||||||
}
|
|
||||||
|
|
||||||
PathLine { x: item.width + pad - radius; relativeY: 0 }
|
|
||||||
|
|
||||||
PathArc {
|
|
||||||
radiusX: radius
|
|
||||||
radiusY: radius
|
|
||||||
|
|
||||||
direction: PathArc.Counterclockwise
|
|
||||||
|
|
||||||
relativeX: radius
|
|
||||||
relativeY: -radius
|
|
||||||
}
|
|
||||||
|
|
||||||
PathLine { relativeX: 0; relativeY: -item.height + 2 * radius - 2 * pad }
|
|
||||||
|
|
||||||
PathArc {
|
|
||||||
radiusX: radius
|
|
||||||
radiusY: radius
|
|
||||||
|
|
||||||
relativeX: radius
|
|
||||||
relativeY: -radius
|
|
||||||
}
|
|
||||||
|
|
||||||
PathLine { x: -radius - pad; y: 0 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
85
config/aurora/modules/VFlyoutDown.qml
Normal file
85
config/aurora/modules/VFlyoutDown.qml
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Shapes
|
||||||
|
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Widgets
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
required property real radius
|
||||||
|
property real pad: 5
|
||||||
|
property color color
|
||||||
|
|
||||||
|
property Item item
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
|
||||||
|
item.y = root.y + pad
|
||||||
|
}
|
||||||
|
|
||||||
|
width: shape.width
|
||||||
|
height: shape.height
|
||||||
|
|
||||||
|
Shape {
|
||||||
|
id: shape
|
||||||
|
|
||||||
|
//anchors.centerIn: parent
|
||||||
|
ShapePath {
|
||||||
|
id: path
|
||||||
|
|
||||||
|
strokeWidth: 1
|
||||||
|
strokeColor: "transparent"
|
||||||
|
fillColor: root.color
|
||||||
|
|
||||||
|
startX: -root.radius - pad; startY: 0
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: root.radius
|
||||||
|
|
||||||
|
relativeX: root.radius
|
||||||
|
relativeY: root.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
PathLine { relativeX: 0; relativeY: 2 * pad + item.height - 2 * root.radius }
|
||||||
|
|
||||||
|
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 {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: root.radius
|
||||||
|
|
||||||
|
direction: PathArc.Counterclockwise
|
||||||
|
|
||||||
|
relativeX: root.radius
|
||||||
|
relativeY: -root.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
PathLine { relativeX: 0; relativeY: -item.height + 2 * root.radius - 2 * pad }
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: root.radius
|
||||||
|
|
||||||
|
relativeX: root.radius
|
||||||
|
relativeY: -root.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
PathLine { x: -root.radius - pad; y: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
87
config/aurora/modules/VFlyoutLeft.qml
Normal file
87
config/aurora/modules/VFlyoutLeft.qml
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Shapes
|
||||||
|
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Widgets
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
required property real radius
|
||||||
|
property real pad: 5
|
||||||
|
property color color
|
||||||
|
|
||||||
|
property Item item
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
|
||||||
|
item.x = pad
|
||||||
|
}
|
||||||
|
|
||||||
|
width: shape.width
|
||||||
|
height: shape.height
|
||||||
|
|
||||||
|
Shape {
|
||||||
|
id: shape
|
||||||
|
|
||||||
|
//anchors.centerIn: parent
|
||||||
|
ShapePath {
|
||||||
|
id: path
|
||||||
|
|
||||||
|
strokeWidth: 4
|
||||||
|
strokeColor: root.color
|
||||||
|
fillColor: root.color
|
||||||
|
|
||||||
|
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 {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: root.radius
|
||||||
|
|
||||||
|
relativeX: root.radius
|
||||||
|
relativeY: root.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
PathLine { relativeX: 0; relativeY: 2 * pad + item.height - 2 * root.radius }
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: root.radius
|
||||||
|
|
||||||
|
relativeX: -root.radius
|
||||||
|
relativeY: root.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
PathLine { relativeX: -item.width - 2 * pad + 2 * root.radius; relativeY: 0 }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: root.radius
|
||||||
|
|
||||||
|
direction: PathArc.Counterclockwise
|
||||||
|
|
||||||
|
relativeX: -root.radius
|
||||||
|
relativeY: root.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
PathLine { x: 0; y: -root.radius - pad }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
87
config/aurora/modules/VFlyoutRight.qml
Normal file
87
config/aurora/modules/VFlyoutRight.qml
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Shapes
|
||||||
|
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Widgets
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
required property real radius
|
||||||
|
property real pad: 5
|
||||||
|
property color color
|
||||||
|
|
||||||
|
property Item item
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
|
||||||
|
item.x = pad
|
||||||
|
}
|
||||||
|
|
||||||
|
width: shape.width
|
||||||
|
height: shape.height
|
||||||
|
|
||||||
|
Shape {
|
||||||
|
id: shape
|
||||||
|
|
||||||
|
//anchors.centerIn: parent
|
||||||
|
ShapePath {
|
||||||
|
id: path
|
||||||
|
|
||||||
|
strokeWidth: 4
|
||||||
|
strokeColor: root.color
|
||||||
|
fillColor: root.color
|
||||||
|
|
||||||
|
startX: 0; startY: pad
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: root.radius
|
||||||
|
|
||||||
|
relativeX: root.radius
|
||||||
|
relativeY: -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 { relativeX: 0; relativeY: 2 * pad + item.height + 2 * root.radius }
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: root.radius
|
||||||
|
|
||||||
|
direction: PathArc.Counterclockwise
|
||||||
|
|
||||||
|
relativeX: -root.radius
|
||||||
|
relativeY: -root.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
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 }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
91
config/aurora/modules/VFlyoutUp.qml
Normal file
91
config/aurora/modules/VFlyoutUp.qml
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Shapes
|
||||||
|
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Widgets
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
required property real radius
|
||||||
|
property real pad: 5
|
||||||
|
property color color
|
||||||
|
|
||||||
|
property Item item
|
||||||
|
|
||||||
|
hoverEnabled: true
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
|
||||||
|
item.y = root.y - pad
|
||||||
|
|
||||||
|
//console.log(height)
|
||||||
|
}
|
||||||
|
|
||||||
|
width: shape.width
|
||||||
|
height: item.height + 2 * pad
|
||||||
|
|
||||||
|
Shape {
|
||||||
|
id: shape
|
||||||
|
|
||||||
|
y: root.y + root.item.height
|
||||||
|
|
||||||
|
//anchors.centerIn: parent
|
||||||
|
ShapePath {
|
||||||
|
id: path
|
||||||
|
|
||||||
|
strokeWidth: 1
|
||||||
|
strokeColor: "transparent"
|
||||||
|
fillColor: root.color
|
||||||
|
|
||||||
|
startX: -root.radius - pad; startY: 0
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: -root.radius
|
||||||
|
|
||||||
|
relativeX: root.radius
|
||||||
|
relativeY: -root.radius
|
||||||
|
direction: PathArc.Counterclockwise
|
||||||
|
}
|
||||||
|
|
||||||
|
PathLine { relativeX: 0; relativeY: -(2 * pad + item.height - 2 * root.radius) }
|
||||||
|
|
||||||
|
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 {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: -root.radius
|
||||||
|
|
||||||
|
//direction: PathArc.Counterclockwise
|
||||||
|
|
||||||
|
relativeX: root.radius
|
||||||
|
relativeY: root.radius
|
||||||
|
}
|
||||||
|
|
||||||
|
PathLine { relativeX: 0; relativeY: -(-item.height + 2 * root.radius - 2 * pad) }
|
||||||
|
|
||||||
|
PathArc {
|
||||||
|
radiusX: root.radius
|
||||||
|
radiusY: -root.radius
|
||||||
|
|
||||||
|
relativeX: root.radius
|
||||||
|
relativeY: root.radius
|
||||||
|
direction: PathArc.Counterclockwise
|
||||||
|
}
|
||||||
|
|
||||||
|
PathLine { x: -root.radius - pad; y: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -7,101 +7,118 @@ import Quickshell.Widgets
|
|||||||
import Quickshell.Hyprland
|
import Quickshell.Hyprland
|
||||||
import Quickshell.Services.Pipewire
|
import Quickshell.Services.Pipewire
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
|
||||||
radius: 5
|
|
||||||
width: 100; height: 30
|
|
||||||
Button {
|
|
||||||
id: button
|
|
||||||
text: (Pipewire.defaultAudioSink?.audio?.muted ? " " : " ") + Math.floor(Pipewire.defaultAudioSink?.audio?.volume * 100) + "%"
|
|
||||||
font.pointSize: 12
|
|
||||||
implicitHeight: parent.height
|
|
||||||
|
|
||||||
PwObjectTracker {
|
|
||||||
objects: [ Pipewire.defaultAudioSink ]
|
|
||||||
}
|
|
||||||
|
|
||||||
onClicked: {
|
ScrollView {
|
||||||
menu.visible = true
|
anchors.fill: parent
|
||||||
grab.active = true
|
ColumnLayout {
|
||||||
}
|
anchors.fill: parent
|
||||||
|
|
||||||
}
|
spacing: 0
|
||||||
|
|
||||||
required property var window
|
|
||||||
required property real popupOffset
|
|
||||||
id: root
|
|
||||||
|
|
||||||
PopupWindow {
|
|
||||||
|
|
||||||
id: menu
|
|
||||||
|
|
||||||
anchor.window: window
|
|
||||||
anchor.rect.x: popupOffset
|
|
||||||
anchor.rect.y: 50
|
|
||||||
implicitWidth: 250
|
|
||||||
implicitHeight: 150
|
|
||||||
visible: false
|
|
||||||
|
|
||||||
color: "transparent"
|
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
|
color: Settings.colors.color11
|
||||||
radius: 5
|
radius: 5
|
||||||
|
Layout.margins: 5
|
||||||
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
||||||
|
implicitWidth: parent.width - 2 * Layout.margins
|
||||||
|
|
||||||
implicitHeight: parent.height - 20
|
RowLayout {
|
||||||
implicitWidth: parent.width
|
width: parent.width
|
||||||
|
Text {
|
||||||
|
color: Settings.colors.color0
|
||||||
|
Layout.margins: 5
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
text: 'Output'
|
||||||
|
}
|
||||||
|
|
||||||
ScrollView {
|
Slider {
|
||||||
ColumnLayout {
|
from: 0
|
||||||
|
to: 2
|
||||||
|
|
||||||
spacing: 0
|
orientation: Qt.Horizontal
|
||||||
|
|
||||||
Text {
|
implicitWidth: 500
|
||||||
text: 'Output Devices'
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
value: Pipewire.defaultAudioSink.audio.volume
|
||||||
Repeater {
|
|
||||||
id: outputs
|
|
||||||
|
|
||||||
model: {
|
|
||||||
Pipewire.nodes.values.filter(n => n.isSink && n.audio && n.nickname != "")
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
text: outputs.model[index].nickname
|
|
||||||
onClicked: Pipewire.preferredDefaultAudioSink = outputs.model[index]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
text: 'Input Devices'
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
Repeater {
|
|
||||||
id: inputs
|
|
||||||
|
|
||||||
model: {
|
|
||||||
Pipewire.nodes.values.filter(n => !n.isSink && n.audio && n.nickname != "")
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
text: inputs.model[index].nickname
|
|
||||||
onClicked: Pipewire.preferredDefaultAudioSource = inputs.model[index]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
onValueChanged: Pipewire.defaultAudioSink.audio.volume = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HyprlandFocusGrab {
|
ColumnLayout {
|
||||||
id: grab
|
Repeater {
|
||||||
windows: [ menu ]
|
id: outputs
|
||||||
onCleared: menu.visible = false
|
|
||||||
|
model: {
|
||||||
|
Pipewire.nodes.values.filter(n => n.isSink && n.audio && n.nickname != "")
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: outputs.model[index].nickname
|
||||||
|
onClicked: {
|
||||||
|
Pipewire.preferredDefaultAudioSink = outputs.model[index]
|
||||||
|
}
|
||||||
|
|
||||||
|
PwObjectTracker {
|
||||||
|
objects: [ outputs.model[index] ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ClippingWrapperRectangle {
|
||||||
|
color: Settings.colors.color11
|
||||||
|
radius: 5
|
||||||
|
Layout.margins: 5
|
||||||
|
Layout.alignment: Qt.AlignVCenter | Qt.AlignTop
|
||||||
|
implicitWidth: parent.width - 2 * Layout.margins
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
width: parent.width
|
||||||
|
Text {
|
||||||
|
color: Settings.colors.color0
|
||||||
|
Layout.margins: 5
|
||||||
|
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
|
||||||
|
text: 'Input'
|
||||||
|
}
|
||||||
|
|
||||||
|
Slider {
|
||||||
|
from: 0
|
||||||
|
to: 2
|
||||||
|
|
||||||
|
visible: false
|
||||||
|
orientation: Qt.Horizontal
|
||||||
|
|
||||||
|
implicitWidth: 500
|
||||||
|
|
||||||
|
value: Pipewire.defaultAudioSource.audio.volume
|
||||||
|
|
||||||
|
onValueChanged: Pipewire.defaultAudioSource.audio.volume = value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
Repeater {
|
||||||
|
id: inputs
|
||||||
|
|
||||||
|
model: {
|
||||||
|
Pipewire.nodes.values.filter(n => !n.isSink && n.audio && n.nickname != "")
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: inputs.model[index].nickname
|
||||||
|
onClicked: {
|
||||||
|
Pipewire.preferredDefaultAudioSource = inputs.model[index]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
87
config/aurora/modules/Wallpaper.qml
Normal file
87
config/aurora/modules/Wallpaper.qml
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Flickable {
|
||||||
|
//anchors.fill: parent
|
||||||
|
|
||||||
|
required property list<string> hyprcmds
|
||||||
|
|
||||||
|
id: root
|
||||||
|
|
||||||
|
property string dir: Settings.wallpaperDir
|
||||||
|
|
||||||
|
implicitHeight: lay.height
|
||||||
|
implicitWidth: 750
|
||||||
|
interactive: true
|
||||||
|
|
||||||
|
contentWidth: lay.width
|
||||||
|
|
||||||
|
flickDeceleration: 5000
|
||||||
|
|
||||||
|
WheelHandler {
|
||||||
|
target: root
|
||||||
|
//property: "contentX"
|
||||||
|
onWheel: {
|
||||||
|
console.log("test")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 {
|
||||||
|
id: lay
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
id: rep
|
||||||
|
model: 0
|
||||||
|
|
||||||
|
WrapperMouseArea {
|
||||||
|
onWheel: (e) => {
|
||||||
|
root.flick(e.angleDelta.y * 15, 0)
|
||||||
|
}
|
||||||
|
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: ["aurora-set-wallpaper", root.dir + "/" + rep.model[index]]
|
||||||
|
running: false
|
||||||
|
onRunningChanged: {
|
||||||
|
root.hyprcmds.forEach((c) => Hyprland.dispatch(c))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
sw.running = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ Item {
|
|||||||
Component.onCompleted: Hyprland.refreshWorkspaces()
|
Component.onCompleted: Hyprland.refreshWorkspaces()
|
||||||
|
|
||||||
ClippingWrapperRectangle {
|
ClippingWrapperRectangle {
|
||||||
color: Pywal.colors.color1
|
color: Settings.colors.color1
|
||||||
radius: 3
|
radius: 3
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
@@ -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,11 +36,11 @@ 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
|
? Settings.colors.color13
|
||||||
: containsMouse
|
: containsMouse
|
||||||
? Pywal.colors.color12
|
? Settings.colors.color12
|
||||||
: Pywal.colors.color4
|
: Settings.colors.color4
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
@@ -48,15 +50,17 @@ 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
|
? Settings.colors.color1
|
||||||
: Pywal.special.foreground
|
: Settings.special.foreground
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
rep.model[index].activate()
|
if(Hyprland?.focusedWorkspace?.id != rep.model[index].id) {
|
||||||
|
rep.model[index].activate()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
36
flake.lock
generated
36
flake.lock
generated
@@ -5,11 +5,11 @@
|
|||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772408722,
|
"lastModified": 1775087534,
|
||||||
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=",
|
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3",
|
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -23,11 +23,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772845525,
|
"lastModified": 1775900011,
|
||||||
"narHash": "sha256-Dp5Ir2u4jJDGCgeMRviHvEQDe+U37hMxp6RSNOoMMPc=",
|
"narHash": "sha256-QUGu6CJYFQ5AWVV0n3/FsJyV+1/gj7HSDx68/SX9pwM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "27b93804fbef1544cb07718d3f0a451f4c4cd6c0",
|
"rev": "b0569dc6ec1e6e7fefd8f6897184e4c191cd768e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -38,11 +38,11 @@
|
|||||||
},
|
},
|
||||||
"import-tree": {
|
"import-tree": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772344373,
|
"lastModified": 1773693634,
|
||||||
"narHash": "sha256-OQQ1MhB9t1J71b2wxRRTdH/Qd8UGG0p+dGspfCf5U1c=",
|
"narHash": "sha256-BtZ2dtkBdSUnFPPFc+n0kcMbgaTxzFNPv2iaO326Ffg=",
|
||||||
"owner": "vic",
|
"owner": "vic",
|
||||||
"repo": "import-tree",
|
"repo": "import-tree",
|
||||||
"rev": "10fda59eee7d7970ec443b925f32a1bc7526648c",
|
"rev": "c41e7d58045f9057880b0d85e1152d6a4430dbf1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -53,11 +53,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772542754,
|
"lastModified": 1775423009,
|
||||||
"narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=",
|
"narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4",
|
"rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -69,11 +69,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-lib": {
|
"nixpkgs-lib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772328832,
|
"lastModified": 1774748309,
|
||||||
"narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=",
|
"narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742",
|
"rev": "333c4e0545a6da976206c74db8773a1645b5870a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -84,11 +84,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1772433332,
|
"lastModified": 1775710090,
|
||||||
"narHash": "sha256-izhTDFKsg6KeVBxJS9EblGeQ8y+O8eCa6RcW874vxEc=",
|
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cf59864ef8aa2e178cccedbe2c178185b0365705",
|
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -1,54 +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 {
|
|
||||||
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user