fix waybar configs
This commit is contained in:
parent
bd0bfbc3d0
commit
e504eae280
17 changed files with 283 additions and 240 deletions
|
|
@ -40,7 +40,7 @@ in
|
||||||
waybar = {
|
waybar = {
|
||||||
modules = {
|
modules = {
|
||||||
left = [ "hyprland/workspaces" "tray" "hyprland/window" ];
|
left = [ "hyprland/workspaces" "tray" "hyprland/window" ];
|
||||||
center = [ "clock" ];
|
center = [ "clock" "custom/spotify" ];
|
||||||
right = [ "custom/vpn" "wireplumber" "network" "cpu" "memory" "custom/poweroff" ];
|
right = [ "custom/vpn" "wireplumber" "network" "cpu" "memory" "custom/poweroff" ];
|
||||||
};
|
};
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
config:
|
|
||||||
[ "hyprland/workspaces" "tray" "hyprland/window" ] ++
|
|
||||||
[ "clock" ] ++
|
|
||||||
[ "custom/vpn" "wireplumber" "network" "cpu" "memory" "custom/poweroff" ]
|
|
||||||
|
|
@ -4,10 +4,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar.modules = import ./addname.nix lib name;
|
||||||
options.modules.waybar.${name} = {
|
options.modules.waybar.enabled.${name} = {
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
programs.waybar.settings.mainBar.${name} = {
|
programs.waybar.settings.mainBar.${name} = {
|
||||||
tooltip-format = "<big>{:%Y %B}</big>\n\n{calendar}";
|
tooltip-format = "<big>{:%Y %B}</big>\n\n{calendar}";
|
||||||
interval = 1;
|
interval = 1;
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar.modules = import ./addname.nix lib name;
|
||||||
options.modules.waybar.${name} = {
|
options.modules.waybar.enabled.${name} = {
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
programs.waybar.settings.mainBar."${name}" = {
|
programs.waybar.settings.mainBar."${name}" = {
|
||||||
format = "cpu: {usage}%";
|
format = "cpu: {usage}%";
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
config: builtins.listToAttrs (import ./namedmodules.nix config)
|
|
||||||
|
|
@ -37,243 +37,258 @@ in
|
||||||
./workspaces.nix
|
./workspaces.nix
|
||||||
./temperature.nix
|
./temperature.nix
|
||||||
./wireplumber.nix
|
./wireplumber.nix
|
||||||
|
./spotify.nix
|
||||||
../../common/colors.nix
|
../../common/colors.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable
|
||||||
modules.waybar = import ./createmodules.nix cfg.modules;
|
rec {
|
||||||
home.packages = with pkgs; [
|
modules.waybar.enabled = (
|
||||||
font-awesome
|
let
|
||||||
];
|
mods = config.modules.waybar.modules;
|
||||||
programs.waybar = {
|
allmodules = mods.left ++ mods.center ++ mods.right;
|
||||||
enable = true;
|
namedmodules = builtins.map
|
||||||
package = cfg.package;
|
(n: { name = n; value = { enable = true; }; })
|
||||||
settings = {
|
allmodules;
|
||||||
mainBar = {
|
createmodules = builtins.listToAttrs namedmodules;
|
||||||
layer = "top";
|
in
|
||||||
position = "top";
|
createmodules
|
||||||
height = 39;
|
);
|
||||||
margin-top = 8;
|
|
||||||
margin-left = 10;
|
home.packages = with pkgs;
|
||||||
margin-right = 10;
|
[
|
||||||
output = [
|
font-awesome
|
||||||
"DP-3"
|
];
|
||||||
"DP-2"
|
programs.waybar = {
|
||||||
];
|
enable = true;
|
||||||
modules-left = cfg.modules.left;
|
package = cfg.package;
|
||||||
modules-center = cfg.modules.center;
|
settings = {
|
||||||
modules-right = cfg.modules.right;
|
mainBar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 39;
|
||||||
|
margin-top = 8;
|
||||||
|
margin-left = 10;
|
||||||
|
margin-right = 10;
|
||||||
|
output = [
|
||||||
|
"DP-3"
|
||||||
|
"DP-2"
|
||||||
|
];
|
||||||
|
modules-left = cfg.modules.left;
|
||||||
|
modules-center = cfg.modules.center;
|
||||||
|
modules-right = cfg.modules.right;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
style = ''
|
||||||
style = ''
|
* {
|
||||||
* {
|
/* `otf-font-awesome` is required to be installed for icons */
|
||||||
/* `otf-font-awesome` is required to be installed for icons */
|
font-family: "Maple Mono NF";
|
||||||
font-family: "Maple Mono NF";
|
font-size: 14px;
|
||||||
font-size: 14px;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
color: #${config.colorScheme.palette.base05};
|
color: #${config.colorScheme.palette.base05};
|
||||||
transition-property: background-color;
|
transition-property: background-color;
|
||||||
transition-duration: .5s;
|
transition-duration: .5s;
|
||||||
}
|
}
|
||||||
window#waybar.hidden {
|
window#waybar.hidden {
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar.termite {
|
window#waybar.termite {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar.chromium {
|
window#waybar.chromium {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
/* Use box-shadow instead of border so the text isn't offset */
|
/* Use box-shadow instead of border so the text isn't offset */
|
||||||
box-shadow: inset 0 -1px transparent;
|
box-shadow: inset 0 -1px transparent;
|
||||||
/* Avoid rounded borders under each button name */
|
/* Avoid rounded borders under each button name */
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* https://githbackground: #000000ub.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
/* https://githbackground: #000000ub.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
button:hover {
|
button:hover {
|
||||||
background: inherit;
|
background: inherit;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
padding: 3px 3px 3px 5px;
|
padding: 3px 3px 3px 5px;
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
min-width: 15px;
|
min-width: 15px;
|
||||||
min-height: 15px;
|
min-height: 15px;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: #${config.colorScheme.palette.base04};
|
color: #${config.colorScheme.palette.base04};
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button:hover {
|
#workspaces button:hover {
|
||||||
background-color: #${config.colorScheme.palette.base17};
|
background-color: #${config.colorScheme.palette.base17};
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.active {
|
#workspaces button.active {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background-color: #${config.colorScheme.palette.base0E};
|
background-color: #${config.colorScheme.palette.base0E};
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
#workspaces button.urgent {
|
||||||
background-color: #${config.colorScheme.palette.base08};
|
background-color: #${config.colorScheme.palette.base08};
|
||||||
}
|
}
|
||||||
|
|
||||||
#clock,
|
#clock,
|
||||||
#battery,
|
#battery,
|
||||||
#cpu,
|
#cpu,
|
||||||
#memory,
|
#memory,
|
||||||
#disk,
|
#disk,
|
||||||
#temperature,
|
#temperature,
|
||||||
#backlight,
|
#backlight,
|
||||||
#network,
|
#network,
|
||||||
#pulseaudio,
|
#pulseaudio,
|
||||||
#wireplumber,
|
#wireplumber,
|
||||||
#custom-media,
|
#custom-media,
|
||||||
#mode,
|
#mode,
|
||||||
#idle_inhibitor,
|
#idle_inhibitor,
|
||||||
#custom-vpn,
|
#custom-vpn,
|
||||||
#scratchpad,
|
#scratchpad,
|
||||||
#tray,
|
#tray,
|
||||||
#custom-updates,
|
#custom-updates,
|
||||||
#custom-poweroff,
|
#custom-poweroff,
|
||||||
#mpd {
|
#mpd {
|
||||||
color: #${config.colorScheme.palette.base04};
|
color: #${config.colorScheme.palette.base04};
|
||||||
margin: 0px 2px;
|
margin: 0px 2px;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
|
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
box-shadow: inset 0 0 0 1px #${config.colorScheme.palette.base01};
|
box-shadow: inset 0 0 0 1px #${config.colorScheme.palette.base01};
|
||||||
}
|
}
|
||||||
|
|
||||||
.modules-right > widget:last-child > #battery {
|
.modules-right > widget:last-child > #battery {
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tray {
|
#tray {
|
||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
border-radius: 999px 999px 999px 999px;
|
border-radius: 999px 999px 999px 999px;
|
||||||
box-shadow: inset 0px 0px 0 1px #${config.colorScheme.palette.base01};
|
box-shadow: inset 0px 0px 0 1px #${config.colorScheme.palette.base01};
|
||||||
}
|
}
|
||||||
|
|
||||||
#window {
|
#window {
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
color: #${config.colorScheme.palette.base04};
|
color: #${config.colorScheme.palette.base04};
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces {
|
#workspaces {
|
||||||
margin: 0 4px;
|
margin: 0 4px;
|
||||||
padding: 4px 4px;
|
padding: 4px 4px;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
box-shadow: inset 0px 0px 0 1px #${config.colorScheme.palette.base01};
|
box-shadow: inset 0px 0px 0 1px #${config.colorScheme.palette.base01};
|
||||||
}
|
}
|
||||||
|
|
||||||
#cpu {
|
#cpu {
|
||||||
border-radius: 999px 0px 0px 999px;
|
border-radius: 999px 0px 0px 999px;
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#memory {
|
#memory {
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
box-shadow: inset 0px 2px 0 -1px #${config.colorScheme.palette.base01},
|
box-shadow: inset 0px 2px 0 -1px #${config.colorScheme.palette.base01},
|
||||||
inset 0px -2px 0 -1px #${config.colorScheme.palette.base01};
|
inset 0px -2px 0 -1px #${config.colorScheme.palette.base01};
|
||||||
}
|
}
|
||||||
|
|
||||||
#clock {
|
#clock {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#battery {
|
#battery {
|
||||||
min-width: 50px;
|
min-width: 50px;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
box-shadow: inset 0 0 0 1px #${config.colorScheme.palette.base01};
|
box-shadow: inset 0 0 0 1px #${config.colorScheme.palette.base01};
|
||||||
background-color: #${config.colorScheme.palette.base01};
|
background-color: #${config.colorScheme.palette.base01};
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
#battery.charging, #battery.plugged {
|
#battery.charging, #battery.plugged {
|
||||||
color: #${config.colorScheme.palette.base0B};
|
color: #${config.colorScheme.palette.base0B};
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
animation: batteryCharging 1.2s linear 0s infinite normal forwards,
|
animation: batteryCharging 1.2s linear 0s infinite normal forwards,
|
||||||
}
|
}
|
||||||
#battery.full {
|
#battery.full {
|
||||||
animation: batteryFull 7.0s linear 0s infinite normal forwards;
|
animation: batteryFull 7.0s linear 0s infinite normal forwards;
|
||||||
}
|
}
|
||||||
#battery.critical:not(.charging) {
|
#battery.critical:not(.charging) {
|
||||||
background-color: #${config.colorScheme.palette.base00};
|
background-color: #${config.colorScheme.palette.base00};
|
||||||
animation: batteryCritical 1.2s linear 0s infinite normal forwards;
|
animation: batteryCritical 1.2s linear 0s infinite normal forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
#network {
|
#network {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#network.disconnected,
|
#network.disconnected,
|
||||||
#pulseaudio.muted {
|
#pulseaudio.muted {
|
||||||
transition: all 0.2s;
|
transition: all 0.2s;
|
||||||
color: #${config.colorScheme.palette.base01};
|
color: #${config.colorScheme.palette.base01};
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-spotify {
|
.custom-spotify {
|
||||||
color: #${config.colorScheme.palette.base14};
|
color: #${config.colorScheme.palette.base14};
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#temperature {
|
#temperature {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
border-radius: 0px 999px 999px 0px;
|
border-radius: 0px 999px 999px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#temperature.critical {
|
#temperature.critical {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
color: #${config.colorScheme.palette.base08};
|
color: #${config.colorScheme.palette.base08};
|
||||||
}
|
}
|
||||||
|
|
||||||
#tray {
|
#tray {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#tray > .passive {
|
#tray > .passive {
|
||||||
-gtk-icon-effect: dim;
|
-gtk-icon-effect: dim;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tray > .needs-attention {
|
#tray > .needs-attention {
|
||||||
background-color: #${config.colorScheme.palette.base08};
|
background-color: #${config.colorScheme.palette.base08};
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#scratchpad {
|
#scratchpad {
|
||||||
background: rgba(0, 0, 0, 0.1);
|
background: rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
#scratchpad.empty {
|
#scratchpad.empty {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
background-color: #${config.colorScheme.palette.base00};
|
background-color: #${config.colorScheme.palette.base00};
|
||||||
border: 1px solid;
|
border: 1px solid;
|
||||||
border-color: #${config.colorScheme.palette.base04};
|
border-color: #${config.colorScheme.palette.base04};
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
color: #${config.colorScheme.palette.base05};
|
color: #${config.colorScheme.palette.base05};
|
||||||
}
|
}
|
||||||
tooltip label {
|
tooltip label {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar.modules = import ./addname.nix lib name;
|
||||||
options.modules.waybar.${name} = {
|
options.modules.waybar.enabled.${name} = {
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
programs.waybar.settings.mainBar."${name}" = {
|
programs.waybar.settings.mainBar."${name}" = {
|
||||||
format = "mem: {}%";
|
format = "mem: {}%";
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
config:
|
|
||||||
builtins.map
|
|
||||||
(n: { name = n; value = { enable = true; }; })
|
|
||||||
(import ./allmodules.nix config)
|
|
||||||
|
|
@ -4,10 +4,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar.modules = import ./addname.nix lib name;
|
||||||
options.modules.waybar.${name} = {
|
options.modules.waybar.enabled.${name} = {
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
programs.waybar.settings.mainBar."${name}" = {
|
programs.waybar.settings.mainBar."${name}" = {
|
||||||
format-wifi = "{essid} ({signalStrength}%) ";
|
format-wifi = "{essid} ({signalStrength}%) ";
|
||||||
format-ethernet = "{ipaddr}/{cidr} ";
|
format-ethernet = "{ipaddr}/{cidr} ";
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,16 @@ let
|
||||||
name = "custom/poweroff";
|
name = "custom/poweroff";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar = {
|
||||||
options.modules.waybar.${name} = {
|
modules = import ./addname.nix lib name;
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enabled.${name} = {
|
||||||
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
imports = [
|
imports = [
|
||||||
../wofi.nix
|
../wofi.nix
|
||||||
];
|
];
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
modules.wofi.enable = true;
|
modules.wofi.enable = true;
|
||||||
programs.waybar.settings.mainBar."${name}" = {
|
programs.waybar.settings.mainBar."${name}" = {
|
||||||
format = "";
|
format = "";
|
||||||
|
|
|
||||||
31
modules/waybar/spotify.nix
Normal file
31
modules/waybar/spotify.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
name = "custom/spotify";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.waybar = {
|
||||||
|
modules = import ./addname.nix lib name;
|
||||||
|
enabled.${name} = {
|
||||||
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
|
programs.waybar.settings.mainBar.${name} = {
|
||||||
|
tooltip-format = "<big>{:%Y %B}</big>\n\n{calendar}";
|
||||||
|
interval = 1;
|
||||||
|
format = "{:%H:%M:%S}";
|
||||||
|
format-alt = "{:%Y-%m-%d %H:%M:%S}";
|
||||||
|
on-click-middle = "gnome-clocks";
|
||||||
|
calendar = {
|
||||||
|
weeks-pos = "left";
|
||||||
|
format = {
|
||||||
|
today = "<span color='#FF6666'><u>{}</u></span>"; # TODO: use nix-colors
|
||||||
|
weeks = "<span color='#707A8C'>{}</span>"; # TODO: use nix-colors
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.packages = [
|
||||||
|
pkgs.gnome.gnome-clocks
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -3,11 +3,13 @@ let
|
||||||
name = "temperature";
|
name = "temperature";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar = {
|
||||||
options.modules.waybar.${name} = {
|
modules = import ./addname.nix lib name;
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enabled.${name} = {
|
||||||
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
programs.waybar.settings.mainBar."${name}" = {
|
programs.waybar.settings.mainBar."${name}" = {
|
||||||
thermal-zone = 2;
|
thermal-zone = 2;
|
||||||
hwmon-path = "/sys/class/hwmon/hwmon3/temp1_input";
|
hwmon-path = "/sys/class/hwmon/hwmon3/temp1_input";
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar.modules = import ./addname.nix lib name;
|
||||||
options.modules.waybar.${name} = {
|
options.modules.waybar.enabled.${name} = {
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
programs.waybar.settings.mainBar."${name}" = {
|
programs.waybar.settings.mainBar."${name}" = {
|
||||||
spacing = 10;
|
spacing = 10;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar.modules = import ./addname.nix lib name;
|
||||||
options.modules.waybar.${name} = {
|
options.modules.waybar.enabled.${name} = {
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
programs.waybar.settings.mainBar."${name}" = {
|
programs.waybar.settings.mainBar."${name}" = {
|
||||||
format = "VPN";
|
format = "VPN";
|
||||||
exec = "echo '{\"class\": \"connected\"}'";
|
exec = "echo '{\"class\": \"connected\"}'";
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar.modules = import ./addname.nix lib name;
|
||||||
options.modules.waybar.${name} = {
|
options.modules.waybar.enabled.${name} = {
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
programs.waybar.settings.mainBar."${name}" = {
|
programs.waybar.settings.mainBar."${name}" = {
|
||||||
max-length = 36;
|
max-length = 36;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,13 @@ let
|
||||||
name = "wireplumber";
|
name = "wireplumber";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar = {
|
||||||
options.modules.waybar.${name} = {
|
modules = import ./addname.nix lib name;
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enabled.${name} = {
|
||||||
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
programs.waybar.settings.mainBar."${name}" = {
|
programs.waybar.settings.mainBar."${name}" = {
|
||||||
format = "{volume}% {icon}";
|
format = "{volume}% {icon}";
|
||||||
format-muted = "";
|
format-muted = "";
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.waybar.modules = import ./addname.nix lib name;
|
options.modules.waybar.modules = import ./addname.nix lib name;
|
||||||
options.modules.waybar.${name} = {
|
options.modules.waybar.enabled.${name} = {
|
||||||
enable = lib.mkEnableOption "enable ${name} waybar module";
|
enable = lib.mkEnableOption "enable ${name} waybar module";
|
||||||
};
|
};
|
||||||
config = lib.mkIf config.modules.waybar.${name}.enable {
|
config = lib.mkIf config.modules.waybar.enabled.${name}.enable {
|
||||||
programs.waybar.settings.mainBar."${name}" = {
|
programs.waybar.settings.mainBar."${name}" = {
|
||||||
format = "{name}";
|
format = "{name}";
|
||||||
on-click = "activate";
|
on-click = "activate";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue