From 519c54fa7449798889215155e95adda73d7db1a5 Mon Sep 17 00:00:00 2001 From: Ottatop Date: Fri, 2 Aug 2024 15:17:53 -0500 Subject: [PATCH] api/lua: Update docs --- api/lua/pinnacle/grpc/defs.lua | 216 ++++++++++------------------- api/lua/pinnacle/grpc/protobuf.lua | 1 - api/lua/pinnacle/input.lua | 10 +- api/lua/pinnacle/input/keys.lua | 2 +- api/lua/pinnacle/output.lua | 38 ++--- api/lua/pinnacle/process.lua | 4 +- api/lua/pinnacle/signal.lua | 19 ++- api/lua/pinnacle/tag.lua | 18 ++- api/lua/pinnacle/util.lua | 2 +- api/lua/pinnacle/window.lua | 44 +++--- src/protocol/gamma_control.rs | 4 + src/protocol/output_management.rs | 8 ++ src/render/util/snapshot.rs | 1 + 13 files changed, 152 insertions(+), 215 deletions(-) diff --git a/api/lua/pinnacle/grpc/defs.lua b/api/lua/pinnacle/grpc/defs.lua index 942cc140d..d4c8518d4 100644 --- a/api/lua/pinnacle/grpc/defs.lua +++ b/api/lua/pinnacle/grpc/defs.lua @@ -98,6 +98,7 @@ local pinnacle_output_v0alpha1_Transform = { TRANSFORM_FLIPPED_270 = 8, } + ---@class google.protobuf.Empty ---@class pinnacle.signal.v0alpha1.OutputConnectRequest @@ -457,6 +458,7 @@ local pinnacle_output_v0alpha1_Transform = { ---@field enabled boolean? ---@field powered boolean? + local google = {} google.protobuf = {} google.protobuf.Empty = {} @@ -561,16 +563,11 @@ pinnacle.output.v0alpha1.GetPropertiesResponse = {} pinnacle.signal.v0alpha1.StreamControl = pinnacle_signal_v0alpha1_StreamControl pinnacle.input.v0alpha1.Modifier = pinnacle_input_v0alpha1_Modifier -pinnacle.input.v0alpha1.SetMousebindRequest.MouseEdge = - pinnacle_input_v0alpha1_SetMousebindRequest_MouseEdge -pinnacle.input.v0alpha1.SetLibinputSettingRequest.AccelProfile = - pinnacle_input_v0alpha1_SetLibinputSettingRequest_AccelProfile -pinnacle.input.v0alpha1.SetLibinputSettingRequest.ClickMethod = - pinnacle_input_v0alpha1_SetLibinputSettingRequest_ClickMethod -pinnacle.input.v0alpha1.SetLibinputSettingRequest.ScrollMethod = - pinnacle_input_v0alpha1_SetLibinputSettingRequest_ScrollMethod -pinnacle.input.v0alpha1.SetLibinputSettingRequest.TapButtonMap = - pinnacle_input_v0alpha1_SetLibinputSettingRequest_TapButtonMap +pinnacle.input.v0alpha1.SetMousebindRequest.MouseEdge = pinnacle_input_v0alpha1_SetMousebindRequest_MouseEdge +pinnacle.input.v0alpha1.SetLibinputSettingRequest.AccelProfile = pinnacle_input_v0alpha1_SetLibinputSettingRequest_AccelProfile +pinnacle.input.v0alpha1.SetLibinputSettingRequest.ClickMethod = pinnacle_input_v0alpha1_SetLibinputSettingRequest_ClickMethod +pinnacle.input.v0alpha1.SetLibinputSettingRequest.ScrollMethod = pinnacle_input_v0alpha1_SetLibinputSettingRequest_ScrollMethod +pinnacle.input.v0alpha1.SetLibinputSettingRequest.TapButtonMap = pinnacle_input_v0alpha1_SetLibinputSettingRequest_TapButtonMap pinnacle.v0alpha1.SetOrToggle = pinnacle_v0alpha1_SetOrToggle pinnacle.window.v0alpha1.FullscreenOrMaximized = pinnacle_window_v0alpha1_FullscreenOrMaximized pinnacle.window.v0alpha1.WindowState = pinnacle_window_v0alpha1_WindowState @@ -579,106 +576,75 @@ pinnacle.output.v0alpha1.Transform = pinnacle_output_v0alpha1_Transform pinnacle.signal.v0alpha1.SignalService = {} pinnacle.signal.v0alpha1.SignalService.OutputConnect = {} -pinnacle.signal.v0alpha1.SignalService.OutputConnect.service = - "pinnacle.signal.v0alpha1.SignalService" +pinnacle.signal.v0alpha1.SignalService.OutputConnect.service = "pinnacle.signal.v0alpha1.SignalService" pinnacle.signal.v0alpha1.SignalService.OutputConnect.method = "OutputConnect" -pinnacle.signal.v0alpha1.SignalService.OutputConnect.request = - ".pinnacle.signal.v0alpha1.OutputConnectRequest" -pinnacle.signal.v0alpha1.SignalService.OutputConnect.response = - ".pinnacle.signal.v0alpha1.OutputConnectResponse" +pinnacle.signal.v0alpha1.SignalService.OutputConnect.request = ".pinnacle.signal.v0alpha1.OutputConnectRequest" +pinnacle.signal.v0alpha1.SignalService.OutputConnect.response = ".pinnacle.signal.v0alpha1.OutputConnectResponse" pinnacle.signal.v0alpha1.SignalService.OutputDisconnect = {} -pinnacle.signal.v0alpha1.SignalService.OutputDisconnect.service = - "pinnacle.signal.v0alpha1.SignalService" +pinnacle.signal.v0alpha1.SignalService.OutputDisconnect.service = "pinnacle.signal.v0alpha1.SignalService" pinnacle.signal.v0alpha1.SignalService.OutputDisconnect.method = "OutputDisconnect" -pinnacle.signal.v0alpha1.SignalService.OutputDisconnect.request = - ".pinnacle.signal.v0alpha1.OutputDisconnectRequest" -pinnacle.signal.v0alpha1.SignalService.OutputDisconnect.response = - ".pinnacle.signal.v0alpha1.OutputDisconnectResponse" +pinnacle.signal.v0alpha1.SignalService.OutputDisconnect.request = ".pinnacle.signal.v0alpha1.OutputDisconnectRequest" +pinnacle.signal.v0alpha1.SignalService.OutputDisconnect.response = ".pinnacle.signal.v0alpha1.OutputDisconnectResponse" pinnacle.signal.v0alpha1.SignalService.OutputResize = {} -pinnacle.signal.v0alpha1.SignalService.OutputResize.service = - "pinnacle.signal.v0alpha1.SignalService" +pinnacle.signal.v0alpha1.SignalService.OutputResize.service = "pinnacle.signal.v0alpha1.SignalService" pinnacle.signal.v0alpha1.SignalService.OutputResize.method = "OutputResize" -pinnacle.signal.v0alpha1.SignalService.OutputResize.request = - ".pinnacle.signal.v0alpha1.OutputResizeRequest" -pinnacle.signal.v0alpha1.SignalService.OutputResize.response = - ".pinnacle.signal.v0alpha1.OutputResizeResponse" +pinnacle.signal.v0alpha1.SignalService.OutputResize.request = ".pinnacle.signal.v0alpha1.OutputResizeRequest" +pinnacle.signal.v0alpha1.SignalService.OutputResize.response = ".pinnacle.signal.v0alpha1.OutputResizeResponse" pinnacle.signal.v0alpha1.SignalService.OutputMove = {} pinnacle.signal.v0alpha1.SignalService.OutputMove.service = "pinnacle.signal.v0alpha1.SignalService" pinnacle.signal.v0alpha1.SignalService.OutputMove.method = "OutputMove" -pinnacle.signal.v0alpha1.SignalService.OutputMove.request = - ".pinnacle.signal.v0alpha1.OutputMoveRequest" -pinnacle.signal.v0alpha1.SignalService.OutputMove.response = - ".pinnacle.signal.v0alpha1.OutputMoveResponse" +pinnacle.signal.v0alpha1.SignalService.OutputMove.request = ".pinnacle.signal.v0alpha1.OutputMoveRequest" +pinnacle.signal.v0alpha1.SignalService.OutputMove.response = ".pinnacle.signal.v0alpha1.OutputMoveResponse" pinnacle.signal.v0alpha1.SignalService.WindowPointerEnter = {} -pinnacle.signal.v0alpha1.SignalService.WindowPointerEnter.service = - "pinnacle.signal.v0alpha1.SignalService" +pinnacle.signal.v0alpha1.SignalService.WindowPointerEnter.service = "pinnacle.signal.v0alpha1.SignalService" pinnacle.signal.v0alpha1.SignalService.WindowPointerEnter.method = "WindowPointerEnter" -pinnacle.signal.v0alpha1.SignalService.WindowPointerEnter.request = - ".pinnacle.signal.v0alpha1.WindowPointerEnterRequest" -pinnacle.signal.v0alpha1.SignalService.WindowPointerEnter.response = - ".pinnacle.signal.v0alpha1.WindowPointerEnterResponse" +pinnacle.signal.v0alpha1.SignalService.WindowPointerEnter.request = ".pinnacle.signal.v0alpha1.WindowPointerEnterRequest" +pinnacle.signal.v0alpha1.SignalService.WindowPointerEnter.response = ".pinnacle.signal.v0alpha1.WindowPointerEnterResponse" pinnacle.signal.v0alpha1.SignalService.WindowPointerLeave = {} -pinnacle.signal.v0alpha1.SignalService.WindowPointerLeave.service = - "pinnacle.signal.v0alpha1.SignalService" +pinnacle.signal.v0alpha1.SignalService.WindowPointerLeave.service = "pinnacle.signal.v0alpha1.SignalService" pinnacle.signal.v0alpha1.SignalService.WindowPointerLeave.method = "WindowPointerLeave" -pinnacle.signal.v0alpha1.SignalService.WindowPointerLeave.request = - ".pinnacle.signal.v0alpha1.WindowPointerLeaveRequest" -pinnacle.signal.v0alpha1.SignalService.WindowPointerLeave.response = - ".pinnacle.signal.v0alpha1.WindowPointerLeaveResponse" +pinnacle.signal.v0alpha1.SignalService.WindowPointerLeave.request = ".pinnacle.signal.v0alpha1.WindowPointerLeaveRequest" +pinnacle.signal.v0alpha1.SignalService.WindowPointerLeave.response = ".pinnacle.signal.v0alpha1.WindowPointerLeaveResponse" pinnacle.signal.v0alpha1.SignalService.TagActive = {} pinnacle.signal.v0alpha1.SignalService.TagActive.service = "pinnacle.signal.v0alpha1.SignalService" pinnacle.signal.v0alpha1.SignalService.TagActive.method = "TagActive" -pinnacle.signal.v0alpha1.SignalService.TagActive.request = - ".pinnacle.signal.v0alpha1.TagActiveRequest" -pinnacle.signal.v0alpha1.SignalService.TagActive.response = - ".pinnacle.signal.v0alpha1.TagActiveResponse" +pinnacle.signal.v0alpha1.SignalService.TagActive.request = ".pinnacle.signal.v0alpha1.TagActiveRequest" +pinnacle.signal.v0alpha1.SignalService.TagActive.response = ".pinnacle.signal.v0alpha1.TagActiveResponse" pinnacle.input.v0alpha1.InputService = {} pinnacle.input.v0alpha1.InputService.SetKeybind = {} pinnacle.input.v0alpha1.InputService.SetKeybind.service = "pinnacle.input.v0alpha1.InputService" pinnacle.input.v0alpha1.InputService.SetKeybind.method = "SetKeybind" -pinnacle.input.v0alpha1.InputService.SetKeybind.request = - ".pinnacle.input.v0alpha1.SetKeybindRequest" -pinnacle.input.v0alpha1.InputService.SetKeybind.response = - ".pinnacle.input.v0alpha1.SetKeybindResponse" +pinnacle.input.v0alpha1.InputService.SetKeybind.request = ".pinnacle.input.v0alpha1.SetKeybindRequest" +pinnacle.input.v0alpha1.InputService.SetKeybind.response = ".pinnacle.input.v0alpha1.SetKeybindResponse" pinnacle.input.v0alpha1.InputService.SetMousebind = {} pinnacle.input.v0alpha1.InputService.SetMousebind.service = "pinnacle.input.v0alpha1.InputService" pinnacle.input.v0alpha1.InputService.SetMousebind.method = "SetMousebind" -pinnacle.input.v0alpha1.InputService.SetMousebind.request = - ".pinnacle.input.v0alpha1.SetMousebindRequest" -pinnacle.input.v0alpha1.InputService.SetMousebind.response = - ".pinnacle.input.v0alpha1.SetMousebindResponse" +pinnacle.input.v0alpha1.InputService.SetMousebind.request = ".pinnacle.input.v0alpha1.SetMousebindRequest" +pinnacle.input.v0alpha1.InputService.SetMousebind.response = ".pinnacle.input.v0alpha1.SetMousebindResponse" pinnacle.input.v0alpha1.InputService.KeybindDescriptions = {} -pinnacle.input.v0alpha1.InputService.KeybindDescriptions.service = - "pinnacle.input.v0alpha1.InputService" +pinnacle.input.v0alpha1.InputService.KeybindDescriptions.service = "pinnacle.input.v0alpha1.InputService" pinnacle.input.v0alpha1.InputService.KeybindDescriptions.method = "KeybindDescriptions" -pinnacle.input.v0alpha1.InputService.KeybindDescriptions.request = - ".pinnacle.input.v0alpha1.KeybindDescriptionsRequest" -pinnacle.input.v0alpha1.InputService.KeybindDescriptions.response = - ".pinnacle.input.v0alpha1.KeybindDescriptionsResponse" +pinnacle.input.v0alpha1.InputService.KeybindDescriptions.request = ".pinnacle.input.v0alpha1.KeybindDescriptionsRequest" +pinnacle.input.v0alpha1.InputService.KeybindDescriptions.response = ".pinnacle.input.v0alpha1.KeybindDescriptionsResponse" pinnacle.input.v0alpha1.InputService.SetXkbConfig = {} pinnacle.input.v0alpha1.InputService.SetXkbConfig.service = "pinnacle.input.v0alpha1.InputService" pinnacle.input.v0alpha1.InputService.SetXkbConfig.method = "SetXkbConfig" -pinnacle.input.v0alpha1.InputService.SetXkbConfig.request = - ".pinnacle.input.v0alpha1.SetXkbConfigRequest" +pinnacle.input.v0alpha1.InputService.SetXkbConfig.request = ".pinnacle.input.v0alpha1.SetXkbConfigRequest" pinnacle.input.v0alpha1.InputService.SetXkbConfig.response = ".google.protobuf.Empty" pinnacle.input.v0alpha1.InputService.SetRepeatRate = {} pinnacle.input.v0alpha1.InputService.SetRepeatRate.service = "pinnacle.input.v0alpha1.InputService" pinnacle.input.v0alpha1.InputService.SetRepeatRate.method = "SetRepeatRate" -pinnacle.input.v0alpha1.InputService.SetRepeatRate.request = - ".pinnacle.input.v0alpha1.SetRepeatRateRequest" +pinnacle.input.v0alpha1.InputService.SetRepeatRate.request = ".pinnacle.input.v0alpha1.SetRepeatRateRequest" pinnacle.input.v0alpha1.InputService.SetRepeatRate.response = ".google.protobuf.Empty" pinnacle.input.v0alpha1.InputService.SetLibinputSetting = {} -pinnacle.input.v0alpha1.InputService.SetLibinputSetting.service = - "pinnacle.input.v0alpha1.InputService" +pinnacle.input.v0alpha1.InputService.SetLibinputSetting.service = "pinnacle.input.v0alpha1.InputService" pinnacle.input.v0alpha1.InputService.SetLibinputSetting.method = "SetLibinputSetting" -pinnacle.input.v0alpha1.InputService.SetLibinputSetting.request = - ".pinnacle.input.v0alpha1.SetLibinputSettingRequest" +pinnacle.input.v0alpha1.InputService.SetLibinputSetting.request = ".pinnacle.input.v0alpha1.SetLibinputSettingRequest" pinnacle.input.v0alpha1.InputService.SetLibinputSetting.response = ".google.protobuf.Empty" pinnacle.input.v0alpha1.InputService.SetXcursor = {} pinnacle.input.v0alpha1.InputService.SetXcursor.service = "pinnacle.input.v0alpha1.InputService" pinnacle.input.v0alpha1.InputService.SetXcursor.method = "SetXcursor" -pinnacle.input.v0alpha1.InputService.SetXcursor.request = - ".pinnacle.input.v0alpha1.SetXcursorRequest" +pinnacle.input.v0alpha1.InputService.SetXcursor.request = ".pinnacle.input.v0alpha1.SetXcursorRequest" pinnacle.input.v0alpha1.InputService.SetXcursor.response = ".google.protobuf.Empty" pinnacle.v0alpha1.PinnacleService = {} pinnacle.v0alpha1.PinnacleService.Quit = {} @@ -700,8 +666,7 @@ pinnacle.v0alpha1.PinnacleService.ShutdownWatch = {} pinnacle.v0alpha1.PinnacleService.ShutdownWatch.service = "pinnacle.v0alpha1.PinnacleService" pinnacle.v0alpha1.PinnacleService.ShutdownWatch.method = "ShutdownWatch" pinnacle.v0alpha1.PinnacleService.ShutdownWatch.request = ".pinnacle.v0alpha1.ShutdownWatchRequest" -pinnacle.v0alpha1.PinnacleService.ShutdownWatch.response = - ".pinnacle.v0alpha1.ShutdownWatchResponse" +pinnacle.v0alpha1.PinnacleService.ShutdownWatch.response = ".pinnacle.v0alpha1.ShutdownWatchResponse" pinnacle.layout.v0alpha1.LayoutService = {} pinnacle.layout.v0alpha1.LayoutService.Layout = {} pinnacle.layout.v0alpha1.LayoutService.Layout.service = "pinnacle.layout.v0alpha1.LayoutService" @@ -737,10 +702,8 @@ pinnacle.tag.v0alpha1.TagService.Get.response = ".pinnacle.tag.v0alpha1.GetRespo pinnacle.tag.v0alpha1.TagService.GetProperties = {} pinnacle.tag.v0alpha1.TagService.GetProperties.service = "pinnacle.tag.v0alpha1.TagService" pinnacle.tag.v0alpha1.TagService.GetProperties.method = "GetProperties" -pinnacle.tag.v0alpha1.TagService.GetProperties.request = - ".pinnacle.tag.v0alpha1.GetPropertiesRequest" -pinnacle.tag.v0alpha1.TagService.GetProperties.response = - ".pinnacle.tag.v0alpha1.GetPropertiesResponse" +pinnacle.tag.v0alpha1.TagService.GetProperties.request = ".pinnacle.tag.v0alpha1.GetPropertiesRequest" +pinnacle.tag.v0alpha1.TagService.GetProperties.response = ".pinnacle.tag.v0alpha1.GetPropertiesResponse" pinnacle.process.v0alpha1.ProcessService = {} pinnacle.process.v0alpha1.ProcessService.Spawn = {} pinnacle.process.v0alpha1.ProcessService.Spawn.service = "pinnacle.process.v0alpha1.ProcessService" @@ -759,44 +722,34 @@ pinnacle.window.v0alpha1.WindowService.Close.method = "Close" pinnacle.window.v0alpha1.WindowService.Close.request = ".pinnacle.window.v0alpha1.CloseRequest" pinnacle.window.v0alpha1.WindowService.Close.response = ".google.protobuf.Empty" pinnacle.window.v0alpha1.WindowService.SetGeometry = {} -pinnacle.window.v0alpha1.WindowService.SetGeometry.service = - "pinnacle.window.v0alpha1.WindowService" +pinnacle.window.v0alpha1.WindowService.SetGeometry.service = "pinnacle.window.v0alpha1.WindowService" pinnacle.window.v0alpha1.WindowService.SetGeometry.method = "SetGeometry" -pinnacle.window.v0alpha1.WindowService.SetGeometry.request = - ".pinnacle.window.v0alpha1.SetGeometryRequest" +pinnacle.window.v0alpha1.WindowService.SetGeometry.request = ".pinnacle.window.v0alpha1.SetGeometryRequest" pinnacle.window.v0alpha1.WindowService.SetGeometry.response = ".google.protobuf.Empty" pinnacle.window.v0alpha1.WindowService.SetFullscreen = {} -pinnacle.window.v0alpha1.WindowService.SetFullscreen.service = - "pinnacle.window.v0alpha1.WindowService" +pinnacle.window.v0alpha1.WindowService.SetFullscreen.service = "pinnacle.window.v0alpha1.WindowService" pinnacle.window.v0alpha1.WindowService.SetFullscreen.method = "SetFullscreen" -pinnacle.window.v0alpha1.WindowService.SetFullscreen.request = - ".pinnacle.window.v0alpha1.SetFullscreenRequest" +pinnacle.window.v0alpha1.WindowService.SetFullscreen.request = ".pinnacle.window.v0alpha1.SetFullscreenRequest" pinnacle.window.v0alpha1.WindowService.SetFullscreen.response = ".google.protobuf.Empty" pinnacle.window.v0alpha1.WindowService.SetMaximized = {} -pinnacle.window.v0alpha1.WindowService.SetMaximized.service = - "pinnacle.window.v0alpha1.WindowService" +pinnacle.window.v0alpha1.WindowService.SetMaximized.service = "pinnacle.window.v0alpha1.WindowService" pinnacle.window.v0alpha1.WindowService.SetMaximized.method = "SetMaximized" -pinnacle.window.v0alpha1.WindowService.SetMaximized.request = - ".pinnacle.window.v0alpha1.SetMaximizedRequest" +pinnacle.window.v0alpha1.WindowService.SetMaximized.request = ".pinnacle.window.v0alpha1.SetMaximizedRequest" pinnacle.window.v0alpha1.WindowService.SetMaximized.response = ".google.protobuf.Empty" pinnacle.window.v0alpha1.WindowService.SetFloating = {} -pinnacle.window.v0alpha1.WindowService.SetFloating.service = - "pinnacle.window.v0alpha1.WindowService" +pinnacle.window.v0alpha1.WindowService.SetFloating.service = "pinnacle.window.v0alpha1.WindowService" pinnacle.window.v0alpha1.WindowService.SetFloating.method = "SetFloating" -pinnacle.window.v0alpha1.WindowService.SetFloating.request = - ".pinnacle.window.v0alpha1.SetFloatingRequest" +pinnacle.window.v0alpha1.WindowService.SetFloating.request = ".pinnacle.window.v0alpha1.SetFloatingRequest" pinnacle.window.v0alpha1.WindowService.SetFloating.response = ".google.protobuf.Empty" pinnacle.window.v0alpha1.WindowService.SetFocused = {} pinnacle.window.v0alpha1.WindowService.SetFocused.service = "pinnacle.window.v0alpha1.WindowService" pinnacle.window.v0alpha1.WindowService.SetFocused.method = "SetFocused" -pinnacle.window.v0alpha1.WindowService.SetFocused.request = - ".pinnacle.window.v0alpha1.SetFocusedRequest" +pinnacle.window.v0alpha1.WindowService.SetFocused.request = ".pinnacle.window.v0alpha1.SetFocusedRequest" pinnacle.window.v0alpha1.WindowService.SetFocused.response = ".google.protobuf.Empty" pinnacle.window.v0alpha1.WindowService.MoveToTag = {} pinnacle.window.v0alpha1.WindowService.MoveToTag.service = "pinnacle.window.v0alpha1.WindowService" pinnacle.window.v0alpha1.WindowService.MoveToTag.method = "MoveToTag" -pinnacle.window.v0alpha1.WindowService.MoveToTag.request = - ".pinnacle.window.v0alpha1.MoveToTagRequest" +pinnacle.window.v0alpha1.WindowService.MoveToTag.request = ".pinnacle.window.v0alpha1.MoveToTagRequest" pinnacle.window.v0alpha1.WindowService.MoveToTag.response = ".google.protobuf.Empty" pinnacle.window.v0alpha1.WindowService.SetTag = {} pinnacle.window.v0alpha1.WindowService.SetTag.service = "pinnacle.window.v0alpha1.WindowService" @@ -811,14 +764,12 @@ pinnacle.window.v0alpha1.WindowService.Raise.response = ".google.protobuf.Empty" pinnacle.window.v0alpha1.WindowService.MoveGrab = {} pinnacle.window.v0alpha1.WindowService.MoveGrab.service = "pinnacle.window.v0alpha1.WindowService" pinnacle.window.v0alpha1.WindowService.MoveGrab.method = "MoveGrab" -pinnacle.window.v0alpha1.WindowService.MoveGrab.request = - ".pinnacle.window.v0alpha1.MoveGrabRequest" +pinnacle.window.v0alpha1.WindowService.MoveGrab.request = ".pinnacle.window.v0alpha1.MoveGrabRequest" pinnacle.window.v0alpha1.WindowService.MoveGrab.response = ".google.protobuf.Empty" pinnacle.window.v0alpha1.WindowService.ResizeGrab = {} pinnacle.window.v0alpha1.WindowService.ResizeGrab.service = "pinnacle.window.v0alpha1.WindowService" pinnacle.window.v0alpha1.WindowService.ResizeGrab.method = "ResizeGrab" -pinnacle.window.v0alpha1.WindowService.ResizeGrab.request = - ".pinnacle.window.v0alpha1.ResizeGrabRequest" +pinnacle.window.v0alpha1.WindowService.ResizeGrab.request = ".pinnacle.window.v0alpha1.ResizeGrabRequest" pinnacle.window.v0alpha1.WindowService.ResizeGrab.response = ".google.protobuf.Empty" pinnacle.window.v0alpha1.WindowService.Get = {} pinnacle.window.v0alpha1.WindowService.Get.service = "pinnacle.window.v0alpha1.WindowService" @@ -826,42 +777,31 @@ pinnacle.window.v0alpha1.WindowService.Get.method = "Get" pinnacle.window.v0alpha1.WindowService.Get.request = ".pinnacle.window.v0alpha1.GetRequest" pinnacle.window.v0alpha1.WindowService.Get.response = ".pinnacle.window.v0alpha1.GetResponse" pinnacle.window.v0alpha1.WindowService.GetProperties = {} -pinnacle.window.v0alpha1.WindowService.GetProperties.service = - "pinnacle.window.v0alpha1.WindowService" +pinnacle.window.v0alpha1.WindowService.GetProperties.service = "pinnacle.window.v0alpha1.WindowService" pinnacle.window.v0alpha1.WindowService.GetProperties.method = "GetProperties" -pinnacle.window.v0alpha1.WindowService.GetProperties.request = - ".pinnacle.window.v0alpha1.GetPropertiesRequest" -pinnacle.window.v0alpha1.WindowService.GetProperties.response = - ".pinnacle.window.v0alpha1.GetPropertiesResponse" +pinnacle.window.v0alpha1.WindowService.GetProperties.request = ".pinnacle.window.v0alpha1.GetPropertiesRequest" +pinnacle.window.v0alpha1.WindowService.GetProperties.response = ".pinnacle.window.v0alpha1.GetPropertiesResponse" pinnacle.window.v0alpha1.WindowService.AddWindowRule = {} -pinnacle.window.v0alpha1.WindowService.AddWindowRule.service = - "pinnacle.window.v0alpha1.WindowService" +pinnacle.window.v0alpha1.WindowService.AddWindowRule.service = "pinnacle.window.v0alpha1.WindowService" pinnacle.window.v0alpha1.WindowService.AddWindowRule.method = "AddWindowRule" -pinnacle.window.v0alpha1.WindowService.AddWindowRule.request = - ".pinnacle.window.v0alpha1.AddWindowRuleRequest" +pinnacle.window.v0alpha1.WindowService.AddWindowRule.request = ".pinnacle.window.v0alpha1.AddWindowRuleRequest" pinnacle.window.v0alpha1.WindowService.AddWindowRule.response = ".google.protobuf.Empty" pinnacle.render.v0alpha1.RenderService = {} pinnacle.render.v0alpha1.RenderService.SetUpscaleFilter = {} -pinnacle.render.v0alpha1.RenderService.SetUpscaleFilter.service = - "pinnacle.render.v0alpha1.RenderService" +pinnacle.render.v0alpha1.RenderService.SetUpscaleFilter.service = "pinnacle.render.v0alpha1.RenderService" pinnacle.render.v0alpha1.RenderService.SetUpscaleFilter.method = "SetUpscaleFilter" -pinnacle.render.v0alpha1.RenderService.SetUpscaleFilter.request = - ".pinnacle.render.v0alpha1.SetUpscaleFilterRequest" +pinnacle.render.v0alpha1.RenderService.SetUpscaleFilter.request = ".pinnacle.render.v0alpha1.SetUpscaleFilterRequest" pinnacle.render.v0alpha1.RenderService.SetUpscaleFilter.response = ".google.protobuf.Empty" pinnacle.render.v0alpha1.RenderService.SetDownscaleFilter = {} -pinnacle.render.v0alpha1.RenderService.SetDownscaleFilter.service = - "pinnacle.render.v0alpha1.RenderService" +pinnacle.render.v0alpha1.RenderService.SetDownscaleFilter.service = "pinnacle.render.v0alpha1.RenderService" pinnacle.render.v0alpha1.RenderService.SetDownscaleFilter.method = "SetDownscaleFilter" -pinnacle.render.v0alpha1.RenderService.SetDownscaleFilter.request = - ".pinnacle.render.v0alpha1.SetDownscaleFilterRequest" +pinnacle.render.v0alpha1.RenderService.SetDownscaleFilter.request = ".pinnacle.render.v0alpha1.SetDownscaleFilterRequest" pinnacle.render.v0alpha1.RenderService.SetDownscaleFilter.response = ".google.protobuf.Empty" pinnacle.output.v0alpha1.OutputService = {} pinnacle.output.v0alpha1.OutputService.SetLocation = {} -pinnacle.output.v0alpha1.OutputService.SetLocation.service = - "pinnacle.output.v0alpha1.OutputService" +pinnacle.output.v0alpha1.OutputService.SetLocation.service = "pinnacle.output.v0alpha1.OutputService" pinnacle.output.v0alpha1.OutputService.SetLocation.method = "SetLocation" -pinnacle.output.v0alpha1.OutputService.SetLocation.request = - ".pinnacle.output.v0alpha1.SetLocationRequest" +pinnacle.output.v0alpha1.OutputService.SetLocation.request = ".pinnacle.output.v0alpha1.SetLocationRequest" pinnacle.output.v0alpha1.OutputService.SetLocation.response = ".google.protobuf.Empty" pinnacle.output.v0alpha1.OutputService.SetMode = {} pinnacle.output.v0alpha1.OutputService.SetMode.service = "pinnacle.output.v0alpha1.OutputService" @@ -869,30 +809,24 @@ pinnacle.output.v0alpha1.OutputService.SetMode.method = "SetMode" pinnacle.output.v0alpha1.OutputService.SetMode.request = ".pinnacle.output.v0alpha1.SetModeRequest" pinnacle.output.v0alpha1.OutputService.SetMode.response = ".google.protobuf.Empty" pinnacle.output.v0alpha1.OutputService.SetModeline = {} -pinnacle.output.v0alpha1.OutputService.SetModeline.service = - "pinnacle.output.v0alpha1.OutputService" +pinnacle.output.v0alpha1.OutputService.SetModeline.service = "pinnacle.output.v0alpha1.OutputService" pinnacle.output.v0alpha1.OutputService.SetModeline.method = "SetModeline" -pinnacle.output.v0alpha1.OutputService.SetModeline.request = - ".pinnacle.output.v0alpha1.SetModelineRequest" +pinnacle.output.v0alpha1.OutputService.SetModeline.request = ".pinnacle.output.v0alpha1.SetModelineRequest" pinnacle.output.v0alpha1.OutputService.SetModeline.response = ".google.protobuf.Empty" pinnacle.output.v0alpha1.OutputService.SetScale = {} pinnacle.output.v0alpha1.OutputService.SetScale.service = "pinnacle.output.v0alpha1.OutputService" pinnacle.output.v0alpha1.OutputService.SetScale.method = "SetScale" -pinnacle.output.v0alpha1.OutputService.SetScale.request = - ".pinnacle.output.v0alpha1.SetScaleRequest" +pinnacle.output.v0alpha1.OutputService.SetScale.request = ".pinnacle.output.v0alpha1.SetScaleRequest" pinnacle.output.v0alpha1.OutputService.SetScale.response = ".google.protobuf.Empty" pinnacle.output.v0alpha1.OutputService.SetTransform = {} -pinnacle.output.v0alpha1.OutputService.SetTransform.service = - "pinnacle.output.v0alpha1.OutputService" +pinnacle.output.v0alpha1.OutputService.SetTransform.service = "pinnacle.output.v0alpha1.OutputService" pinnacle.output.v0alpha1.OutputService.SetTransform.method = "SetTransform" -pinnacle.output.v0alpha1.OutputService.SetTransform.request = - ".pinnacle.output.v0alpha1.SetTransformRequest" +pinnacle.output.v0alpha1.OutputService.SetTransform.request = ".pinnacle.output.v0alpha1.SetTransformRequest" pinnacle.output.v0alpha1.OutputService.SetTransform.response = ".google.protobuf.Empty" pinnacle.output.v0alpha1.OutputService.SetPowered = {} pinnacle.output.v0alpha1.OutputService.SetPowered.service = "pinnacle.output.v0alpha1.OutputService" pinnacle.output.v0alpha1.OutputService.SetPowered.method = "SetPowered" -pinnacle.output.v0alpha1.OutputService.SetPowered.request = - ".pinnacle.output.v0alpha1.SetPoweredRequest" +pinnacle.output.v0alpha1.OutputService.SetPowered.request = ".pinnacle.output.v0alpha1.SetPoweredRequest" pinnacle.output.v0alpha1.OutputService.SetPowered.response = ".google.protobuf.Empty" pinnacle.output.v0alpha1.OutputService.Get = {} pinnacle.output.v0alpha1.OutputService.Get.service = "pinnacle.output.v0alpha1.OutputService" @@ -900,15 +834,13 @@ pinnacle.output.v0alpha1.OutputService.Get.method = "Get" pinnacle.output.v0alpha1.OutputService.Get.request = ".pinnacle.output.v0alpha1.GetRequest" pinnacle.output.v0alpha1.OutputService.Get.response = ".pinnacle.output.v0alpha1.GetResponse" pinnacle.output.v0alpha1.OutputService.GetProperties = {} -pinnacle.output.v0alpha1.OutputService.GetProperties.service = - "pinnacle.output.v0alpha1.OutputService" +pinnacle.output.v0alpha1.OutputService.GetProperties.service = "pinnacle.output.v0alpha1.OutputService" pinnacle.output.v0alpha1.OutputService.GetProperties.method = "GetProperties" -pinnacle.output.v0alpha1.OutputService.GetProperties.request = - ".pinnacle.output.v0alpha1.GetPropertiesRequest" -pinnacle.output.v0alpha1.OutputService.GetProperties.response = - ".pinnacle.output.v0alpha1.GetPropertiesResponse" +pinnacle.output.v0alpha1.OutputService.GetProperties.request = ".pinnacle.output.v0alpha1.GetPropertiesRequest" +pinnacle.output.v0alpha1.OutputService.GetProperties.response = ".pinnacle.output.v0alpha1.GetPropertiesResponse" return { google = google, pinnacle = pinnacle, } + diff --git a/api/lua/pinnacle/grpc/protobuf.lua b/api/lua/pinnacle/grpc/protobuf.lua index dd41c5c02..c076798b6 100644 --- a/api/lua/pinnacle/grpc/protobuf.lua +++ b/api/lua/pinnacle/grpc/protobuf.lua @@ -48,7 +48,6 @@ function protobuf.build_protos() pb.option("enum_as_value") end ----@nodoc ---Encode the given `data` as the protobuf `type`. ---@param type string The absolute protobuf type ---@param data table The table of data, conforming to its protobuf definition diff --git a/api/lua/pinnacle/input.lua b/api/lua/pinnacle/input.lua index 340866a6c..6b0113eeb 100644 --- a/api/lua/pinnacle/input.lua +++ b/api/lua/pinnacle/input.lua @@ -89,7 +89,7 @@ input.mouse_button_values = mouse_button_values ---Input.keybind({ "ctrl" }, "@", function() end) ---``` --- ----### Example +---#### Example ---```lua --- -- Set `super + Return` to open Alacritty ---Input.keybind({ "super" }, Input.key.Return, function() @@ -133,7 +133,7 @@ end --- ---You must specify whether the keybind happens on button press or button release. --- ----### Example +---#### Example ---```lua --- -- Set `super + left mouse button` to move a window on press ---Input.mousebind({ "super" }, "btn_left", "press", function() @@ -221,7 +221,7 @@ end --- ---Read `xkeyboard-config(7)` for more information. --- ----### Example +---#### Example ---```lua ---Input.set_xkb_config({ --- layout = "us,fr,ge", @@ -240,7 +240,7 @@ end ---Set the keyboard's repeat rate and delay. --- ----### Example +---#### Example ---```lua ---Input.set_repeat_rate(100, 1000) -- Key must be held down for 1 second, then repeats 10 times per second. ---``` @@ -316,7 +316,7 @@ local tap_button_map_values = { --- ---This includes settings for pointer devices, like acceleration profiles, natural scroll, and more. --- ----### Example +---#### Example ---```lua ---Input.set_libinput_settings({ --- accel_profile = "flat", diff --git a/api/lua/pinnacle/input/keys.lua b/api/lua/pinnacle/input/keys.lua index 41f0b1ea6..d467ccaf3 100644 --- a/api/lua/pinnacle/input/keys.lua +++ b/api/lua/pinnacle/input/keys.lua @@ -2,7 +2,7 @@ -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at https://mozilla.org/MPL/2.0/. ----@nodoc +---Every key under the sun. ---@enum Key local keys = { NoSymbol = 0x00000000, diff --git a/api/lua/pinnacle/output.lua b/api/lua/pinnacle/output.lua index 34245efa8..ad932901e 100644 --- a/api/lua/pinnacle/output.lua +++ b/api/lua/pinnacle/output.lua @@ -7,7 +7,7 @@ local client = require("pinnacle.grpc.client").client local output_v0alpha1 = require("pinnacle.grpc.defs").pinnacle.output.v0alpha1 local output_service = require("pinnacle.grpc.defs").pinnacle.output.v0alpha1.OutputService ----@nodoc +---@lcat nodoc ---@class OutputHandleModule local output_handle = {} @@ -29,13 +29,14 @@ local OutputHandle = {} --- ---Outputs are uniquely identified by their name, a.k.a. the name of the connector they're plugged in to. ---@class Output +---@lcat nodoc ---@field private handle OutputHandleModule local output = {} output.handle = output_handle ---Get all outputs. --- ----### Example +---#### Example ---```lua ---local outputs = Output.get_all() ---``` @@ -63,7 +64,7 @@ end ---Get all enabled outputs. --- ----### Example +---#### Example ---```lua ---local outputs = Output.get_all_enabled() ---``` @@ -84,7 +85,7 @@ end ---Get an output by its name (the connector it's plugged into). --- ----### Example +---#### Example ---```lua ---local output = Output.get_by_name("eDP-1") ---``` @@ -107,7 +108,7 @@ end --- ---This is currently defined as the most recent one that has had pointer motion. --- ----### Example +---#### Example ---```lua ---local output = Output.get_focused() ---``` @@ -135,7 +136,7 @@ end ---to prevent duplicate setup. Instead, the compositor keeps track of the tags and other ---state associated with that output and restores it when replugged. --- ----### Example +---#### Example ---```lua --- -- Add tags "1" through "5" to all outputs ---Output.connect_for_all(function(output) @@ -184,7 +185,7 @@ end --- ---`setups` is a table of output identifier strings to `OutputSetup`s. --- ----### Keys +---##### Keys --- ---Keys attempt to match outputs. --- @@ -194,17 +195,17 @@ end --- ---Otherwise, keys will attempt to match the exact name of an output. --- ----Use "serial:" to match outputs by their EDID serial. For example, "serial:143256". +---Use `"serial:"` to match outputs by their EDID serial. For example, `"serial:143256"`. ---Note that not all displays have EDID serials. Also, serials are not guaranteed to be unique. ---If you're unlucky enough to have two displays with the same serial, you'll have to use their names ---or filter with wildcards instead. --- ----### Setups +---##### Setups --- ---If an output is matched, the corresponding `OutputSetup` entry will be applied to it. ---Any given `tags` will be added, and things like `transform`s, `scale`s, and `mode`s will be set. --- ----### Ordering setups +---##### Ordering setups --- ---You may need to specify multiple wildcard matches for different setup applications. ---You can't just add another key of `"*"`, because that would overwrite the old `"*"`. @@ -214,7 +215,7 @@ end ---orders above `#setups` may cause their entries to not apply. --- --- ----### Example +---#### Example ---```lua ---Output.setup({ --- -- Give all outputs tags 1 through 5 @@ -347,17 +348,17 @@ end ---This function lets you declare positions for outputs, either as a specific point in the global ---space or relative to another output. --- ----### Choosing when to recompute output positions +---##### Choosing when to recompute output positions --- ---`update_locs_on` specifies when output positions should be recomputed. It can be `"all"`, signaling you ---want positions to update on all of output connect, disconnect, and resize, or it can be a table ---containing `"connect"`, `"disconnect"`, and/or `"resize"`. --- ----### Specifying locations +---##### Specifying locations --- ---`locs` should be a table of output identifiers to locations. --- ----#### Output identifiers +---##### Output identifiers --- ---Keys for `locs` should be output identifiers. These are strings of ---the name of the output, for example "eDP-1" or "HDMI-A-1". @@ -374,7 +375,7 @@ end ---you to specify more than one relative output. The first connected ---relative output will be chosen for placement. See the example below. --- ----### Example +---#### Example ---```lua --- -- vvvvv Relayout on output connect, disconnect, and resize ---Output.setup_locs("all", { @@ -674,7 +675,7 @@ end ---Note: If you have space between two outputs when setting their locations, ---the pointer will not be able to move between them. --- ----### Example +---#### Example ---```lua --- -- Assume two monitors in order, "DP-1" and "HDMI-1", with the following dimensions: --- -- - "DP-1": ┌─────┐ @@ -729,7 +730,7 @@ end ---For example, "top_align_left" will place this output above `other` and align the left borders. ---Similarly, "right_align_center" will place this output to the right of `other` and align their centers. --- ----### Example +---#### Example ---```lua --- -- Assume two monitors in order, "DP-1" and "HDMI-1", with the following dimensions: --- -- - "DP-1": ┌─────┐ @@ -830,7 +831,7 @@ end --- ---If this output doesn't support the given mode, it will be ignored. --- ----### Example +---#### Example ---```lua ---Output.get_focused():set_mode(2560, 1440, 144000) ---``` @@ -1271,7 +1272,6 @@ function OutputHandle:keyboard_focus_stack_visible() return keyboard_focus_stack_visible end ----@nodoc ---Create a new `OutputHandle` from its raw name. ---@param output_name string function output_handle.new(output_name) diff --git a/api/lua/pinnacle/process.lua b/api/lua/pinnacle/process.lua index 5342495a6..24de12a24 100644 --- a/api/lua/pinnacle/process.lua +++ b/api/lua/pinnacle/process.lua @@ -56,7 +56,7 @@ end ---Note 2: If you spawn a window before tags are added it will spawn without any tags and ---won't be displayed in the compositor. TODO: Do what awesome does and display on all tags instead --- ----### Example +---#### Example ---```lua ---Process.spawn("alacritty") --- @@ -103,7 +103,7 @@ end ---Set an environment variable for the compositor. ---This will cause any future spawned processes to have this environment variable. --- ----### Example +---#### Example ---```lua ---Process.set_env("ENV_NAME", "the value") ---``` diff --git a/api/lua/pinnacle/signal.lua b/api/lua/pinnacle/signal.lua index a9c8396f5..03c31f9ac 100644 --- a/api/lua/pinnacle/signal.lua +++ b/api/lua/pinnacle/signal.lua @@ -7,8 +7,6 @@ local signal_service = require("pinnacle.grpc.defs").pinnacle.signal.v0alpha1.Si local stream_control = require("pinnacle.grpc.defs").pinnacle.signal.v0alpha1.StreamControl --- TODO: rewrite ldoc_gen so you don't have to stick @nodoc everywhere - ---@type table local signals = { OutputConnect = { @@ -130,20 +128,21 @@ end ----------------------------------------------------------------------------- ----@nodoc ---@class SignalHandleModule +---@lcat nodoc local signal_handle = {} ----@classmod ---A handle to a connected signal that can be used to disconnect the provided callback. --- ---@class SignalHandle +---@lcat nodoc ---@field private signal string +---@lcat nodoc ---@field private callback function The callback you connected local SignalHandle = {} ----@nodoc ---@class SignalHandlesModule +---@lcat nodoc local signal_handles = {} ---A collection of `SignalHandle`s retreived through a `connect_signal` function. @@ -151,10 +150,10 @@ local signal_handles = {} ---@class SignalHandles local SignalHandles = {} ----@nodoc ---@class Signal ---@field private handle SignalHandleModule ---@field private handles SignalHandlesModule +---@lcat nodoc local signal = {} signal.handle = signal_handle signal.handles = signal_handles @@ -178,7 +177,6 @@ function SignalHandle:disconnect() end end ----@nodoc ---@return SignalHandle function signal_handle.new(request, callback) ---@type SignalHandle @@ -199,7 +197,6 @@ function SignalHandles:disconnect_all() end end ----@nodoc ---@param signal_hdls table ---@return SignalHandles function signal_handles.new(signal_hdls) @@ -209,9 +206,9 @@ function signal_handles.new(signal_hdls) return self end ----@nodoc ---@param request string ---@param callback function +---@lcat nodoc function signal.add_callback(request, callback) if #signals[request].callbacks == 0 then signal.connect(request, signals[request].on_response) @@ -220,9 +217,9 @@ function signal.add_callback(request, callback) table.insert(signals[request].callbacks, callback) end ----@nodoc ---@param request string ---@param callback fun(response: table) +---@lcat nodoc function signal.connect(request, callback) local stream = client:bidirectional_streaming_request(signal_service[request], { control = stream_control.STREAM_CONTROL_READY, @@ -250,9 +247,9 @@ function signal.connect(request, callback) signals[request].sender = stream end ----@nodoc ---This should only be called when call callbacks for the signal are removed ---@param request string +---@lcat nodoc function signal.disconnect(request) if signals[request].sender then local chunk = require("pinnacle.grpc.protobuf").encode( diff --git a/api/lua/pinnacle/tag.lua b/api/lua/pinnacle/tag.lua index 152357829..2474d796a 100644 --- a/api/lua/pinnacle/tag.lua +++ b/api/lua/pinnacle/tag.lua @@ -14,7 +14,7 @@ local set_or_toggle = { TOGGLE = require("pinnacle.grpc.defs").pinnacle.v0alpha1.SetOrToggle.SET_OR_TOGGLE_TOGGLE, } ----@nodoc +---@lcat nodoc ---@class TagHandleModule local tag_handle = {} @@ -77,7 +77,7 @@ end --- ---If an output has more than one tag with the same name, this returns the first. --- ----### Example +---#### Example ---```lua --- -- Get tags on the focused output ---local tag = Tag.get("Tag") @@ -123,7 +123,7 @@ end --- ---Returns handles to the created tags. --- ----### Example +---#### Example ---```lua ---local tags = Tag.add(Output.get_by_name("HDMI-1"), "1", "2", "Buckle", "Shoe") --- @@ -168,7 +168,7 @@ end ---Remove the given tags. --- ----### Example +---#### Example ---```lua ---local tags = Tag.add(Output.get_by_name("HDMI-1"), "1", "2", "Buckle", "Shoe") --- @@ -239,7 +239,7 @@ end ---Remove this tag. --- ----### Example +---#### Example ---```lua ---local tags = Tag.add(Output.get_by_name("HDMI-1"), "1", "2", "Buckle", "Shoe") --- @@ -253,7 +253,7 @@ end ---Activate this tag and deactivate all other ones on the same output. --- ----### Example +---#### Example ---```lua --- -- Assume the focused output has the following inactive tags and windows: --- -- - "1": Alacritty @@ -272,7 +272,7 @@ end ---Set whether or not this tag is active. --- ----### Example +---#### Example ---```lua --- -- Assume the focused output has the following inactive tags and windows: --- -- - "1": Alacritty @@ -297,7 +297,7 @@ end ---Toggle this tag's active state. --- ----### Example +---#### Example ---```lua --- -- Assume the focused output has the following inactive tags and windows: --- -- - "1": Alacritty @@ -383,7 +383,6 @@ function TagHandle:windows() return self:props().windows end ----@nodoc ---Create a new `TagHandle` from an id. ---@param tag_id integer ---@return TagHandle @@ -396,7 +395,6 @@ function tag_handle.new(tag_id) return self end ----@nodoc ---@param tag_ids integer[] ---@return TagHandle[] function tag_handle.new_from_table(tag_ids) diff --git a/api/lua/pinnacle/util.lua b/api/lua/pinnacle/util.lua index f3a5b24db..8bf351d58 100644 --- a/api/lua/pinnacle/util.lua +++ b/api/lua/pinnacle/util.lua @@ -234,7 +234,7 @@ local util = { ---You must wrap each request in a function, otherwise they would just get ---evaluated at the callsite in a blocking manner. --- ----### Example +---#### Example ---```lua ---local handles = window.get_all() --- diff --git a/api/lua/pinnacle/window.lua b/api/lua/pinnacle/window.lua index 95123f7d8..002479f01 100644 --- a/api/lua/pinnacle/window.lua +++ b/api/lua/pinnacle/window.lua @@ -15,7 +15,7 @@ local set_or_toggle = { TOGGLE = require("pinnacle.grpc.defs").pinnacle.v0alpha1.SetOrToggle.SET_OR_TOGGLE_TOGGLE, } ----@nodoc +---@lcat nodoc ---@class WindowHandleModule local window_handle = {} @@ -27,7 +27,6 @@ local window_handle = {} ---what you want it to. --- ---You can retrieve window handles through the various `get` functions in the `Window` module. ----@classmod ---@class WindowHandle ---@field id integer local WindowHandle = {} @@ -37,13 +36,14 @@ local WindowHandle = {} ---This module helps you deal with setting windows to fullscreen and maximized, setting their size, ---moving them between tags, and various other actions. ---@class Window +---@lcat nodoc ---@field private handle WindowHandleModule local window = {} window.handle = window_handle ---Get all windows. --- ----### Example +---#### Example ---```lua ---local windows = Window.get_all() ---for _, window in ipairs(windows) do @@ -68,7 +68,7 @@ end ---Get the currently focused window. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -104,7 +104,7 @@ end ---The button must be pressed at the time this method is called. ---If the button is lifted, the move will end. --- ----### Example +---#### Example ---```lua ---Input.mousebind({ "super" }, "btn_left", function() --- Window.begin_move("btn_left") @@ -126,7 +126,7 @@ end ---The button must be pressed at the time this method is called. ---If the button is lifted, the resize will end. --- ----### Example +---#### Example ---```lua ---Input.mousebind({ "super" }, "btn_right", function() --- Window.begin_resize("btn_right") @@ -256,7 +256,7 @@ end --- ---`cond` can be a bit confusing and quite table heavy. Examples are shown below for guidance. --- ----### Examples +---#### Examples ---```lua --- -- A simple window rule. This one will cause Firefox to open on tag "Browser". ---Window.add_window_rule({ @@ -390,7 +390,7 @@ end ---Send a close request to this window. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then focused:close() end @@ -417,7 +417,7 @@ end ---*Tiled windows will not reflect these changes.* ---This method only applies to this window's floating geometry. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -440,7 +440,7 @@ end ---Set this window to fullscreen or not. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -463,7 +463,7 @@ end ---Toggle this window to and from fullscreen. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -483,7 +483,7 @@ end ---Set this window to maximized or not. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -506,7 +506,7 @@ end ---Toggle this window to and from maximized. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -526,7 +526,7 @@ end ---Set this window to floating or not. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -549,7 +549,7 @@ end ---Toggle this window to and from floating. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -569,7 +569,7 @@ end ---Focus or unfocus this window. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -591,7 +591,7 @@ end ---Toggle this window to and from focused. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -613,7 +613,7 @@ end --- ---This will remove all tags from this window and tag it with `tag`. --- ----### Example +---#### Example ---```lua --- -- Assume the focused output has the tag "Tag" ---local focused = Window.get_focused() @@ -634,7 +634,7 @@ end ---Tag or untag the given tag on this window. --- ----### Example +---#### Example ---```lua --- -- Assume the focused output has the tag "Tag" ---local focused = Window.get_focused() @@ -663,7 +663,7 @@ end ---Toggle the given tag on this window. --- ----### Example +---#### Example ---```lua --- -- Assume the focused output has the tag "Tag" ---local focused = Window.get_focused() @@ -694,7 +694,7 @@ end --- ---This will raise a window all the way to the top of the z-stack. --- ----### Example +---#### Example ---```lua ---local focused = Window.get_focused() ---if focused then @@ -864,7 +864,6 @@ function WindowHandle:tags() return self:props().tags end ----@nodoc ---Create a new `WindowHandle` from an id. ---@param window_id integer ---@return WindowHandle @@ -877,7 +876,6 @@ function window_handle.new(window_id) return self end ----@nodoc ---@param window_ids integer[] --- ---@return WindowHandle[] diff --git a/src/protocol/gamma_control.rs b/src/protocol/gamma_control.rs index c65e0c695..fc89ee6d9 100644 --- a/src/protocol/gamma_control.rs +++ b/src/protocol/gamma_control.rs @@ -213,6 +213,8 @@ where let mut file = File::from(fd); + // Output is hashed by Arc::as_ptr, which is immutable + #[allow(clippy::mutable_key_type)] let gamma_controls = &mut state.gamma_control_manager_state().gamma_controls; if let Err(err) = file.read_exact(buf) { @@ -276,6 +278,8 @@ where resource: &ZwlrGammaControlV1, _data: &GammaControlState, ) { + // Output is hashed by Arc::as_ptr, which is immutable + #[allow(clippy::mutable_key_type)] let gamma_controls = &mut state.gamma_control_manager_state().gamma_controls; let Some(output) = gamma_controls diff --git a/src/protocol/output_management.rs b/src/protocol/output_management.rs index fcfa0181e..574e3d844 100644 --- a/src/protocol/output_management.rs +++ b/src/protocol/output_management.rs @@ -97,7 +97,11 @@ pub enum OutputConfiguration { pub trait OutputManagementHandler { fn output_management_manager_state(&mut self) -> &mut OutputManagementManagerState; + // Output is hashed by Arc::as_ptr, which is immutable + #[allow(clippy::mutable_key_type)] fn apply_configuration(&mut self, config: HashMap) -> bool; + // Output is hashed by Arc::as_ptr, which is immutable + #[allow(clippy::mutable_key_type)] fn test_configuration(&mut self, config: HashMap) -> bool; } @@ -524,6 +528,8 @@ where ) { let manager = data_init.init(resource, ()); + // Output is hashed by Arc::as_ptr, which is immutable + #[allow(clippy::mutable_key_type)] let heads = state .output_management_manager_state() .outputs @@ -587,6 +593,7 @@ where return; }; + #[allow(clippy::mutable_key_type)] let pending_heads = manager_data .heads .keys() @@ -849,6 +856,7 @@ where return; } + #[allow(clippy::mutable_key_type)] let config = data .pending_heads .iter() diff --git a/src/render/util/snapshot.rs b/src/render/util/snapshot.rs index a019e54de..df1bba5cf 100644 --- a/src/render/util/snapshot.rs +++ b/src/render/util/snapshot.rs @@ -197,6 +197,7 @@ pub fn capture_snapshots_on_output( let fullscreen_and_up = under_fullscreen.split_off(split_index.unwrap_or(under_fullscreen.len())); + #[allow(clippy::mutable_key_type)] let also_include = also_include.into_iter().collect::>(); let mut flat_map = |win: WindowElement| {