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

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
flameshot
power-profiles-daemon
i3lock-fancy
];
xfconf.settings = {
xfce4-session = {
"general/LockCommand" = "${pkgs.i3lock-fancy}/bin/i3lock-fancy";
"general/LockCommand" = "i3lock-fancy";
};
xsettings = {
"Net/ThemeName" = "Catppuccin-Frappe-Standard-Blue-Dark";