Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes window get's hidden behind other windows when called back. #55

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scratchpad/scratchpad
Original file line number Diff line number Diff line change
Expand Up @@ -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')"

Expand Down Expand Up @@ -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"
}

Expand Down