From 611f5c069ec67fdb032e9b7d77502d96368dc4a1 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Fri, 8 Jan 2021 13:16:38 +0100 Subject: Add xbindkeys service --- xbindkeys/log/run | 1 + xbindkeys/run | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 120000 xbindkeys/log/run create mode 100755 xbindkeys/run diff --git a/xbindkeys/log/run b/xbindkeys/log/run new file mode 120000 index 0000000..04b2c93 --- /dev/null +++ b/xbindkeys/log/run @@ -0,0 +1 @@ +../../.log/run \ No newline at end of file diff --git a/xbindkeys/run b/xbindkeys/run new file mode 100755 index 0000000..a280cee --- /dev/null +++ b/xbindkeys/run @@ -0,0 +1,23 @@ +#!/bin/sh + +set -x + +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 + +exec s6-envdir env xbindkeys -n -v -- cgit v1.2.3