From 36ec0de9cd7b91b5de1ab3eb5cba7166ed897490 Mon Sep 17 00:00:00 2001 From: sravioli Date: Fri, 22 Nov 2024 14:19:47 +0100 Subject: [PATCH] fix: disable wrong linter warnings --- config/appearance.lua | 6 ++++-- config/gpu.lua | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/config/appearance.lua b/config/appearance.lua index 46f82c1..a9fc073 100644 --- a/config/appearance.lua +++ b/config/appearance.lua @@ -1,6 +1,8 @@ local Utils = require "utils" local color = Utils.fn.color -local fs = Utils.fn.fs + +---@diagnostic disable-next-line: undefined-field +local G = require("wezterm").GLOBAL local Config = {} @@ -14,7 +16,7 @@ Config.background = { source = { Color = theme.background }, width = "100%", height = "100%", - opacity = require("wezterm").GLOBAL.opacity or 1, + opacity = G.opacity or 1, }, } diff --git a/config/gpu.lua b/config/gpu.lua index 273bb9f..b6e0cd0 100644 --- a/config/gpu.lua +++ b/config/gpu.lua @@ -4,6 +4,7 @@ Config.front_end = "WebGpu" Config.webgpu_force_fallback_adapter = false ---switch to low power mode when battery is low +---@diagnostic disable-next-line: undefined-field local battery_charge = require("wezterm").battery_info()[1].state_of_charge if battery_charge < 0.35 then Config.webgpu_power_preference = "LowPower"