Created
July 3, 2023 20:04
-
-
Save keifgwinn/543d38bf287341ff239926397a5d84fc to your computer and use it in GitHub Desktop.
Toggle Litra
This file contains hidden or 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 | |
# Use 046D/C900 for older models | |
model="046D/C901" | |
# Change to your own path | |
hidapitester="/usr/local/bin/hidapitester" | |
beam="046D/C901" | |
glow="046D/C900" | |
if [[ ! -f ~/litratoggle ]]; then | |
eval "$hidapitester --vidpid $glow --open --length 20 --send-output 0x11,0xff,0x04,0x1c,0x01" && \ | |
eval "$hidapitester --vidpid $beam --open --length 20 --send-output 0x11,0xff,0x04,0x1c,0x01" | |
touch ~/litratoggle | |
else | |
eval "$hidapitester --vidpid $glow --open --length 20 --send-output 0x11,0xff,0x04,0x1c" && \ | |
eval "$hidapitester --vidpid $beam --open --length 20 --send-output 0x11,0xff,0x04,0x1c" | |
rm ~/litratoggle | |
fi Use 046D/C900 for older models | |
model="046D/C901" | |
# Change to your own path | |
hidapitester="/usr/local/bin/hidapitester" | |
beam="046D/C901" | |
glow="046D/C900" | |
if [[ ! -f ~/litratoggle ]]; then | |
eval "$hidapitester --vidpid $glow --open --length 20 --send-output 0x11,0xff,0x04,0x1c,0x01" && \ | |
eval "$hidapitester --vidpid $beam --open --length 20 --send-output 0x11,0xff,0x04,0x1c,0x01" | |
touch ~/litratoggle | |
else | |
eval "$hidapitester --vidpid $glow --open --length 20 --send-output 0x11,0xff,0x04,0x1c" && \ | |
eval "$hidapitester --vidpid $beam --open --length 20 --send-output 0x11,0xff,0x04,0x1c" | |
rm ~/litratoggle | |
fi |
This file contains hidden or 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 | |
if [[ -f ~/litratoggle ]]; then | |
# Use 046D/C900 for older models | |
model="046D/C901" | |
# Change to your own path | |
hidapitester="/usr/local/bin/hidapitester" | |
beam="046D/C901" | |
glow="046D/C900" | |
eval "$hidapitester --vidpid $glow --open --length 20 --send-output 0x11,0xff,0x04,0x1c" && \ | |
eval "$hidapitester --vidpid $beam --open --length 20 --send-output 0x11,0xff,0x04,0x1c" | |
rm ~/litratoggle | |
fi |
This file contains hidden or 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 | |
if [[ ! -f ~/litratoggle ]]; then | |
# Use 046D/C900 for older models | |
model="046D/C901" | |
# Change to your own path | |
hidapitester="/usr/local/bin/hidapitester" | |
beam="046D/C901" | |
glow="046D/C900" | |
eval "$hidapitester --vidpid $glow --open --length 20 --send-output 0x11,0xff,0x04,0x1c,0x01" && \ | |
eval "$hidapitester --vidpid $beam --open --length 20 --send-output 0x11,0xff,0x04,0x1c,0x01" | |
touch ~/litratoggle | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment