From c2e3c09096d1c96352e5da6ab64da00f6fea35ee Mon Sep 17 00:00:00 2001 From: Abin Simon Date: Tue, 28 Nov 2023 11:00:09 +0530 Subject: [PATCH] [home-manager] util func to generate github bookmarks for ff --- home-manager/.config/home-manager/utils.nix | 47 +++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/home-manager/.config/home-manager/utils.nix b/home-manager/.config/home-manager/utils.nix index db8a3e29..96355444 100644 --- a/home-manager/.config/home-manager/utils.nix +++ b/home-manager/.config/home-manager/utils.nix @@ -33,4 +33,51 @@ Timer.Persistent = true; Install.WantedBy = [ "timers.target" ]; }; + + # generate github bookmarks + gh-bookmarks = { repo, basename, basekeyword }: + [ + { + name = basename; + tags = [ "github" ]; + keyword = basekeyword; + url = "https://github.com/" + repo; + } + { + name = basename + " Issues"; + tags = [ "github" ]; + keyword = basekeyword + "i"; + url = "https://github.com/" + repo + "/issues"; + } + { + name = basename + " Issues Assigned to me"; + tags = [ "github" ]; + keyword = basekeyword + "im"; + url = "https://github.com/" + repo + "/issues/assigned/@me"; + } + { + name = basename + " Pull Requests"; + tags = [ "github" ]; + keyword = basekeyword + "p"; + url = "https://github.com/" + repo + "/pulls"; + } + { + name = basename + " Pull Requests Assigned to me"; + tags = [ "github" ]; + keyword = basekeyword + "pm"; + url = "https://github.com/" + repo + "/pulls/assigned/@me"; + } + { + name = basename + " Pull Requests Review Requested to me"; + tags = [ "github" ]; + keyword = basekeyword + "pr"; + url = "https://github.com/" + repo + "/pulls/review-requested/@me"; + } + { + name = basename + " Actions"; + tags = [ "github" ]; + keyword = basekeyword + "a"; + url = "https://github.com/" + repo + "/actions"; + } + ]; }