GNU bug report logs - #58179
A small script to switch between browser tabs.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Thu, 29 Sep 2022 19:49:01 UTC

Severity: normal

Done: Nicolas Graves <ngraves <at> ngraves.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58179 in the body.
You can then email your comments to 58179 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#58179; Package guix-patches. (Thu, 29 Sep 2022 19:49:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graves <ngraves <at> ngraves.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 29 Sep 2022 19:49:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-patches <at> gnu.org
Subject: A small script to switch between browser tabs.
Date: Thu, 29 Sep 2022 21:48:23 +0200
Hi!

4 patches to send a small rofi script to switch between chromium-based
browser tabs.

There are node packages in it and i didn't take care of packaging all
development dependencies (node bootstrapping).

The script should also work in firefox based browsers soon.

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches <at> gnu.org:
bug#58179; Package guix-patches. (Thu, 29 Sep 2022 19:53:01 GMT) Full text and rfc822 format available.

Message #8 received at 58179 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 58179 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 1/4] gnu: Add node-ws.
Date: Thu, 29 Sep 2022 21:52:24 +0200
* gnu/packages/node-xyz.scm (node-ws): New variable.
---
 gnu/packages/node-xyz.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index b14b407e19..4c92e07537 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -1512,6 +1512,35 @@ (define-public node-serialport
 projects.  It combines a high-level Node.js stream interface with a useful
 default set of parsers and bindings.")))
 
+(define-public node-ws
+  (package
+    (name "node-ws")
+    (version "8.8.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/websockets/ws")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1nwig6rxakd72nr1sbcl7qqwab3w5116s7dcblnz45fslf9lql8i"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases (modify-phases %standard-phases
+                  (replace 'configure
+                    (lambda _
+                      (invoke "npm" "--offline" "--ignore-scripts" "install"
+                              "--production"))))))
+    (home-page "https://github.com/websockets/ws")
+    (synopsis "Websocket client and server for Node.js")
+    (description "This package provides a simple websocket client and server
+for Node.js.  It doesn't work in a browser.  It can send and receive data,
+authenticate clients, broadwast to other websocket clients, use external
+APIs...")
+    (license license:expat)))
+
 (define-public node-yazl
   (package
     (name "node-yazl")
-- 
2.37.3





Information forwarded to guix-patches <at> gnu.org:
bug#58179; Package guix-patches. (Thu, 29 Sep 2022 19:53:02 GMT) Full text and rfc822 format available.

Message #11 received at 58179 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 58179 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 2/4] gnu: Add node-commander.
Date: Thu, 29 Sep 2022 21:52:25 +0200
* gnu/packages/node-xyz.scm (node-commander): New variable.
---
 gnu/packages/node-xyz.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 4c92e07537..c14ff7f421 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -106,6 +106,34 @@ (define-public node-color-name
      "This package provides a JSON list with color names and their values.")
     (license license:expat)))
 
