diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2022-04-27 21:25:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2022-04-27 21:25:03 +1200 |
commit | 1287cf7167393a17497ae1aa33ac7c7bb47a3964 (patch) | |
tree | 1bfae27d76dfe60f13287b353be39fb37d09518c /X/xinitrc.d | |
parent | Refine browser selection logic (diff) | |
download | dotfiles-1287cf7167393a17497ae1aa33ac7c7bb47a3964.tar.gz dotfiles-1287cf7167393a17497ae1aa33ac7c7bb47a3964.zip |
Switch .xinitrc to .xsession
This is Debian-specific, but that's the only system with which I'm
presently using X11 anyway.
From Debian's startx(1):
> Note that in the Debian system, what many people traditionally put in
> the .xinitrc file should go in .xsession instead; this permits the
> same X environment to be presented whether startx, xdm, or xinit is
> used to start the X session. All discussion of the .xinitrc file in
> the xinit(1) manual page applies equally well to .xsession. Keep in
> mind that .xinitrc is used only by xinit(1) and completely ignored by
> xdm(1).
Indeed, everything just seems to work a bit better, probably because
problems are more likely to be able to find the user instance of dbus.
Diffstat (limited to 'X/xinitrc.d')
-rw-r--r-- | X/xinitrc.d/background.sh | 7 | ||||
-rw-r--r-- | X/xinitrc.d/browser.sh | 26 | ||||
-rw-r--r-- | X/xinitrc.d/dunst.sh | 3 | ||||
-rw-r--r-- | X/xinitrc.d/redshift.sh | 3 | ||||
-rw-r--r-- | X/xinitrc.d/ssh.sh | 4 | ||||
-rw-r--r-- | X/xinitrc.d/sxhkd.sh | 3 | ||||
-rw-r--r-- | X/xinitrc.d/urxvt.sh | 3 | ||||
-rw-r--r-- | X/xinitrc.d/xkb.sh | 5 |
8 files changed, 0 insertions, 54 deletions
diff --git a/X/xinitrc.d/background.sh b/X/xinitrc.d/background.sh deleted file mode 100644 index 85a40889..00000000 --- a/X/xinitrc.d/background.sh +++ /dev/null @@ -1,7 +0,0 @@ -# If there's a ~/.fehbg, just run that; otherwise, try to apply a random -# background image, if the relevant dir exists -if [ -e "$HOME"/.fehbg ] ; then - sh -- "$HOME"/.fehbg -elif [ -d "${XBACKGROUNDS:-"$HOME"/.xbackgrounds}" ] ; then - xrbg -fi diff --git a/X/xinitrc.d/browser.sh b/X/xinitrc.d/browser.sh deleted file mode 100644 index 024075d6..00000000 --- a/X/xinitrc.d/browser.sh +++ /dev/null @@ -1,26 +0,0 @@ -# Choose a GUI browser with some rough heuristics - -# If LibreWolf or failing that Firefox is available, start by assuming that -if command -v librewolf >/dev/null 2>&1 ; then - BROWSER=librewolf -elif command -v firefox >/dev/null 2>&1 ; then - BROWSER=firefox -fi - -# Consider a switch to Dillo... -if ( - # No output, please - exec >/dev/null 2>&1 - # Don't switch if it's not there - command -v dillo || exit 1 - # Do switch if neither LibreWolf nor Firefox are there - command -v librewolf || command -v firefox || exit 0 - # Do switch if procfs says we have less than 2GB of RAM - awk '$1=="MemTotal:"&&$2<2^20{m++}END{exit!m}' < /proc/meminfo -) ; then - BROWSER=dillo -fi - -# Export our choice of browser, if it isn't empty -[ -n "$BROWSER" ] || return -export BROWSER diff --git a/X/xinitrc.d/dunst.sh b/X/xinitrc.d/dunst.sh deleted file mode 100644 index bddaa1fe..00000000 --- a/X/xinitrc.d/dunst.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Start dunst(1) to display libnotify messages -command -v dunst >/dev/null 2>&1 || return -dunst & diff --git a/X/xinitrc.d/redshift.sh b/X/xinitrc.d/redshift.sh deleted file mode 100644 index d5d58d8a..00000000 --- a/X/xinitrc.d/redshift.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Start redshift(1) -command -v redshift >/dev/null 2>&1 || return -redshift & diff --git a/X/xinitrc.d/ssh.sh b/X/xinitrc.d/ssh.sh deleted file mode 100644 index 005743fe..00000000 --- a/X/xinitrc.d/ssh.sh +++ /dev/null @@ -1,4 +0,0 @@ -# Set SSH_ASKPASS if we can find one -command -v ssh-askpass >/dev/null 2>&1 || return -SSH_ASKPASS=$(command -v ssh-askpass) -export SSH_ASKPASS diff --git a/X/xinitrc.d/sxhkd.sh b/X/xinitrc.d/sxhkd.sh deleted file mode 100644 index 132d8f8a..00000000 --- a/X/xinitrc.d/sxhkd.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Start sxhkd(1) -command -v sxhkd >/dev/null 2>&1 || return -sxhkd & diff --git a/X/xinitrc.d/urxvt.sh b/X/xinitrc.d/urxvt.sh deleted file mode 100644 index a5eb0940..00000000 --- a/X/xinitrc.d/urxvt.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Start urxvtd(1) -command -v urxvtd >/dev/null 2>&1 || return -urxvtd -o -q & diff --git a/X/xinitrc.d/xkb.sh b/X/xinitrc.d/xkb.sh deleted file mode 100644 index a5142398..00000000 --- a/X/xinitrc.d/xkb.sh +++ /dev/null @@ -1,5 +0,0 @@ -# Map Caps Lock as a Ctrl key, use right alt as Compose, kill X server with -# Ctrl+Alt+Backspace -# <https://en.wikipedia.org/wiki/Compose_key#Common_compose_combinations> -command -v setxkbmap >/dev/null 2>&1 || return -setxkbmap -option compose:ralt,ctrl:nocaps,terminate:ctrl_alt_bksp |