Fix layout file being created twice

This commit is contained in:
JeremyStar™ 2024-06-04 13:04:42 +02:00
parent d5f14c1178
commit ffbec879fe
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -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