1
0
Fork 0

cleanup xinit

This commit is contained in:
Luca Bilke 2022-09-21 21:48:28 +02:00
parent d1370e3612
commit 744528c247
2 changed files with 6 additions and 19 deletions

View File

@ -13,3 +13,5 @@ if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then
else else
. "$HOME/.xprofile" . "$HOME/.xprofile"
fi fi
dwm

View File

@ -2,38 +2,27 @@
xrandr --dpi 109 --fb 4480x1633 \ xrandr --dpi 109 --fb 4480x1633 \
--output DP-2 --mode 2560x1440 --pos 1920x0 \ --output DP-2 --mode 2560x1440 --pos 1920x0 \
--output HDMI-0 --mode 1920x1080 --pos 0x553 --output HDMI-0 --mode 1920x1080 --pos 0x553
setbg & # set the background with the `setbg` script setbg &
xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! xrdb "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources" & xrdbpid=$!
remaps & remaps &
autostart="checkup mpd dunst unclutter pipewire dwmblocks" autostart="checkup mpd dunst unclutter pipewire dwmblocks"
for program in $autostart; do for program in $autostart; do
pidof -s "$program" || "$program" & pidof -s "$program" || "$program" &
done >/dev/null 2>&1 done >/dev/null 2>&1
pidof -s "picom" || picom --experimental-backends & pidof -s "picom" || picom --experimental-backends &
# Ensure that xrdb has finished running before moving on to start the WM/DE.
[ -n "$xrdbpid" ] && wait "$xrdbpid"
# Start gpg-agent if not already running
if ! pgrep -x -u "${USER}" gpg-agent 1> /dev/null 2>&1; then if ! pgrep -x -u "${USER}" gpg-agent 1> /dev/null 2>&1; then
gpg-connect-agent /bye 1> /dev/null 2>&1 gpg-connect-agent /bye 1> /dev/null 2>&1
fi fi
# Set SSH to use gpg-agent (see 'man gpg-agent', section EXAMPLES)
unset SSH_AGENT_PID unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
# export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh" # export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK export SSH_AUTH_SOCK
fi fi
# Set GPG TTY as stated in 'man gpg-agent'
GPG_TTY="$(tty)" GPG_TTY="$(tty)"
export GPG_TTY export GPG_TTY
# Refresh gpg-agent tty
gpg-connect-agent updatestartuptty /bye > /dev/null gpg-connect-agent updatestartuptty /bye > /dev/null
export XSECURELOCK_AUTH_BACKGROUND_COLOR="#24283b" export XSECURELOCK_AUTH_BACKGROUND_COLOR="#24283b"
@ -49,9 +38,5 @@ export XSECURELOCK_COMPOSITE_OBSCURER=0
xset s 300 xset s 300
xss-lock -- xsecurelock & xss-lock -- xsecurelock &
# Set GPU settings # Ensure that xrdb has finished running before moving on to start the WM/DE.
# gwe --hide-window & [ -n "$xrdbpid" ] && wait "$xrdbpid"
# Start Console TDM
exec dwm