#!/bin/sh # This file runs when a DM logs you into a graphical session. # If you use startx/xinit like a Chad, this file will also be sourced. dbus-update-activation-environment --systemd DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY xrdb -merge ~/.config/x11/Xresources #mpv --no-video "$XDG_CONFIG_HOME/windows_xp_startup.ogg" setbg & # set the background with the `setbg` script xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup autostart="picom mpd dunst unclutter dwmblocks update_musicbar pipewire remapd" for program in $autostart; do pidof -s "$program" || setsid -f "$program" done >/dev/null 2>&1 xrandr --auto xrandr --dpi 180 # Set DPI. User may want to use a larger number for larger screens. xrandr --listactivemonitors | grep -qE '1920.*x1080.*HDMI-1-3$' && ( xrandr --output HDMI-1-3 --scale 1.666666666666 && setbg ) # set scale for 2nd monitor if connected echo "$DBUS_SESSION_BUS_ADDRESS" > /tmp/dbus_session_bus_address # Ensure that xrdb has finished running before moving on to start the WM/DE. [ -n "$xrdbpid" ] && wait "$xrdbpid"