tmp/hypr -> xdg_runtime_dir/hypr

This commit is contained in:
Vaxry 2024-04-28 22:07:57 +01:00
parent d250fddf06
commit c187fb5301
6 changed files with 12 additions and 12 deletions

View File

@ -29,5 +29,5 @@ function handle {
fi 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 When running Hyprland in Debug mode, the config is
`~/.config/hypr/hyprlandd.conf` and the logs can be found at `~/.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 ## 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 You can also use the amazing command
```sh ```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) 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 launched, the log can be printed with
```sh ```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 if you are in a Hyprland session, and you want the log of the last session, use
```sh ```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 ## Obtaining the Hyprland Crash Report

View File

@ -195,7 +195,7 @@ handle() {
esac 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. 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 echo $HYPRLAND_INSTANCE_SIGNATURE
``` ```
## /tmp/hypr/\[HIS\]/.socket.sock ## $XDG_RUNTIME_DIR/hypr/\[HIS\]/.socket.sock
Used for hyprctl-like requests. See the Used for hyprctl-like requests. See the
[Hyprctl page](../Configuring/Using-hyprctl) for commands. [Hyprctl page](../Configuring/Using-hyprctl) for commands.
basically, write `[flag(s)]/command args`. 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 Used for events. Hyprland will write to each connected client live events like
this: this:
@ -89,5 +89,5 @@ handle() {
esac 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' 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}' stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
``` ```
@ -184,7 +184,7 @@ spaces (){
} }
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 spaces
done done
``` ```
@ -218,7 +218,7 @@ This widget simply displays the title of the active window. It requires
```sh ```sh
#!/bin/sh #!/bin/sh
hyprctl activewindow -j | jq --raw-output .title 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> </details>