aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2020-04-17 10:46:56 +0200
committerPatrick Spek <p.spek@tyil.nl>2021-08-14 11:59:36 +0200
commitef8424e69ba569b0cfcecdd28ac1d6d60e30c1ce (patch)
treea1cc039ee3c71186276c2b0299df6cb6bf7201ec
parenta82164a278da4e81929749d7c58577feebf7b50e (diff)
Add xinit config
-rw-r--r--.config/xinit.d/awesome.rc6
-rw-r--r--.config/xinit.d/ob.rc8
-rwxr-xr-x.local/bin/x30
3 files changed, 44 insertions, 0 deletions
diff --git a/.config/xinit.d/awesome.rc b/.config/xinit.d/awesome.rc
new file mode 100644
index 0000000..e3723db
--- /dev/null
+++ b/.config/xinit.d/awesome.rc
@@ -0,0 +1,6 @@
+sxhkd &
+chwp &
+
+xcompmgr &
+
+exec dbus-launch --exit-with-session awesome
diff --git a/.config/xinit.d/ob.rc b/.config/xinit.d/ob.rc
new file mode 100644
index 0000000..36c86d7
--- /dev/null
+++ b/.config/xinit.d/ob.rc
@@ -0,0 +1,8 @@
+sxhkd &
+chwp &
+
+xcompmgr &
+
+tint2 &
+
+exec dbus-launch --exit-with-session openbox-session
diff --git a/.local/bin/x b/.local/bin/x
new file mode 100755
index 0000000..9c6e9f6
--- /dev/null
+++ b/.local/bin/x
@@ -0,0 +1,30 @@
+#! /usr/bin/env sh
+
+cd || exit 3
+
+# If an argument is given, check if we have an xinitrc for that
+if [ -n "$1" ]
+then
+ if [ ! -f "$HOME/.config/xinit.d/$1.rc" ]
+ then
+ printf "%s\n" "no valid config for $1" >&2
+ exit 1
+ fi
+
+ # Remove the old config
+ rm -f -- "$HOME/.xinitrc"
+
+ # Create the new config
+ cat -- "$HOME/.config/xinit.d/xinitrc" "$HOME/.config/xinit.d/$1.rc" \
+ > "$HOME/.xinitrc"
+fi
+
+# Make sure the xinitrc exists, just in case
+if [ ! -f "$HOME/.xinitrc" ]
+then
+ printf "%s\n" "no xinitrc" >&2
+ exit 2
+fi
+
+# start the X session
+startx