From 083a99063d5092e0895424f652804065c84463f8 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Wed, 13 May 2026 13:43:19 +0100 Subject: chore(fmt): apply shfmt and prettier formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - shfmt -i 2 -ci -s on the four updated shell scripts (tabs → 2 spaces) - prettier --write on KEYBINDS.md and README.md --- dot_config/sway/executable_bt-toggle.sh | 12 ++++++------ dot_config/sway/executable_tb-autostart.sh | 10 +++++----- dot_config/sway/executable_tb-toggle.sh | 18 +++++++++--------- dot_config/waybar/executable_mako-status.sh | 26 +++++++++++++------------- 4 files changed, 33 insertions(+), 33 deletions(-) (limited to 'dot_config') diff --git a/dot_config/sway/executable_bt-toggle.sh b/dot_config/sway/executable_bt-toggle.sh index 95958f9..02b72f9 100644 --- a/dot_config/sway/executable_bt-toggle.sh +++ b/dot_config/sway/executable_bt-toggle.sh @@ -6,11 +6,11 @@ set -eu state=$(bluetoothctl show | awk '/Powered:/ {print $2}') if [ "$state" = "yes" ]; then - bluetoothctl power off >/dev/null - notify-send -t 1500 -h string:x-canonical-private-synchronous:bt \ - 'Bluetooth' 'off' + bluetoothctl power off >/dev/null + notify-send -t 1500 -h string:x-canonical-private-synchronous:bt \ + 'Bluetooth' 'off' else - bluetoothctl power on >/dev/null - notify-send -t 1500 -h string:x-canonical-private-synchronous:bt \ - 'Bluetooth' 'on' + bluetoothctl power on >/dev/null + notify-send -t 1500 -h string:x-canonical-private-synchronous:bt \ + 'Bluetooth' 'on' fi diff --git a/dot_config/sway/executable_tb-autostart.sh b/dot_config/sway/executable_tb-autostart.sh index b77431e..f841428 100644 --- a/dot_config/sway/executable_tb-autostart.sh +++ b/dot_config/sway/executable_tb-autostart.sh @@ -11,11 +11,11 @@ MARK=tb-main thunderbird & for _ in $(seq 1 200); do - if swaymsg -t get_tree | jq -e --arg m "$MARK" ' + if swaymsg -t get_tree | jq -e --arg m "$MARK" ' [.. | objects | select(.marks? // [] | index($m))] | length > 0 ' >/dev/null 2>&1; then - swaymsg "[con_mark=\"$MARK\"] move container to scratchpad" >/dev/null - exit 0 - fi - sleep 0.1 + swaymsg "[con_mark=\"$MARK\"] move container to scratchpad" >/dev/null + exit 0 + fi + sleep 0.1 done diff --git a/dot_config/sway/executable_tb-toggle.sh b/dot_config/sway/executable_tb-toggle.sh index 8fc39c0..77a3307 100644 --- a/dot_config/sway/executable_tb-toggle.sh +++ b/dot_config/sway/executable_tb-toggle.sh @@ -18,17 +18,17 @@ tb_ws=$(swaymsg -t get_tree | jq -r --arg m "$MARK" ' ) // empty') if [ -z "$tb_ws" ]; then - exec thunderbird + exec thunderbird fi if [ "$tb_ws" = "__i3_scratch" ]; then - # scratchpad show reveals it as floating; floating disable tiles it on the - # current workspace. - swaymsg "[con_mark=\"$MARK\"] scratchpad show, floating disable" >/dev/null + # scratchpad show reveals it as floating; floating disable tiles it on the + # current workspace. + swaymsg "[con_mark=\"$MARK\"] scratchpad show, floating disable" >/dev/null else - # Criteria-based move can cause sway to follow focus to the originating - # workspace. Pin focus back to where we started. - current_ws=$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused) | .name') - swaymsg "[con_mark=\"$MARK\"] move container to scratchpad" >/dev/null - swaymsg "workspace \"$current_ws\"" >/dev/null + # Criteria-based move can cause sway to follow focus to the originating + # workspace. Pin focus back to where we started. + current_ws=$(swaymsg -t get_workspaces | jq -r '.[] | select(.focused) | .name') + swaymsg "[con_mark=\"$MARK\"] move container to scratchpad" >/dev/null + swaymsg "workspace \"$current_ws\"" >/dev/null fi diff --git a/dot_config/waybar/executable_mako-status.sh b/dot_config/waybar/executable_mako-status.sh index a2fb792..ed89661 100644 --- a/dot_config/waybar/executable_mako-status.sh +++ b/dot_config/waybar/executable_mako-status.sh @@ -4,25 +4,25 @@ set -eu if ! command -v makoctl >/dev/null 2>&1; then - printf '{"text":"","tooltip":"mako not installed","class":"off"}\n' - exit 0 + printf '{"text":"","tooltip":"mako not installed","class":"off"}\n' + exit 0 fi -count=$(makoctl history 2>/dev/null \ - | grep -c '"summary"' || true) -pending=$(makoctl list 2>/dev/null \ - | grep -c '"summary"' || true) +count=$(makoctl history 2>/dev/null | + grep -c '"summary"' || true) +pending=$(makoctl list 2>/dev/null | + grep -c '"summary"' || true) if [ "$pending" -gt 0 ]; then - text="!$pending" - class="pending" + text="!$pending" + class="pending" elif [ "$count" -gt 0 ]; then - text="$count" - class="history" + text="$count" + class="history" else - text="0" - class="empty" + text="0" + class="empty" fi printf '{"text":"%s","tooltip":"%s pending / %s history","class":"%s"}\n' \ - "$text" "$pending" "$count" "$class" + "$text" "$pending" "$count" "$class" -- cgit v1.3.1