From 0bdcdf0ae0850b83000feebcb7e9aa54e65b2f13 Mon Sep 17 00:00:00 2001 From: Nikhil Singh Date: Wed, 30 Aug 2023 02:47:40 +0530 Subject: [PATCH] Fixed window is hidden behind the floating windows 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" }