From 15966d16f3858b2a8ef301fa5ad4202836a67720 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Wed, 29 Mar 2017 16:17:32 -0700 Subject: [PATCH] [Linux] Add scripts to interact with specific tabs --- dotfiles/lib/bin/focus_tab_by_id.sh | 5 +++++ dotfiles/lib/bin/split_tab_by_id.sh | 3 +++ 2 files changed, 8 insertions(+) create mode 100755 dotfiles/lib/bin/focus_tab_by_id.sh create mode 100755 dotfiles/lib/bin/split_tab_by_id.sh diff --git a/dotfiles/lib/bin/focus_tab_by_id.sh b/dotfiles/lib/bin/focus_tab_by_id.sh new file mode 100755 index 00000000..eadf4d9f --- /dev/null +++ b/dotfiles/lib/bin/focus_tab_by_id.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +windowId=$(chromix-too raw chrome.tabs.update "$1" '{"active": true}' | jq .windowId) +chromix-too raw chrome.windows.update "$windowId" '{"focused": true}' + diff --git a/dotfiles/lib/bin/split_tab_by_id.sh b/dotfiles/lib/bin/split_tab_by_id.sh new file mode 100755 index 00000000..f66f784f --- /dev/null +++ b/dotfiles/lib/bin/split_tab_by_id.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env zsh + +chromix-too raw chrome.windows.create '{"tabId": '"$1}"