Skip to content

Commit

Permalink
fix: disable wrong linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
sravioli committed Nov 22, 2024
1 parent 7022dc5 commit 36ec0de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/appearance.lua
Original file line number Diff line number Diff line change
@@ -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 = {}

Expand All @@ -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,
},
}

Expand Down
1 change: 1 addition & 0 deletions config/gpu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 36ec0de

Please sign in to comment.