Skip to content

Commit

Permalink
#134 added dbus environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
ldrahnik committed Jul 22, 2023
1 parent 8840e1f commit e46bc2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions asus_touchpad.X11.service
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ TimeoutSec=5
Restart=on-failure
Environment="DISPLAY=$XDISPLAY"
Environment="XAUTHORITY=$XAUTHORITY"
Environment="DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS"

[Install]
WantedBy=graphical.target
8 changes: 6 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,13 @@ if [ "$wayland_or_x11" = "x11" ]; then

xauthority=$(/usr/bin/xauth info | grep Authority | awk '{print $3}')
xdisplay=$(echo $DISPLAY)
dbus=$(echo "unix:path=/run/user/1000/bus")

echo "DISPLAY: $xdisplay"
echo "AUTHORITY: $xauthority"
cat asus_touchpad.X11.service | CONFIG_FILE_DIR="$CONFIG_FILE_DIR/" LAYOUT=$model XDISPLAY=$xdisplay XAUTHORITY=$xauthority envsubst '$LAYOUT $XAUTHORITY $XDISPLAY $CONFIG_FILE_DIR' > /etc/systemd/system/[email protected]
echo "XAUTHORITY: $xauthority"
echo "DBUS_SESSION_BUS_ADDRESS: $dbus"

cat asus_touchpad.X11.service | CONFIG_FILE_DIR="$CONFIG_FILE_DIR/" LAYOUT=$model XDISPLAY=$xdisplay XAUTHORITY=$xauthority DBUS_SESSION_BUS_ADDRESS=$dbus envsubst '$LAYOUT $XAUTHORITY $XDISPLAY $CONFIG_FILE_DIR $DBUS_SESSION_BUS_ADDRESS' > /etc/systemd/system/[email protected]
elif [ "$wayland_or_x11" = "wayland" ]; then
echo "Wayland is detected, unfortunatelly you will not be able use feature: Disabling Touchpad (e.g. Fn+special key) disables NumberPad aswell, at this moment is supported only X11"

Expand Down

0 comments on commit e46bc2a

Please sign in to comment.