hyprexpo: use touchDown for touchscreen workspace selection (#245)

* flake.lock: update

* hyprexpo: use touchDown for touchscreen workspace selection
This commit is contained in:
Mathis H. 2024-11-14 16:28:54 -05:00 committed by GitHub
parent 844eb98250
commit 344a69db96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 186 additions and 35 deletions

View file

@ -1,5 +1,76 @@
{ {
"nodes": { "nodes": {
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1731496216,
"narHash": "sha256-nlQrNN+tmJ+iP6Ck/czwZI0Hxz3oNvUyGkVruxJwgwA=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "3b00e96f90cb0040de6d88ad99bf5f4d443f0c59",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hyprcursor": { "hyprcursor": {
"inputs": { "inputs": {
"hyprlang": [ "hyprlang": [
@ -16,11 +87,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717181720, "lastModified": 1728669738,
"narHash": "sha256-yv+QZWsusu/NWjydkxixHC2g+tIJ9v+xkE2EiVpJj6g=", "narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprcursor", "repo": "hyprcursor",
"rev": "9e27a2c2ceb1e0b85bd55b0afefad196056fe87c", "rev": "0264e698149fcb857a66a53018157b41f8d97bb0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -31,48 +102,48 @@
}, },
"hyprland": { "hyprland": {
"inputs": { "inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor", "hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang", "hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner", "hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks",
"systems": "systems", "systems": "systems",
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1717970802, "lastModified": 1731526492,
"narHash": "sha256-kFnaAmte/N1mrbHEQyrwDu9+laZzVAi4N2nQodCNfgg=", "narHash": "sha256-tzWLCOcIxvJvxB25kC0Q371pc5wBBzbzwSlSNc4L8gw=",
"ref": "refs/heads/main", "owner": "hyprwm",
"rev": "1423707dbefc0329e80895451903a77ab684f7ea", "repo": "Hyprland",
"revCount": 4789, "rev": "3fb47372b79265ebdabeeefdad10359d5b18377a",
"submodules": true, "type": "github"
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
}, },
"original": { "original": {
"submodules": true, "owner": "hyprwm",
"type": "git", "repo": "Hyprland",
"url": "https://github.com/hyprwm/Hyprland" "type": "github"
} }
}, },
"hyprland-protocols": { "hyprland-protocols": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"xdph",
"nixpkgs" "nixpkgs"
], ],
"systems": [ "systems": [
"hyprland", "hyprland",
"xdph",
"systems" "systems"
] ]
}, },
"locked": { "locked": {
"lastModified": 1691753796, "lastModified": 1728345020,
"narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-protocols", "repo": "hyprland-protocols",
"rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", "rev": "a7c183800e74f337753de186522b9017a07a8cee",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -83,6 +154,10 @@
}, },
"hyprlang": { "hyprlang": {
"inputs": { "inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"nixpkgs" "nixpkgs"
@ -93,11 +168,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1716473782, "lastModified": 1728168612,
"narHash": "sha256-+qLn4lsHU6iL3+HTo1gTQ1tWzet8K9h+IfVemzEQZj8=", "narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "87d5d984109c839482b88b4795db073eb9ed446f", "rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -106,6 +181,31 @@
"type": "github" "type": "github"
} }
}, },
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1731518387,
"narHash": "sha256-aZZw1ZvTMLkcA6udlvkA3hrCkuipoWLy8s/JNnIclxY=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "315fba5d21d87ddb756d4bebdb49f99d86b0ffe8",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": { "hyprwayland-scanner": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -118,11 +218,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1717784906, "lastModified": 1726874836,
"narHash": "sha256-YxmfxHfWed1fosaa7fC1u7XoKp1anEZU+7Lh/ojRKoM=", "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwayland-scanner", "repo": "hyprwayland-scanner",
"rev": "0f30f9eca6e404130988554accbb64d1c9ec877d", "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -133,11 +233,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1717602782, "lastModified": 1731139594,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=", "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6", "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -147,6 +247,46 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": {
"locked": {
"lastModified": 1730741070,
"narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d063c1dd113c91ab27959ba540c0d9753409edf3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1731363552,
"narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"hyprland": "hyprland", "hyprland": "hyprland",
@ -177,11 +317,22 @@
}, },
"xdph": { "xdph": {
"inputs": { "inputs": {
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [ "hyprlang": [
"hyprland", "hyprland",
"hyprlang" "hyprlang"
], ],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"nixpkgs" "nixpkgs"
@ -192,11 +343,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1716290197, "lastModified": 1730743262,
"narHash": "sha256-1u9Exrc7yx9qtES2brDh7/DDZ8w8ap1nboIOAtCgeuM=", "narHash": "sha256-iTLqj3lU8kFehPm5tXpctzkD274t/k1nwSSq3qCWXeg=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "91e48d6acd8a5a611d26f925e51559ab743bc438", "rev": "09b23cef06fe248e61cec8862c04b9bcb62f4b6d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -2,7 +2,7 @@
description = "Official Hyprland Plugins"; description = "Official Hyprland Plugins";
inputs = { inputs = {
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; hyprland.url = "github:hyprwm/Hyprland";
nixpkgs.follows = "hyprland/nixpkgs"; nixpkgs.follows = "hyprland/nixpkgs";
systems.follows = "hyprland/systems"; systems.follows = "hyprland/systems";
}; };

View file

@ -205,7 +205,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
touchMoveHook = g_pHookSystem->hookDynamic("touchMove", onCursorMove); touchMoveHook = g_pHookSystem->hookDynamic("touchMove", onCursorMove);
mouseButtonHook = g_pHookSystem->hookDynamic("mouseButton", onCursorSelect); mouseButtonHook = g_pHookSystem->hookDynamic("mouseButton", onCursorSelect);
touchUpHook = g_pHookSystem->hookDynamic("touchUp", onCursorSelect); touchDownHook = g_pHookSystem->hookDynamic("touchDown", onCursorSelect);
} }
void COverview::redrawID(int id, bool forcelowres) { void COverview::redrawID(int id, bool forcelowres) {

View file

@ -71,7 +71,7 @@ class COverview {
SP<HOOK_CALLBACK_FN> mouseMoveHook; SP<HOOK_CALLBACK_FN> mouseMoveHook;
SP<HOOK_CALLBACK_FN> mouseButtonHook; SP<HOOK_CALLBACK_FN> mouseButtonHook;
SP<HOOK_CALLBACK_FN> touchMoveHook; SP<HOOK_CALLBACK_FN> touchMoveHook;
SP<HOOK_CALLBACK_FN> touchUpHook; SP<HOOK_CALLBACK_FN> touchDownHook;
bool swipe = false; bool swipe = false;
bool swipeWasCommenced = false; bool swipeWasCommenced = false;