-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: configurable timeout for gestures * tests: add timeout duration * fix: bad math * feat: add hold gestures action * tests: add tests for hold gestures * internal: rework CallbackAction to trigger immediately * fixup! internal: rework CallbackAction to trigger immediately * feat: hold gesture emits drag and completed events * refactor: rename * refactor: separate drag gestures from completed ones * tests: separate drag gestures from completed one * feat: add explicit drag event handlers * refactor: rename * feat: handle drag gestures * fix: use exisiting methods for updating workspace swipe * fix: add long press gesture * fix: handle hold gestures * feat: expose function to handle end of drag separately * tests: use updated end of drag function * tests: only handle drag gestures if needed * cleanup * fixup! feat: expose function to handle end of drag separately * fix: handle drag gesture end * dev: add hotreload script * fix: cascade reset calls to child of OnCompleteAction * internal: add onLongPressTimeout() * internal: expose new API for long press timers * feat: impl hold gesture timer * fix: cleanup timer source in dtor * refactor: rename * fix: operator precedence bug * fix: move cursor during dragGestureUpdate * fixup! fix: move cursor during dragGestureUpdate * refactor: rename "hold" to "long press" * chore: update README
- Loading branch information
1 parent
ebc604b
commit 7ccb8d3
Showing
10 changed files
with
579 additions
and
152 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
TMP=/tmp/hyprgrass-testing | ||
helpText=" | ||
usage: $0 FILE | ||
Hot reload a hyprland plugin | ||
Plugins loaded by this script will not be 'cached' (not really but don't worry about it :D). | ||
If a new plugin with the same file name is loaded, the old one is first unloaded. | ||
example: $(basename $0) ./build/libhyprgrass.so | ||
Subsequent calls will automatically unload the plugin as needed" | ||
|
||
error () { | ||
echo "$helpText" | ||
exit 1 | ||
} | ||
|
||
if [ -z "$1" ]; then | ||
error | ||
fi | ||
|
||
if ! [ -f "$1" ]; then | ||
echo "'$1' is not a valid file" | ||
echo '' | ||
error | ||
fi | ||
|
||
baseFileName="$(basename "$1")" | ||
fileHash="$(sha256sum "$1" | cut -d ' ' -f 1)" | ||
pluginTempDir="$TMP/$fileHash" | ||
pluginTempFile="$pluginTempDir/$baseFileName" | ||
|
||
for soPath in $TMP/*/$baseFileName; do | ||
if [ -f "$soPath" ]; then | ||
hyprctl plugin unload "$soPath" | ||
rm -r $(dirname "$soPath") | ||
fi | ||
done | ||
|
||
mkdir -p "$pluginTempDir" | ||
|
||
cp "$1" "$pluginTempDir" | ||
|
||
hyprctl plugin load "$pluginTempFile" | ||
|
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
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
Oops, something went wrong.