Move bspwm extra scripts to separate file, assign windows to workspaces like in i3

This commit is contained in:
Evie Litherland-Smith 2023-04-08 10:32:55 +01:00
parent 502dd59723
commit 774f25f544
3 changed files with 27 additions and 19 deletions

View file

@ -1,5 +1,9 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [
nitrogen
polybar
];
xsession.windowManager.bspwm = { xsession.windowManager.bspwm = {
enable = true; enable = true;
settings = { settings = {
@ -18,24 +22,20 @@
}; };
rules = { rules = {
"Xfce4-terminal".state = "floating"; "Xfce4-terminal".state = "floating";
"kitty" = { "Nm-connection-editor".state = "floating";
desktop = "^1"; "Pavucontrol".state = "floating";
focus = true; "kitty".desktop = "^1";
}; "firefox".desktop = "^2";
"firefox" = { "Thunar".desktop = "^3";
desktop = "^2"; "thunderbird".desktop = "^4";
focus = false; "Mailspring".desktop = "^4";
}; "Element".desktop = "^5";
"Signal".desktop = "^5";
"TelegramDesktop".desktop = "^5";
"Steam".desktop = "^6";
"Bitwarden".desktop = "^7";
"Nxplayer.bin".desktop = "^8";
}; };
extraConfig = '' extraConfig = builtins.readFile (./config/bspwm/startup.sh);
[ -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

@ -0,0 +1,7 @@
[ -f "$HOME/.config/nitrogen/bg-saved.cfg" ]\
&& nitrogen --restore\
|| nitrogen --set-auto $HOME/.dotfiles/wallpaper/images_dark/5120x2880.png --save
polybar-msg cmd quit
echo "---" | tee -a /tmp/polybar.log
polybar 2>&1 | tee -a /tmp/polybar.log & disown
echo "Bars launched..."

View file

@ -15,10 +15,11 @@
ranger ranger
flameshot flameshot
power-profiles-daemon power-profiles-daemon
i3lock-fancy
]; ];
xfconf.settings = { xfconf.settings = {
xfce4-session = { xfce4-session = {
"general/LockCommand" = "${pkgs.i3lock-fancy}/bin/i3lock-fancy"; "general/LockCommand" = "i3lock-fancy";
}; };
xsettings = { xsettings = {
"Net/ThemeName" = "Catppuccin-Frappe-Standard-Blue-Dark"; "Net/ThemeName" = "Catppuccin-Frappe-Standard-Blue-Dark";