some more config, want to turn waybar into simple battery bar

This commit is contained in:
twoneis 2024-08-23 14:42:25 +02:00
parent 4621354963
commit c912f2cf06
3 changed files with 40 additions and 19 deletions

View file

@ -1,6 +1,8 @@
{ inputs, lib, config, pkgs, ... }: let { inputs, lib, config, pkgs, ... }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config) conf; inherit (config) conf;
swayosd-style = pkgs.writeText "swayosd.css"
(import ./swayosd.css.nix { config = config; }).style;
in { in {
imports = [ imports = [
./xwl-satellite.service.nix ./xwl-satellite.service.nix
@ -30,13 +32,15 @@ in {
home-manager.users.${conf.username} = { home-manager.users.${conf.username} = {
home.packages = with pkgs; [ home.packages = with pkgs; [
brightnessctl
swaybg
swayidle swayidle
swayosd
gammastep
]; ];
services.swayosd = {
enable = true;
topMargin = 0.8;
stylePath = swayosd-style;
};
programs.niri = { programs.niri = {
settings = import ./niri.conf.nix { config = config; }; settings = import ./niri.conf.nix { config = config; };
}; };

View file

@ -18,7 +18,7 @@ in {
outputs = { outputs = {
"eDP-1" = { "eDP-1" = {
scale = 1.15; scale = 1;
mode = { mode = {
width = 2736; width = 2736;
height = 1824; height = 1824;
@ -56,13 +56,7 @@ in {
default-column-width = { proportion = 0.5; }; default-column-width = { proportion = 0.5; };
gaps = 16; gaps = 2;
struts = {
left = -8;
right = -8;
top = -8;
bottom = -8;
};
}; };
window-rules = [ window-rules = [
@ -74,9 +68,6 @@ in {
bottom-right= 8.0; bottom-right= 8.0;
}; };
clip-to-geometry = true; clip-to-geometry = true;
} {
excludes = [{is-focused = true;}];
opacity = 0.98;
} }
]; ];
@ -92,11 +83,7 @@ in {
spawn-at-startup = [ spawn-at-startup = [
{ command = [ "waybar" ]; } { command = [ "waybar" ]; }
{ command = [ "brightnessctl" "s" "50%" ]; }
{ command = [ "swaybg" "-i" "${./wallpaper.png}" ]; }
{ command = [ "swayidle" "-w" "before-sleep" "swaylock" ]; } { command = [ "swayidle" "-w" "before-sleep" "swaylock" ]; }
{ command = [ "swayosd-server" ]; }
{ command = [ "gammastep" "-O" "5400" ]; }
]; ];
binds = { binds = {

View file

@ -0,0 +1,30 @@
{ config, ... }: let
background = config.theme.overlay;
muted = config.theme.muted;
font = config.theme.text;
in {
style = ''
window#osd {
border-radius: 8px;
border: none;
background: ${background};
}
image,
label {
color: ${font};
}
progressbar {
background: ${muted};
}
progress:disabled {
background: ${font};
}
progress {
background: ${font};
}
'';
}