aboutsummaryrefslogtreecommitdiff
path: root/modules/firefox.home/chrome
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2024-08-20 00:07:39 +0530
committerAkshay Nair <phenax5@gmail.com>2024-08-20 00:07:39 +0530
commitfb6fa85d49ea921c2913c0e7fafeb43fe873e624 (patch)
tree24f7cdfcc98db24b2904c3fcaf3cebb099d4a41d /modules/firefox.home/chrome
parent3ead21983a9e150ce57e40189f4e472421abc2ee (diff)
downloadnixos-config-fb6fa85d49ea921c2913c0e7fafeb43fe873e624.tar.gz
nixos-config-fb6fa85d49ea921c2913c0e7fafeb43fe873e624.zip
Add sidebar tabs for firefox
Diffstat (limited to 'modules/firefox.home/chrome')
-rw-r--r--modules/firefox.home/chrome/globalKeybindings.uc.js7
-rw-r--r--modules/firefox.home/chrome/userChrome.css17
2 files changed, 22 insertions, 2 deletions
diff --git a/modules/firefox.home/chrome/globalKeybindings.uc.js b/modules/firefox.home/chrome/globalKeybindings.uc.js
index dd1f0f7..7341fc0 100644
--- a/modules/firefox.home/chrome/globalKeybindings.uc.js
+++ b/modules/firefox.home/chrome/globalKeybindings.uc.js
@@ -13,12 +13,16 @@
RELEASE: [
[ctrl(shift(key('J'))), moveSelectedTabBy(+1)],
[ctrl(shift(key('K'))), moveSelectedTabBy(-1)],
+ [ctrl(shift(key('B'))), toggleTabSidebar()],
[ctrl(alt(key('p'))), togglePassthrough(), { modes: ALL_MODES }],
],
PRESS: [
// Block default key bindings
[ctrl(shift(key('J'))), preventDefault()],
[ctrl(shift(key('K'))), preventDefault()],
+ [ctrl(shift(key('B'))), preventDefault()],
+ [ctrl(key('h')), preventDefault()],
+ [ctrl(key('b')), preventDefault()],
[ctrl(key('j')), preventDefault(nextTab())],
[ctrl(key('k')), preventDefault(prevTab())],
@@ -37,6 +41,9 @@
const moveSelectedTabBy = incr => () => updateSelectedTabIndex(incr);
const togglePassthrough = () => () => UC.globalKeybindings.updateMode(m => m !== MODE_PASSTHRU ? MODE_PASSTHRU : MODE_NORMAL)
+ const getSidebarId = () => [...SidebarController.sidebars].find(([_, p]) => p.label?.match(/sidetabs/i))?.[0];
+ const toggleTabSidebar = () => () => SidebarController.toggle(getSidebarId() ?? undefined);
+
const MODE_PASSTHRU = 'passthru';
const MODE_NORMAL = '';
const ALL_MODES = [MODE_NORMAL, MODE_PASSTHRU];
diff --git a/modules/firefox.home/chrome/userChrome.css b/modules/firefox.home/chrome/userChrome.css
index e888056..99dc670 100644
--- a/modules/firefox.home/chrome/userChrome.css
+++ b/modules/firefox.home/chrome/userChrome.css
@@ -145,6 +145,19 @@ toolbarbutton#alltabs-button {
margin: 0 !important;
}
-#urlbar[focused='true'] > #urlbar-background {
- /* box-shadow: none !important; */
+
+
+/* Sidebar + tab */
+#TabsToolbar {
+ visibility: collapse !important;
+}
+#sidebar-header {
+ display: none !important;
+}
+#sidebar-splitter {
+ display: none !important;
}
+/* #appcontent { */
+/* border-radius: 4px !important; */
+/* overflow: hidden !important; */
+/* } */