tmp/hypr -> xdg_runtime_dir/hypr (#622)

This commit is contained in:
Vaxry 2024-04-28 22:25:40 +01:00 committed by GitHub
parent d250fddf06
commit 4c02d8b28b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 12 additions and 12 deletions

View file

@ -29,5 +29,5 @@ function handle {
fi
}
socat - "UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do handle "$line"; done
socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do handle "$line"; done
```

View file

@ -64,7 +64,7 @@ This code can go in the `package` attribute of the NixOS/Home Manager modules.
When running Hyprland in Debug mode, the config is
`~/.config/hypr/hyprlandd.conf` and the logs can be found at
`/tmp/hypr/[INSTANCE SIGNATURE]/hyprlandd.log`.
`$XDG_RUNTIME_DIR/hypr/[INSTANCE SIGNATURE]/hyprlandd.log`.
## Logs, dumps, etc
@ -78,7 +78,7 @@ the dump. See the instructions below for more info about `coredumpctl`.
You can also use the amazing command
```sh
watch -n 0.1 "grep -v \"arranged\" /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | tail -n 40"
watch -n 0.1 "grep -v \"arranged\" $XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | tail -n 40"
```
for live logs. (replace `hyprland` with `hyprlandd` for debug builds)

View file

@ -9,13 +9,13 @@ If you are in a TTY, and the Hyprland session that crashed was the last one you
launched, the log can be printed with
```sh
cat /tmp/hypr/$(ls -t /tmp/hypr/ | head -n 1)/hyprland.log
cat $XDG_RUNTIME_DIR/hypr/$(ls -t $XDG_RUNTIME_DIR/hypr/ | head -n 1)/hyprland.log
```
if you are in a Hyprland session, and you want the log of the last session, use
```sh
cat /tmp/hypr/$(ls -t /tmp/hypr/ | head -n 2 | tail -n 1)/hyprland.log
cat $XDG_RUNTIME_DIR/hypr/$(ls -t $XDG_RUNTIME_DIR/hypr/ | head -n 2 | tail -n 1)/hyprland.log
```
## Obtaining the Hyprland Crash Report

View file

@ -195,7 +195,7 @@ handle() {
esac
}
socat - "UNIX-CONNECT:/tmp/hypr/${HYPRLAND_INSTANCE_SIGNATURE}/.socket2.sock" | while read -r line; do handle "$line"; done
socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/${HYPRLAND_INSTANCE_SIGNATURE}/.socket2.sock" | while read -r line; do handle "$line"; done
```
This makes workspaces 1, 2, 4, and 5 go to monitor 1 when connecting it.

View file

@ -12,14 +12,14 @@ via code / bash utilities.
echo $HYPRLAND_INSTANCE_SIGNATURE
```
## /tmp/hypr/\[HIS\]/.socket.sock
## $XDG_RUNTIME_DIR/hypr/\[HIS\]/.socket.sock
Used for hyprctl-like requests. See the
[Hyprctl page](../Configuring/Using-hyprctl) for commands.
basically, write `[flag(s)]/command args`.
## /tmp/hypr/\[HIS\]/.socket2.sock
## $XDG_RUNTIME_DIR/hypr/\[HIS\]/.socket2.sock
Used for events. Hyprland will write to each connected client live events like
this:
@ -89,5 +89,5 @@ handle() {
esac
}
socat -U - UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
```

View file

@ -169,7 +169,7 @@ fi
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
```
@ -184,7 +184,7 @@ spaces (){
}
spaces
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | while read -r line; do
spaces
done
```
@ -218,7 +218,7 @@ This widget simply displays the title of the active window. It requires
```sh
#!/bin/sh
hyprctl activewindow -j | jq --raw-output .title
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^activewindow>>/{print $3}'
socat -u UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^activewindow>>/{print $3}'
```
</details>