margins & refactor
This commit is contained in:
parent
f4a943d189
commit
3f96acd255
2 changed files with 120 additions and 120 deletions
|
@ -73,9 +73,10 @@ in
|
||||||
{
|
{
|
||||||
config =
|
config =
|
||||||
let
|
let
|
||||||
|
bar_conf_file = if (lib.isPath cfg.sway.bar.config) then cfg.sway.bar.config else pkgs.writers.writeJSON "config.json" cfg.sway.bar.config;
|
||||||
waybar_full = pkgs.writeShellScriptBin "waybar-full" (
|
waybar_full = pkgs.writeShellScriptBin "waybar-full" (
|
||||||
(lib.getExe config.programs.waybar.package)
|
(lib.getExe config.programs.waybar.package)
|
||||||
+ (lib.optionalString (!isNull cfg.sway.bar.config) " -c ${cfg.sway.bar.config}")
|
+ (lib.optionalString (!isNull cfg.sway.bar.config) " -c ${bar_conf_file}")
|
||||||
+ (lib.optionalString (!isNull cfg.sway.bar.style) " -s ${cfg.sway.bar.style}")
|
+ (lib.optionalString (!isNull cfg.sway.bar.style) " -s ${cfg.sway.bar.style}")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -219,7 +220,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkOption {
|
config = mkOption {
|
||||||
type = types.nullOr types.path;
|
type = types.nullOr (types.either types.path types.attrs);
|
||||||
default = null;
|
default = null;
|
||||||
description = "waybar config to use";
|
description = "waybar config to use";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) getExe;
|
inherit (lib) getExe;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
grimmShared.sway.bar = {
|
||||||
|
enable = true;
|
||||||
config = with pkgs; {
|
config = with pkgs; {
|
||||||
backlight = {
|
backlight = {
|
||||||
format = "{percent}%";
|
format = "{percent}%";
|
||||||
|
@ -34,6 +37,7 @@ let
|
||||||
on-scroll-up = "${getExe waybar-mpris} --send next";
|
on-scroll-up = "${getExe waybar-mpris} --send next";
|
||||||
return-type = "json";
|
return-type = "json";
|
||||||
};
|
};
|
||||||
|
margin-right = 4;
|
||||||
height = 30;
|
height = 30;
|
||||||
idle_inhibitor = {
|
idle_inhibitor = {
|
||||||
format = "{icon}";
|
format = "{icon}";
|
||||||
|
@ -118,11 +122,6 @@ let
|
||||||
tooltip-format = "{title}";
|
tooltip-format = "{title}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
|
||||||
{
|
|
||||||
grimmShared.sway.bar = {
|
|
||||||
enable = true;
|
|
||||||
config = pkgs.writers.writeJSON "config.json" config;
|
|
||||||
style = ./style.css;
|
style = ./style.css;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue