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 =
|
||||
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" (
|
||||
(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}")
|
||||
);
|
||||
|
||||
|
@ -219,7 +220,7 @@ in
|
|||
};
|
||||
|
||||
config = mkOption {
|
||||
type = types.nullOr types.path;
|
||||
type = types.nullOr (types.either types.path types.attrs);
|
||||
default = null;
|
||||
description = "waybar config to use";
|
||||
};
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib) getExe;
|
||||
|
||||
in
|
||||
{
|
||||
grimmShared.sway.bar = {
|
||||
enable = true;
|
||||
config = with pkgs; {
|
||||
backlight = {
|
||||
format = "{percent}%";
|
||||
|
@ -34,6 +37,7 @@ let
|
|||
on-scroll-up = "${getExe waybar-mpris} --send next";
|
||||
return-type = "json";
|
||||
};
|
||||
margin-right = 4;
|
||||
height = 30;
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
|
@ -118,11 +122,6 @@ let
|
|||
tooltip-format = "{title}";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
grimmShared.sway.bar = {
|
||||
enable = true;
|
||||
config = pkgs.writers.writeJSON "config.json" config;
|
||||
style = ./style.css;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue