From 826605d131467f1207ed41697190e03faa39dd3b Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Thu, 14 Mar 2024 11:36:11 +0100 Subject: [PATCH] styx: improvements --- home/programs/firefox.nix | 4 ++++ system/darwin/yabai.nix | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/home/programs/firefox.nix b/home/programs/firefox.nix index d6193c1..844f982 100644 --- a/home/programs/firefox.nix +++ b/home/programs/firefox.nix @@ -150,6 +150,7 @@ # Themes "browser.compactmode.show" = true; + "layout.css.prefers-color-scheme.content-override" = 2; }; search = { @@ -275,6 +276,7 @@ }; extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + automatic-dark bypass-paywalls-clean cookie-quick-manager darkreader @@ -293,6 +295,8 @@ ublock-origin video-downloadhelper + dracula-dark-colorscheme + dictionary-german ]; }; diff --git a/system/darwin/yabai.nix b/system/darwin/yabai.nix index 714e756..5558ef1 100644 --- a/system/darwin/yabai.nix +++ b/system/darwin/yabai.nix @@ -48,10 +48,18 @@ let ql_windows=$(${yabai-bin} -m query --windows --display $app_display | ${jq-bin} 'map(select(.subrole == "Quick Look")) | length') - if [ $ql_windows -eq 0 ]; then - if [ $app_display -eq 1 ]; then + if [ $app_display -eq 1 ]; then + win_count=$(${yabai-bin} -m query --windows --display next | ${jq-bin} 'length') + [ -z "$win_count" ] && win_count=0 + + if [ $ql_windows -eq 0 ] && [ $win_count -gt 0 ]; then ${yabai-bin} -m display --focus next && yabai -m display --focus prev - else + fi + else + win_count=$(${yabai-bin} -m query --windows --display prev | ${jq-bin} 'length') + [ -z "$win_count" ] && win_count=0 + + if [ $ql_windows -eq 0 ] && [ $win_count -gt 0 ]; then ${yabai-bin} -m display --focus prev && yabai -m display --focus next fi fi