Last active
October 20, 2021 11:45
-
-
Save funatsufumiya/34a9c484cc42c89fee6e55c989a2e938 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ID1=$(cat /proc/bus/input/devices | grep -m 1 -A 4 'Name="Topre' | tail -n 1 | sed -e 's/.*event\([0-9]\+\).*/\1/' | tr -d '\n') | |
ID2=$(cat /proc/bus/input/devices | grep -m 2 -A 4 'Name="Topre' | tail -n 1 | sed -e 's/.*event\([0-9]\+\).*/\1/' | tr -d '\n') | |
/usr/bin/gnome-terminal -e 'bash -c "echo \"input device ids: '$ID1', '$ID2'\"; echo \"shingeta is working (if close, stops)\"; cd /path/to/shingeta-linux-ruby; echo PASSWORD | sudo -S ruby shingeta.rb -e /dev/input/event'$ID1' -E /dev/input/event'$ID2' &> /dev/null"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment