aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-30 21:27:55 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-30 21:27:55 +1200
commita8f5866ed977325532998e800401057c8f767ac6 (patch)
tree63e772fd89f5fb240d4808beb86c2e01cfd97aa2 /sh
parentAdd an idea (diff)
downloaddotfiles-a8f5866ed977325532998e800401057c8f767ac6.tar.gz
dotfiles-a8f5866ed977325532998e800401057c8f767ac6.zip
Add x()
Diffstat (limited to 'sh')
-rw-r--r--sh/shrc.d/x.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/sh/shrc.d/x.sh b/sh/shrc.d/x.sh
new file mode 100644
index 00000000..ed921c68
--- /dev/null
+++ b/sh/shrc.d/x.sh
@@ -0,0 +1,7 @@
+# Most systems won't have X, so we'll only define this if we have startx(1)
+command -v startx >/dev/null 2>&1 || return
+
+# Quick one-key command to launch an X session
+x() {
+ exec startx "$@"
+}