remove dead OsdState/Osd code, update README
This commit is contained in:
parent
69ee00004a
commit
367520df6a
5 changed files with 11 additions and 186 deletions
19
README.md
19
README.md
|
|
@ -10,18 +10,19 @@ exactly when you should be most suspicious.
|
|||
|
||||
## "Features"
|
||||
|
||||
- Bar with workspaces, window title, clock, tray, and a regrettable number of widgets
|
||||
- Niri IPC integration — workspace indicator, focused window title, power menu with `niri msg action quit`
|
||||
- Context menus for tray icons with submenu support, because the robot watched celestia-shell do it and got jealous
|
||||
- Per-module accent colors that change based on state (battery goes red when it's dying, bluetooth goes blue when connected, volume dims when muted — genuinely useful, by accident)
|
||||
- OSD overlay for volume and brightness changes — works with niri hotkeys, not just the bar
|
||||
- Screen corner rounding — tiny overlay windows that draw quarter-circle masks, configurable via `screenRadius` (set to 0 if you prefer your corners sharp and your desktop ugly)
|
||||
- Bar with workspaces, window title, clock, tray, and a regrettable number of widgets grouped into color-coded sections with glowing borders, because subtlety is dead
|
||||
- Niri IPC integration — workspace indicator, focused window title with app icon, power menu with `niri msg action quit`. All event-driven, no polling
|
||||
- Interactive hover panels — volume (with per-app mixer and output device switcher), brightness (with slider), media (with album art, transport controls, progress bar). Hover to peek, click to expand, leave to dismiss. The OSD and tooltip in one, because having three separate UI patterns for the same information was too reasonable
|
||||
- Context menus for tray icons with submenu support, network chooser (known available WiFi/ethernet), bluetooth device manager (connect/disconnect, battery levels)
|
||||
- Privacy indicators — screenshare and microphone icons pulse red/green when PipeWire detects active video/audio capture streams. Finally, you'll know when your webcam is on, which is more than can be said for most laptop manufacturers
|
||||
- Per-module accent colors that change based on state, with animated transitions. Battery blinks when critical and sends desktop notifications, because the robot cares about your hardware more than you do
|
||||
- Screen corner rounding — tiny overlay windows with quarter-circle masks, click-transparent, configurable via `screenRadius` (set to 0 if you prefer your corners sharp and your desktop ugly)
|
||||
- Weather via wttrbar with configurable arguments and rich HTML tooltips
|
||||
- Power menu with lock, suspend, logout, reboot, shutdown
|
||||
- Flyout tooltips that actually filter by screen on multi-monitor setups, which only took three attempts to get right
|
||||
- Home Manager module with stylix integration, per-module enable/disable, and a theme system that hot-reloads
|
||||
- Event-driven updates for network, bluetooth, and power profiles via dbus-monitor/nmcli monitor — no more 5-second polling lag
|
||||
- Animated everything: flyout tooltips slide in/out, modules fade on visibility change, icons crossfade on state change, notification count pops. The bar is basically a screensaver at this point
|
||||
- Home Manager module with stylix integration, per-module config objects (enable/disable + module-specific settings like polling intervals, thresholds, brightness step), and a theme system that hot-reloads
|
||||
- treefmt + nixfmt for formatting, because even AI slop deserves consistent indentation
|
||||
- Checks via `nix flake check` (the irony of testing AI garbage is not lost on anyone)
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
|
|||
146
modules/Osd.qml
146
modules/Osd.qml
|
|
@ -1,146 +0,0 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import "." as M
|
||||
|
||||
// OSD overlay — slides out from the bar, centered on screen.
|
||||
PanelWindow {
|
||||
id: root
|
||||
|
||||
required property var screen
|
||||
|
||||
visible: _winVisible
|
||||
color: "transparent"
|
||||
|
||||
property bool _winVisible: false
|
||||
property bool _shown: M.OsdState.visible && M.OsdState.screen === root.screen
|
||||
|
||||
on_ShownChanged: {
|
||||
if (_shown) {
|
||||
_winVisible = true;
|
||||
hideAnim.stop();
|
||||
showAnim.start();
|
||||
} else {
|
||||
showAnim.stop();
|
||||
hideAnim.start();
|
||||
}
|
||||
}
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
WlrLayershell.exclusiveZone: 0
|
||||
WlrLayershell.namespace: "nova-osd"
|
||||
mask: Region {}
|
||||
|
||||
anchors.top: true
|
||||
anchors.left: true
|
||||
|
||||
margins.top: 0
|
||||
margins.left: Math.max(0, Math.min(Math.round(M.OsdState.itemX - implicitWidth / 2), screen.width - implicitWidth))
|
||||
|
||||
implicitWidth: 200
|
||||
implicitHeight: 48
|
||||
|
||||
ParallelAnimation {
|
||||
id: showAnim
|
||||
NumberAnimation {
|
||||
target: content
|
||||
property: "opacity"
|
||||
to: 1
|
||||
duration: 150
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
NumberAnimation {
|
||||
target: content
|
||||
property: "y"
|
||||
to: 0
|
||||
duration: 200
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
|
||||
ParallelAnimation {
|
||||
id: hideAnim
|
||||
NumberAnimation {
|
||||
target: content
|
||||
property: "opacity"
|
||||
to: 0
|
||||
duration: 250
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
NumberAnimation {
|
||||
target: content
|
||||
property: "y"
|
||||
to: -content.height
|
||||
duration: 250
|
||||
easing.type: Easing.InCubic
|
||||
}
|
||||
onFinished: root._winVisible = false
|
||||
}
|
||||
|
||||
Item {
|
||||
id: content
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
height: root.implicitHeight
|
||||
opacity: 0
|
||||
y: -height
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: M.Theme.base00
|
||||
opacity: Math.max(M.Theme.barOpacity, 0.85)
|
||||
topLeftRadius: 0
|
||||
topRightRadius: 0
|
||||
bottomLeftRadius: M.Theme.radius
|
||||
bottomRightRadius: M.Theme.radius
|
||||
}
|
||||
|
||||
Row {
|
||||
anchors.centerIn: parent
|
||||
spacing: 10
|
||||
|
||||
Text {
|
||||
text: M.OsdState.icon
|
||||
color: M.Theme.base0D
|
||||
font.pixelSize: M.Theme.fontSize + 6
|
||||
font.family: M.Theme.iconFontFamily
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Item {
|
||||
width: 120
|
||||
height: 6
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: M.Theme.base02
|
||||
radius: 3
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: parent.width * Math.min(1, Math.max(0, M.OsdState.value))
|
||||
height: parent.height
|
||||
color: M.Theme.base0D
|
||||
radius: 3
|
||||
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
duration: 120
|
||||
easing.type: Easing.OutCubic
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
text: Math.round(M.OsdState.value * 100) + "%"
|
||||
color: M.Theme.base05
|
||||
font.pixelSize: M.Theme.fontSize
|
||||
font.family: M.Theme.fontFamily
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: 32
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
pragma Singleton
|
||||
import QtQuick
|
||||
|
||||
QtObject {
|
||||
property bool visible: false
|
||||
property real value: 0 // 0.0–1.0
|
||||
property string icon: ""
|
||||
property real itemX: 0
|
||||
property var screen: null
|
||||
|
||||
property Timer _timer: Timer {
|
||||
interval: 1500
|
||||
onTriggered: visible = false
|
||||
}
|
||||
|
||||
function show(val, ico, x, scr) {
|
||||
value = val;
|
||||
icon = ico;
|
||||
itemX = x;
|
||||
screen = scr;
|
||||
visible = true;
|
||||
_timer.restart();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
module modules
|
||||
singleton Theme 1.0 Theme.qml
|
||||
singleton FlyoutState 1.0 FlyoutState.qml
|
||||
singleton OsdState 1.0 OsdState.qml
|
||||
singleton Modules 1.0 Modules.qml
|
||||
Bar 1.0 Bar.qml
|
||||
BarGroup 1.0 BarGroup.qml
|
||||
|
|
@ -16,7 +15,6 @@ TrayMenu 1.0 TrayMenu.qml
|
|||
PopupPanel 1.0 PopupPanel.qml
|
||||
PowerMenu 1.0 PowerMenu.qml
|
||||
ScreenCorners 1.0 ScreenCorners.qml
|
||||
Osd 1.0 Osd.qml
|
||||
ThemedIcon 1.0 ThemedIcon.qml
|
||||
Battery 1.0 Battery.qml
|
||||
Mpris 1.0 Mpris.qml
|
||||
|
|
|
|||
|
|
@ -19,10 +19,6 @@ ShellRoot {
|
|||
screen: scope.modelData
|
||||
}
|
||||
|
||||
Osd {
|
||||
screen: scope.modelData
|
||||
}
|
||||
|
||||
ScreenCorners {
|
||||
screen: scope.modelData
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue