From 97fef158db8ae3e67f8765978fad7b2b216c672f Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Tue, 24 Mar 2020 19:03:38 +0530 Subject: mihn --- arch.png | Bin 947311 -> 881349 bytes bspwm/.config/bspwm/bspwmrc | 1 - polybar/.config/polybar/cmus.sh | 20 ++++++++++++++++++++ polybar/.config/polybar/config | 31 +++++++++++++++---------------- sxhkd/.config/sxhkd/sxhkdrc | 8 ++++---- zsh/.zshrc | 2 +- 6 files changed, 40 insertions(+), 22 deletions(-) create mode 100755 polybar/.config/polybar/cmus.sh diff --git a/arch.png b/arch.png index 076e1ab..8d4e805 100644 Binary files a/arch.png and b/arch.png differ diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc index 3ee2105..1d30e20 100755 --- a/bspwm/.config/bspwm/bspwmrc +++ b/bspwm/.config/bspwm/bspwmrc @@ -3,7 +3,6 @@ sxhkd & dunst & unclutter & -xss-lock -- /home/fd0e/.local/bin/lock & compton & ~/scrypts/bat_check.sh & redshift -l 13.082680:80.270718 & diff --git a/polybar/.config/polybar/cmus.sh b/polybar/.config/polybar/cmus.sh new file mode 100755 index 0000000..7917d4c --- /dev/null +++ b/polybar/.config/polybar/cmus.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +prepend_zero () { + seq -f "%02g" $1 $1 +} + +artist=$(echo -n $(cmus-remote -C status | grep "tag artist" | cut -c 12-)) + +if [[ $artist = *[!\ ]* ]]; then + song=$(echo -n $(cmus-remote -C status | grep title | cut -c 11-)) + position=$(cmus-remote -C status | grep position | cut -c 10-) + minutes1=$(prepend_zero $(($position / 60))) + seconds1=$(prepend_zero $(($position % 60))) + duration=$(cmus-remote -C status | grep duration | cut -c 10-) + minutes2=$(prepend_zero $(($duration / 60))) + seconds2=$(prepend_zero $(($duration % 60))) + echo -n "$artist - $song [$minutes1:$seconds1/$minutes2:$seconds2]" +else + echo +fi diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index fa869f3..1e91738 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -34,7 +34,7 @@ module-margin-right = 1.5 font-0 = Hermit:style=medium:size=9;1 modules-left = alsa battery date time bspwm modules-center = -;modules-right = spotify mpd +modules-right = cmus tray-position = right cursor-click = pointer cursor-scroll = ns-resize @@ -143,21 +143,20 @@ format =