| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
if [ "$1" = configure ]; then |
| 6 |
# Set the capabilities |
| 7 |
if command -v setcap > /dev/null ; then |
| 8 |
cap="CAP_SYS_NICE=+ep" |
| 9 |
binary=/usr/bin/kwin_wayland |
| 10 |
if ! setcap -v "${cap}" "${binary}" > /dev/null; then |
| 11 |
setcap "${cap}" "${binary}" \ |
| 12 |
&& echo "Successfully set ${cap} for ${binary}" \ |
| 13 |
|| echo "Failed to set ${cap} for ${binary}" >&2 |
| 14 |
fi |
| 15 |
else |
| 16 |
echo "setcap command not found, failed to set capabilities for kwin_wayland" >&2 |
| 17 |
fi |
| 18 |
fi |
| 19 |
|
| 20 |
#DEBHELPER# |
| 21 |
|
| 22 |
exit 0 |
| 23 |
|