custom-hypr - update true way
This commit is contained in:
25
scripts/toggle_fullscreen_left.sh
Executable file
25
scripts/toggle_fullscreen_left.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
# Get the window identifiers from hyprctl clients
|
||||
window_ids=$(hyprctl clients | grep 'pid:' | awk '{print $2}')
|
||||
prev_monitor=$(hyprctl clients | grep 'monitor:' | awk '{print $2}')
|
||||
|
||||
hyprctl dispatch movewindow l
|
||||
current_monitor=$(hyprctl clients | grep 'monitor:' | awk '{print $2}')
|
||||
echo $prev_monitor
|
||||
echo $current_monitor
|
||||
|
||||
if [[ $prev_monitor != $current_monitor ]]
|
||||
then
|
||||
# Loop through each window ID and set it to fullscreen
|
||||
# for win_id in $window_ids
|
||||
# do
|
||||
#
|
||||
# hyprctl dispatch movefocus $win_id
|
||||
# hyprctl dispatch fullscreenstate 0
|
||||
# done
|
||||
#
|
||||
hyprctl dispatch bringactivetotop
|
||||
else
|
||||
hyprctl dispatch fullscreenstate 0
|
||||
fi
|
||||
|
||||
|
||||
20
scripts/toggle_fullscreen_right.sh
Executable file
20
scripts/toggle_fullscreen_right.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
# Get the window identifiers from hyprctl clients
|
||||
window_ids=$(hyprctl clients | grep 'pid:' | awk '{print $2}')
|
||||
prev_monitor=$(hyprctl clients | grep 'monitor:' | awk '{print $2}')
|
||||
|
||||
hyprctl dispatch movewindow r
|
||||
current_monitor=$(hyprctl clients | grep 'monitor:' | awk '{print $2}')
|
||||
|
||||
if [[ $prev_monitor != $current_monitor ]]
|
||||
then
|
||||
# Loop through each window ID and set it to fullscreen
|
||||
for win_id in $window_ids
|
||||
do
|
||||
hyprctl dispatch fullscreenstate 0 $win_id
|
||||
echo done
|
||||
done
|
||||
else
|
||||
hyprctl dispatch fullscreenstate 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user