Fix hyprland-handler and add wayland flags/env

This commit is contained in:
Tobias Reisinger 2023-07-07 00:40:25 +02:00
parent eb3067ff29
commit c6267c7163
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
4 changed files with 10 additions and 12 deletions

View file

@ -0,0 +1 @@
--ozone-platform-hint=auto

View file

@ -0,0 +1,2 @@
--enable-features=WaylandWindowDecorations
--ozone-platform-hint=auto

View file

@ -32,6 +32,7 @@ export HOSTNAME="$(cat /proc/sys/kernel/hostname)"
export MAKEFLAGS="-j$(grep -c ^processor /proc/cpuinfo)"
export MOAR="--style=dracula"
export MOZ_ENABLE_WAYLAND=1
export PASSWORD_STORE_GENERATED_LENGTH='64'
export PS1='\$ '

View file

@ -11,24 +11,18 @@ _handler_check_ws_media_empty() {
# split at ">>" and get the second part and take first part of that
win_id=$(echo "$1" | cut -d'>' -f3 | cut -d',' -f1)
media_got_emptied="false"
event_on_media="false"
is_on_media_ws=$(hyprctl clients -j | jq ".[] | select(.address == \"0x$win_id\") | .workspace.name == \"$ws_media\"")
if [ "$is_on_media_ws" == "true" ]; then
media_got_emptied="true"
fi
moved_from_media=$(hyprctl clients -j | jq ".[] | select(.address == \"0x$win_id\") | .workspace.name == \"$ws_media\"")
closed_on_media=$(hyprctl clients -j | jq ".[] | select(.address == \"0x$win_id\") | .at == $ws_media_at")
was_on_media_ws=$(hyprctl clients -j | jq ".[] | select(.address == \"0x$win_id\") | .at == $ws_media_at")
if [ "$was_on_media_ws" == "true" ]; then
media_got_emptied="true"
if [ "$moved_from_media" == "true" ] || [ "$closed_on_media" == "true" ]; then
event_on_media="true"
fi
has_zero_windows=$(hyprctl workspaces -j | jq ".[] | select(.name == \"$ws_media\") | .windows == 0")
if [ "$has_zero_windows" == "true" ]; then
media_got_emptied="true"
fi
if [ "$media_got_emptied" == "true" ]; then
if [ "$has_zero_windows" == "true" ] && [ "$event_on_media" == "true" ]; then
hyprctl dispatch workspace "$ws_voip"
fi