This tmux alert system didn't work as nicely as I imagined
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Ui
|
||||
|
||||
BarIndicator {
|
||||
id: root
|
||||
|
||||
readonly property var tmuxService: bar?.shell?.firstPartyServiceFor("omarchy.tmux")
|
||||
|
||||
active: tmuxService ? tmuxService.waiting : false
|
||||
activeText: ""
|
||||
inactiveText: ""
|
||||
activeTooltipText: tmuxService ? tmuxService.tooltip : ""
|
||||
inactiveTooltipText: "No Terminal Waiting"
|
||||
|
||||
// The service owns the probe and its polling; the tmux hooks still reach it
|
||||
// through the indicator host's refresh broadcast, which coalesces into a
|
||||
// single run no matter how many bars relay it.
|
||||
function refresh() {
|
||||
if (root.tmuxService) root.tmuxService.refresh()
|
||||
}
|
||||
|
||||
SequentialAnimation {
|
||||
running: root.active
|
||||
loops: Animation.Infinite
|
||||
|
||||
PauseAnimation { duration: 2740 }
|
||||
NumberAnimation { target: root; property: "textRotation"; to: -10; duration: 50; easing.type: Easing.OutQuad }
|
||||
NumberAnimation { target: root; property: "textRotation"; to: 10; duration: 70; easing.type: Easing.InOutQuad }
|
||||
NumberAnimation { target: root; property: "textRotation"; to: -7; duration: 55; easing.type: Easing.InOutQuad }
|
||||
NumberAnimation { target: root; property: "textRotation"; to: 7; duration: 45; easing.type: Easing.InOutQuad }
|
||||
NumberAnimation { target: root; property: "textRotation"; to: 0; duration: 40; easing.type: Easing.OutQuad }
|
||||
|
||||
onStopped: root.textRotation = 0
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: root.indicatorHost
|
||||
ignoreUnknownSignals: true
|
||||
function onRefreshRequested() { root.refresh() }
|
||||
}
|
||||
|
||||
onPressed: function() {
|
||||
Quickshell.execDetached(["omarchy-tmux-alert", "focus"])
|
||||
}
|
||||
}
|
||||
@@ -26,11 +26,6 @@
|
||||
"placeholderText": "Search indicators...",
|
||||
"emptyText": "No indicators",
|
||||
"options": [
|
||||
{
|
||||
"value": "TmuxAlert",
|
||||
"label": "Tmux alert",
|
||||
"description": "Tmux windows waiting for attention"
|
||||
},
|
||||
{
|
||||
"value": "Dictation",
|
||||
"label": "Dictation",
|
||||
|
||||
@@ -8,7 +8,7 @@ BarWidget {
|
||||
id: root
|
||||
moduleName: "omarchy.indicators"
|
||||
|
||||
readonly property var defaultIndicatorEntries: [ "TmuxAlert", "Dictation", "ScreenRecording", "Reminder", "NightLight", "Dnd", "StayAwake" ]
|
||||
readonly property var defaultIndicatorEntries: [ "Dictation", "ScreenRecording", "Reminder", "NightLight", "Dnd", "StayAwake" ]
|
||||
readonly property var indicatorEntries: indicatorEntriesFromSettings(settings)
|
||||
property var activeIndicatorIds: []
|
||||
property var indicatorActiveStates: ({})
|
||||
|
||||
Reference in New Issue
Block a user