Fix polybar error because it was being started by xfce rather than bspwm

This commit is contained in:
Evie Litherland-Smith 2023-04-07 09:06:11 +01:00
parent 82257facf6
commit 246f90818e
11 changed files with 53 additions and 49 deletions

View file

@ -1,6 +0,0 @@
{ ... }:
{
imports = [
./common.nix
];
}

View file

@ -1,12 +0,0 @@
{ ... }:
{
systemd.user.targets.tray = {
enable = true;
wantedBy = ["graphical-session.target"];
unitConfig = {
Description = "Tray target";
Requires="graphical-session.target";
After="graphical-session.target";
};
};
}

View file

@ -1,25 +1,22 @@
{ ... }:
{ pkgs, ... }:
{
imports = [
./common.nix
./xserver.nix
./picom.nix
];
services.xserver = {
enable = true;
desktopManager = {
xterm.enable = false;
xfce = {
enable = true;
noDesktop = true;
enableXfwm = false;
noDesktop = true;
};
};
displayManager = {
defaultSession = "none+i3";
lightdm.enable = true;
};
windowManager.i3 = {
enable = true;
};
};
programs.i3lock = {
enable = true;
package = pkgs.i3lock-fancy;
};
}

View file

@ -0,0 +1,13 @@
{ ... }:
{
imports = [
./xfce-bare.nix
./sddm.nix
];
services.xserver = {
windowManager.bspwm.enable = true;
displayManager = {
defaultSession = "xfce+bspwm";
};
};
}

13
nixos/desktop/xfce-i3.nix Normal file
View file

@ -0,0 +1,13 @@
{ ... }:
{
imports = [
./xfce-bare.nix
./sddm.nix
];
services.xserver = {
windowManager.i3.enable = true;
displayManager = {
defaultSession = "xfce+i3";
};
};
}

View file

@ -5,20 +5,11 @@
./xserver.nix
./sddm.nix
];
environment.systemPackages = with pkgs; [
nitrogen
];
services.xserver = {
enable = true;
desktopManager.xterm.enable = false;
desktopManager.xfce = {
enable = true;
enableXfwm = false;
noDesktop = true;
};
windowManager.bspwm.enable = true;
desktopManager.xfce.enable = true;
displayManager = {
defaultSession = "xfce+bspwm";
defaultSession = "xfce";
sessionCommands = ''
[ -f "$HOME/.config/nitrogen/bg-saved.cfg" ]\
&& ${pkgs.nitrogen}/bin/nitrogen --restore\

View file

@ -2,7 +2,6 @@
{
imports = [
./common.nix
./systemd.nix
];
services.xserver = {
enable = true;

View file

@ -1,4 +1,4 @@
{ ... }:
{ pkgs, ... }:
{
xsession.windowManager.bspwm = {
enable = true;
@ -14,7 +14,7 @@
pointer_action3 = "resize_corner";
};
monitors = {
"primary" = ["I" "II" "III" "IV"];
"primary" = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX" "X" ];
};
rules = {
"Xfce4-terminal".state = "floating";
@ -27,5 +27,15 @@
focus = false;
};
};
extraConfig = ''
[ -f "$HOME/.config/nitrogen/bg-saved.cfg" ]\
&& ${pkgs.nitrogen}/bin/nitrogen --restore\
|| ${pkgs.nitrogen}/bin/nitrogen --set-auto $HOME/.dotfiles/wallpaper/images_dark/5120x2880.png --save
${pkgs.xorg.xinput}/bin/xinput set-button-map "Logitech USB Receiver Mouse" 3 2 1
${pkgs.polybar}/bin/polybar-msg cmd quit
echo "---" | tee -a /tmp/polybar.log
${pkgs.polybar}/bin/polybar 2>&1 | tee -a /tmp/polybar.log & disown
echo "Bars launched..."
'';
};
}

View file

@ -82,7 +82,7 @@ module-margin = 1
separator = |
separator-foreground = ${colors.disabled}
font-0 = Fira Code Nerd Font;2
font-0 = FiraCode Nerd Font;2
modules-left = xworkspaces xwindow
modules-right = filesystem alsa xkeyboard memory cpu wlan eth date
@ -92,11 +92,9 @@ cursor-scroll = ns-resize
enable-ipc = true
; tray-position = right
; wm-restack = bspwm
; override-redirect = true
tray-position = right
wm-restack = bspwm
override-redirect = false
[module/xworkspaces]
type = internal/xworkspaces

View file

@ -24,6 +24,7 @@
extraFlags = [
"--quiet"
"--ignore-missing"
"--noask"
];
keys = [
"id_rsa"

View file

@ -4,7 +4,7 @@
imports = [
./common.nix
./locales/en_GB.nix
./desktop/xfce.nix
./desktop/xfce-bspwm.nix
];
networking.hostName = "Vanguard"; # Define your hostname.