melawy-skel-root/root/.local/bin/reset-layout.sh

31 lines
670 B
Bash
Raw Normal View History

2023-11-22 11:29:04 +05:00
#!/bin/bash
2023-11-23 14:05:12 +05:00
sleep 5
2023-11-23 01:03:12 +05:00
2023-11-23 01:53:21 +05:00
theme="com.github.Melawy.Melawy-round-gray.Nier-A2.desktop"
plasma-apply-lookandfeel -a "$theme" --resetLayout
2023-11-22 11:29:04 +05:00
if [ "$(whoami)" != "liveuser" ]; then
sleep 5
2025-01-06 15:27:16 +05:00
if [ -f "$HOME/.config/autostart/reset-layout.desktop" ]; then
rm "$HOME/.config/autostart/reset-layout.desktop"
fi
2024-12-02 11:52:16 +05:00
# rm "$HOME/.local/bin/reset-layout.sh"
2023-11-22 11:29:04 +05:00
fi
2025-01-06 15:27:16 +05:00
sleep 1
normal_process=$(ps -eo pcpu,stat,comm | grep plasmashell | grep 'S<sl')
if [ -z "$normal_process" ]; then
echo "Restart plasma-plasmashell"
systemctl --user restart plasma-plasmashell
fi
sleep 1
notify-send -t 5000 -a "Theme is" "$theme" "$(date '+%Y.%m.%d %H:%M:%S')"
echo "Ready"