Skip to content

Conversation

@h4636oh
Copy link

@h4636oh h4636oh commented Nov 2, 2025

for details please see the this issue #3071

h4636oh and others added 2 commits November 2, 2025 19:22
…se try this on your and if it isn't working then please let me know what were the issue
@dhh dhh changed the title I have added the script which should work on all the laptops but please try this on your and if it isn't working then please let me know what were the issue Toggle touchpad on/off Nov 2, 2025
@h4636oh
Copy link
Author

h4636oh commented Nov 4, 2025

@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"
Copy link
Member

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"
Copy link
Member

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"
Copy link
Member

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.

Copy link
Member

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants