Regenerated
This commit is contained in:
+288
-291
File diff suppressed because it is too large
Load Diff
+8
-11
@@ -154,7 +154,7 @@ in
|
||||
"nl_NL.UTF-8/UTF-8"
|
||||
"en_US.UTF-8/UTF-8"
|
||||
];
|
||||
consoleKeyMap = "us";
|
||||
console.KeyMap = "us";
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
@@ -2989,26 +2989,23 @@ These are config files for waybar
|
||||
#+BEGIN_SRC sh :tangle generated/.config/waybar/scripts/bluetooth-status.sh :noweb yes :mkdirp yes :eval never
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Collect connected devices
|
||||
bt_connected=$(bluetoothctl devices | while read -r line; do
|
||||
mac=$(echo "$line" | awk '{print $2}')
|
||||
if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then
|
||||
echo "$line" | cut -d' ' -f3-
|
||||
fi
|
||||
done | sed '/^$/d') # remove empty lines
|
||||
done)
|
||||
|
||||
icon=""
|
||||
tooltip=null
|
||||
|
||||
# Determine icon
|
||||
if [ -n "$bt_connected" ]; then
|
||||
icon=""
|
||||
else
|
||||
icon=""
|
||||
tooltip=$(echo "$bt_connected" | jq -R -s '.')
|
||||
fi
|
||||
|
||||
# Escape for JSON
|
||||
bt_connected_json=$(printf '%s' "$bt_connected" | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')
|
||||
|
||||
# Output single JSON object
|
||||
echo "{\"text\": \"$icon\", \"tooltip\": \"$bt_connected_json\"}"
|
||||
# Output JSON for Waybar
|
||||
jq -n --arg text "$icon" --argjson tooltip "$tooltip" '{text: $text, tooltip: $tooltip}'
|
||||
#+END_SRC
|
||||
|
||||
|
||||
|
||||
@@ -1,22 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Collect connected devices
|
||||
bt_connected=$(bluetoothctl devices | while read -r line; do
|
||||
mac=$(echo "$line" | awk '{print $2}')
|
||||
if [ "$(bluetoothctl info "$mac" | awk '/Connected:/ {print $2}')" = "yes" ]; then
|
||||
echo "$line" | cut -d' ' -f3-
|
||||
fi
|
||||
done | sed '/^$/d') # remove empty lines
|
||||
done)
|
||||
|
||||
icon=""
|
||||
tooltip=null
|
||||
|
||||
# Determine icon
|
||||
if [ -n "$bt_connected" ]; then
|
||||
icon=""
|
||||
else
|
||||
icon=""
|
||||
tooltip=$(echo "$bt_connected" | jq -R -s '.')
|
||||
fi
|
||||
|
||||
# Escape for JSON
|
||||
bt_connected_json=$(printf '%s' "$bt_connected" | sed 's/"/\\"/g' | awk '{printf "%s\\n", $0}')
|
||||
|
||||
# Output single JSON object
|
||||
echo "{\"text\": \"$icon\", \"tooltip\": \"$bt_connected_json\"}"
|
||||
# Output JSON for Waybar
|
||||
jq -n --arg text "$icon" --argjson tooltip "$tooltip" '{text: $text, tooltip: $tooltip}'
|
||||
|
||||
@@ -20,7 +20,7 @@ in
|
||||
"nl_NL.UTF-8/UTF-8"
|
||||
"en_US.UTF-8/UTF-8"
|
||||
];
|
||||
consoleKeyMap = "us";
|
||||
console.KeyMap = "us";
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
Reference in New Issue
Block a user