Make shebang more portable to NixOS
This commit is contained in:
		
							
								
								
									
										12
									
								
								README.org
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								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 | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| BAR="mybar" | ||||
| CONFIG="~/.config/dwm-flexipatch/polybar/config.ini" | ||||
| NUM_MONITORS=0 | ||||
|   | ||||
| @@ -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 | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| #!/bin/bash | ||||
| #!/usr/bin/env bash | ||||
| zscroll \ | ||||
|     --length $(xrdb -get polybar.maxlen) \ | ||||
|     --delay 0.2 \ | ||||
|   | ||||
| @@ -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" | ||||
		Reference in New Issue
	
	Block a user