From e4e5df80f10ca4111295daf9a66bdd7c6b126b68 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 28 Aug 2023 09:26:30 +0000 Subject: [PATCH] sxmo-utils: factor out commons and create a package for sxmo-utils-latest --- .../sxmo-utils/0007-workspace-wrapping.patch | 58 ---- pkgs/additional/sxmo-utils/common.nix | 174 +++++++++++ pkgs/additional/sxmo-utils/default.nix | 292 +++++------------- pkgs/default.nix | 4 +- 4 files changed, 250 insertions(+), 278 deletions(-) delete mode 100644 pkgs/additional/sxmo-utils/0007-workspace-wrapping.patch create mode 100644 pkgs/additional/sxmo-utils/common.nix diff --git a/pkgs/additional/sxmo-utils/0007-workspace-wrapping.patch b/pkgs/additional/sxmo-utils/0007-workspace-wrapping.patch deleted file mode 100644 index 0935ce6c..00000000 --- a/pkgs/additional/sxmo-utils/0007-workspace-wrapping.patch +++ /dev/null @@ -1,58 +0,0 @@ -commit bf0057011777b91ef5af005fb4e984b4b9b71c7b -Author: Colin -Date: 2023-07-15 21:35:45 +0000 - - sxmo_wmmenu: respect SXMO_WORKSPACE_WRAPPING - - sxmo_wm.sh uses the `SXMO_WORKSPACE_WRAPPING` variable to control - relative movements. for example, set this to "5" and then the "Next - Workspace" option in the switch menu will cycle WS 1 -> 2 ... -> 5 -> 1. - same for one- and two-finger left/right swipe to switch/move workspaces. - - however, absolute movements (via the move menu) only allowed moving to - WS 1-4. a user with non-default `SXMO_WORKSPACE_WRAPPING` could move a - window from WS 5 to WS 4 with this menu, but not from WS 4 back to WS 5. - this patch brings consistency by using `SXMO_WORKSPACE_WRAPPING` - anywhere we would otherwise assume the number of possible workspaces. - -diff --git a/scripts/core/sxmo_wmmenu.sh b/scripts/core/sxmo_wmmenu.sh -index 3d40b31..d3c1db6 100755 ---- a/scripts/core/sxmo_wmmenu.sh -+++ b/scripts/core/sxmo_wmmenu.sh -@@ -12,6 +12,12 @@ - - set -e - -+_movetowssubmenu() { -+ for ws in $(seq "${SXMO_WORKSPACE_WRAPPING:-4}"); do -+ printf "%s Move to WS %s\n" "$ws" "$ws" -+ done -+} -+ - # A menu which allows to move windows or toggle floating. - swaymovemenu() { - CHOICES="$(cat <