diff --git a/gui/hypr/scripts.d/layout.sh b/gui/hypr/scripts.d/layout.sh index b47e2d93..dabc9601 100755 --- a/gui/hypr/scripts.d/layout.sh +++ b/gui/hypr/scripts.d/layout.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Create layout file -cat << EOF >> /tmp/hyprland-layout.txt +[[ ! -f /tmp/hyprland-layout.txt ]] && cat << EOF >> /tmp/hyprland-layout.txt Hyprland Keybindings Listed in order of appearance in hyprland.conf @@ -56,8 +56,8 @@ Media keys --> Play previous track -> Audio Previous EOF +# Remove layout file +( sleep 1s; rm -rf /tmp/hyprland-layout.txt ) & + # Display layout file less /tmp/hyprland-layout.txt - -# Remove layout file -rm -rf /tmp/hyprland-layout.txt