66 lines
1.9 KiB
Nix
66 lines
1.9 KiB
Nix
{ pkgs, lib, ... }:
|
||
let
|
||
xsetroot = "${pkgs.xorg.xsetroot}/bin/xsetroot";
|
||
monitorPages = [ "Ⅰ" "Ⅱ" "Ⅲ" "Ⅳ" "Ⅴ" "Ⅵ" "Ⅶ" "Ⅷ" "Ⅸ" "Ⅹ" ];
|
||
monitorPagesString = lib.strings.concatStringsSep " " monitorPages;
|
||
monitorSetupScript = pkgs.writeShellScript "monitorSetupScript" ''
|
||
for monitor in $(bspc query -M --names); do
|
||
bspc monitor $monitor -d ${monitorPagesString}
|
||
done
|
||
${pkgs.autorandr}/bin/autorandr -c || true
|
||
systemctl --user restart polybar # Restart polybar
|
||
systemctl --user restart kdeconnect-indicator # Restart polybar
|
||
'';
|
||
strPalette = pkgs.lib.nix-rice.palette.toRGBHex pkgs.rice.colorPalette;
|
||
in
|
||
{
|
||
imports = [
|
||
./picom.nix
|
||
./polybar.nix
|
||
./sxhkd.nix
|
||
./update_background.nix
|
||
./xidlehook.nix
|
||
];
|
||
|
||
home.packages = builtins.attrValues {
|
||
inherit (pkgs)
|
||
arandr
|
||
blueman
|
||
dmenu
|
||
keyboard-switch
|
||
;
|
||
};
|
||
|
||
xsession.windowManager.bspwm = {
|
||
enable = true;
|
||
settings = {
|
||
border_width = 1;
|
||
border_radius = 8;
|
||
window_gap = 2;
|
||
split_ratio = 0.5;
|
||
top_padding = 0;
|
||
bottom_padding = 0;
|
||
right_padding = 0;
|
||
left_padding = 0;
|
||
borderless_monocle = true;
|
||
gapless_monocle = false;
|
||
normal_border_color = strPalette.normal.blue;
|
||
focused_border_color = strPalette.bright.red;
|
||
};
|
||
# monitors = builtins.foldl' (acc: monitor: acc // { ${monitor} = monitorPages; }) { } monitors;
|
||
rules = {
|
||
"*" = { follow = true; };
|
||
"Zathura" = { state = "tiled"; };
|
||
"Yad" = { state = "floating"; };
|
||
};
|
||
startupPrograms = [
|
||
"${monitorSetupScript}" # Setup monitors
|
||
"${xsetroot} -solid black -cursor_name left_ptr" # Set cursor
|
||
"${pkgs.update-background}/bin/update-background" # Set background
|
||
];
|
||
};
|
||
services = {
|
||
network-manager-applet.enable = true;
|
||
blueman-applet.enable = true;
|
||
};
|
||
}
|