From 9a33212efbdff411b8ce92f4fcc64d63dcdcb833 Mon Sep 17 00:00:00 2001 From: pseudometa <73286100+chrisgrieser@users.noreply.github.com> Date: Wed, 20 Sep 2023 13:39:45 +0200 Subject: [PATCH] refactor!: key for conformation sound option --- README.md | 7 ++++--- lua/tinygit.lua | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index add1432..b7de63b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ -Lightweight git client for nvim for quick commits and other quality of life improvements. +Lightweight and nimble git client for nvim. `nvim-tinygit` should be considered beta status. It-works-on-my-machine™, but it has not yet been tested by many other users. @@ -101,8 +101,9 @@ local defaultConfig = { closedPR = "🟥", }, - -- confirmation sounds on finished async operations like push - confirmationSoundsOnMacOs = true, + -- Confirmation sound on finished async operations like push. + -- Currently macOS only. + confirmationSound = true, } ``` diff --git a/lua/tinygit.lua b/lua/tinygit.lua index 0d77b95..a102746 100644 --- a/lua/tinygit.lua +++ b/lua/tinygit.lua @@ -21,7 +21,7 @@ local defaultConfig = { mergedPR = "🟨", closedPR = "🟥", }, - confirmationSoundsOnMacOs = true, + confirmationSound = true, -- for async commands like push } -- set values if setup call is not run @@ -75,11 +75,11 @@ local function notInGitRepo() return notInRepo end ----if on mac, play a sound +---CAVEAT currently only on macOS ---@param soundFilepath string local function playSoundMacOS(soundFilepath) local onMacOs = fn.has("macunix") == 1 - if not onMacOs or not config.confirmationSoundsOnMacOs then return end + if not onMacOs or not config.confirmationSound then return end fn.system(("afplay %q &"):format(soundFilepath)) end