#!/usr/bin/env bash # # ~/.xinitrc -- execute commands before starting X # # On my P43s, run X on NVIDIA if required. Requires gpu-select. # https://github.com/manu-mannattil/gpu-select [[ -f /etc/gpu-select/state ]] && { gpu=$(/dev/null then # Compton doesn't work with xsetroot. # https://github.com/chjj/compton/issues/162 hsetroot -solid "$bgcolor" else xsetroot -solid "$bgcolor" fi # Use dunst for notifications. dunst & # Control computer usage. xwrits top clock breakclock mouse=5 & # I really don't want the overhead of a compositor, but Zoom's screen # sharing requires a compositor -- otherwise black squares will replace # Zoom's window. The issue seems to be # https://support.zoom.us/hc/en-us/articles/202082128-Black-screen-during-screen-sharing xcompmgr -c -l0 -t0 -r0 -o.00 & # Since updating to Debian 10.10, launching the WM using dbus-launch # seems to be required to have a nonempty $DBUS_SESSION_BUS_ADDRESS. # Without this, several applications (evince, inkscape, etc.) wait 25 # seconds (some hard-coded time related to D-Bus) before showing their # GUI. case "$DE" in i3) exec dbus-launch --exit-with-session --sh-syntax i3 ;; openbox) # Use tint2 for the taskbar, systray, etc. tint2 & exec dbus-launch --exit-with-session --sh-syntax openbox ;; *) echo >&2 "${0##*/}: DE must be either 'i3' or 'openbox'" exit 1 ;; esac