mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 21:29:12 +02:00
feat: switch to niri+noctalia
This commit is contained in:
parent
a343de7a90
commit
b45746e127
34 changed files with 2726 additions and 1315 deletions
|
|
@ -23,14 +23,12 @@ done
|
|||
|
||||
WIN_INFO=$(niri msg -j windows | jq --arg search "$searchapp" '.[] | select (.app_id | test($search)) | { id, is_focused, workspace_id }')
|
||||
ID=$(echo "$WIN_INFO" | jq -r '.id // empty')
|
||||
IS_FOCUSED=$(echo "$WIN_INFO" | jq -r '.is_focused // empty')
|
||||
TARGET_MONITOR=$(niri msg -j workspaces | jq --arg search "" '.[] | select (.name != null and (.name | test($search))) | { output }' | jq -r '.output // empty')
|
||||
CURRENT_WORKSPACE=$(niri msg -j workspaces | jq -r '.[] | select (.is_active == true) | .output // empty')
|
||||
# IS_FOCUSED=$(echo "$WIN_INFO" | jq -r '.is_focused // empty')
|
||||
# TARGET_MONITOR=$(niri msg -j workspaces | jq --arg search "" '.[] | select (.name != null and (.name | test($search))) | { output }' | jq -r '.output // empty')
|
||||
# CURRENT_WORKSPACE=$(niri msg -j workspaces | jq -r '.[] | select (.is_active == true) | .output // empty')
|
||||
|
||||
if [ -z "$ID" ]; then
|
||||
niri msg action spawn -- "${cmd[@]}"
|
||||
elif [ "$IS_FOCUSED" ]; then
|
||||
niri msg action move-window-to-workspace "" --window-id "$ID" --focus false
|
||||
else
|
||||
niri msg action focus-monitor "$TARGET_MONITOR" && niri msg action move-window-to-workspace "$CURRENT_WORKSPACE" --window-id "$ID" && niri msg action focus-floating
|
||||
niri msg action close-window --id "$ID"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue