diff --git a/modules/Bar.qml b/modules/Bar.qml index 6b4f324..0c4d66c 100644 --- a/modules/Bar.qml +++ b/modules/Bar.qml @@ -144,7 +144,9 @@ PanelWindow { M.BarGroup { Layout.minimumWidth: 0 clip: true - M.WindowTitle {} + M.WindowTitle { + visible: M.Modules.windowTitle.enable + } } Item { Layout.fillWidth: true diff --git a/modules/BluetoothMenu.qml b/modules/BluetoothMenu.qml index b6b97d3..1eb9d5f 100644 --- a/modules/BluetoothMenu.qml +++ b/modules/BluetoothMenu.qml @@ -73,7 +73,7 @@ M.HoverPanel { anchors.fill: parent anchors.leftMargin: 4 anchors.rightMargin: 4 - color: btHeaderHover.hovered ? M.Theme.base02 : "transparent" + color: btHeaderArea.containsMouse ? M.Theme.base02 : "transparent" radius: M.Theme.radius } @@ -109,12 +109,12 @@ M.HoverPanel { font.family: M.Theme.iconFontFamily } - HoverHandler { - id: btHeaderHover + MouseArea { + id: btHeaderArea + anchors.fill: parent + hoverEnabled: true cursorShape: Qt.PointingHandCursor - } - TapHandler { - onTapped: { + onClicked: { powerProc._action = menuWindow._btEnabled ? "off" : "on"; powerProc.running = true; } @@ -143,7 +143,7 @@ M.HoverPanel { anchors.fill: parent anchors.leftMargin: 4 anchors.rightMargin: 4 - color: entryHover.hovered ? M.Theme.base02 : "transparent" + color: entryArea.containsMouse ? M.Theme.base02 : "transparent" radius: M.Theme.radius } @@ -184,12 +184,12 @@ M.HoverPanel { width: entry.modelData.battery >= 0 ? implicitWidth : 0 } - HoverHandler { - id: entryHover + MouseArea { + id: entryArea + anchors.fill: parent + hoverEnabled: true cursorShape: Qt.PointingHandCursor - } - TapHandler { - onTapped: { + onClicked: { toggleProc.action = entry.modelData.connected ? "disconnect" : "connect"; toggleProc.mac = entry.modelData.mac; toggleProc.running = true; diff --git a/modules/Modules.qml b/modules/Modules.qml index f1f07ed..ae6c222 100644 --- a/modules/Modules.qml +++ b/modules/Modules.qml @@ -33,17 +33,20 @@ QtObject { enable: true }) property var bluetooth: ({ - enable: true + enable: true, + interval: 5000 }) property var backlight: ({ enable: true, step: 5 }) property var network: ({ - enable: true + enable: true, + interval: 5000 }) property var powerProfile: ({ - enable: true + enable: true, + interval: 5000 }) property var idleInhibitor: ({ enable: true @@ -60,10 +63,12 @@ QtObject { hot: 90 }) property var cpu: ({ - enable: true + enable: true, + interval: 1000 }) property var memory: ({ - enable: true + enable: true, + interval: 2000 }) property var disk: ({ enable: true, diff --git a/modules/NetworkMenu.qml b/modules/NetworkMenu.qml index 2bc7b67..a2798d8 100644 --- a/modules/NetworkMenu.qml +++ b/modules/NetworkMenu.qml @@ -104,7 +104,7 @@ M.HoverPanel { anchors.fill: parent anchors.leftMargin: 4 anchors.rightMargin: 4 - color: headerHover.hovered ? M.Theme.base02 : "transparent" + color: headerArea.containsMouse ? M.Theme.base02 : "transparent" radius: M.Theme.radius } @@ -140,12 +140,12 @@ M.HoverPanel { font.family: M.Theme.iconFontFamily } - HoverHandler { - id: headerHover + MouseArea { + id: headerArea + anchors.fill: parent + hoverEnabled: true cursorShape: Qt.PointingHandCursor - } - TapHandler { - onTapped: { + onClicked: { radioProc._state = menuWindow._wifiEnabled ? "off" : "on"; radioProc.running = true; } @@ -174,7 +174,7 @@ M.HoverPanel { anchors.fill: parent anchors.leftMargin: 4 anchors.rightMargin: 4 - color: entryHover.hovered ? M.Theme.base02 : "transparent" + color: entryArea.containsMouse ? M.Theme.base02 : "transparent" radius: M.Theme.radius } @@ -215,12 +215,12 @@ M.HoverPanel { width: entry.modelData.signal >= 0 ? implicitWidth : 0 } - HoverHandler { - id: entryHover + MouseArea { + id: entryArea + anchors.fill: parent + hoverEnabled: true cursorShape: Qt.PointingHandCursor - } - TapHandler { - onTapped: { + onClicked: { if (entry.modelData.active) { disconnectProc.uuid = entry.modelData.uuid; disconnectProc.running = true; diff --git a/modules/WindowTitle.qml b/modules/WindowTitle.qml index 6d48e6e..1749745 100644 --- a/modules/WindowTitle.qml +++ b/modules/WindowTitle.qml @@ -8,7 +8,7 @@ import "." as M M.BarSection { id: root spacing: M.Theme.moduleSpacing - visible: M.Modules.windowTitle.enable && root._title !== "" + visible: root._title !== "" tooltip: root._appId ? root._appId + "\n" + root._title : root._title diff --git a/nix/hm-module.nix b/nix/hm-module.nix index 343af64..cd3ab56 100644 --- a/nix/hm-module.nix +++ b/nix/hm-module.nix @@ -84,11 +84,6 @@ in "clock" "mpris" "volume" - "bluetooth" - "network" - "powerProfile" - "cpu" - "memory" "idleInhibitor" "power" "backgroundOverlay" @@ -119,6 +114,11 @@ in description = "Maximum notifications kept in history (-1 for unlimited)."; }; }; + bluetooth = moduleOpt "bluetooth" (intervalOpt 5000); + network = moduleOpt "network" (intervalOpt 5000); + powerProfile = moduleOpt "powerProfile" (intervalOpt 5000); + cpu = moduleOpt "cpu" (intervalOpt 1000); + memory = moduleOpt "memory" (intervalOpt 2000); disk = moduleOpt "disk" (intervalOpt 30000); backlight = moduleOpt "backlight" { step = lib.mkOption { @@ -177,7 +177,7 @@ in description = '' Theme overrides written to `$XDG_CONFIG_HOME/nova-shell/theme.json`. Keys: colors (base00-base0F), fontFamily, iconFontFamily, fontSize, - barOpacity, barHeight, barPadding, groupSpacing, moduleSpacing, radius, screenRadius. + barOpacity, barHeight, barPadding, barSpacing, moduleSpacing, radius. Automatically populated from stylix when it is available. ''; };