From 7634e796cc038c5ca90c0f43bc5645e899f0a4a2 Mon Sep 17 00:00:00 2001 From: Anton Plotnikov Date: Mon, 20 May 2024 20:11:51 +0300 Subject: [PATCH] Update hyprland ip client to support v0.40 --- README.md | 2 +- linux/go.mod | 6 ++---- linux/go.sum | 4 ++-- linux/internal/deinfo/hyprland.go | 4 ++-- nix/homeModule.nix | 2 +- nix/packages/_default.nix | 3 +-- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 2f4e773..6c63721 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ Change paths for your setup if needed. ```ini [Desktop Entry] Categories=Network;WebBrowser -Exec=~/go/bin/autobrowser-linux -config ~/.config/autobrowser.config -url %u +Exec=~/go/bin/autobrowser -config ~/.config/autobrowser.config -url %u Icon=browser MimeType=x-scheme-handler/http;x-scheme-handler/https Name=Autobrowser: select browser by contextual rules diff --git a/linux/go.mod b/linux/go.mod index f2667b0..5642174 100644 --- a/linux/go.mod +++ b/linux/go.mod @@ -2,13 +2,11 @@ module github.com/pltanton/autobrowser/linux go 1.22.1 -require github.com/labi-le/hyprland-ipc-client v1.0.3 - -require github.com/pltanton/autobrowser/common v0.0.0 - require ( github.com/godbus/dbus/v5 v5.1.0 github.com/joshuarubin/go-sway v1.2.0 + github.com/labi-le/hyprland-ipc-client/v3 v3.0.2 + github.com/pltanton/autobrowser/common v0.0.0 ) require ( diff --git a/linux/go.sum b/linux/go.sum index a60fdd0..269c566 100644 --- a/linux/go.sum +++ b/linux/go.sum @@ -6,8 +6,8 @@ github.com/joshuarubin/go-sway v1.2.0 h1:t3eqW504//uj9PDwFf0+IVfkD+WoOGaDX5gYIe0 github.com/joshuarubin/go-sway v1.2.0/go.mod h1:qcDd6f25vJ0++wICwA1BainIcRC67p2Mb4lsrZ0k3/k= github.com/joshuarubin/lifecycle v1.0.0 h1:N/lPEC8f+dBZ1Tn99vShqp36LwB+LI7XNAiNadZeLUQ= github.com/joshuarubin/lifecycle v1.0.0/go.mod h1:sRy++ATvR9Ee21tkRdFkQeywAWvDsue66V70K0Dnl54= -github.com/labi-le/hyprland-ipc-client v1.0.3 h1:NvfazDlMf/pKl8sAqAO7BUwLEo3xxBcGgMP8PKT7R6g= -github.com/labi-le/hyprland-ipc-client v1.0.3/go.mod h1:JZ+LBSfp0aO33qOm6TMYqe7qD8CO9d8jMpGpqz6Yf3I= +github.com/labi-le/hyprland-ipc-client/v3 v3.0.2 h1:FhijVxBIiqzaRWINsuj0cy/cuBzzci4nzPfbcuHb50M= +github.com/labi-le/hyprland-ipc-client/v3 v3.0.2/go.mod h1:5y18Ty27Br/BQcyhC45CaNofWmwXR8VzswlNnb5CYZA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/linux/internal/deinfo/hyprland.go b/linux/internal/deinfo/hyprland.go index ea50c90..b03ff44 100644 --- a/linux/internal/deinfo/hyprland.go +++ b/linux/internal/deinfo/hyprland.go @@ -5,7 +5,7 @@ import ( "log/slog" "os" - ipc "github.com/labi-le/hyprland-ipc-client" + ipc "github.com/labi-le/hyprland-ipc-client/v3" ) type hyprlandProvider struct { @@ -14,7 +14,7 @@ type hyprlandProvider struct { func newHyprlandProvider() deInfoProvider { return &hyprlandProvider{ - c: ipc.NewClient(os.Getenv("HYPRLAND_INSTANCE_SIGNATURE")), + c: ipc.MustClient(os.Getenv("HYPRLAND_INSTANCE_SIGNATURE")), } } diff --git a/nix/homeModule.nix b/nix/homeModule.nix index 2deb350..2a95f04 100644 --- a/nix/homeModule.nix +++ b/nix/homeModule.nix @@ -40,7 +40,7 @@ in { (lib.generators.toINI {} { "Desktop Entry" = { Type = "Application"; - Exec = "${cfg.package}/bin/autobrowser-linux -config ${configFile} -url %u"; + Exec = "${cfg.package}/bin/autobrowser -config ${configFile} -url %u"; Terminal = false; Name = "Autobrowser: select browser by contextual rules"; Icon = "browser"; diff --git a/nix/packages/_default.nix b/nix/packages/_default.nix index 3d15ebf..1935c93 100644 --- a/nix/packages/_default.nix +++ b/nix/packages/_default.nix @@ -5,8 +5,7 @@ buildGoModule { pname = "autobrowser"; version = "0"; - # vendorHash = "sha256-W4WltWSZ1hJPUusaH3iRHo4HD5xmz3+/kOGxEspVF30="; - vendorHash = "sha256-GWrflGa6evgehcHQujac67llQJWnRIQbBFna26DYizk="; + vendorHash = "sha256-dvu80fFm3vIBjhk9k9Z5h9J5qTbvl3Tq1MCMQVJ+ru8="; meta = with lib; { homepage = "https://github.com/pltanton/autobrowser"; description = "Automatically determine browser depending on provided rules";