summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovki <david@davidovski.xyz>2023-03-16 11:32:48 +0000
committerdavidovki <david@davidovski.xyz>2023-03-16 11:32:48 +0000
commit33fb893a3120325c39539aee94361222659ae04f (patch)
treecf878af2e7fe8abe7fc4e63e1a8f918068d5bd3a
parenta8944ec46d19126c2054f7232a78a1f395c93b1b (diff)
Added slock configuration files
-rwxr-xr-xdeploy.sh4
-rw-r--r--slock/config.h12
-rwxr-xr-xslock/deploy.sh14
3 files changed, 30 insertions, 0 deletions
diff --git a/deploy.sh b/deploy.sh
index 1d80f9d..ba475ae 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -85,6 +85,10 @@ load () {
mkdir -p ~/.urxvt/ext/
cp /tmp/urxvt-resize-font/resize-font ~/.urxvt/ext/
+ cd slock
+ ./deploy.sh
+ cd -
+
echo "Copied configurations!"
else
diff --git a/slock/config.h b/slock/config.h
new file mode 100644
index 0000000..ba25888
--- /dev/null
+++ b/slock/config.h
@@ -0,0 +1,12 @@
+/* user and group to drop privileges to */
+static const char *user = "nobody";
+static const char *group = "nogroup";
+
+static const char *colorname[NUMCOLS] = {
+ [INIT] = "#191919", /* after initialization */
+ [INPUT] = "#282a2e", /* during input */
+ [FAILED] = "#cc6666", /* wrong password */
+};
+
+/* treat a cleared input like a wrong password (color) */
+static const int failonclear = 1;
diff --git a/slock/deploy.sh b/slock/deploy.sh
new file mode 100755
index 0000000..6ee800a
--- /dev/null
+++ b/slock/deploy.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+pkgver=1.5
+
+[ -d "~/.local/src" ]mkdir -p ~/.local/src
+
+curl -o ~/.local/src/slock-$pkgver.tar.gz https://dl.suckless.org/tools/slock-$pkgver.tar.gz
+tar -C ~/.local/src/ -xvf ~/local/src/slock-$pkgver.tar.gz
+
+srcdir=~/.local/src/slock-$pkgver
+ cp config.h $srcdir
+make -C $srcdir
+
+doas make -C $srcdir install PREFIX=/usr