diff options
Diffstat (limited to 'xbindkeys')
l--------- | xbindkeys/log/run | 1 | ||||
-rwxr-xr-x | xbindkeys/run | 23 |
2 files changed, 24 insertions, 0 deletions
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 |