From 72e4a8f932867c1f0448e5af9da672b18f102439 Mon Sep 17 00:00:00 2001 From: lelgenio Date: Thu, 13 Apr 2023 15:28:20 -0300 Subject: [PATCH] qutebrowser: enable toggling dark mode during runtime --- user/qutebrowser/colors.nix | 2 +- user/qutebrowser/default.nix | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/user/qutebrowser/colors.nix b/user/qutebrowser/colors.nix index bbb688c..71afa4f 100644 --- a/user/qutebrowser/colors.nix +++ b/user/qutebrowser/colors.nix @@ -162,7 +162,7 @@ in bg = color.bg; preferred_color_scheme = "dark"; darkmode = { - enabled = true; + enabled = false; threshold = { text = 150; background = 205; diff --git a/user/qutebrowser/default.nix b/user/qutebrowser/default.nix index 070345b..00f73be 100644 --- a/user/qutebrowser/default.nix +++ b/user/qutebrowser/default.nix @@ -42,6 +42,8 @@ in "" = "tree-tab-demote"; "co" = "tab-only --pinned keep"; + + "K" = "jseval --world main if (DarkReader.isEnabled()) {DarkReader.disable()} else {DarkReader.enable()}"; }; insert = { # quit insert mode