aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2022-05-06 17:06:07 +1200
committerTom Ryder <tom@sanctum.geek.nz>2022-05-06 23:54:41 +1200
commit8536c0a17d68e7f94a37866e793ce0d0b8eeb5b9 (patch)
tree7ac7c37afe2861304322c302f625bd1464a85f67
parentRemove keychain target; no longer using it (diff)
downloaddotfiles-8536c0a17d68e7f94a37866e793ce0d0b8eeb5b9.tar.gz
dotfiles-8536c0a17d68e7f94a37866e793ce0d0b8eeb5b9.zip
Lean on Debian alternatives system a bit more
I'll refactor this if I ever need to (i.e. if I end up running X on something other than Debian a lot).
-rw-r--r--bin/xgo.sh2
-rw-r--r--sh/profile.d/browser.sh12
-rw-r--r--sxhkd/sxhkdrc16
-rw-r--r--x/bin/xsession.sh18
4 files changed, 24 insertions, 24 deletions
diff --git a/bin/xgo.sh b/bin/xgo.sh
index 6d6586ef..35c2485f 100644
--- a/bin/xgo.sh
+++ b/bin/xgo.sh
@@ -74,7 +74,7 @@ for url do (
# Open plain text in a terminal view(1)
(text/plain)
# shellcheck disable=SC2016
- exec urxvt -e sh -c 'curl -- "$1" | view -' _ "$url"
+ exec x-terminal-emulator -e sh -c 'curl -- "$1" | view -' _ "$url"
;;
# Otherwise, just pass it to br(1df)
diff --git a/sh/profile.d/browser.sh b/sh/profile.d/browser.sh
index ee94857c..ce18e127 100644
--- a/sh/profile.d/browser.sh
+++ b/sh/profile.d/browser.sh
@@ -1,4 +1,10 @@
-# Set command-line browser to lynx; ~/.xsession will change this to something
-# graphical instead if invoked
-BROWSER=lynx
+# Set command-line browser to Debian's alternatives name www-browser, or
+# failing that, just to `lynx`; ~/.xsession will change this to something
+# graphical instead if invoked.
+#
+if command -v www-browser >/dev/null 2>&1 ; then
+ BROWSER=www-browser
+else
+ BROWSER=lynx
+fi
export BROWSER
diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc
index c277855b..028b73d7 100644
--- a/sxhkd/sxhkdrc
+++ b/sxhkd/sxhkdrc
@@ -1,17 +1,17 @@
super + Return
- urxvtcd
+ x-terminal-emulator
super + control + Return
- urxvtcd -e sh
+ x-terminal-emulator -e sh
super + shift + Return
- urxvtcd -e ksh
+ x-terminal-emulator -e ksh
super + alt + Return
- urxvtcd -e zsh
+ x-terminal-emulator -e zsh
super + b
- br
+ x-www-browser
super + d
dmenu_run
@@ -23,13 +23,13 @@ super + i
gimp
super + m
- urxvtcd -e tm
+ x-terminal-emulator -e tm
super + p
dmp
super + v
- urxvtcd -e "$VISUAL"
+ x-terminal-emulator -e "$VISUAL"
super + shift + s
sleep 0.25 && scrot --freeze --select \
@@ -53,4 +53,4 @@ XF86AudioLowerVolume
amixer -q sset Master 5%- unmute
XF86Calculator
- urxvtcd -e bcq
+ x-terminal-emulator -e bcq
diff --git a/x/bin/xsession.sh b/x/bin/xsession.sh
index 76cbc85b..7a12e5e8 100644
--- a/x/bin/xsession.sh
+++ b/x/bin/xsession.sh
@@ -1,4 +1,4 @@
-# Custom i3wm X session to fit into Debian's way of doing things
+# Custom X session to fit into Debian's way of doing things
# 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
@@ -31,15 +31,8 @@ setxkbmap \
# Set fast mouse acceleration with a natural threshold
xset mouse 5/2 0 &
-# Pick a GUI browser, depending on availability
-if command -v librewolf >/dev/null 2>&1 ; then
- BROWSER=librewolf
-elif command -v firefox >/dev/null 2>&1 ; then
- BROWSER=firefox
-fi
-if [ -n "$BROWSER" ] ; then
- export BROWSER
-fi
+# Update browser, since .profile set this to a curses browser on login
+BROWSER=x-www-browser
# Load all supplementary scripts in ~/.xsession.d
for sh in "$HOME"/.xsession.d/*.sh ; do
@@ -48,5 +41,6 @@ for sh in "$HOME"/.xsession.d/*.sh ; do
done
unset -v sh
-# Start i3 window manager now that everything's ready
-exec i3
+# Start Debian's configured window manager now that everything's ready; at the
+# time of writing, this is normally i3wm
+exec x-session-manager