summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillermo Ramos2021-02-03 11:18:04 +0100
committerGuillermo Ramos2021-02-03 11:18:04 +0100
commitce196b3436c74cbbffb68c98b8743c12e421930a (patch)
treeed167866804997b127fee01325cbc1a6fc67fc08
parent14c129b2c307a57d348b6457ffc07cadda83c56f (diff)
downloads6-services-ce196b3436c74cbbffb68c98b8743c12e421930a.tar.gz
sxhkd
-rwxr-xr-xprotonmail-bridge/run2
l---------sxhkd/log/run1
-rwxr-xr-xsxhkd/run24
-rwxr-xr-xxbindkeys/run5
4 files changed, 30 insertions, 2 deletions
diff --git a/protonmail-bridge/run b/protonmail-bridge/run
index c9ba4b1..3728961 100755
--- a/protonmail-bridge/run
+++ b/protonmail-bridge/run
@@ -1,2 +1,2 @@
#!/bin/sh
-exec /usr/bin/protonmail-bridge --noninteractive
+exec /usr/bin/protonmail-bridge-cli --noninteractive
diff --git a/sxhkd/log/run b/sxhkd/log/run
new file mode 120000
index 0000000..04b2c93
--- /dev/null
+++ b/sxhkd/log/run
@@ -0,0 +1 @@
+../../.log/run \ No newline at end of file
diff --git a/sxhkd/run b/sxhkd/run
new file mode 100755
index 0000000..82504bb
--- /dev/null
+++ b/sxhkd/run
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+xdg_runtime_dir=$(id -ur | sed 's:^:/run/user/:')
+test -d "$xdg_runtime_dir" || exit -1;
+
+mkdir -p env
+
+echo "$xdg_runtime_dir" \
+ > env/XDG_RUNTIME_DIR
+
+ls /tmp/.X11-unix | tr 'X' ':' | head -n1 \
+ > env/DISPLAY
+
+user_home=$(id -urn | xargs getent passwd | cut -d: -f6)
+local_bin="$user_home/.local/bin"
+path="/bin:/usr/bin"
+test -d "$local_bin" && path="$path:$local_bin"
+echo "$path" \
+ > env/PATH
+
+env_full_path=$PWD/env
+
+cd $HOME
+exec s6-envdir $env_full_path sxhkd
diff --git a/xbindkeys/run b/xbindkeys/run
index 6e5b6e9..aefda95 100755
--- a/xbindkeys/run
+++ b/xbindkeys/run
@@ -18,4 +18,7 @@ test -d "$local_bin" && path="$path:$local_bin"
echo "$path" \
> env/PATH
-exec s6-envdir env xbindkeys -n -v
+env_full_path=$PWD/env
+
+cd $HOME
+exec s6-envdir $env_full_path xbindkeys -n -v