From c187fb53015955659621752939c00782334de321 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 28 Apr 2024 22:07:57 +0100 Subject: [PATCH] tmp/hypr -> xdg_runtime_dir/hypr --- pages/Configuring/Expanding-functionality.md | 2 +- pages/Contributing and Debugging/_index.md | 4 ++-- pages/Crashes and Bugs/_index.md | 4 ++-- pages/FAQ/_index.md | 2 +- pages/IPC/_index.md | 6 +++--- pages/Useful Utilities/Status-Bars.md | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pages/Configuring/Expanding-functionality.md b/pages/Configuring/Expanding-functionality.md index f252443..89c5796 100644 --- a/pages/Configuring/Expanding-functionality.md +++ b/pages/Configuring/Expanding-functionality.md @@ -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 ``` diff --git a/pages/Contributing and Debugging/_index.md b/pages/Contributing and Debugging/_index.md index 0c770e3..c074e69 100644 --- a/pages/Contributing and Debugging/_index.md +++ b/pages/Contributing and Debugging/_index.md @@ -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) diff --git a/pages/Crashes and Bugs/_index.md b/pages/Crashes and Bugs/_index.md index 550bcb5..442d4f3 100644 --- a/pages/Crashes and Bugs/_index.md +++ b/pages/Crashes and Bugs/_index.md @@ -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 diff --git a/pages/FAQ/_index.md b/pages/FAQ/_index.md index 000da74..e227b1e 100644 --- a/pages/FAQ/_index.md +++ b/pages/FAQ/_index.md @@ -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. diff --git a/pages/IPC/_index.md b/pages/IPC/_index.md index 97e9ed9..f61995b 100644 --- a/pages/IPC/_index.md +++ b/pages/IPC/_index.md @@ -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 ``` diff --git a/pages/Useful Utilities/Status-Bars.md b/pages/Useful Utilities/Status-Bars.md index d8f1783..ec63189 100644 --- a/pages/Useful Utilities/Status-Bars.md +++ b/pages/Useful Utilities/Status-Bars.md @@ -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}' ```