dotfiles

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

commit 3dc8f8ed4301fd4b8d978c305b435eabadc97284
parent aa3925efd4de6e1d015e3b631fa46709dfe76161
Author: Cem Keylan <cem@ckyln.com>
Date:   Sat, 21 Sep 2019 14:33:20 +0300

switch to dwm and dwm bar

Diffstat:
Mbin/nightmodecheck | 8++++----
Mbin/nightmodetoggle | 21+++------------------
Dbin/polyrestart | 40----------------------------------------
3 files changed, 7 insertions(+), 62 deletions(-)

diff --git a/bin/nightmodecheck b/bin/nightmodecheck @@ -12,17 +12,17 @@ then then if [ $CLICK = "0" ] then - echo "" + echo "0" else - echo " $CLICK" + echo "0 $CLICK" fi elif [ $(tail -n -1 $HOME/.night) = "NIGHT=1" ] then if [ $CLICK = "0" ] then - echo "" + echo "1" else - echo " $CLICK" + echo "1 $CLICK" fi fi else diff --git a/bin/nightmodetoggle b/bin/nightmodetoggle @@ -44,25 +44,10 @@ then esac if [ $(tail -n -1 $HOME/.night) = "NIGHT=1" ] then - wal -i $HOME/Pictures/Wallpapers/Night - case $(ps aux | grep -i polybar) in - *night*) - exit - ;; - *) - $HOME/bin/polyrestart night - ;; - esac + + feh --bg-fill --randomize $HOME/Pictures/Wallpapers/Night/* else - wal -i $HOME/Pictures/Wallpapers/Morning - case $(ps aux | grep -i polybar | head -n +1 -) in - *"polybar -q top") - exit - ;; - *) - $HOME/bin/polyrestart morning - ;; - esac + feh --bg-fill --randomize $HOME/Pictures/Wallpapers/Morning/* fi else touch $HOME/.night diff --git a/bin/polyrestart b/bin/polyrestart @@ -1,40 +0,0 @@ -#!/bin/sh - -case $(ps aux) in - *polybar/config*) - case "$(ps aux)" in - *polybar\ -q*) - killall polybar - ;; - *) - ;; - esac - ;; - *polybar*) - killall polybar - ;; - *) - ;; -esac -case $1 in - morning) - polybar -q top >/dev/null 2>&1 & - ;; - night) - polybar -q topnight >/dev/null 2>&1 & - ;; - *) - if [ -e $HOME/.night ] - then - if [ $(tail -n -1 $HOME/.night) = "NIGHT=1" ] - then - $HOME/bin/polyrestart night - elif [ $(tail -n -1 $HOME/.night) = "NIGHT=0" ] - then - $HOME/bin/polyrestart morning - else - echo Unexpected error - fi - fi - ;; -esac