Compare commits

..

No commits in common. "4d5f3c1bbb8a4d84cee2e23819b4979e1f4ecafd" and "d7a35463fe61f79ab12144ef9e2e2e2d460902a9" have entirely different histories.

5 changed files with 34 additions and 45 deletions

View file

@ -274,7 +274,7 @@ in
Unit.After = [ "graphical-session-pre.target" ]; Unit.After = [ "graphical-session-pre.target" ];
Unit.Before = [ "graphical-session.target" ]; Unit.Before = [ "graphical-session.target" ];
Unit.BindsTo = [ "graphical-session.target" ]; Unit.BindsTo = [ "graphical-session.target" ];
Install.WantedBy = [ "graphical-session.target" ]; Install.WantedBy = [ "plasma-workspace.target" ];
}; };
# XWayland target # XWayland target
xwayland = { xwayland = {
@ -282,7 +282,7 @@ in
Unit.After = [ "graphical-session-pre.target" ]; Unit.After = [ "graphical-session-pre.target" ];
Unit.Before = [ "graphical-session.target" ]; Unit.Before = [ "graphical-session.target" ];
Unit.BindsTo = [ "graphical-session.target" ]; Unit.BindsTo = [ "graphical-session.target" ];
Install.WantedBy = [ "graphical-session.target" ]; Install.WantedBy = [ "plasma-workspace.target" ];
}; };
}; };
}; };

View file

@ -10,7 +10,7 @@ let
wallpaper = config.linux.graphical.wallpaper; wallpaper = config.linux.graphical.wallpaper;
xwayland-display = ":0"; xwayland-display = ":12";
in in
{ {
@ -67,12 +67,22 @@ in
"10" = { name = "🎲 misc"; }; "10" = { name = "🎲 misc"; };
"99" = { name = "📧 Email"; }; "99" = { name = "📧 Email"; };
}; };
systemd.user.services.swaync.Install.WantedBy = [ "niri.service" ]; # systemd.user.services.niri = lib.mkIf cfg.enable {
systemd.user.services.swaync.Unit.After = [ "niri.service" ]; # Unit.Wants = [ "tray.target" "xwayland.target" ];
systemd.user.targets.tray.Unit.After = [ "niri.service" ]; # };
systemd.user.services.waybar.Unit.After = [ "niri.service" ]; systemd.user.services.niri = lib.mkIf cfg.enable {
systemd.user.services.waybar.Install.WantedBy = [ "niri.service" ]; Unit = {
systemd.user.targets.xwayland.Unit.After = [ "niri.service" ]; Description = "A scrollable-tiling Wayland compositor";
BindsTo = [ "graphical-session.target" ];
Before = [ "graphical-session.target" "tray.target" "swaync.service" "xdg-desktop-autostart.target" ];
Wants = [ "graphical-session-pre.target" "swaync.service" "xdg-desktop-autostart.target" ];
After = [ "graphical-session-pre.target" ];
};
Service.Slice = "session.slice";
Service.Type = "notify";
Service.ExecStart = "${lib.getExe config.programs.niri.package} --session";
};
# xwayland-satellite # xwayland-satellite
systemd.user.services.niri-xwayland-satellite = lib.mkIf cfg.enable { systemd.user.services.niri-xwayland-satellite = lib.mkIf cfg.enable {
@ -82,9 +92,8 @@ in
Before = [ "xwayland.target" "xdg-desktop-autostart.target" ]; Before = [ "xwayland.target" "xdg-desktop-autostart.target" ];
After = [ "niri.service" ]; After = [ "niri.service" ];
}; };
Install.UpheldBy = [ "niri.service" ]; Install.RequiredBy = [ "niri.service" ];
Service.Slice = "session.slice"; Service.Slice = "session.slice";
Service.Type = "notify";
Service.ExecStart = "${lib.getExe pkgs.xwayland-satellite} ${xwayland-display}"; Service.ExecStart = "${lib.getExe pkgs.xwayland-satellite} ${xwayland-display}";
}; };
@ -134,6 +143,8 @@ in
{ command = [ (lib.getExe pkgs.swaybg) "-i" "${wallpaper}" "-m" "fill" ]; } { command = [ (lib.getExe pkgs.swaybg) "-i" "${wallpaper}" "-m" "fill" ]; }
# Waybar # Waybar
{ command = [ "systemctl" "--user" "start" "xdg-desktop-portal-gtk.service" "xdg-desktop-portal.service" ]; } { command = [ "systemctl" "--user" "start" "xdg-desktop-portal-gtk.service" "xdg-desktop-portal.service" ]; }
# Export XWayland DISPLAY
{ command = [ "sh" "-c" "systemctl --user set-environment DISPLAY=${xwayland-display} && systemctl --user start xwayland.target" ]; }
]; ];
layout = { layout = {
@ -216,23 +227,6 @@ in
]; ];
} }
# xwaylandvideobridge
{
matches = [{ app-id = "^xwaylandvideobridge$"; }];
open-floating = true;
focus-ring.enable = false;
opacity = 0.0;
default-floating-position = {
x = 0;
y = 0;
relative-to = "bottom-right";
};
min-width = 1;
max-width = 1;
min-height = 1;
max-height = 1;
}
# Kitty dimming # Kitty dimming
{ {
matches = [{ app-id = "kitty"; }]; matches = [{ app-id = "kitty"; }];

View file

@ -92,9 +92,7 @@ in
}; };
config.systemd.user.targets.sway-session = mkIf cfg.enable { config.systemd.user.targets.sway-session = mkIf cfg.enable {
Unit.Before = [ "tray.target" "xwayland.target" "xdg-desktop-portal.service" "xdg-desktop-autostart.target" ]; Unit.Before = [ "tray.target" "xwayland.target" ];
Unit.Upholds = [ "waybar.service" ];
Unit.Wants = [ "xdg-desktop-autostart.target" ];
}; };
# Enable waybar # Enable waybar
@ -115,10 +113,10 @@ in
] ++ lib.optionals osConfig.services.desktopManager.plasma6.enable [ ] ++ lib.optionals osConfig.services.desktopManager.plasma6.enable [
"XDG_MENU_PREFIX" "XDG_MENU_PREFIX"
]; ];
# systemd.extraCommands = options.wayland.windowManager.sway.systemd.extraCommands.default systemd.extraCommands = options.wayland.windowManager.sway.systemd.extraCommands.default
# ++ [ ++ [
# "systemctl --user restart xdg-desktop-portal.service" "systemctl --user restart xdg-desktop-portal.service"
# ]; ];
checkConfig = false; # Not working atm checkConfig = false; # Not working atm
config = { config = {
@ -147,10 +145,10 @@ in
menu = "${pkgs.dmenu}/bin/dmenu_path | ${pkgs.bemenu}/bin/bemenu | ${pkgs.findutils}/bin/xargs swaymsg exec --"; menu = "${pkgs.dmenu}/bin/dmenu_path | ${pkgs.bemenu}/bin/bemenu | ${pkgs.findutils}/bin/xargs swaymsg exec --";
# Startup # Startup
startup = [ startup = [
# # Dex for autostart # Dex for autostart
# { command = "${pkgs.dex}/bin/dex -ae sway"; } { command = "${pkgs.dex}/bin/dex -ae sway"; }
# # Waybar # Waybar
# { command = "systemctl --user restart waybar"; always = true; } { command = "systemctl --user restart waybar"; always = true; }
# IME # IME
{ command = "fcitx5"; } { command = "fcitx5"; }
]; ];

View file

@ -43,7 +43,8 @@ in
}; };
}; };
config.systemd.user.services.waybar = lib.mkIf cfg.enable { config.systemd.user.services.waybar = lib.mkIf cfg.enable {
Unit.Before = [ "tray.target" ]; Unit.BindsTo = [ "tray.target" ];
Unit.After = [ "tray.target" ];
}; };
config.programs.waybar = config.programs.waybar =
let let
@ -259,7 +260,7 @@ in
lib.mkIf cfg.enable { lib.mkIf cfg.enable {
enable = true; enable = true;
systemd.enable = true; systemd.enable = true;
systemd.target = "sway-session.target"; systemd.target = "graphical-session.target";
settings = cfg.makeBars barWith; settings = cfg.makeBars barWith;
style = '' style = ''
* { * {

View file

@ -46,10 +46,6 @@
tap = "enabled"; tap = "enabled";
}; };
}; };
programs.my-niri.enable = true;
programs.niri.settings = {
input.keyboard.xkb.options = "ctrl:swapcaps";
};
programs.my-waybar.extraSettings = programs.my-waybar.extraSettings =
let let
change-mode = pkgs.writeScript "change-mode" '' change-mode = pkgs.writeScript "change-mode" ''