dotfiles

Cem's Dotfiles
git clone git://git.ckyln.com/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 4f8fc6092fa8ee396fc0c438e24466f91867a4ad
parent 0a11e3742a82e7573c752498e0f1e51f43f217a5
Author: Cem Keylan <warc1998@gmail.com>
Date:   Fri, 24 May 2019 21:04:56 +0300

Besh delet

Diffstat:
Mbin/polyrestart | 27+++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/bin/polyrestart b/bin/polyrestart @@ -1,20 +1,23 @@ -#!/bin/bash +#!/bin/sh -if [[ $(ps aux) == *polybar* ]] -then - kill $(pidof polybar) -fi -sleep 0.5 +case $(ps aux) in + *polybar*) + kill $(pidof polybar) + ;; + *) + ;; +esac +sleep 1 case $1 in morning) - polybar -q top &>/dev/null & - sleep 0.5 - polybar -q bottom &>/dev/null & + polybar -q top >/dev/null 2>&1 & + sleep 1 + polybar -q bottom >/dev/null 2>&1 & ;; night) - polybar -q topnight &>/dev/null & - sleep 0.5 - polybar -q bottomnight &>/dev/null & + polybar -q topnight >/dev/null 2>&1 & + sleep 1 + polybar -q bottomnight >/dev/null 2>&1 & ;; *) if [ -e $HOME/.night ]