blob: 243a132c913864566d5fad1135ebc74605a7bec9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#!/bin/bash
# Copyright (C) 2026 Danilo M. <danix@danix.xyz>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# Restart quickshell components. With no argument, every directory holding a
# shell.qml; otherwise the named ones: ./reload.sh desktop notifications
#
# A restart rather than a hot reload: saving a file only rebuilds what
# quickshell thinks changed, and a stuck window survives that.
cd "$(dirname "$0")" || exit 1
if [ $# -eq 0 ]; then
set -- */shell.qml
set -- "${@%/shell.qml}"
fi
for c in "$@"; do
c=${c%/}
[ -f "$c/shell.qml" ] || { echo "$c: no shell.qml" >&2; continue; }
qs kill -p "$PWD/$c" >/dev/null 2>&1
setsid -f qs -p "$PWD/$c" >/dev/null 2>&1
echo "restarted $c"
done
sleep 1
# The process is qs, not quickshell: see AGENTS.md.
echo "qs running: $(pgrep -cx qs)"
|