From 9a5e9255a4e88a0c9357f243037e26796c9ca7ab Mon Sep 17 00:00:00 2001 From: Tigor Hutasuhut Date: Mon, 19 Aug 2024 12:23:24 +0700 Subject: [PATCH] hyprland: update check for hyprctl to use environment variable --- lua/config/keymaps.lua | 2 +- lua/config/lazygit.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index c222811..82c12e7 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -10,6 +10,6 @@ if vim.fn.executable "lazygit" == 1 then require "config.lazygit" end -if vim.fn.executable "hyprctl" == 1 and vim.fn.executable "footclient" == 1 then +if vim.env.HYPRLAND_INSTANCE_SIGNATURE ~= nil and vim.fn.executable "footclient" == 1 then require "config.terminal" end diff --git a/lua/config/lazygit.lua b/lua/config/lazygit.lua index 1b3de59..6f866a3 100644 --- a/lua/config/lazygit.lua +++ b/lua/config/lazygit.lua @@ -13,7 +13,7 @@ if vim.env.ZELLIJ ~= nil and not vim.g.neovide then "lazygit", } end, { desc = "Open Lazygit (Zellij)" }) -elseif vim.fn.executable "hyprctl" == 1 and vim.fn.executable "foot" == 1 then +elseif vim.env.HYPRLAND_INSTANCE_SIGNATURE ~= nil and vim.fn.executable "foot" == 1 then vim.keymap.set("n", "z", function() vim.system { "hyprctl",