nixos/home/common/optional/desktop/dwm/default.nix

53 lines
1.1 KiB
Nix

{ pkgs, ... }:
{
imports = [
../common
../common/x11
# Status bar scripts
./scripts/sb-cpu-pct.nix
./scripts/sb-mem-pct.nix
./scripts/sb-volume.nix
./scripts/sb-network-status.nix
./scripts/sb-updates.nix
];
home.packages = [
pkgs.dwmblocks
];
# TODO configure x11 to look in .config/x11
#home.file."${config.xdg.configHome}/x11/xinitrc" = {
home.file.".xinitrc" = {
recursive = true;
text = ''
picom -b --config ~/.config/picom/picom.conf
xrdb ~/.Xresources
autostart="dwmblocks feh-wallpaper-changer"
for program in $autostart; do
pidof -sx "$program" || "$program" &
done >/dev/null 2>&1
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval $(dbus-launch --exit-with-session --sh-syntax)
fi
systemctl --user import-environment DISPLAY XAUTHORITY
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY
fi
export XSESSION_PID="$$"
exec dwm
'';
};
}