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 = [ imports = [
./common.nix ./common.nix
./xserver.nix ./xserver.nix
./picom.nix
]; ];
services.xserver = { services.xserver = {
enable = true;
desktopManager = { desktopManager = {
xterm.enable = false; xterm.enable = false;
xfce = { xfce = {
enable = true; enable = true;
noDesktop = true;
enableXfwm = false; enableXfwm = false;
noDesktop = true;
}; };
}; };
displayManager = {
defaultSession = "none+i3";
lightdm.enable = true;
}; };
windowManager.i3 = { programs.i3lock = {
enable = true; 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 ./xserver.nix
./sddm.nix ./sddm.nix
]; ];
environment.systemPackages = with pkgs; [
nitrogen
];
services.xserver = { services.xserver = {
enable = true; enable = true;
desktopManager.xterm.enable = false; desktopManager.xfce.enable = true;
desktopManager.xfce = {
enable = true;
enableXfwm = false;
noDesktop = true;
};
windowManager.bspwm.enable = true;
displayManager = { displayManager = {
defaultSession = "xfce+bspwm"; defaultSession = "xfce";
sessionCommands = '' sessionCommands = ''
[ -f "$HOME/.config/nitrogen/bg-saved.cfg" ]\ [ -f "$HOME/.config/nitrogen/bg-saved.cfg" ]\
&& ${pkgs.nitrogen}/bin/nitrogen --restore\ && ${pkgs.nitrogen}/bin/nitrogen --restore\

View file

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

View file

@ -1,4 +1,4 @@
{ ... }: { pkgs, ... }:
{ {
xsession.windowManager.bspwm = { xsession.windowManager.bspwm = {
enable = true; enable = true;
@ -14,7 +14,7 @@
pointer_action3 = "resize_corner"; pointer_action3 = "resize_corner";
}; };
monitors = { monitors = {
"primary" = ["I" "II" "III" "IV"]; "primary" = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX" "X" ];
}; };
rules = { rules = {
"Xfce4-terminal".state = "floating"; "Xfce4-terminal".state = "floating";
@ -27,5 +27,15 @@
focus = false; 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 = |
separator-foreground = ${colors.disabled} separator-foreground = ${colors.disabled}
font-0 = Fira Code Nerd Font;2 font-0 = FiraCode Nerd Font;2
modules-left = xworkspaces xwindow modules-left = xworkspaces xwindow
modules-right = filesystem alsa xkeyboard memory cpu wlan eth date modules-right = filesystem alsa xkeyboard memory cpu wlan eth date
@ -92,11 +92,9 @@ cursor-scroll = ns-resize
enable-ipc = true enable-ipc = true
; tray-position = right tray-position = right
wm-restack = bspwm
; wm-restack = bspwm override-redirect = false
; override-redirect = true
[module/xworkspaces] [module/xworkspaces]
type = internal/xworkspaces type = internal/xworkspaces

View file

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

View file

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