-
-
Notifications
You must be signed in to change notification settings - Fork 50
Open
Description
In Hyprland I have all my windows float and absolutely zero tiling. I think hdrop should have an option to bring the most recently focused window of an app to the top, perhaps with alterzorder
. Before finding hdrop I wrote a fish script that does basically the same thing, but also includes alterzorder
(this is how I use Hyprland without tiling nor pulling my hair out):
#!/usr/bin/env fish
argparse 'c/class=' 'a/appcommand=' -- $argv
set top_window (hyprctl clients -j | \
jq -r "[.[] | select(.class == \"$_flag_c\")] | sort_by(.focusHistoryID) | .[0].focusHistoryID")
if test $top_window = "null"
$_flag_a
hyprctl dispatch alterzorder top,address:$_flag_c
hyprctl dispatch focuswindow address:$_flag_c
return
end
if test $top_window = "0"
set top_window (hyprctl clients -j | jq -r '.[] | select(.focusHistoryID == 1) | .address')
else
set top_window (hyprctl clients -j | \
jq -r "[.[] | select(.class == \"$_flag_c\")] | sort_by(.focusHistoryID) | .[0].address")
end
hyprctl dispatch alterzorder top,address:$top_window
hyprctl dispatch focuswindow address:$top_window
Metadata
Metadata
Assignees
Labels
No labels