pinwheel: Ensure waybar scripts use packages with store paths
This commit is contained in:
@@ -25,7 +25,7 @@ let
|
||||
'';
|
||||
|
||||
notifications-status = pkgs.writeShellScript "notifications-status" ''
|
||||
if ${pkgs.dunst}/bin/dunstctl is-paused | grep -q "false"; then
|
||||
if ${pkgs.dunst}/bin/dunstctl is-paused | ${pkgs.gnugrep}/bin/grep -q "false"; then
|
||||
echo "<span font='14'></span>"
|
||||
else
|
||||
DISABLED=
|
||||
@@ -42,7 +42,7 @@ let
|
||||
STATUS_CONNECTED="Connected"
|
||||
|
||||
status() {
|
||||
STATUS=$(${pkgs.mullvad}/bin/mullvad status | awk 'NR==1{print $1}')
|
||||
STATUS=$(${pkgs.mullvad}/bin/mullvad status | ${pkgs.gawk}/bin/awk 'NR==1{print $1}')
|
||||
echo $STATUS
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ let
|
||||
$STATUS_CONNECTING)
|
||||
echo '{ "text": "", "tooltip": "Connecting", "class": "disconnected" }' ;;
|
||||
$STATUS_CONNECTED)
|
||||
TOOLTIP=$(${pkgs.mullvad}/bin/mullvad status | awk 'NR==1')
|
||||
TOOLTIP=$(${pkgs.mullvad}/bin/mullvad status | ${pkgs.gawk}/bin/awk 'NR==1')
|
||||
echo "{ \"text\": \"\", \"tooltip\":\"$TOOLTIP\" }" ;;
|
||||
$STATUS_DISCONNECTING)
|
||||
echo '{ "text": "", "tooltip": "Disconnecting", "class": "disconnected" }' ;;
|
||||
@@ -67,9 +67,9 @@ let
|
||||
|
||||
case "$CURRENT_STATUS" in
|
||||
$STATUS_DISCONNECTED)
|
||||
${pkgs.mullvad}/bin/mullvad connect --wait > /dev/null && notify-send "Connected to VPN";;
|
||||
${pkgs.mullvad}/bin/mullvad connect --wait > /dev/null && ${pkgs.libnotify}/bin/notify-send "Connected to VPN";;
|
||||
$STATUS_CONNECTED)
|
||||
${pkgs.mullvad}/bin/mullvad disconnect --wait > /dev/null && notify-send "Disconnected from VPN";;
|
||||
${pkgs.mullvad}/bin/mullvad disconnect --wait > /dev/null && ${pkgs.libnotify}/bin/notify-send "Disconnected from VPN";;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -90,16 +90,16 @@ let
|
||||
'';
|
||||
|
||||
toggle-bt-power = pkgs.writeShellScript "toggle-bt-power" ''
|
||||
POWERED_ON=$(bluetoothctl show | grep "Powered: yes")
|
||||
POWERED_ON=$(${pkgs.bluez}/bin/bluetoothctl show | ${pkgs.gnugrep}/bin/grep "Powered: yes")
|
||||
if [ -z "$POWERED_ON" ]; then
|
||||
bluetoothctl power on >> /dev/null
|
||||
${pkgs.bluez}/bin/bluetoothctl power on >> /dev/null
|
||||
else
|
||||
bluetoothctl power off >> /dev/null
|
||||
${pkgs.bluez}/bin/bluetoothctl power off >> /dev/null
|
||||
fi
|
||||
'';
|
||||
|
||||
container-status = pkgs.writeShellScript "container-status" ''
|
||||
RUNNING=$(docker ps -q | wc -l)
|
||||
RUNNING=$(${pkgs.docker}/bin/docker ps -q | ${pkgs.coreutils}/bin/wc -l)
|
||||
if [ "$RUNNING" -gt 0 ]; then
|
||||
echo "{ \"text\": \"\", \"tooltip\": \"containers running: $RUNNING\", \"class\": \"running\" }"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user