diff --git a/README.org b/README.org index f82059b..949c63a 100644 --- a/README.org +++ b/README.org @@ -6469,7 +6469,7 @@ click-left = "/home/sravan/.scripts/playerctl.sh --next" ***** Script -#+BEGIN_SRC shell :shebang #!/bin/bash :tangle polybar/scripts/get-media-source-icon.sh +#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle polybar/scripts/get-media-source-icon.sh mediaStatus=$(playerctl --player=playerctld metadata 2>&1) if [[ "$mediaStatus" == "No player could handle this command" ]]; then @@ -6498,7 +6498,7 @@ else fi #+END_SRC -#+BEGIN_SRC shell :shebang #!/bin/bash :tangle polybar/scripts/get-media-status-icon.sh +#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle polybar/scripts/get-media-status-icon.sh mediaStatus=$(/home/sravan/.config/dwm-flexipatch/polybar/scripts/get-media-status.sh) if [[ "$mediaStatus" == "N/A" ]]; then @@ -6512,7 +6512,7 @@ else fi #+END_SRC -#+BEGIN_SRC shell :shebang #!/bin/bash :tangle polybar/scripts/get-media-status.sh +#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle polybar/scripts/get-media-status.sh mediaStatus=$(playerctl --player=playerctld metadata 2>&1) if [[ "$mediaStatus" == "No player could handle this command" ]]; then @@ -6524,7 +6524,7 @@ else fi #+END_SRC -#+BEGIN_SRC shell :shebang #!/bin/bash :tangle polybar/scripts/get-media-playing.sh +#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle polybar/scripts/get-media-playing.sh mediaStatus=$(playerctl --player=playerctld metadata 2>&1) if [[ "$mediaStatus" == "No player could handle this command" ]]; then @@ -6545,7 +6545,7 @@ else fi #+END_SRC -#+BEGIN_SRC shell :shebang #!/bin/bash :tangle polybar/scripts/scroll-media-playing.sh +#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle polybar/scripts/scroll-media-playing.sh zscroll \ --length $(xrdb -get polybar.maxlen) \ --delay 0.2 \ @@ -7126,7 +7126,7 @@ click-right = pavucontrol *** Launch Script -#+BEGIN_SRC shell :shebang #!/bin/bash :tangle polybar/launch.sh +#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle polybar/launch.sh BAR="mybar" CONFIG="~/.config/dwm-flexipatch/polybar/config.ini" NUM_MONITORS=0 diff --git a/polybar/launch.sh b/polybar/launch.sh index 3b2a81c..9bee9dd 100755 --- a/polybar/launch.sh +++ b/polybar/launch.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash BAR="mybar" CONFIG="~/.config/dwm-flexipatch/polybar/config.ini" NUM_MONITORS=0 diff --git a/polybar/scripts/get-media-info.sh b/polybar/scripts/get-media-info.sh deleted file mode 100755 index 9e43833..0000000 --- a/polybar/scripts/get-media-info.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -mediaStatus=$(playerctl --player=playerctld metadata 2>&1) - -if [[ "$mediaStatus" == "No player could handle this command" ]]; then - echo " N/A" -else - artist=$(playerctl --player=playerctld metadata --format '{{ artist }}') - title=$(playerctl --player=playerctld metadata --format '{{ title }}') - - if [[ $artist == "" ]]; then - artist="N/A" - fi - - if [[ $title == "" ]]; then - title="N/A" - fi - - echo "$title - $artist" -fi diff --git a/polybar/scripts/get-media-playing.sh b/polybar/scripts/get-media-playing.sh index 1c32d0b..9579883 100755 --- a/polybar/scripts/get-media-playing.sh +++ b/polybar/scripts/get-media-playing.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash mediaStatus=$(playerctl --player=playerctld metadata 2>&1) if [[ "$mediaStatus" == "No player could handle this command" ]]; then diff --git a/polybar/scripts/get-media-source-icon.sh b/polybar/scripts/get-media-source-icon.sh index 3a36a43..00e683b 100755 --- a/polybar/scripts/get-media-source-icon.sh +++ b/polybar/scripts/get-media-source-icon.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash mediaStatus=$(playerctl --player=playerctld metadata 2>&1) if [[ "$mediaStatus" == "No player could handle this command" ]]; then diff --git a/polybar/scripts/get-media-status-icon.sh b/polybar/scripts/get-media-status-icon.sh index 3857591..12e916b 100755 --- a/polybar/scripts/get-media-status-icon.sh +++ b/polybar/scripts/get-media-status-icon.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash mediaStatus=$(/home/sravan/.config/dwm-flexipatch/polybar/scripts/get-media-status.sh) if [[ "$mediaStatus" == "N/A" ]]; then diff --git a/polybar/scripts/get-media-status.sh b/polybar/scripts/get-media-status.sh index b03d84c..53c730a 100755 --- a/polybar/scripts/get-media-status.sh +++ b/polybar/scripts/get-media-status.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash mediaStatus=$(playerctl --player=playerctld metadata 2>&1) if [[ "$mediaStatus" == "No player could handle this command" ]]; then diff --git a/polybar/scripts/scroll-media-playing.sh b/polybar/scripts/scroll-media-playing.sh index 32237d5..3c19ed7 100755 --- a/polybar/scripts/scroll-media-playing.sh +++ b/polybar/scripts/scroll-media-playing.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash zscroll \ --length $(xrdb -get polybar.maxlen) \ --delay 0.2 \ diff --git a/polybar/scripts/updates-pacman-aurhelper.sh b/polybar/scripts/updates-pacman-aurhelper.sh deleted file mode 100755 index e312ec2..0000000 --- a/polybar/scripts/updates-pacman-aurhelper.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then - updates_arch=0 -fi - -# if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then -if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then -# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then -# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then -# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then -# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then - updates_aur=0 -fi - -updates=$((updates_arch + updates_aur)) - -# if [ "$updates" -gt 0 ]; then -# echo "# $updates" -# else -# echo "" -# fi - -echo "$updates"