File: papersway-msg

package info (click to toggle)
papersway 2.003-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156 kB
  • sloc: perl: 852; sh: 8; makefile: 2
file content (13 lines) | stat: -rwxr-xr-x 356 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh

# Copyright © 2024  Sean Whitton
# SPDX-License-Identifier: GPL-3.0-or-later

[ -n "$1" ] || exit 127
socket=${SWAYSOCK:-$I3SOCK}
pipe="$(printf "%s/papersway.%s.pipe" \
	       "$(dirname "$socket")" \
	       "$(basename "$socket" \
		      | sed -n 's/^[^0-9]*\([0-9][0-9.]*[0-9]\).*/\1/p')")"
[ -w "$pipe" ] || exit 127
echo "$@" >"$pipe"