nix fmt
This commit is contained in:
parent
4df704844e
commit
9e1716aa39
14 changed files with 154 additions and 102 deletions
|
|
@ -10,7 +10,7 @@ PanelWindow {
|
|||
required property var screen
|
||||
required property real anchorX
|
||||
|
||||
signal menuClosed()
|
||||
signal menuClosed
|
||||
signal runCommand(var cmd)
|
||||
|
||||
readonly property bool _isNiri: Quickshell.env("NIRI_SOCKET") !== ""
|
||||
|
|
@ -40,10 +40,7 @@ PanelWindow {
|
|||
Item {
|
||||
id: panel
|
||||
|
||||
x: Math.max(0, Math.min(
|
||||
Math.round(menuWindow.anchorX - menuCol.width / 2),
|
||||
menuWindow.width - menuCol.width
|
||||
))
|
||||
x: Math.max(0, Math.min(Math.round(menuWindow.anchorX - menuCol.width / 2), menuWindow.width - menuCol.width))
|
||||
y: 0
|
||||
|
||||
width: menuCol.width
|
||||
|
|
@ -73,11 +70,36 @@ PanelWindow {
|
|||
|
||||
Repeater {
|
||||
model: [
|
||||
{ label: "Lock", icon: "\uF023", cmd: ["loginctl", "lock-session"], color: M.Theme.base0D },
|
||||
{ label: "Suspend", icon: "\uF186", cmd: ["systemctl", "suspend"], color: M.Theme.base0E },
|
||||
{ label: "Logout", icon: "\uF2F5", cmd: menuWindow._isNiri ? ["niri", "msg", "action", "quit"] : ["loginctl", "terminate-user", ""], color: M.Theme.base0A },
|
||||
{ label: "Reboot", icon: "\uF021", cmd: ["systemctl", "reboot"], color: M.Theme.base09 },
|
||||
{ label: "Shutdown", icon: "\uF011", cmd: ["systemctl", "poweroff"], color: M.Theme.base08 }
|
||||
{
|
||||
label: "Lock",
|
||||
icon: "\uF023",
|
||||
cmd: ["loginctl", "lock-session"],
|
||||
color: M.Theme.base0D
|
||||
},
|
||||
{
|
||||
label: "Suspend",
|
||||
icon: "\uF186",
|
||||
cmd: ["systemctl", "suspend"],
|
||||
color: M.Theme.base0E
|
||||
},
|
||||
{
|
||||
label: "Logout",
|
||||
icon: "\uF2F5",
|
||||
cmd: menuWindow._isNiri ? ["niri", "msg", "action", "quit"] : ["loginctl", "terminate-user", ""],
|
||||
color: M.Theme.base0A
|
||||
},
|
||||
{
|
||||
label: "Reboot",
|
||||
icon: "\uF021",
|
||||
cmd: ["systemctl", "reboot"],
|
||||
color: M.Theme.base09
|
||||
},
|
||||
{
|
||||
label: "Shutdown",
|
||||
icon: "\uF011",
|
||||
cmd: ["systemctl", "poweroff"],
|
||||
color: M.Theme.base08
|
||||
}
|
||||
]
|
||||
|
||||
delegate: Item {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue