-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Toggle touchpad on/off #3075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Toggle touchpad on/off #3075
Conversation
…se try this on your and if it isn't working then please let me know what were the issue
|
@dhh can you please tell me what is the process of merging it to the main |
|
|
||
| # 1. Define the state file path (using .cache is a good practice) | ||
| export CACHE_DIR="$HOME/.cache" | ||
| export STATUS_FILE="$CACHE_DIR/touchpad.status" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use ~/.local/state/omarchy/ for these kinds of flags.
| enable_touchpad() { | ||
| printf "true" > "$STATUS_FILE" | ||
| hyprctl keyword "device[$TOUCHPAD_NAME]:enabled" "true" | ||
| notify-send "Touchpad Enabled" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 spaces is the default here
| } | ||
|
|
||
| disable_touchpad() { | ||
| printf "false" > "$STATUS_FILE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turn the status file into the toggle, so it's touchpad-disabled.state. And check on presence of file instead of what's in it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually we use ~/.local/state/omarchy/toggles/screensaver-off, so it would be ~/.local/state/omarchy/toggles/touchpad-off.
| bindd = SUPER CTRL, B, Show battery remaining, exec, notify-send " Battery is at $(omarchy-battery-remaining)%" | ||
|
|
||
| # Toggle Touchpad | ||
| bindd = , XF86TouchpadToggle, Toggle Touchpad, exec, omarchy-toggle-touchpad |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most keyboards won't have that mapped. Let's go with Super + Ctrl + P.
for details please see the this issue #3071