From 45df0954f4af3777a53391a30580fe8f1d52cc40 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 6 Sep 2023 02:11:57 +0000 Subject: [PATCH] sway: improve waybar text size --- hosts/modules/gui/sway/default.nix | 14 +++++++++++++- hosts/modules/gui/sxmo/default.nix | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hosts/modules/gui/sway/default.nix b/hosts/modules/gui/sway/default.nix index ad1b06b3..0fe2fdfe 100644 --- a/hosts/modules/gui/sway/default.nix +++ b/hosts/modules/gui/sway/default.nix @@ -91,6 +91,18 @@ in description = "command to run that populates the status section of the topbar"; }; }; + sane.gui.sway.waybar.extra_style = mkOption { + type = types.lines; + default = '' + /* default font-size is about 14px, which is good for moby, but not quite for larger displays */ + window#waybar { + font-size: 16px; + } + ''; + description = '' + extra CSS rules to append to ~/.config/waybar/style.css + ''; + }; sane.gui.sway.waybar.top = mkOption { type = types.submodule { # `attrsOf types.anything` (v.s. plain `attrs`) causes merging of the toplevel items. @@ -228,7 +240,7 @@ in ]; ".config/waybar/style.css".symlink.text = - builtins.readFile ./waybar-style.css; + (builtins.readFile ./waybar-style.css) + cfg.waybar.extra_style; ".config/sway/config" = lib.mkIf cfg.installConfigs { symlink.target = import ./sway-config.nix { diff --git a/hosts/modules/gui/sxmo/default.nix b/hosts/modules/gui/sxmo/default.nix index dd03c42c..35f7670f 100644 --- a/hosts/modules/gui/sxmo/default.nix +++ b/hosts/modules/gui/sxmo/default.nix @@ -200,6 +200,8 @@ in # we manage the greeter ourselves (TODO: merge this into sway config as well) useGreeter = false; waybar.top = import ./waybar-top.nix; + # reset extra waybar style + waybar.extra_style = ""; config = { # N.B. missing from upstream sxmo config here is: # - `bindsym $mod+g exec sxmo_hook_locker.sh`