feat: consistent konawall on hyprland

This commit is contained in:
Kat Inskip 2024-03-10 12:28:14 -07:00
parent 576f3a3e7e
commit 15f40761fb
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
17 changed files with 92 additions and 72 deletions

View file

@ -28,16 +28,11 @@ in {
SDL_VIDEODRIVER = "wayland";
XDG_SESSION_TYPE = "wayland";
};
systemd.user.services.swayidle.Install.WantedBy = lib.mkForce ["hyprland-session.target"];
wayland.windowManager.hyprland = {
enable = true;
systemd = {
enable = true;
variables = ["--all"];
extraCommands = [
"systemctl --user stop graphical-session.target"
"systemctl --user start hyprland-session.target"
];
};
xwayland.enable = true;
settings = {
@ -73,16 +68,16 @@ in {
"eDP-1, 2256x1504, 0x0, 1"
];
exec-once = [
"${pkgs.swww}/bin/swww init"
"${pkgs.hypridle}/bin/hypridle"
"${pkgs.udiskie}/bin/udiskie &"
"${pkgs.dbus}/bin/dbus-update-activation-environment --all"
"${pkgs.libsForQt5.polkit-kde-agent}/bin/polkit-kde-agent"
"${pkgs.networkmanagerapplet}/bin/nm-applet"
"${pkgs.mako}/bin/mako"
"${pkgs.swww}/bin/swww init"
"${pkgs.systemd}/bin/systemctl --user restart waybar.service"
"${pkgs.udiskie}/bin/udiskie &"
"${pkgs.pasystray}/bin/pasystray"
"${inputs.konawall-py.packages.${pkgs.system}.konawall-py}/bin/konawall"
];
exec = [
];
xwayland = {
force_zero_scaling = true;

View file

@ -1,19 +1,24 @@
{
inputs,
pkgs,
config,
...
}: let
desktop_entry = ''
[Desktop Entry]
Exec=${inputs.konawall-py.packages.${pkgs.system}.konawall-py}/bin/konawall
Icon=
Name=konawall
Path=
Terminal=False
Type=Application
'';
systemd.user.services.konawall-py = {
Unit = {
Description = "konawall-py";
X-Restart-Triggers = [(toString config.xdg.configFile."konawall/config.toml".source)];
After = ["hyprland-session.target"];
};
Service = {
ExecStart = "${inputs.konawall-py.packages.${pkgs.system}.konawall-py}/bin/konawall";
Restart = "always";
};
Install = {WantedBy = ["hyprland-session.target"];};
};
konawallConfig = {
interval = 30 * 60;
interval = 60 * 5;
rotate = true;
source = "konachan";
tags = [

View file

@ -2,13 +2,27 @@
kittywitch,
pkgs,
config,
lib,
...
}: {
systemd.user.services.waybar.Unit.X-Restart-Triggers = [
(builtins.hashString "md5" (builtins.toJSON config.programs.waybar.settings))
];
}: let
inherit (lib.modules) mkForce;
in {
systemd.user.services.waybar = {
Install.WantedBy = lib.mkForce ["hyprland-session.target"];
Service = {
RestartSec = "1s";
};
Unit = {
After = ["hyprland-session.target"];
X-Restart-Triggers = [
(builtins.hashString "md5" (builtins.toJSON config.programs.waybar.settings))
];
};
};
programs.waybar = {
enable = true;
systemd.enable = true;
style = let
template = kittywitch.sassTemplate {
name = "waybar-style";
@ -16,7 +30,6 @@
};
in
template.source;
systemd.enable = true;
settings.main = {
layer = "top";
position = "top";

View file

@ -11,7 +11,7 @@
%widget_unpadded
transition: none
background: $base01
background: rgba($base01, 0.5)
color: $base07
margin: 0 4px
@ -21,7 +21,7 @@
padding-top: 2px
window#waybar
background: rgba($base00, 0.9)
background: rgba($base00, 0.1)
border-bottom: 2px solid transparent
// sway/workspaces