rename power
This commit is contained in:
parent
48c58e2fbf
commit
4df704844e
6 changed files with 7 additions and 7 deletions
|
|
@ -17,7 +17,7 @@ exactly when you should be most suspicious.
|
||||||
- OSD overlay for volume and brightness changes — works with niri hotkeys, not just the bar
|
- 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)
|
- 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)
|
||||||
- Weather via wttrbar with configurable arguments and rich HTML tooltips
|
- Weather via wttrbar with configurable arguments and rich HTML tooltips
|
||||||
- Power menu with lock, suspend, logout, reboot, shutdown — no more `wlogout` dependency
|
- 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
|
- 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
|
- Home Manager module with stylix integration, per-module enable/disable, and a theme system that hot-reloads
|
||||||
- treefmt + nixfmt for formatting, because even AI slop deserves consistent indentation
|
- treefmt + nixfmt for formatting, because even AI slop deserves consistent indentation
|
||||||
|
|
@ -75,14 +75,14 @@ programs.nova-shell.modules = {
|
||||||
battery = false; # see above, but for power
|
battery = false; # see above, but for power
|
||||||
temperature = false; # what you don't measure can't alarm you
|
temperature = false; # what you don't measure can't alarm you
|
||||||
disk = false; # the number will only make you anxious
|
disk = false; # the number will only make you anxious
|
||||||
wlogout = false; # if you enjoy living dangerously without a logout button
|
power = false; # if you enjoy living dangerously without a logout button
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
Full list of things you can disable: `workspaces`, `tray`, `windowTitle`,
|
Full list of things you can disable: `workspaces`, `tray`, `windowTitle`,
|
||||||
`clock`, `notifications`, `mpris`, `volume`, `bluetooth`, `backlight`,
|
`clock`, `notifications`, `mpris`, `volume`, `bluetooth`, `backlight`,
|
||||||
`network`, `powerProfile`, `idleInhibitor`, `weather`, `temperature`, `cpu`,
|
`network`, `powerProfile`, `idleInhibitor`, `weather`, `temperature`, `cpu`,
|
||||||
`memory`, `disk`, `battery`, `wlogout`.
|
`memory`, `disk`, `battery`, `power`.
|
||||||
|
|
||||||
### Theme
|
### Theme
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ PanelWindow {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Power
|
// Power
|
||||||
M.Wlogout { bar: bar; visible: M.Modules.wlogout }
|
M.Power { bar: bar; visible: M.Modules.power }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ QtObject {
|
||||||
property bool memory: true
|
property bool memory: true
|
||||||
property bool disk: true
|
property bool disk: true
|
||||||
property bool battery: true
|
property bool battery: true
|
||||||
property bool wlogout: true
|
property bool power: true
|
||||||
|
|
||||||
property var weatherArgs: ["--nerd"]
|
property var weatherArgs: ["--nerd"]
|
||||||
|
|
||||||
|
|
|
||||||
37
modules/Power.qml
Normal file
37
modules/Power.qml
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
import QtQuick
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Io
|
||||||
|
import "." as M
|
||||||
|
|
||||||
|
M.BarIcon {
|
||||||
|
id: root
|
||||||
|
icon: "\uF011"
|
||||||
|
color: M.Theme.base08
|
||||||
|
tooltip: "Power menu"
|
||||||
|
|
||||||
|
required property var bar
|
||||||
|
|
||||||
|
Process {
|
||||||
|
id: runner
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: menuLoader.active = !menuLoader.active
|
||||||
|
}
|
||||||
|
|
||||||
|
Loader {
|
||||||
|
id: menuLoader
|
||||||
|
active: false
|
||||||
|
sourceComponent: M.PowerMenu {
|
||||||
|
screen: root.bar.screen
|
||||||
|
anchorX: root.mapToGlobal(root.width / 2, 0).x - (QsWindow.window?.screen?.x ?? 0)
|
||||||
|
onMenuClosed: menuLoader.active = false
|
||||||
|
onRunCommand: cmd => {
|
||||||
|
runner.command = cmd;
|
||||||
|
runner.running = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -30,4 +30,4 @@ Weather 1.0 Weather.qml
|
||||||
PowerProfile 1.0 PowerProfile.qml
|
PowerProfile 1.0 PowerProfile.qml
|
||||||
IdleInhibitor 1.0 IdleInhibitor.qml
|
IdleInhibitor 1.0 IdleInhibitor.qml
|
||||||
Notifications 1.0 Notifications.qml
|
Notifications 1.0 Notifications.qml
|
||||||
Wlogout 1.0 Wlogout.qml
|
Power 1.0 Power.qml
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ in
|
||||||
"memory"
|
"memory"
|
||||||
"disk"
|
"disk"
|
||||||
"battery"
|
"battery"
|
||||||
"wlogout"
|
"power"
|
||||||
]
|
]
|
||||||
(name: lib.mkOption {
|
(name: lib.mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
|
|
|
||||||
Reference in a new issue