+(define-public node-commander
+  (package
+    (name "node-commander")
+    (version "9.3.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/tj/commander.js")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1yvm0qjirxxdrf7dng0h770n8abz83ymzv4r0wa8ww5x2l2xzsvz"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases (modify-phases %standard-phases
+                  (replace 'configure
+                    (lambda _
+                      (invoke "npm" "--offline" "--ignore-scripts" "install"
+                              "--production"))))))
+    (home-page "https://github.com/tj/commander.js")
+    (synopsis "Complete solution for Node.js command-line interfaces")
+    (description "This package can parse arguments into options and
+command-arguments, disaply usage errors for problems, and implements a help
+system.")
+    (license license:expat)))
+
 (define-public node-crx3
   (package
     (name "node-crx3")
-- 
2.37.3





Information forwarded to guix-patches <at> gnu.org:
bug#58179; Package guix-patches. (Thu, 29 Sep 2022 19:53:02 GMT) Full text and rfc822 format available.

Message #14 received at 58179 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 58179 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 3/4] gnu: Add node-chrome-remote-interface.
Date: Thu, 29 Sep 2022 21:52:26 +0200
* gnu/packages/node-xyz.scm (node-chrome-remote-interface): New variable.
---
 gnu/packages/node-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index c14ff7f421..8dd11333ef 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -85,6 +85,36 @@ (define-public node-buffer-crc32
 and fancy character sets, signed or unsigned data and has tests, for Node.")
     (license license:expat)))
 
+(define-public node-chrome-remote-interface
+  (package
+    (name "node-chrome-remote-interface")
+    (version "0.31.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/cyrus-and/chrome-remote-interface")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0gbz8cj6s1mxvzaa9wpvdky2mcrdaz3ql552rkzzi6xlziqsrx69"))))
+    (build-system node-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases (modify-phases %standard-phases
+                  (replace 'configure
+                    (lambda _
+                      (invoke "npm" "--offline" "--ignore-scripts" "install"
+                              "--production"))))))
+    (inputs (list node-ws node-commander))
+    (home-page "https://github.com/cyrus-and/chrome-remote-interface")
+    (synopsis "Chrome Debugging Protocol interface")
+    (description "This package is a Chrome Debugging Protocol interface that
+helps to instrument Chrome (or any other suitable implementation) by providing
+a simple abstraction of commands and notifications using a straightforward
+JavaScript API.")
+    (license license:expat)))
+
 (define-public node-color-name
   (package
     (name "node-color-name")
-- 
2.37.3





Information forwarded to guix-patches <at> gnu.org:
bug#58179; Package guix-patches. (Thu, 29 Sep 2022 19:53:02 GMT) Full text and rfc822 format available.

Message #17 received at 58179 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 58179 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH 4/4] gnu: Add rofi-switch-browser-tabs/chromium.
Date: Thu, 29 Sep 2022 21:52:27 +0200
* gnu/packages/xdisorg.scm (rofi-switch-browser-tabs/chromium): New variable.
---
 gnu/packages/xdisorg.scm | 42 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 9908f29191..2fa12ba220 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -56,6 +56,7 @@
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan <at> gmail.com>
 ;;; Copyright © 2022 Derek Chuank <derekchuank <at> outlook.com>
 ;;; Copyright © 2022 Wamm K. D. <jaft.r <at> outlook.com>
+;;; Copyright © 2022 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -118,6 +119,7 @@ (define-module (gnu packages xdisorg)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages node-xyz)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -128,6 +130,7 @@ (define-module (gnu packages xdisorg)
   #:use-module (gnu packages terminals)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
+  #:use-module (gnu packages web)
   #:use-module (gnu packages)
   #:use-module (ice-9 match))
 
@@ -1905,6 +1908,45 @@ (define-public rofi-calc
 natural language input and provide results.")
     (license license:expat)))
 
+(define-public rofi-switch-browser-tabs/chromium
+  (let* ((commit "788cce881ba8c3891175fbbe62b9c799aa47652b")
+         (revision "0"))
+    (package
+      (name "rofi-switch-browser-tabs-chromium")
+      (version (git-version "0.0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/kevinmorio/rofi-switch-browser-tabs")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0m4vldx9k6wxx7s7zkkwbj11r7vckvdky8fypf73qzmgl0yn4vmi"))
+         ;; The firefox version is strongly outdated.
+         ;; Firefox and firefox-based browsers will soon (and partially do)
+         ;; support this feature using this same package.
+         ;; Not working for firefox v105.0
+         (modules '((guix build utils)))
+         (snippet '(delete-file-recursively "firefox-switch-tabs"))))
+      (build-system copy-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-before 'install 'chmod
+             (lambda _
+               (chmod "chrome-switch-tabs/chrome-switch-tabs" #o555))))
+         #:install-plan
+         (list '("chrome-switch-tabs/chrome-switch-tabs" "bin/"))))
+      (propagated-inputs (list jq node-chrome-remote-interface))
+      (home-page "https://github.com/kevinmorio/rofi-switch-browser-tabs")
+      (synopsis "Use rofi to switch between browser tabs")
+      (description "This packages provides a simple rofi mode to switch between
+tabs in Chromium-based browsers.  It also has experimental support for
+firefox-based browsers.  Once installed, simply run
+@code{rofi -modi 'chrome:chrome-switch-tabs' -show chrome}.")
+      (license license:expat))))
+
 (define-public tint2
   (package
     (name "tint2")
-- 
2.37.3





Information forwarded to guix-patches <at> gnu.org:
bug#58179; Package guix-patches. (Sun, 02 Oct 2022 19:17:02 GMT) Full text and rfc822 format available.

Message #20 received at 58179 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 58179 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add rofi-switch-browser-tabs.
Date: Sun, 02 Oct 2022 21:16:21 +0200
* gnu/packages/xdisorg.scm (rofi-switch-browser-tabs): New variable.
---
 gnu/packages/xdisorg.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 9908f29191..aa673ce84d 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -1905,6 +1905,38 @@ (define-public rofi-calc
 natural language input and provide results.")
     (license license:expat)))
 
+(define-public rofi-switch-browser-tabs
+  (let* ((commit "e1516cc2cb824fb9bdfe45680429e36d6e3789c5")
+         (revision "0"))
+    (package
+      (name "rofi-switch-browser-tabs")
+      (version (git-version "0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/nicolas-graves/rofi-switch-browser-tabs")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "15r3ajf60vgirrlapqf10xlklmwpj4k39sii9ji6djm16anpqwsm"))))
+      (build-system copy-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-before 'install 'exe
+             (lambda _ (chmod "switch-browser-tabs" #o555))))
+         #:install-plan
+         (list '("switch-browser-tabs" "bin/"))))
+      (propagated-inputs (list wget jq))
+      (home-page "https://github.com/nicolas-graves/rofi-switch-browser-tabs")
+      (synopsis "Use rofi to switch between browser tabs")
+      (description "This packages provides a simple rofi mode to switch between
+tabs in Chromium-based browsers.  Once installed, just run your browser with
+@code{--remote-debugging-port=9222} and use
+@code{rofi -modi 'switch-tabs:switch-browser-tabs' -show switch-tabs}.")
+      (license license:expat))))
+
 (define-public tint2
   (package
     (name "tint2")
-- 
2.37.3


<#secure method=pgpmime mode=sign>

-- 
Best regards,
Nicolas Graves




Information forwarded to guix-patches <at> gnu.org:
bug#58179; Package guix-patches. (Sun, 02 Oct 2022 19:23:01 GMT) Full text and rfc822 format available.

Message #23 received at 58179 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 58179 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add rofi-switch-browser-tabs.
Date: Sun, 02 Oct 2022 21:22:46 +0200
* gnu/packages/xdisorg.scm (rofi-switch-browser-tabs): New variable.
---
 gnu/packages/xdisorg.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 9908f29191..e8c201f375 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -56,6 +56,7 @@
 ;;; Copyright © 2022 Jai Vetrivelan <jaivetrivelan <at> gmail.com>
 ;;; Copyright © 2022 Derek Chuank <derekchuank <at> outlook.com>
 ;;; Copyright © 2022 Wamm K. D. <jaft.r <at> outlook.com>
+;;; Copyright © 2022 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -126,6 +127,7 @@ (define-module (gnu packages xdisorg)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages terminals)
+  #:use-module (gnu packages wget)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages)
@@ -1905,6 +1907,38 @@ (define-public rofi-calc
 natural language input and provide results.")
     (license license:expat)))

+(define-public rofi-switch-browser-tabs
+  (let* ((commit "e1516cc2cb824fb9bdfe45680429e36d6e3789c5")
+         (revision "0"))
+    (package
+      (name "rofi-switch-browser-tabs")
+      (version (git-version "0.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/nicolas-graves/rofi-switch-browser-tabs")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "15r3ajf60vgirrlapqf10xlklmwpj4k39sii9ji6djm16anpqwsm"))))
+      (build-system copy-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-before 'install 'exe
+             (lambda _ (chmod "switch-browser-tabs" #o555))))
+         #:install-plan
+         (list '("switch-browser-tabs" "bin/"))))
+      (propagated-inputs (list wget jq))
+      (home-page "https://github.com/nicolas-graves/rofi-switch-browser-tabs")
+      (synopsis "Use rofi to switch between browser tabs")
+      (description "This packages provides a simple rofi mode to switch between
+tabs in Chromium-based browsers.  Once installed, just run your browser with
+@code{--remote-debugging-port=9222} and use
+@code{rofi -modi 'switch-tabs:switch-browser-tabs' -show switch-tabs}.")
+      (license license:expat))))
+
 (define-public tint2
   (package
     (name "tint2")
--
2.37.3

Sorry for the double send.
In a few words, I forked the project and made it work with minimal
changes without node-chrome-remote-interface. The first commits aren't
useful for this final package anymore, although they are correct and
could still be added if wanted.

--
Best regards,
Nicolas Graves




bug closed, send any further explanations to 58179 <at> debbugs.gnu.org and Nicolas Graves <ngraves <at> ngraves.fr> Request was from Nicolas Graves <ngraves <at> ngraves.fr> to control <at> debbugs.gnu.org. (Mon, 15 Apr 2024 06:07:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 13 May 2024 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 2 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.