Some work on Scripts
notable changes: - rename `bt-connect` to `bt_connect` - rename `music` to `media` and make it generic instead of checking Spotify - make separate script to set background to a preset black image - make all shebangs "#!/usr/bin/env sh"
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
name=$(bluetoothctl info | grep "Name" | sed 's/.*Name: //')
|
||||
battery=$(bluetoothctl info | grep "Battery" | sed 's/.*(//;s/)//')
|
||||
name=$(bluetoothctl info | grep "Alias" | sed 's/.*Alias: //')
|
||||
battery=$(bluetoothctl info | grep "Battery Percentage" | sed 's/.*(//;s/)//')
|
||||
if [ ! "$name" ]
|
||||
then
|
||||
echo ""
|
||||
|
||||
4
Scripts/.local/scripts/status/media
Executable file
4
Scripts/.local/scripts/status/media
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
title=$(playerctl metadata title)
|
||||
echo " $title"
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
line=$(free -m | sed -n 2p);
|
||||
used=$(echo $line | awk '{print $3}');
|
||||
available=$(echo $line | awk '{print $2}');
|
||||
value=$(echo "100 * $used / $available" | bc -l | xargs printf "%.2f" $1)
|
||||
|
||||
echo "⾝ $(printf "%dMB" $used) $value%"
|
||||
echo "㊎ $(printf "%dMB" $used) $value%"
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
title=$(playerctl --player=spotify metadata title | cut -c 1-30)
|
||||
echo " $title"
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
while :
|
||||
do
|
||||
prev="$(playerctl --player=spotify metadata title)"
|
||||
item=$prev
|
||||
while [[ $item == $prev ]]
|
||||
do
|
||||
item="$(playerctl --player=spotify metadata title)";
|
||||
sleep 0.5;
|
||||
done
|
||||
kill -37 $(pidof dwmblocks);
|
||||
item="";
|
||||
done
|
||||
Reference in New Issue
Block a user