Skip to content

Commit 64c5b81

Browse files
authored
Create revert_to_plasma.sh
1 parent c18a96d commit 64c5b81

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# Funkcja sprawdzająca czy Plasma działa na tty2
4+
is_plasma_running() {
5+
pgrep -a startplasma-wayland | grep -q "tty2"
6+
}
7+
8+
if is_plasma_running; then
9+
echo "[INFO] Plasma już działa na tty2 → tylko przełączam."
10+
sudo chvt 2
11+
else
12+
echo "[INFO] Plasma nie działa → uruchamiam na tty2."
13+
# Przełącz na tty2
14+
sudo chvt 2
15+
sleep 1
16+
# Odpal Plasma Wayland w tty2
17+
sudo openvt -c 2 -s -w -- /usr/bin/startplasma-wayland &
18+
fi

0 commit comments

Comments
 (0)