Last active
February 16, 2025 23:29
-
-
Save bbb651/e36858746b86aa12feac7a7b3aa76be8 to your computer and use it in GitHub Desktop.
Niri + Fish terminal xdg activation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function xdg_activation --on-event fish_preexec | |
| set -l tmpdir /tmp | |
| set -q TMPDIR | |
| and set tmpdir $TMPDIR | |
| set filename (mktemp -u $tmpdir/.xdg-activation.XXXXXXXXXX) | |
| command mkfifo $filename | |
| niri msg action spawn -- sh -c "echo \$XDG_ACTIVATION_TOKEN > $filename" & | |
| set -gx XDG_ACTIVATION_TOKEN (cat $filename) | |
| command rm $filename | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment