~kris/dots

srice

ref: e98f3b030dc24445bd55c68d95d2d81933fd68b3 srice/.xprofile -rw-r--r-- 1.5 KiB
e98f3b03 — Kris Yotam chore: sync local state after restore (push updates, no pull) a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/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.

# Add local bin to PATH for scripts
export PATH="$HOME/.local/bin:$HOME/.local/bin/statusbar:$PATH"

# Plan 9 rc shell uses ~/.planrc instead of $home/lib/profile
export rcrc="$HOME/.planrc"

# Auto-detect device type and set DPI accordingly
DEVICE_TYPE_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/srice/device-type"
if [ -f "$DEVICE_TYPE_FILE" ] && [ "$(cat "$DEVICE_TYPE_FILE")" = "laptop" ]; then
	xrandr --dpi 150	# Laptop HiDPI
else
	xrandr --dpi 128	# Desktop 1440p scaled
fi
~/.screenlayout/main.sh	# Set up monitor layout
setxkbmap -option caps:none	# Completely disable Caps Lock
xrdb -merge ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources	# Load base Xresources
xset s off -dpms s noblank	# Disable DPMS/screensaver (freezes with dual-GPU + 4 monitors)
setbg -s -c "$HOME/.local/share/wallpapers/plan9theme.png" "$HOME/.local/share/wallpapers/plan9.png"	# plan9 solid bg + plan9 winter colorscheme
setfan &	# Set case fan RGB (ice blue)

# Start gnome-keyring-daemon with unlocked login keyring (needed for ProtonMail Bridge)
eval $(echo -n "kris" | gnome-keyring-daemon --replace --unlock --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK

autostart="mpd picom dunst unclutter pipewire wireplumber conky protonmail-bridge"

for program in $autostart; do
	pgrep -x "$program" >/dev/null 2>&1 || "$program" &
done >/dev/null 2>&1

# dwmblocks is started by dwm autostart