Skip to content

Instantly share code, notes, and snippets.

@gilligan
Last active January 15, 2020 21:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gilligan/d4ef63096fd900cbee7c0874aa0e924b to your computer and use it in GitHub Desktop.
Save gilligan/d4ef63096fd900cbee7c0874aa0e924b to your computer and use it in GitHub Desktop.

i3 configuration

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

service config

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;
      };

Telling plasma to use i3

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 ;-)

Logging 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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment