aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-08-13 23:34:39 +1200
committerTom Ryder <tom@sanctum.geek.nz>2022-08-13 23:34:39 +1200
commit3d4a6e428381b1062776335aad28a21ac63e3fe9 (patch)
tree7778122426b92df4413d9ae83eab9a44217fd1df
parentMerge branch 'release/v12.20.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-12.21.0.tar.gz (sig)
dotfiles-12.21.0.zip
Merge branch 'release/v12.21.0'v12.21.0
* release/v12.21.0: Refactor X startup to accomodate different methods Adjust power management settings Remove loading ~/.xprofile.d scripts Correct xterm color name Add install-init target to detect systemd Set SYSTEMD_EDITOR as part of install-systemd Add starting unclutter to .xsession Remove unnecessary quoting in tmux config
-rw-r--r--Makefile9
-rw-r--r--VERSION4
-rw-r--r--systemd/profile.d/systemd.sh2
-rw-r--r--tmux/tmux.conf2
-rw-r--r--x/Xresources.d/XTerm2
-rw-r--r--x/xprofile15
-rw-r--r--x/xsession.sh51
-rw-r--r--x/xsessionrc6
8 files changed, 58 insertions, 33 deletions
diff --git a/Makefile b/Makefile
index 4cea49d8..16e51e4a 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@
install-git \
install-gnupg \
install-i3 \
+ install-init \
install-ksh \
install-less \
install-login-shell \
@@ -367,6 +368,7 @@ install: install-bin \
install-ex \
install-git \
install-gnupg \
+ install-init \
install-less \
install-login-shell \
install-man \
@@ -457,6 +459,9 @@ install-i3: install-x
mkdir -p -- $(XDG_CONFIG_HOME)/i3
cp -p -- i3/* $(XDG_CONFIG_HOME)/i3
+install-init:
+ if test -d /run/systemd/system ; then make install-systemd ; fi
+
install-less: less/less
mkdir -p -- $(HOME)/.profile.d
cp -p -- less/profile.d/*.sh $(HOME)/.profile.d
@@ -580,7 +585,8 @@ install-sxhkd: install-scrot install-x
cp -p -- sxhkd/sxhkdrc $(XDG_CONFIG_HOME)/sxhkd
cp -p -- sxhkd/xsession.d/* $(HOME)/.xsession.d
-install-systemd:
+install-systemd: install-sh
+ cp -p -- systemd/profile.d/*.sh $(HOME)/.profile.d
mkdir -p -- $(XDG_DATA_HOME)/systemd/user
cp -p -- systemd/user/*.service \
$(XDG_DATA_HOME)/systemd/user
@@ -668,6 +674,7 @@ install-x: x/xsession check-x install-logrotate install-sh
$(XDG_CONFIG_HOME)/log/xsession
cp -p -- x/xprofile $(HOME)/.xprofile
cp -p -- x/xsession $(HOME)/.xsession
+ cp -p -- x/xsessionrc $(HOME)/.xsessionrc
cp -p -- x/Xresources $(HOME)/.Xresources
cp -p -- x/Xresources.d/* $(HOME)/.Xresources.d
cp -p -- x/logrotate/config.d/* $(XDG_CONFIG_HOME)/logrotate/config.d
diff --git a/VERSION b/VERSION
index 0a3a97a8..a28d9aa4 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v12.20.0
-Tue, 09 Aug 2022 07:48:02 +0000
+tejr dotfiles v12.21.0
+Sat, 13 Aug 2022 11:34:34 +0000
diff --git a/systemd/profile.d/systemd.sh b/systemd/profile.d/systemd.sh
new file mode 100644
index 00000000..1f305f65
--- /dev/null
+++ b/systemd/profile.d/systemd.sh
@@ -0,0 +1,2 @@
+# Use $VISUAL for editing systemd unit files, not $EDITOR
+export SYSTEMD_EDITOR=$VISUAL
diff --git a/tmux/tmux.conf b/tmux/tmux.conf
index 053921b3..f6109afd 100644
--- a/tmux/tmux.conf
+++ b/tmux/tmux.conf
@@ -19,7 +19,7 @@ bind-key C-a last-window
# Quick ways to kill single windows and the whole server
bind-key '/' confirm-before 'kill-window'
-bind-key "\\" confirm-before 'kill-server'
+bind-key '\' confirm-before 'kill-server'
# Slightly more intuitive way to split windows
bind-key '_' split-window -v
diff --git a/x/Xresources.d/XTerm b/x/Xresources.d/XTerm
index f991ec91..706abd87 100644
--- a/x/Xresources.d/XTerm
+++ b/x/Xresources.d/XTerm
@@ -21,4 +21,4 @@ XTerm.vt100.color11: #FCE94F
XTerm.vt100.color12: #729FCF
XTerm.vt100.color13: #AD7FA8
XTerm.vt100.color14: #34E2E2
-XTerm.vt101.color15: #EEEEEC
+XTerm.vt100.color15: #EEEEEC
diff --git a/x/xprofile b/x/xprofile
index 454700ff..1750c70b 100644
--- a/x/xprofile
+++ b/x/xprofile
@@ -1,12 +1,3 @@
-# Environment variables common to any X session
-
-# Update browser, since .profile set this to a curses browser on login
-# shellcheck disable=SC2034
-BROWSER=x-www-browser
-
-# Load all supplementary scripts in ~/.xprofile.d
-for sh in "$HOME"/.xprofile.d/*.sh ; do
- [ -e "$sh" ] || continue
- . "$sh"
-done
-unset -v sh
+# Read ~/.profile to set up environment when starting X with a display manager
+# like LightDM, since we didn't have a TTY login arrange that already
+. "$HOME"/.profile
diff --git a/x/xsession.sh b/x/xsession.sh
index 8f8ca25f..e0552315 100644
--- a/x/xsession.sh
+++ b/x/xsession.sh
@@ -1,8 +1,20 @@
-# Custom X session to fit into Debian's way of doing things
-
-# Load common environment variables
-# shellcheck disable=SC1091
-. "$HOME"/.xprofile
+#
+# Custom i3wm X session to fit into Debian's way of doing things, for use with
+# startx(1) or xinit(1). From Debian's `man 1 startx` (xinit dpkg 1.4.0-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.
+#
+# This turns out to be important for having the X session wrappers in /etc/X11
+# on Debian-derived systems do things like dbus daemon and accessibility setup.
+#
+# At the time of writing, none of my machines running X are using anything
+# other than the Debian-derived X startup script layout, so we'll just conform
+# to that unless and until I actually need to abstract this.
+#
# Monitor and wallpaper setup is very machine-specific, and isn't versioned in
# here. Neither xrandr(1) nor xwallpaper(1) have config files, so we fake it
@@ -20,22 +32,30 @@ xargs xwallpaper \
# Set a few X user preferences:
#
# - No bell
-# - No power management
+# - Power management on, but start with no timeouts
# - Quick curved mouse acceleration
# - No screen saver
#
xset \
b off \
- -dpms \
+ dpms 0 0 0 \
mouse 5/2 0 \
s off
-# Start a couple of daemons if we can; it's OK if they don't exist, but log
-# the failed attempt to start them to the errors file.
-## compton: Display compositor
-compton -b &
-## dunst: Message display (libnotify)
-dunst &
+# Start a few daemons if we can; it's OK if any of these don't exist, but we'll
+# log the failed attempt to start them to the errors file, as a hint that
+# I might want to install them.
+#
+(
+ # Display compositor
+ compton
+ # Message display (libnotify)
+ dunst
+ # PulseAudio system tray tool
+ pasystray
+ # Hide mouse after inactivity
+ unclutter
+) &
# Load all supplementary scripts in ~/.xsession.d
for sh in "$HOME"/.xsession.d/*.sh ; do
@@ -44,6 +64,5 @@ for sh in "$HOME"/.xsession.d/*.sh ; do
done
unset -v sh
-# Start Debian's configured window manager now that everything's ready; at the
-# time of writing, this is normally i3wm
-exec x-window-manager
+# Become an i3 window manager process, having set everything else up
+exec i3
diff --git a/x/xsessionrc b/x/xsessionrc
new file mode 100644
index 00000000..48f2a725
--- /dev/null
+++ b/x/xsessionrc
@@ -0,0 +1,6 @@
+# X startup commands go in here if they should run on every X session, whether
+# classic `startx` or a modern DE like LightDM
+
+# Update BROWSER, since .profile has already set this to a curses browser
+# shellcheck disable=SC2034
+BROWSER=x-www-browser