Replace gojq usages with jq

This commit is contained in:
Moeta Yuko
2024-06-18 15:41:01 +08:00
parent 595698c2ec
commit f2a6a6b40e
6 changed files with 15 additions and 18 deletions
+2 -2
View File
@@ -8,7 +8,7 @@ fi
# Get the current workspace number
current=$(swaymsg -t get_workspaces | gojq '.[] | select(.focused==true) | .num')
current=$(swaymsg -t get_workspaces | jq '.[] | select(.focused==true) | .num')
# Check if a number was passed as an argument
if [[ "$1" =~ ^[+-]?[0-9]+$ ]]; then
@@ -25,6 +25,6 @@ fi
# Switch to the new workspace
if [[ $2 == 'move' ]]; then
swaymsg move container to workspace $new_workspace
else
else
swaymsg workspace $new_workspace
fi