dotfiles/.config/x11/xprofile

26 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-10-12 15:12:12 +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.
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
2024-04-05 10:50:33 +02:00
autostart="picom mpd dunst unclutter dwmblocks update_musicbar pipewire remapd pipewire"
2023-10-12 15:12:12 +02:00
for program in $autostart; do
pidof -s "$program" || setsid -f "$program"
done >/dev/null 2>&1
2024-04-05 10:50:33 +02:00
sleep 30 && jellyfin-mpv-shim & # Start jellyfin-mpv-shim after 30 seconds, to ensure that internet is connected (bodged, not relevant though)
2023-10-12 15:12:12 +02:00
xrandr --auto
2024-03-09 13:38:38 +01:00
xrandr --dpi 140 # Set DPI. User may want to use a larger number for larger screens.
sb-bright 40 # set brighntess by default to 40% instead of ~38%
xrandr --listactivemonitors | grep -qE '1920.*x1080.*DP-7$' && ( xrandr --output DP-7 --scale 1.666666666666 && setbg ) # set scale for 2nd monitor if connected
2023-10-12 15:12:12 +02:00
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"