mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 13:51:54 -05:00
desktop: add swayosd module with custom style (#80)
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
Some checks are pending
git-mirror / gitlab-sync (push) Waiting to run
nix-build / default-build (push) Waiting to run
nix-build / fallarbor-build (push) Waiting to run
nix-build / lavaridge-build (push) Waiting to run
nix-build / mauville-build (push) Waiting to run
nix-build / petalburg-build (push) Waiting to run
nix-build / rustboro-build (push) Waiting to run
nix-check / fmt-check (push) Waiting to run
nix-check / eval-check (push) Waiting to run
* desktop: add swayosd theme style * home: add swayosd module options * desktop: enable libinput
This commit is contained in:
parent
40d2853baa
commit
bbc0be5a61
|
@ -16,6 +16,7 @@
|
||||||
mako.enable = lib.mkDefault true;
|
mako.enable = lib.mkDefault true;
|
||||||
pipewire-inhibit.enable = lib.mkDefault true;
|
pipewire-inhibit.enable = lib.mkDefault true;
|
||||||
swayidle.enable = lib.mkDefault true;
|
swayidle.enable = lib.mkDefault true;
|
||||||
|
swayosd.enable = lib.mkDefault true;
|
||||||
waybar.enable = lib.mkDefault true;
|
waybar.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -33,21 +34,9 @@
|
||||||
gnome.file-roller
|
gnome.file-roller
|
||||||
libnotify
|
libnotify
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
swayosd
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services = {
|
services.playerctld.enable = lib.mkDefault true;
|
||||||
playerctld.enable = lib.mkDefault true;
|
|
||||||
swayosd.enable = lib.mkDefault true;
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services.swayosd = {
|
|
||||||
Install.WantedBy = lib.mkForce ["hyprland-session.target" "sway-session.target"];
|
|
||||||
Service = {
|
|
||||||
Restart = lib.mkForce "on-failure";
|
|
||||||
RestartSec = 5;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -194,6 +194,7 @@ in {
|
||||||
pipewire-inhibit.enable = lib.mkEnableOption "Inhibit idle when audio is playing with Pipewire.";
|
pipewire-inhibit.enable = lib.mkEnableOption "Inhibit idle when audio is playing with Pipewire.";
|
||||||
randomWallpaper.enable = lib.mkEnableOption "Lightweight swaybg-based random wallpaper daemon.";
|
randomWallpaper.enable = lib.mkEnableOption "Lightweight swaybg-based random wallpaper daemon.";
|
||||||
swayidle.enable = lib.mkEnableOption "Swayidle idle daemon.";
|
swayidle.enable = lib.mkEnableOption "Swayidle idle daemon.";
|
||||||
|
swayosd.enable = lib.mkEnableOption "OSD for brightness and volume keys.";
|
||||||
waybar.enable = lib.mkEnableOption "Waybar wayland panel.";
|
waybar.enable = lib.mkEnableOption "Waybar wayland panel.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
./pipewire-inhibit
|
./pipewire-inhibit
|
||||||
./randomWallpaper
|
./randomWallpaper
|
||||||
./swayidle
|
./swayidle
|
||||||
|
./swayosd
|
||||||
./waybar
|
./waybar
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
78
homeManagerModules/services/swayosd/default.nix
Normal file
78
homeManagerModules/services/swayosd/default.nix
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.ar.home;
|
||||||
|
in {
|
||||||
|
config = lib.mkIf cfg.services.swayosd.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
swayosd
|
||||||
|
];
|
||||||
|
|
||||||
|
services.swayosd = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
stylePath = "${config.xdg.configHome}/swayosd/style.css";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.swayosd = {
|
||||||
|
Install.WantedBy = lib.mkForce ["hyprland-session.target" "sway-session.target"];
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Restart = lib.mkForce "on-failure";
|
||||||
|
RestartSec = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."swayosd/style.css" = {
|
||||||
|
text = ''
|
||||||
|
window#osd {
|
||||||
|
padding: 12px 20px;
|
||||||
|
border-radius: ${toString cfg.theme.borderRadius}px;
|
||||||
|
border: 4px solid alpha(${cfg.theme.colors.primary}, 0.8);
|
||||||
|
background: alpha(${cfg.theme.colors.background}, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
window#osd #container {
|
||||||
|
margin: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#osd image,
|
||||||
|
window#osd label {
|
||||||
|
color: ${cfg.theme.colors.secondary};
|
||||||
|
}
|
||||||
|
|
||||||
|
window#osd progressbar:disabled,
|
||||||
|
window#osd image:disabled {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#osd progressbar {
|
||||||
|
min-height: 6px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#osd trough {
|
||||||
|
min-height: inherit;
|
||||||
|
border-radius: inherit;
|
||||||
|
border: none;
|
||||||
|
background: alpha(${cfg.theme.colors.secondary}, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
window#osd progress {
|
||||||
|
min-height: inherit;
|
||||||
|
border-radius: inherit;
|
||||||
|
border: none;
|
||||||
|
background: ${cfg.theme.colors.secondary};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
onChange = ''
|
||||||
|
${lib.getExe' pkgs.systemd "systemctl"} restart --user swayosd
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -52,6 +52,7 @@
|
||||||
xserver = {
|
xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
excludePackages = with pkgs; [xterm];
|
excludePackages = with pkgs; [xterm];
|
||||||
|
libinput.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue