2021-09-09 21:55:28 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
2022-03-23 12:42:04 +01:00
|
|
|
let cfg = config.modules.desktop;
|
|
|
|
in {
|
|
|
|
imports = [ ./polybar.nix ];
|
|
|
|
|
|
|
|
config = lib.mkIf (cfg.name == "bspwm") {
|
|
|
|
services = {
|
|
|
|
xserver = {
|
|
|
|
enable = true;
|
|
|
|
layout = "de";
|
|
|
|
|
|
|
|
displayManager = {
|
|
|
|
defaultSession = "none+bspwm";
|
|
|
|
|
|
|
|
autoLogin = {
|
|
|
|
enable = true;
|
|
|
|
user = "moritz";
|
|
|
|
};
|
|
|
|
lightdm.enable = true;
|
2021-09-14 18:43:49 +02:00
|
|
|
};
|
2022-03-23 12:42:04 +01:00
|
|
|
windowManager.bspwm.enable = true;
|
2021-09-14 18:43:49 +02:00
|
|
|
};
|
|
|
|
};
|
2021-10-03 12:29:45 +02:00
|
|
|
|
2022-03-23 12:42:04 +01:00
|
|
|
console.keyMap = "de";
|
|
|
|
|
|
|
|
home-manager.users.moritz = {
|
|
|
|
xsession.windowManager.bspwm = {
|
|
|
|
enable = true;
|
|
|
|
rules = {
|
|
|
|
"Zathura" = { state = "tiled"; };
|
|
|
|
"Emacs" = { state = "tiled"; };
|
|
|
|
"feh" = { state = "floating"; };
|
|
|
|
"Vampire_Survivors" = { state = "fullscreen"; };
|
|
|
|
};
|
|
|
|
settings = {
|
|
|
|
border_width = 2;
|
|
|
|
window_gap = 5;
|
|
|
|
borderless_monocle = true;
|
|
|
|
gapless_monocle = true;
|
|
|
|
focus_follows_pointer = true;
|
|
|
|
|
|
|
|
# Dracula theme #
|
|
|
|
focused_border_color = "#bd93f9";
|
|
|
|
normal_border_color = "#44475a";
|
|
|
|
active_border_color = "#6272a4";
|
|
|
|
};
|
|
|
|
startupPrograms = [
|
|
|
|
"${pkgs.systemd}/bin/systemctl --user start polybar.service"
|
|
|
|
"randomWallpaper"
|
|
|
|
"synology-drive"
|
|
|
|
];
|
|
|
|
extraConfig = ''
|
|
|
|
# MONITORS #
|
|
|
|
monitors=($(bspc query -M --names | sort -r))
|
|
|
|
desktops=$(expr 10 / ''${#monitors[@]})
|
|
|
|
start=1
|
|
|
|
end=$desktops
|
|
|
|
for monitor in ''${monitors[@]}; do
|
|
|
|
bspc monitor $monitor -d $(seq -s ' ' $start $end)
|
|
|
|
start=$(expr $start + $desktops)
|
|
|
|
end=$(expr $end + $desktops)
|
|
|
|
done
|
|
|
|
'';
|
2021-09-29 16:27:02 +02:00
|
|
|
|
2021-10-19 11:12:40 +02:00
|
|
|
};
|
2022-03-23 12:42:04 +01:00
|
|
|
services.sxhkd = {
|
|
|
|
enable = true;
|
|
|
|
extraConfig = builtins.readFile ./sxhkdrc;
|
2021-10-19 11:12:40 +02:00
|
|
|
};
|
|
|
|
|
2022-03-23 12:42:04 +01:00
|
|
|
home.packages = with pkgs; [ feh playerctl pamixer brightnessctl ];
|
2021-10-19 11:12:40 +02:00
|
|
|
};
|
2021-09-09 21:55:28 +02:00
|
|
|
};
|
|
|
|
}
|