waybar: fix font size to be more usable on moby
This commit is contained in:
parent
81e02e2885
commit
37ddb2ae17
|
@ -30,6 +30,8 @@
|
||||||
workspace_layout = "tabbed";
|
workspace_layout = "tabbed";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sane.programs.waybar.fontSize = 14;
|
||||||
|
|
||||||
sane.gui.sxmo = {
|
sane.gui.sxmo = {
|
||||||
nogesture = true;
|
nogesture = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -7,18 +7,20 @@ in
|
||||||
configOption = with lib; mkOption {
|
configOption = with lib; mkOption {
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
options = {
|
options = {
|
||||||
extra_style = mkOption {
|
extraStyle = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''
|
default = "";
|
||||||
/* default font-size is about 14px, which is good for moby, but not quite for larger displays */
|
|
||||||
window#waybar {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
description = ''
|
description = ''
|
||||||
extra CSS rules to append to ~/.config/waybar/style.css
|
extra CSS rules to append to ~/.config/waybar/style.css
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
fontSize = mkOption {
|
||||||
|
type = types.int;
|
||||||
|
default = 16;
|
||||||
|
description = ''
|
||||||
|
default font-size is about 14px, which is good for moby, but not quite for larger displays
|
||||||
|
'';
|
||||||
|
};
|
||||||
top = mkOption {
|
top = mkOption {
|
||||||
type = types.submodule {
|
type = types.submodule {
|
||||||
# `attrsOf types.anything` (v.s. plain `attrs`) causes merging of the toplevel items.
|
# `attrsOf types.anything` (v.s. plain `attrs`) causes merging of the toplevel items.
|
||||||
|
@ -80,8 +82,10 @@ in
|
||||||
(pkgs.formats.json {}).generate "waybar-config.json" [
|
(pkgs.formats.json {}).generate "waybar-config.json" [
|
||||||
({ layer = "top"; } // cfg.config.top)
|
({ layer = "top"; } // cfg.config.top)
|
||||||
];
|
];
|
||||||
fs.".config/waybar/style.css".symlink.text =
|
fs.".config/waybar/style.css".symlink.target = pkgs.substituteAll {
|
||||||
(builtins.readFile ./waybar-style.css) + cfg.config.extra_style;
|
src = ./waybar-style.css;
|
||||||
|
inherit (cfg.config) extraStyle fontSize;
|
||||||
|
};
|
||||||
|
|
||||||
services.waybar = {
|
services.waybar = {
|
||||||
description = "swaybar graphical header bar/tray for sway";
|
description = "swaybar graphical header bar/tray for sway";
|
||||||
|
|
|
@ -14,6 +14,7 @@ window#waybar {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
transition-property: background-color;
|
transition-property: background-color;
|
||||||
transition-duration: .2s;
|
transition-duration: .2s;
|
||||||
|
font-size: @fontSize@px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modules-right {
|
.modules-right {
|
||||||
|
@ -99,3 +100,5 @@ window#waybar {
|
||||||
-gtk-icon-effect: highlight;
|
-gtk-icon-effect: highlight;
|
||||||
background-color: #e64291;
|
background-color: #e64291;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@extraStyle@
|
||||||
|
|
|
@ -285,8 +285,7 @@ in
|
||||||
sane.programs.sway.enableFor.user.colin = true;
|
sane.programs.sway.enableFor.user.colin = true;
|
||||||
sane.programs.waybar.config = {
|
sane.programs.waybar.config = {
|
||||||
top = import ./waybar-top.nix;
|
top = import ./waybar-top.nix;
|
||||||
# reset extra waybar style
|
fontSize = 14;
|
||||||
extra_style = "";
|
|
||||||
};
|
};
|
||||||
sane.programs.sway.config = {
|
sane.programs.sway.config = {
|
||||||
# N.B. missing from upstream sxmo config here is:
|
# N.B. missing from upstream sxmo config here is:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user