This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

2configs/desktops/sway/noctalia: bring workspace to current screen on click

+11 -3
+11 -3
2configs/desktops/sway/noctalia.nix
··· 5 5 ... 6 6 }: 7 7 let 8 - # Patch noctalia-shell to use workspace name instead of number for sway 9 - # Quickshell's activate() sends "workspace number <num>" which fails for named workspaces (num=-1) 8 + sway-focus-workspace = pkgs.writeShellScript "sway-focus-workspace" '' 9 + # Bring a workspace to the currently focused output 10 + ws="$1" 11 + current_output=$(${pkgs.sway}/bin/swaymsg -t get_workspaces | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .output') 12 + ${pkgs.sway}/bin/swaymsg "workspace $ws, move workspace to output $current_output" 13 + ''; 14 + # Patch noctalia-shell for sway: 15 + # - Use workspace name instead of number (activate() sends "workspace number <num>" which fails for named workspaces) 16 + # - Show all workspaces on all screens (globalWorkspaces) 17 + # - Bring workspace to current screen on click instead of jumping to its screen 10 18 noctalia-shell-patched = pkgs.noctalia-shell.overrideAttrs (old: { 11 19 postInstall = (old.postInstall or "") + '' 12 20 substituteInPlace $out/share/noctalia-shell/Services/Compositor/SwayService.qml \ 13 21 --replace-fail 'workspace.handle.activate();' \ 14 - 'Quickshell.execDetached([msgCommand, "workspace", workspace.name]);' \ 22 + 'Quickshell.execDetached(["${sway-focus-workspace}", workspace.name]);' \ 15 23 --replace-fail 'property bool initialized: false' \ 16 24 'property bool globalWorkspaces: true 17 25 property bool initialized: false'