TheRepoClub-DotFiles/localbin/.local/bin/toggle_conky
2022-10-28 11:08:22 +01:00

42 lines
871 B
Bash
Executable File

#!/usr/bin/env bash
#-*-coding:utf-8 -*-
#Auto updated?
# Yes
#File:
# toggle_conky
#Author:
# The-Repo-Club [wayne6324@gmail.com]
#Github:
# https://github.com/The-Repo-Club/
#
#Created:
# Fri 28 October 2022, 08:57:10 AM [GMT+1]
#Modified:
# Fri 28 October 2022, 10:48:27 AM [GMT+1]
#
#Description:
# Toggle the conky on and off
#
#Dependencies:
# conky
#
checkRun=$(pgrep 'conky' | wc -l)
if command -v conky &>/dev/null; then
if [[ ! $checkRun -ge "1" ]]; then
(
conky -c ~/.config/conky/conky_left.config
conky -c ~/.config/conky/conky_right.config
# sleep 2s
i3-msg "gaps right all set 5; gaps right all set 330"
) &
else
killall -q conky
echo "conky has been killed."
# sleep 2s
i3-msg "gaps inner all set 5; gaps outer all set 2"
fi
fi