Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d8cef95b6f | ||
|
|
5deb6e7b62 | ||
|
|
208a9023b8 |
7 changed files with 38 additions and 33 deletions
|
|
@ -138,7 +138,6 @@ PanelWindow {
|
|||
leftEdge: !workspacesGroup.visible
|
||||
M.Tray {
|
||||
bar: bar
|
||||
visible: M.Modules.tray.enable
|
||||
}
|
||||
}
|
||||
M.BarGroup {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ M.BarSection {
|
|||
|
||||
Process {
|
||||
id: proc
|
||||
running: true
|
||||
running: M.Modules.bluetooth.enable
|
||||
command: ["sh", "-c", "s=$(bluetoothctl show 2>/dev/null); " + "[ -z \"$s\" ] && echo unavailable && exit; " + "echo \"$s\" | grep -q 'Powered: yes' || { echo off:; exit; }; " + "info=$(bluetoothctl info 2>/dev/null); " + "d=$(echo \"$info\" | awk -F': ' '/\\tName:/{n=$2}/Connected: yes/{c=1}END{if(c)print n}'); " + "[ -n \"$d\" ] && echo \"connected:$d\" || { echo on:; exit; }; " + "bat=$(echo \"$info\" | awk -F': ' '/Battery Percentage.*\\(/{gsub(/[^0-9]/,\"\",$2);print $2}'); " + "[ -n \"$bat\" ] && echo \"bat:$bat\""]
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: root._parse(text)
|
||||
|
|
@ -44,7 +44,7 @@ M.BarSection {
|
|||
// Event-driven: watch BlueZ DBus property changes
|
||||
Process {
|
||||
id: btMonitor
|
||||
running: true
|
||||
running: M.Modules.bluetooth.enable
|
||||
command: ["sh", "-c", "dbus-monitor --system \"interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path_namespace='/org/bluez'\" 2>/dev/null"]
|
||||
stdout: SplitParser {
|
||||
splitMarker: "\n"
|
||||
|
|
@ -58,7 +58,7 @@ M.BarSection {
|
|||
}
|
||||
Timer {
|
||||
interval: 60000
|
||||
running: true
|
||||
running: M.Modules.bluetooth.enable
|
||||
repeat: true
|
||||
onTriggered: proc.running = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,85 +8,85 @@ QtObject {
|
|||
id: root
|
||||
|
||||
property var workspaces: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var tray: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var windowTitle: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var clock: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var notifications: ({
|
||||
enable: false,
|
||||
enable: true,
|
||||
timeout: 3000,
|
||||
maxPopups: 4,
|
||||
maxVisible: 10,
|
||||
maxHistory: -1
|
||||
})
|
||||
property var mpris: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var volume: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var bluetooth: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var backlight: ({
|
||||
enable: false,
|
||||
enable: true,
|
||||
step: 5
|
||||
})
|
||||
property var network: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var powerProfile: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var idleInhibitor: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var weather: ({
|
||||
enable: false,
|
||||
enable: true,
|
||||
args: ["--nerd"],
|
||||
interval: 3600000
|
||||
})
|
||||
property var temperature: ({
|
||||
enable: false,
|
||||
enable: true,
|
||||
warm: 80,
|
||||
hot: 90
|
||||
})
|
||||
property var cpu: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var memory: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var disk: ({
|
||||
enable: false,
|
||||
enable: true,
|
||||
interval: 30000
|
||||
})
|
||||
property var battery: ({
|
||||
enable: false,
|
||||
enable: true,
|
||||
warning: 25,
|
||||
critical: 15
|
||||
})
|
||||
property var privacy: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var screenCorners: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var power: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var backgroundOverlay: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var overviewBackdrop: ({
|
||||
enable: false
|
||||
enable: true
|
||||
})
|
||||
property var statsDaemon: ({
|
||||
interval: -1
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ M.BarSection {
|
|||
|
||||
Process {
|
||||
id: proc
|
||||
running: true
|
||||
running: M.Modules.network.enable
|
||||
command: ["sh", "-c", "line=$(nmcli -t -f NAME,TYPE,DEVICE connection show --active 2>/dev/null | head -1); if [ -z \"$line\" ]; then dev=$(nmcli -t -f DEVICE,STATE device 2>/dev/null | grep ':connected' | grep -v ':unmanaged\\|:unavailable\\|:disconnected\\|:connecting' | head -1 | cut -d: -f1); [ -n \"$dev\" ] && line=\"linked:linked:$dev\"; fi; [ -z \"$line\" ] && exit 0; echo \"$line\"; dev=$(echo \"$line\" | cut -d: -f3); ip=$(nmcli -t -f IP4.ADDRESS device show \"$dev\" 2>/dev/null | head -1 | cut -d: -f2); echo \"ip:${ip:-}\"; sig=$(nmcli -t -f GENERAL.SIGNAL device show \"$dev\" 2>/dev/null | head -1 | cut -d: -f2); echo \"sig:${sig:-}\""]
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: {
|
||||
|
|
@ -53,7 +53,7 @@ M.BarSection {
|
|||
// Event-driven: re-poll on any network change
|
||||
Process {
|
||||
id: monitor
|
||||
running: true
|
||||
running: M.Modules.network.enable
|
||||
command: ["nmcli", "monitor"]
|
||||
stdout: SplitParser {
|
||||
splitMarker: "\n"
|
||||
|
|
@ -71,7 +71,7 @@ M.BarSection {
|
|||
// Fallback poll
|
||||
Timer {
|
||||
interval: 60000
|
||||
running: true
|
||||
running: M.Modules.network.enable
|
||||
repeat: true
|
||||
onTriggered: proc.running = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ pragma Singleton
|
|||
|
||||
import QtQuick
|
||||
import Quickshell.Io
|
||||
import "." as M
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
|
@ -10,7 +11,7 @@ QtObject {
|
|||
readonly property bool powerSaver: profile === "power-saver"
|
||||
|
||||
property var _proc: Process {
|
||||
running: true
|
||||
running: M.Modules.powerProfile.enable
|
||||
command: ["powerprofilesctl", "get"]
|
||||
stdout: StdioCollector {
|
||||
onStreamFinished: root.profile = text.trim()
|
||||
|
|
@ -18,7 +19,7 @@ QtObject {
|
|||
}
|
||||
|
||||
property var _monitor: Process {
|
||||
running: true
|
||||
running: M.Modules.powerProfile.enable
|
||||
command: ["sh", "-c", "dbus-monitor --system \"interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='/net/hadess/PowerProfiles'\" 2>/dev/null"]
|
||||
stdout: SplitParser {
|
||||
splitMarker: "\n"
|
||||
|
|
@ -33,7 +34,7 @@ QtObject {
|
|||
|
||||
property var _poll: Timer {
|
||||
interval: 60000
|
||||
running: true
|
||||
running: M.Modules.powerProfile.enable
|
||||
repeat: true
|
||||
onTriggered: root._proc.running = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import "." as M
|
|||
RowLayout {
|
||||
id: root
|
||||
spacing: M.Theme.moduleSpacing + 2
|
||||
visible: M.Modules.tray.enable && SystemTray.items.length > 0
|
||||
|
||||
required property var bar
|
||||
property var _activeMenu: null
|
||||
|
|
|
|||
|
|
@ -9,6 +9,10 @@ M.BarSection {
|
|||
spacing: M.Theme.moduleSpacing
|
||||
visible: M.Modules.windowTitle.enable && M.NiriIpc.focusedTitle !== ""
|
||||
|
||||
onVisibleChanged: console.log("WindowTitle visible=" + visible + " enable=" + M.Modules.windowTitle.enable + " title='" + M.NiriIpc.focusedTitle + "' width=" + width)
|
||||
onWidthChanged: if (visible)
|
||||
console.log("WindowTitle width=" + width + " centerSection.x would need bar ref")
|
||||
|
||||
tooltip: M.NiriIpc.focusedAppId ? M.NiriIpc.focusedAppId + "\n" + M.NiriIpc.focusedTitle : M.NiriIpc.focusedTitle
|
||||
|
||||
readonly property string _iconSource: {
|
||||
|
|
|
|||
Reference in a new issue