Skip to content

Commit

Permalink
fs/install: drop requirement of WLR_DISP
Browse files Browse the repository at this point in the history
  • Loading branch information
Maccraft123 committed Nov 25, 2024
1 parent 604494f commit fd609e1
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions fs/install
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,22 @@ if [ "$FS_HAS_OOBE" = "false" ]; then
1) MODKEY=Mod4 ;;
2) MODKEY=Mod1 ;;
esac


# add sway config shim to cover up hardware differences between cadmium devices and whatever sway thinks is default
echo "input type:touch map_to_output $WLR_DISP" > $DESTDIR/etc/sway/cadmium-shim.conf
DSI_PATH="$(realpath /sys/class/drm/card*-DSI*)"
EDP_PATH="$(realpath /sys/class/drm/card*-eDP*)"
if [ -e "$DSI_PATH" ]; then
DISP="$DSI_PATH"
elif [ -e "$EDP_PATH" ]; then
DISP="$EDP_PATH"
else
echo "Failed finding the internal display"
echo "/sys/class/drm/:"
ls /sys/class/drm
exit 1
fi
DISP="$(basename $DISP | sed 's/card.-//')"

echo "input type:touch map_to_output $DISP" > $DESTDIR/etc/sway/cadmium-shim.conf
echo "input type:touchpad click_method clickfinger" >> $DESTDIR/etc/sway/cadmium-shim.conf

# and also keybinds
Expand Down

0 comments on commit fd609e1

Please sign in to comment.