aboutsummaryrefslogtreecommitdiffstats
path: root/ellipsis.sh
diff options
context:
space:
mode:
authorGravatar Tom Willemse2020-04-16 22:24:15 -0700
committerGravatar Tom Willemse2020-04-16 22:24:15 -0700
commitd33f451238cd9d6be08a105f8e5aae7feb310c63 (patch)
tree672512cf73680a69ac90cf415cd635136f994f33 /ellipsis.sh
parent8c5f9a0478de4a8e7cb8507e6a68e747c0c0694b (diff)
downloadstumpwm-d33f451238cd9d6be08a105f8e5aae7feb310c63.tar.gz
stumpwm-d33f451238cd9d6be08a105f8e5aae7feb310c63.zip
Make sure stumpwm-contrib is installed
Diffstat (limited to 'ellipsis.sh')
-rw-r--r--ellipsis.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/ellipsis.sh b/ellipsis.sh
index b4daede..02bdcc7 100644
--- a/ellipsis.sh
+++ b/ellipsis.sh
@@ -1,13 +1,26 @@
#!/usr/bin/env bash
+stump_modules="${HOME}/.stumpwm.d/modules"
+
ensure_used_programs() {
if ! util.cmd_exists "i3lock"; then
echo "Can't find i3lock, screenlocking won't work." >&2
fi
}
+ensure_modules_installed() {
+ if ! test -d "$stump_modules"; then
+ echo "Downloading stumpwm-contrib"
+
+ git.clone git://github.com/stumpwm/stumpwm-contrib.git "$stump_modules"
+ else
+ echo "Modules already installed"
+ fi
+}
+
pkg.install() {
ensure_used_programs
+ ensure_modules_used
}
pkg.pull() {
@@ -16,4 +29,9 @@ pkg.pull() {
pkg.reinstall() {
ensure_used_programs
+ ensure_modules_used
+}
+
+pkg.uninstall() {
+ rm -r "$stump_modules"
}