Squash merge feat/mail-server into main
This commit is contained in:
parent
14f4243aee
commit
06bcfe62ff
21 changed files with 973 additions and 67 deletions
22
home/config/scripts/gamemodeStatus.sh
Executable file
22
home/config/scripts/gamemodeStatus.sh
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SERVICE="gamemode"
|
||||
|
||||
if [ "$1" = "toggle" ]; then
|
||||
if systemctl --user is-active --quiet "$SERVICE"; then
|
||||
systemctl --user stop "$SERVICE"
|
||||
notify-send " Gamemode" "off" >/dev/null 2>&1
|
||||
else
|
||||
systemctl --user start "$SERVICE"
|
||||
notify-send " Gamemode" "on" >/dev/null 2>&1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! systemctl --user is-active --quiet "$SERVICE"; then
|
||||
echo "{\"text\": \"inactive\", \"tooltip\": \"gamemoded is inactive\", \"alt\": \"inactive\", \"class\": \"inactive\"}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "{\"text\": \"active\", \"tooltip\": \"gamemoded is running\", \"alt\": \"active\", \"class\": \"active\"}"
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue