mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-12-22 17:49:48 +01:00
ref: improve eww get-active-workspace for multimonitor setup (#222)
This commit is contained in:
parent
105b55239e
commit
9a8e8dc32d
1 changed files with 6 additions and 3 deletions
|
@ -142,9 +142,12 @@ fi
|
|||
### `~/.config/eww/scripts/get-active-workspace`
|
||||
|
||||
```sh
|
||||
#!/bin/bash
|
||||
hyprctl monitors -j | jq --raw-output .[0].activeWorkspace.id
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - | stdbuf -o0 awk -F '>>|,' '/^workspace>>/{print $2}'
|
||||
#!/usr/bin/env bash
|
||||
|
||||
hyprctl monitors -j | jq '.[] | select(.focused) | .activeWorkspace.id'
|
||||
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock - |
|
||||
stdbuf -o0 awk -F '>>|,' -e '/^workspace>>/ {print $2}' -e '/^focusedmon>>/ {print $3}'
|
||||
```
|
||||
|
||||
### `~/.config/eww/scripts/get-workspaces`
|
||||
|
|
Loading…
Reference in a new issue