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
|
leftEdge: !workspacesGroup.visible
|
||||||
M.Tray {
|
M.Tray {
|
||||||
bar: bar
|
bar: bar
|
||||||
visible: M.Modules.tray.enable
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
M.BarGroup {
|
M.BarGroup {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ M.BarSection {
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: proc
|
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\""]
|
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 {
|
stdout: StdioCollector {
|
||||||
onStreamFinished: root._parse(text)
|
onStreamFinished: root._parse(text)
|
||||||
|
|
@ -44,7 +44,7 @@ M.BarSection {
|
||||||
// Event-driven: watch BlueZ DBus property changes
|
// Event-driven: watch BlueZ DBus property changes
|
||||||
Process {
|
Process {
|
||||||
id: btMonitor
|
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"]
|
command: ["sh", "-c", "dbus-monitor --system \"interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path_namespace='/org/bluez'\" 2>/dev/null"]
|
||||||
stdout: SplitParser {
|
stdout: SplitParser {
|
||||||
splitMarker: "\n"
|
splitMarker: "\n"
|
||||||
|
|
@ -58,7 +58,7 @@ M.BarSection {
|
||||||
}
|
}
|
||||||
Timer {
|
Timer {
|
||||||
interval: 60000
|
interval: 60000
|
||||||
running: true
|
running: M.Modules.bluetooth.enable
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: proc.running = true
|
onTriggered: proc.running = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,85 +8,85 @@ QtObject {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property var workspaces: ({
|
property var workspaces: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var tray: ({
|
property var tray: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var windowTitle: ({
|
property var windowTitle: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var clock: ({
|
property var clock: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var notifications: ({
|
property var notifications: ({
|
||||||
enable: false,
|
enable: true,
|
||||||
timeout: 3000,
|
timeout: 3000,
|
||||||
maxPopups: 4,
|
maxPopups: 4,
|
||||||
maxVisible: 10,
|
maxVisible: 10,
|
||||||
maxHistory: -1
|
maxHistory: -1
|
||||||
})
|
})
|
||||||
property var mpris: ({
|
property var mpris: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var volume: ({
|
property var volume: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var bluetooth: ({
|
property var bluetooth: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var backlight: ({
|
property var backlight: ({
|
||||||
enable: false,
|
enable: true,
|
||||||
step: 5
|
step: 5
|
||||||
})
|
})
|
||||||
property var network: ({
|
property var network: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var powerProfile: ({
|
property var powerProfile: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var idleInhibitor: ({
|
property var idleInhibitor: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var weather: ({
|
property var weather: ({
|
||||||
enable: false,
|
enable: true,
|
||||||
args: ["--nerd"],
|
args: ["--nerd"],
|
||||||
interval: 3600000
|
interval: 3600000
|
||||||
})
|
})
|
||||||
property var temperature: ({
|
property var temperature: ({
|
||||||
enable: false,
|
enable: true,
|
||||||
warm: 80,
|
warm: 80,
|
||||||
hot: 90
|
hot: 90
|
||||||
})
|
})
|
||||||
property var cpu: ({
|
property var cpu: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var memory: ({
|
property var memory: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var disk: ({
|
property var disk: ({
|
||||||
enable: false,
|
enable: true,
|
||||||
interval: 30000
|
interval: 30000
|
||||||
})
|
})
|
||||||
property var battery: ({
|
property var battery: ({
|
||||||
enable: false,
|
enable: true,
|
||||||
warning: 25,
|
warning: 25,
|
||||||
critical: 15
|
critical: 15
|
||||||
})
|
})
|
||||||
property var privacy: ({
|
property var privacy: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var screenCorners: ({
|
property var screenCorners: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var power: ({
|
property var power: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var backgroundOverlay: ({
|
property var backgroundOverlay: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var overviewBackdrop: ({
|
property var overviewBackdrop: ({
|
||||||
enable: false
|
enable: true
|
||||||
})
|
})
|
||||||
property var statsDaemon: ({
|
property var statsDaemon: ({
|
||||||
interval: -1
|
interval: -1
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ M.BarSection {
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: proc
|
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:-}\""]
|
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 {
|
stdout: StdioCollector {
|
||||||
onStreamFinished: {
|
onStreamFinished: {
|
||||||
|
|
@ -53,7 +53,7 @@ M.BarSection {
|
||||||
// Event-driven: re-poll on any network change
|
// Event-driven: re-poll on any network change
|
||||||
Process {
|
Process {
|
||||||
id: monitor
|
id: monitor
|
||||||
running: true
|
running: M.Modules.network.enable
|
||||||
command: ["nmcli", "monitor"]
|
command: ["nmcli", "monitor"]
|
||||||
stdout: SplitParser {
|
stdout: SplitParser {
|
||||||
splitMarker: "\n"
|
splitMarker: "\n"
|
||||||
|
|
@ -71,7 +71,7 @@ M.BarSection {
|
||||||
// Fallback poll
|
// Fallback poll
|
||||||
Timer {
|
Timer {
|
||||||
interval: 60000
|
interval: 60000
|
||||||
running: true
|
running: M.Modules.network.enable
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: proc.running = true
|
onTriggered: proc.running = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ pragma Singleton
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
|
import "." as M
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: root
|
id: root
|
||||||
|
|
@ -10,7 +11,7 @@ QtObject {
|
||||||
readonly property bool powerSaver: profile === "power-saver"
|
readonly property bool powerSaver: profile === "power-saver"
|
||||||
|
|
||||||
property var _proc: Process {
|
property var _proc: Process {
|
||||||
running: true
|
running: M.Modules.powerProfile.enable
|
||||||
command: ["powerprofilesctl", "get"]
|
command: ["powerprofilesctl", "get"]
|
||||||
stdout: StdioCollector {
|
stdout: StdioCollector {
|
||||||
onStreamFinished: root.profile = text.trim()
|
onStreamFinished: root.profile = text.trim()
|
||||||
|
|
@ -18,7 +19,7 @@ QtObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
property var _monitor: Process {
|
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"]
|
command: ["sh", "-c", "dbus-monitor --system \"interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='/net/hadess/PowerProfiles'\" 2>/dev/null"]
|
||||||
stdout: SplitParser {
|
stdout: SplitParser {
|
||||||
splitMarker: "\n"
|
splitMarker: "\n"
|
||||||
|
|
@ -33,7 +34,7 @@ QtObject {
|
||||||
|
|
||||||
property var _poll: Timer {
|
property var _poll: Timer {
|
||||||
interval: 60000
|
interval: 60000
|
||||||
running: true
|
running: M.Modules.powerProfile.enable
|
||||||
repeat: true
|
repeat: true
|
||||||
onTriggered: root._proc.running = true
|
onTriggered: root._proc.running = true
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import "." as M
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: root
|
id: root
|
||||||
spacing: M.Theme.moduleSpacing + 2
|
spacing: M.Theme.moduleSpacing + 2
|
||||||
|
visible: M.Modules.tray.enable && SystemTray.items.length > 0
|
||||||
|
|
||||||
required property var bar
|
required property var bar
|
||||||
property var _activeMenu: null
|
property var _activeMenu: null
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,10 @@ M.BarSection {
|
||||||
spacing: M.Theme.moduleSpacing
|
spacing: M.Theme.moduleSpacing
|
||||||
visible: M.Modules.windowTitle.enable && M.NiriIpc.focusedTitle !== ""
|
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
|
tooltip: M.NiriIpc.focusedAppId ? M.NiriIpc.focusedAppId + "\n" + M.NiriIpc.focusedTitle : M.NiriIpc.focusedTitle
|
||||||
|
|
||||||
readonly property string _iconSource: {
|
readonly property string _iconSource: {
|
||||||
|
|
|
||||||
Reference in a new issue