Skip to content

Commit

Permalink
tmp/hypr -> xdg_runtime_dir/hypr (#622)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Apr 28, 2024
1 parent d250fdd commit 4c02d8b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pages/Configuring/Expanding-functionality.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
4 changes: 2 additions & 2 deletions pages/Contributing and Debugging/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions pages/Crashes and Bugs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pages/FAQ/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions pages/IPC/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
```
6 changes: 3 additions & 3 deletions pages/Useful Utilities/Status-Bars.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
```

Expand All @@ -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
```
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 4c02d8b

Please sign in to comment.