mpv: uosc: remove package pin

this is not thoroughly tested; may well be partly broken on moby
This commit is contained in:
2024-09-19 10:40:02 +00:00
parent b034196ce4
commit 03ebb3de28

View File

@@ -42,21 +42,6 @@
let let
cfg = config.sane.programs.mpv; cfg = config.sane.programs.mpv;
uosc = pkgs.mpvScripts.uosc.overrideAttrs (upstream: { uosc = pkgs.mpvScripts.uosc.overrideAttrs (upstream: {
version = "5.2.0-unstable-2024-03-13";
src = lib.warnIf (lib.versionOlder "5.2.0" upstream.version) "uosc outdated; remove patch?" pkgs.fetchFromGitHub {
owner = "tomasklaen";
repo = "uosc";
rev = "6fa34c31d0a5290dee83282205768d15111df7d8";
hash = "sha256-qxyNZHmH33bKRp4heFSC+RtvSApIfbVFt4otfS351nE=";
};
# src = pkgs.fetchFromGitea {
# domain = "git.uninsane.org";
# owner = "colin";
# repo = "uosc";
# rev = "dev-sane-5.2.0";
# hash = "sha256-lpqk4nnCxDZr/Y7/seM4VyR30fVrDAT4VP7C8n88lvA=";
# };
postPatch = (upstream.postPatch or "") + '' postPatch = (upstream.postPatch or "") + ''
### patch so touch controls work well with sway 1.9+ ### patch so touch controls work well with sway 1.9+
### in particular, "mouse.hover" is *always* false for touch events (i guess this is a bug in mpv?) ### in particular, "mouse.hover" is *always* false for touch events (i guess this is a bug in mpv?)
@@ -75,15 +60,13 @@ let
cursor:move(mpos.x, mpos.y) cursor:move(mpos.x, mpos.y)
cursor.hover_raw = mpos.hover" cursor.hover_raw = mpos.hover"
# 3. explicitly fire a cursor:leave on touch release, so that all zones are deactivated (and control visibility goes back to default state) # 3. explicitly fire a cursor:leave on touch release, so that all zones are deactivated (and control visibility goes back to default state)
substituteInPlace src/uosc/lib/cursor.lua \ cat <<EOF >> src/uosc/main.lua
--replace-fail \ cursor:on('primary_up', function(...)
"cursor:create_handler('primary_up')" \ if not cursor.hover_raw then
"function(...) cursor:leave()
cursor:trigger('primary_up', ...) end
if not cursor.hover_raw then end)
cursor:leave() EOF
end
end"
# 4. sometimes we get a touch movement shortly AFTER touch is released: # 4. sometimes we get a touch movement shortly AFTER touch is released:
# detect that and ignore it # detect that and ignore it
substituteInPlace src/uosc/lib/cursor.lua \ substituteInPlace src/uosc/lib/cursor.lua \
@@ -122,8 +105,8 @@ let
# tweak the top-bar "maximize" button to actually act as a "fullscreen" button. # tweak the top-bar "maximize" button to actually act as a "fullscreen" button.
substituteInPlace src/uosc/elements/TopBar.lua \ substituteInPlace src/uosc/elements/TopBar.lua \
--replace-fail \ --replace-fail \
'get_maximized_command,' \ "mp.command(state.fullormaxed and 'set fullscreen no;set window-maximized no' or 'set window-maximized yes')" \
'"cycle fullscreen",' "mp.command('cycle fullscreen')"
''; '';
}); });
# visualizer = pkgs.mpvScripts.visualizer.overrideAttrs (upstream: { # visualizer = pkgs.mpvScripts.visualizer.overrideAttrs (upstream: {