dotfiles/.config/x11/xprofile

26 lines
791 B
Text
Raw Normal View History

2022-05-27 21:07:07 +02:00
#!/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.
xrandr --dpi "${DISPLAY_DPI:-96}"
xrdb "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources" &
xrdbpid=$!
2024-04-12 16:07:57 +02:00
display_script="${XDG_DATA_HOME:-$HOME/.local/share}/xrandr/$(hostname | cut -d. -f1)"
([ -e "$display_script" ] && $display_script) || xrandr --auto
2022-05-27 21:07:07 +02:00
2024-04-12 16:07:57 +02:00
autostart="picom"
2022-05-27 21:07:07 +02:00
2024-04-12 16:07:57 +02:00
for program in $autostart; do
which "$program" || continue
pidof -s "$program" || "$program" &
2022-05-27 21:07:07 +02:00
done >/dev/null 2>&1
# Ensure that xrdb has finished running before moving on to start the WM/DE.
[ -n "$xrdbpid" ] && wait "$xrdbpid"
2024-04-12 16:07:11 +02:00
# Source .config/shell/profile
profile_path="${XDG_CONFIG_HOME:-$HOME/.config}/shell/profile"
[ -f "$profile_path" ] && . "$profile_path"