Compare commits

...

2 Commits

Author SHA1 Message Date
Sravan Balaji
3d8e77d2e2 Replace killall with pkill 2024-03-30 21:09:41 -04:00
Sravan Balaji
2fc6acd399 Make shebang more portable to NixOS 2024-03-30 20:03:41 -04:00
5 changed files with 10 additions and 10 deletions

View File

@@ -1111,7 +1111,7 @@ scroll-down = "/home/sravan/.scripts/playerctl.sh --prev"
***** Script ***** Script
#+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) mediaStatus=$(playerctl --player=playerctld metadata 2>&1)
if [[ "$mediaStatus" == "No player could handle this command" ]]; then if [[ "$mediaStatus" == "No player could handle this command" ]]; then
@@ -1300,7 +1300,7 @@ click-right = alacritty --hold -e paru -Syu &
***** Script ***** Script
#+BEGIN_SRC shell :shebang #!/bin/bash :tangle polybar/scripts/updates-pacman-aurhelper.sh #+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle polybar/scripts/updates-pacman-aurhelper.sh
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0 updates_arch=0
fi fi
@@ -1556,7 +1556,7 @@ click-right = "/home/sravan/.scripts/dunst.sh --history"
***** Script ***** Script
#+BEGIN_SRC shell :shebang #!/bin/bash :tangle polybar/scripts/dunst-notification-status.sh #+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle polybar/scripts/dunst-notification-status.sh
# Check if dunst is running # Check if dunst is running
if pgrep -x "dunst" > /dev/null if pgrep -x "dunst" > /dev/null
then then
@@ -1576,14 +1576,14 @@ echo $status_icon
*** Launch Script *** 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" BAR="mybar"
CONFIG="~/.xmonad/polybar/config.ini" CONFIG="~/.xmonad/polybar/config.ini"
NUM_MONITORS=0 NUM_MONITORS=0
CONNECTED_MONITORS=$(xrandr --query | grep " connected" | cut -d" " -f1) CONNECTED_MONITORS=$(xrandr --query | grep " connected" | cut -d" " -f1)
TRAY_POS="right" TRAY_POS="right"
killall -q polybar pkill polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
rm /tmp/polybar.pids rm /tmp/polybar.pids

View File

@@ -1,11 +1,11 @@
#!/bin/bash #!/usr/bin/env bash
BAR="mybar" BAR="mybar"
CONFIG="~/.xmonad/polybar/config.ini" CONFIG="~/.xmonad/polybar/config.ini"
NUM_MONITORS=0 NUM_MONITORS=0
CONNECTED_MONITORS=$(xrandr --query | grep " connected" | cut -d" " -f1) CONNECTED_MONITORS=$(xrandr --query | grep " connected" | cut -d" " -f1)
TRAY_POS="right" TRAY_POS="right"
killall -q polybar pkill polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
rm /tmp/polybar.pids rm /tmp/polybar.pids

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
# Check if dunst is running # Check if dunst is running
if pgrep -x "dunst" > /dev/null if pgrep -x "dunst" > /dev/null
then then

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
mediaStatus=$(playerctl --player=playerctld metadata 2>&1) mediaStatus=$(playerctl --player=playerctld metadata 2>&1)
if [[ "$mediaStatus" == "No player could handle this command" ]]; then if [[ "$mediaStatus" == "No player could handle this command" ]]; then

View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/usr/bin/env bash
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0 updates_arch=0
fi fi