command using jq works when running from command line but not as a service
- Dominant language
- C
- Stars
- 8.1k
- Forks
- 241
- PR merge metrics
- No merged PRs in 30d
Description
skhd-v0.3.9
yabai-v7.1.0
command in question
```
# create desktop, move window and follow focus - uses jq for parsing json
lshift + lcmd - n : yabai -m space --create && \
index="$(yabai -m query --spaces --display | ~/.nix-profile/bin/jq 'map(select(."is-native-fullscreen" == false))[-1].index')" && \
yabai -m window --space "${index}" && \
yabai -m space --focus "${index}"
```
if I run skhd from a terminal, this command works correctly. but if I run skhd --start-service, it simply does not. I don't know where to look for logs either.
Note that if I comment out the `index` variable and set a literal index, like so:
```
lshift + lcmd - n : yabai -m space --create && \
yabai -m window --space "5" && \
yabai -m space --focus "5"
```
it works (assuming i only have 4 spaces)
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the command once from a terminal and once after starting skhd with --start-service, using the versions and command shown in the issue. Start by comparing the service execution environment with the terminal environment, especially access to ~/.nix-profile/bin/jq; done means the documented command works as a service or the service limitation and available logs are clearly identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100