From 74aa6b02ff4bd48aaee4da461a16c4cbaaa0ca7e Mon Sep 17 00:00:00 2001 From: Nikhil Singh Date: Mon, 4 Sep 2023 20:33:41 +0530 Subject: [PATCH] Fix window being hidden behind the floating windows (#55) This commit fixes window is hidden behind the floating windows when reterivied from the scratchpad Also formatts the code with shfmt --- scratchpad/scratchpad | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scratchpad/scratchpad b/scratchpad/scratchpad index 386bd55..0c21ed9 100755 --- a/scratchpad/scratchpad +++ b/scratchpad/scratchpad @@ -95,7 +95,7 @@ getBack() { _ifs="$IFS" IFS=$'\n'$'\n' - if pgrep "${_menu_cmd%% *}" >/dev/null; then exit; fi # Menu running already? → exit + if pgrep "${_menu_cmd%% *}" >/dev/null; then exit; fi # Menu running already? → exit _current_workspace="$(hyprctl monitors -j | jq '.[] | select(.focused==true)' | jq -j '.activeWorkspace.name')" @@ -125,6 +125,10 @@ getBack() { [ -z "$_selected_client" ] && _selected_client="$(echo "${_clients_on_spad[*]}" | eval "${_menu_cmd[*]}")" _address="$(echo "$_selected_client" | awk '{print $NF}')" hyprctl dispatch movetoworkspace "$_current_workspace,address:$_address" + hyprctl dispatch focuswindow "address:$_address" + [ "$(hyprctl activewindow -j | jq '.floating')" = true ] && { + hyprctl dispatch bringactivetotop none + } IFS="$_ifs" }