Compare commits
No commits in common. "a53616523b63ea87db99f48f6e75d3fa55939951" and "d6d108ee7ce45208b43ba5d9953d52b881cc2efa" have entirely different histories.
a53616523b
...
d6d108ee7c
4 changed files with 65 additions and 71 deletions
|
|
@ -27,8 +27,6 @@ QtObject {
|
|||
property bool battery: true
|
||||
property bool wlogout: true
|
||||
|
||||
property var weatherArgs: ["--nerd"]
|
||||
|
||||
property FileView _file: FileView {
|
||||
path: (Quickshell.env("XDG_CONFIG_HOME") || (Quickshell.env("HOME") + "/.config")) + "/nova-shell/modules.json"
|
||||
watchChanges: true
|
||||
|
|
@ -47,7 +45,5 @@ QtObject {
|
|||
if (k in root && typeof root[k] === "boolean")
|
||||
root[k] = data[k];
|
||||
}
|
||||
if (Array.isArray(data.weatherArgs))
|
||||
root.weatherArgs = data.weatherArgs;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,10 @@ import Quickshell
|
|||
import Quickshell.Wayland
|
||||
import "." as M
|
||||
|
||||
// Empty region = no input area — clicks pass through to windows below
|
||||
|
||||
// Draws rounded black corners at the edges of each screen.
|
||||
// Disabled when screenRadius is 0.
|
||||
// Disabled when screenRadius is 0 (the default).
|
||||
Item {
|
||||
id: root
|
||||
|
||||
|
|
@ -12,13 +14,20 @@ Item {
|
|||
|
||||
readonly property int _r: M.Theme.screenRadius
|
||||
|
||||
component Corner: PanelWindow {
|
||||
id: win
|
||||
Repeater {
|
||||
model: root._r > 0 ? [
|
||||
{ top: true, left: true, right: false, bottom: false, corner: 0 },
|
||||
{ top: true, left: false, right: true, bottom: false, corner: 1 },
|
||||
{ top: false, left: true, right: false, bottom: true, corner: 2 },
|
||||
{ top: false, left: false, right: true, bottom: true, corner: 3 }
|
||||
] : []
|
||||
|
||||
property int corner: 0
|
||||
delegate: PanelWindow {
|
||||
id: cornerWindow
|
||||
|
||||
required property var modelData
|
||||
|
||||
screen: root.screen
|
||||
visible: root._r > 0
|
||||
color: "transparent"
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
|
|
@ -26,6 +35,11 @@ Item {
|
|||
WlrLayershell.namespace: "nova-corners"
|
||||
mask: Region {}
|
||||
|
||||
anchors.top: cornerWindow.modelData.top
|
||||
anchors.left: cornerWindow.modelData.left
|
||||
anchors.right: cornerWindow.modelData.right
|
||||
anchors.bottom: cornerWindow.modelData.bottom
|
||||
|
||||
implicitWidth: root._r
|
||||
implicitHeight: root._r
|
||||
|
||||
|
|
@ -38,7 +52,7 @@ Item {
|
|||
ctx.fillStyle = "black";
|
||||
ctx.beginPath();
|
||||
|
||||
switch (win.corner) {
|
||||
switch (cornerWindow.modelData.corner) {
|
||||
case 0: // top-left
|
||||
ctx.moveTo(0, 0);
|
||||
ctx.lineTo(r, 0);
|
||||
|
|
@ -69,9 +83,5 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Corner { corner: 0; anchors.top: true; anchors.left: true }
|
||||
Corner { corner: 1; anchors.top: true; anchors.right: true }
|
||||
Corner { corner: 2; anchors.bottom: true; anchors.left: true }
|
||||
Corner { corner: 3; anchors.bottom: true; anchors.right: true }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ M.BarSection {
|
|||
Process {
|
||||
id: proc
|
||||
running: true
|
||||
command: ["wttrbar"].concat(M.Modules.weatherArgs)
|
||||
command: ["wttrbar", "--nerd"]
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -86,17 +86,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
weatherArgs = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ "--nerd" ];
|
||||
description = "Arguments passed to wttrbar.";
|
||||
example = [
|
||||
"--nerd"
|
||||
"--location"
|
||||
"Berlin"
|
||||
];
|
||||
};
|
||||
|
||||
theme = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.anything;
|
||||
default = { };
|
||||
|
|
@ -131,8 +120,7 @@ in
|
|||
++ lib.optional cfg.modules.weather pkgs.wttrbar;
|
||||
|
||||
xdg.configFile."nova-shell/modules.json".source =
|
||||
(pkgs.formats.json { }).generate "nova-shell-modules.json"
|
||||
(cfg.modules // { weatherArgs = cfg.weatherArgs; });
|
||||
(pkgs.formats.json { }).generate "nova-shell-modules.json" cfg.modules;
|
||||
|
||||
xdg.configFile."nova-shell/theme.json".source =
|
||||
let
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue