about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2024-05-17 15:35:47 +0200
committersternenseemann <sternenseemann@systemli.org>2024-05-18 00:43:07 +0200
commit961b9adc9acfe06baf769db5026f42b5ea62a0d5 (patch)
treeea944809fb4516ba3937e1c502a81f81ac1bd193
parentb1b9a422eb774a6f2780c4e8c87316584f20bc68 (diff)
modules/sternenseemann/sway: make color selection more granular
This is done in the same step as changing the default colors to a
Plan9/acme inspired look since I can't be bothered to split the changes
up. A handy list for the acme colors can be found here
<https://github.com/prodhe/acme-setup/blob/master/acme-colors.md>.
-rw-r--r--modules/user/sternenseemann/services/sway.nix50
1 files changed, 31 insertions, 19 deletions
diff --git a/modules/user/sternenseemann/services/sway.nix b/modules/user/sternenseemann/services/sway.nix
index 6eab6726..673e9a03 100644
--- a/modules/user/sternenseemann/services/sway.nix
+++ b/modules/user/sternenseemann/services/sway.nix
@@ -92,10 +92,19 @@ in {
       };
 
       colors = {
-        background = mkColorOption "background" "#000000";
-        active = mkColorOption "active window" "#ffffff";
-        inactive = mkColorOption "inactive window" "#000000";
+        background = mkColorOption "background" "#ffffea";
+        statusBackground = mkColorOption "background of status bar" "#ffffea";
+        statusText = mkColorOption "status bar text color" "#000000";
+
+        active = mkColorOption "active window" "#9EEEEE";
+        activeText = mkColorOption "active window text" "#000000";
+
+        inactive = mkColorOption "inactive window" "#eaffff";
+        inactiveText = mkColorOption "inactive window text" "#000000";
+
         urgent = mkColorOption "urgent window" "#900000";
+        urgentText = mkColorOption "urgent window text" "#ffffff";
+
         indicate = mkColorOption "indicator" "#d0d0d0";
       };
 
@@ -279,19 +288,22 @@ in {
         font "${cfg.font.name} ${builtins.toString cfg.font.size}"
 
         # colors
-        set $bg     ${cfg.colors.background}
-        set $act    ${cfg.colors.active}
-        set $inact  ${cfg.colors.inactive}
-        set $urg    ${cfg.colors.urgent}
-        set $ind    ${cfg.colors.indicate}
+        set $bg          ${cfg.colors.background}
+        set $act         ${cfg.colors.active}
+        set $act_text    ${cfg.colors.activeText}
+        set $inact       ${cfg.colors.inactive}
+        set $inact_text  ${cfg.colors.inactiveText}
+        set $urg         ${cfg.colors.urgent}
+        set $urg_text    ${cfg.colors.urgentText}
+        set $ind         ${cfg.colors.indicate}
 
         output * bg $bg solid_color
 
-        # class                 border  backgr. text    indicator
-        client.focused          $act    $act    $inact  $ind
-        client.focused_inactive $inact  $inact  $act    $inact
-        client.unfocused        $inact  $inact  $act    $inact
-        client.urgent           $urg    $urg    $act    $urg
+        # class                 border  backgr. text         indicator
+        client.focused          $act    $act    $act_text    $ind
+        client.focused_inactive $inact  $inact  $inact_text  $ind
+        client.unfocused        $inact  $inact  $inact_text  $ind
+        client.urgent           $urg    $urg    $urg_text    $ind
 
         # bar aesthetics
         bar {
@@ -300,13 +312,13 @@ in {
           position top
           colors {
             font "${cfg.font.name} ${builtins.toString cfg.font.size}"
-            statusline $act
-            background $inact
+            statusline ${cfg.colors.statusText}
+            background ${cfg.colors.statusBackground}
             # type             border bg     text
-            focused_workspace  $act   $act   $inact
-            active_workspace   $act   $act   $ind
-            inactive_workspace $inact $inact $act
-            urgent_workspace   $urg   $urg   $act
+            focused_workspace  $act   $act   $act_text
+            active_workspace   $act   $act   $act_text
+            inactive_workspace $inact $inact $inact_text
+            urgent_workspace   $urg   $urg   $urg_text
           }
         }