Xfce: Difference between revisions

imported>Symphorien
Using as a desktop manager and not a window manager: mention that i3-msg exit does not work anymore.
imported>Mucaho
No edit summary
Line 58: Line 58:
Note that xfce manages your session instead of i3: exiting i3 will blank your screen but not terminate your session.
Note that xfce manages your session instead of i3: exiting i3 will blank your screen but not terminate your session.
In your i3 config, replace <code>i3-msg exit</code> with <code>xfce4-session-logout</code>.
In your i3 config, replace <code>i3-msg exit</code> with <code>xfce4-session-logout</code>.
==== Usage with xmonad as window manager ====
One of the possibilities is to use <code>xmonad</code> as a window manager in a <code>Xfce</code> desktop environment.
The previously described configuration is extended with the part that configures xmonad:
{{file|/etc/nixos/configuration.nix|nix|
<nowiki>
{ config, pkgs, callPackage, ... }: {
  ...
  services.xserver = {
    enable = true; 
    desktopManager = {
      default = "xfce";
      xterm.enable = false;
      xfce = {
        enable = true;
        noDesktop = true;
        enableXfwm = false;
      };
    };
    windowManager = {
      default = "xmonad";
      xmonad = {
        enable = true;
        enableContribAndExtras = true;
        extraPackages = haskellPackages : [
          haskellPackages.xmonad-contrib
          haskellPackages.xmonad-extras
          haskellPackages.xmonad
        ];
      };
    };
  };
  ...
}
</nowiki>
}}
Xmonad's contrib package comes with a config to integrate seamlessly into Xfce, like connecting workspaces to xfce's top panel's preview of workspaces. To enable this config, put the following into the user's xmonad config file:
{{file|~/.xmonad/xmonad.hs|haskell|
<nowiki>
  import XMonad
  import XMonad.Config.Xfce
  main = xmonad xfceConfig
        { terminal = "xfce4-terminal"
        , modMask = mod4Mask -- optional: use Win key instead of Alt as modifier key
        }
</nowiki>
}}
Since Xfce uses Alt for a lot of keybindings, using the Win key for xmonad hotkeys may be preferred.
{{Evaluate}}
Note that, unlike suggested in additional resources, the xmonad packages should not be installed in the environment (neither as systemPackages nor user packages), since that leads to errors when (re)compiling xmonad's config file.
Additional resources:
[https://wiki.haskell.org/Xmonad/Installing_xmonad#NixOS Haskell Wiki: Installing xmonad on NixOS]
[https://wiki.haskell.org/Xmonad/Using_xmonad_in_XFCE Haskell Wiki: Using xmonad in Xfce]


== Troubleshooting ==
== Troubleshooting ==