Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

services.aerospace.settings.on-window-detected has the wrong type #1142

Closed
Sabinu opened this issue Nov 4, 2024 · 7 comments · Fixed by #1208
Closed

services.aerospace.settings.on-window-detected has the wrong type #1142

Sabinu opened this issue Nov 4, 2024 · 7 comments · Fixed by #1208

Comments

@Sabinu
Copy link

Sabinu commented Nov 4, 2024

on-window-detected = lib.mkOption {

https://nikitabobko.github.io/AeroSpace/guide#on-window-detected-callback

it is not a list of strings; it is a set with atributes: { x = 1; y = 2; }

@Enzime
Copy link
Collaborator

Enzime commented Nov 4, 2024

Could you make a PR?

@teelahti
Copy link

teelahti commented Nov 6, 2024

Similarly, workspace-to-monitor-force-assignment does not work even with the default configuration sample when inside services.aerospace.settings block. Nix complains about the data type:

error: syntax error, unexpected INT_LIT
at /nix/store/2ya55va8svjxbz5hrr5c17iykwgaf2a2-source/nix/hosts/mbp/default.nix:157:7:
   156|     workspace-to-monitor-force-assignment = {
   157|       1 = "1";

If I had to guess, this needs to be raised to be a property of its own, with correct data types.

@Enzime Enzime changed the title AEROSPACE SERVICE: on-window-detected options is not properly typed services.aerospace.settings.on-window-detected has the wrong type Nov 15, 2024
@dbozbay
Copy link

dbozbay commented Nov 29, 2024

Has anyone managed to parse into services.aerospace.settings.on-window-detected successfully? I can't figure out. Would love to completely ditch Aerospace via Homebrew + aerospace.toml and migrate to services.aerospace completely, but this is holding me back.

These are the settings from my aerospace.toml that I'm trying to implement in nix:

[[on-window-detected]]
if.app-id = 'company.thebrowser.Browser'
run = "move-node-to-workspace 1"

[[on-window-detected]]
if.app-id = 'com.mitchellh.ghostty'
run = 'move-node-to-workspace 2'

[[on-window-detected]]
if.app-id = 'com.apple.Music'
run = "move-node-to-workspace 3"

thuvasooriya added a commit to thuvasooriya/nix-darwin that referenced this issue Dec 2, 2024
@thuvasooriya
Copy link
Contributor

Has anyone managed to parse into services.aerospace.settings.on-window-detected successfully? I can't figure out. Would love to completely ditch Aerospace via Homebrew + aerospace.toml and migrate to services.aerospace completely, but this is holding me back.

#1168
this one fixes the issue by allowing multiple types, not sure if it's the nix way to do things, but it works for now. I think they haven't gotten around to merging it yet

thuvasooriya added a commit to thuvasooriya/nix-darwin that referenced this issue Dec 2, 2024
trying to fix LnL7#1142
@blindFS
Copy link

blindFS commented Dec 2, 2024

Unrelated question, I have a long aerospace.toml file, is it possible to load it as services.aerospace.settings ?
let expression seems not allowed in flake.nix.

@thuvasooriya
Copy link
Contributor

I have a long aerospace.toml file, is it possible to load it as services.aerospace.settings ?

I'm not sure if this is what you are asking, you can import a toml like this

  services.aerospace = {
    enable = true;
    settings = pkgs.lib.importTOML ../../config/aerospace.toml;
  };

@blindFS
Copy link

blindFS commented Dec 2, 2024

I have a long aerospace.toml file, is it possible to load it as services.aerospace.settings ?

I'm not sure if this is what you are asking, you can import a toml like this

  services.aerospace = {
    enable = true;
    settings = pkgs.lib.importTOML ../../config/aerospace.toml;
  };

Totally, thanks!

thuvasooriya added a commit to thuvasooriya/nix-darwin that referenced this issue Dec 29, 2024
…n-window-detected type LnL7#1208

trying to fix LnL7#1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

error
thuvasooriya added a commit to thuvasooriya/nix-darwin that referenced this issue Dec 29, 2024
…n-window-detected type LnL7#1208

trying to fix LnL7#1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

error

formatting mishap
thuvasooriya added a commit to thuvasooriya/nix-darwin that referenced this issue Dec 29, 2024
…n-window-detected type LnL7#1208

trying to fix LnL7#1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

error

formatting mishap

space left
thuvasooriya added a commit to thuvasooriya/nix-darwin that referenced this issue Dec 29, 2024
trying to fix LnL7#1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

aerospace: add workspace-to-monitor-force-assignment option and fix on-window-detected type LnL7#1208

trying to fix LnL7#1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

error

formatting mishap

space left
thuvasooriya added a commit to thuvasooriya/nix-darwin that referenced this issue Dec 29, 2024
…n-window-detected type LnL7#1208

trying to fix LnL7#1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

aerospace: add workspace-to-monitor-force-assignment option and fix
on-window-detected type LnL7#1208

trying to fix LnL7#1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

error

formatting mishap

space left

small fix
thuvasooriya added a commit to thuvasooriya/nix-darwin that referenced this issue Dec 29, 2024
…n-window-detected type LnL7#1208

trying to fix LnL7#1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

aerospace: add workspace-to-monitor-force-assignment option and fix
on-window-detected type LnL7#1208

trying to fix LnL7#1142

testing requested changes

adding workspace to monitor force assignment

remove formatting

tests pass

proper tests

undo formatting

tests for on-window-detected and workspace-to-monitor-force-assignment

testing submodules

cleanup n if fiz

checking

final

toml null field aerospace callback issue

custom null filter for submodule list

check for no presense of window-regex and if.workspace config check

error

formatting mishap

space left

small fix

formatting mishaps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants