First of some fixes for your i3 config:
# Plasma compatibility improvements
for_window [title="Desktop — Plasma"] kill; floating enable; border none
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [class="systemsettings"] floating enable
for_window [class="plasmashell"] floating enable;
for_window [class="Plasma"] floating enable; border none
for_window [title="plasma-desktop"] floating enable; border none
for_window [class="krunner"] floating enable; border none
for_window [class="Kmix"] floating enable; border none
for_window [class="Klipper"] floating enable; border none
for_window [class="Plasmoidviewer"] floating enable; border none
for_window [class="plasmashell" window_type="notification"] floating enable, border none, move right 700px, move down 450px, no_focus
Next my relevant service config:
desktopManager.plasma5.enable = true;
displayManager = {
sessionCommands = ''
gpg-connect-agent /bye
GPG_TTY=$(tty)
export GPG_TTY
export XCURSOR_PATH=${pkgs.gnome3.adwaita-icon-theme}/share/icons
'';
};
desktopManager.xterm.enable = true;
windowManager.default = "i3";
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
configFile = pkgs.i3-config-file;
};
Lastly we need to make sure that plasma is actually using i3 as window manager instead of KWIN. The impure way to do that is through a file in your home directory:
cat ~/.config/plasma-workspace/env/set_window_manager.sh
export KDEWM=/run/current-system/sw/bin/i3
Maybe this will also just work via
environment.variables = { KDEWM = "/run/current-system/sw/bin/i3";}
i've been too lazy to find out ;-)
You can use the following to trigger an overlay where you can select to log out or restart or power off:
'${lib.getDev qt5.qttools}/bin/qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout -1 -1 -1'