mwm icon indicating copy to clipboard operation
mwm copied to clipboard

Unable to parse .toml

Open PuffyWithEyes opened this issue 1 year ago • 1 comments

thread 'main' panicked at 'Unable to parse toml config.: Error { inner: Error { inner: TomlError { message: "invalid type: integer `8`, expected a sequence", original: Some("# Border thickness\nborder_thickness = 2\n\n# Space between windows\nborder_gap = 4\n\n# Color of border around windows when active\nactive_border = 0x56b6c2\n\n# Color of border around windows when inactive\ninactive_border = 0x4b5263\n\n# What modifier to switch workspace\nworkspace_modifier = 0x0008 # key: l-alt\n\n# What modifier to move window to workspace\nworkspace_move_window_modifier = 0x0009 # key: l-alt + shift\n\n# Autostart the following programs\nautostart = [\n \"statusbar\"\n]\n\n# List of actions that the window manager handles\n[[actions]]\nmodifier = 0x0009 # key: l-alt + shift\nkeysym = 0x0063 # key: c\naction = \"Close\"\n\n[[actions]]\nmodifier = 0x0008 # key: l-alt\nkeysym = 0x006b # key: k\naction = \"SelectAbove\"\n\n[[actions]]\nmodifier = 0x0008 # key: l-alt\nkeysym = 0x006a # key: j\naction = \"SelectBelow\"\n\n[[actions]]\nmodifier = 0x0008 # key: l-alt\nkeysym = 0x0068 # key: h\naction = \"ShrinkFront\"\n\n[[actions]]\nmodifier = 0x0008 # key: l-alt\nkeysym = 0x006c # key: l\naction = \"ExpandFront\"\n\n# List of commands that are executed\n[[commands]]\nmodifier = 0x0008 # key: l-alt\nkeysym = 0x0070 # key: p\ncommand = \"selector_run\"\n\n[[commands]]\nmodifier = 0x0008 # key: l-alt\nkeysym = 0x0073 # key: s\ncommand = \"st\"\n"), keys: ["workspace_modifier"], span: Some(284..290) } } } error that appears when trying to launch the application

PuffyWithEyes avatar Mar 11 '24 22:03 PuffyWithEyes

For anyone in future who is reading this, this is because the config.toml desired syntax changed. Rather, it is like this now (the full config.toml is attached, incase you don't have it):

border_thickness = 2

# Space between windows
border_gap = 4

# Color of border around windows when active
active_border = 0x56b6c2

# Color of border around windows when inactive
inactive_border = 0x4b5263

# What modifier to switch workspace
# workspace_modifier = ["Alt"] --> This was default
workspace_modifier = ["Alt", "Ctrl"]

# What modifier to move window to workspace
workspace_move_window_modifier = ["Alt", "Shift"]

# Autostart the following programs
autostart = [
    "statusbar"
]

# List of actions that the window manager handles
[[actions]]
modifier = 0x0009 # key: l-alt + shift
keysym = 0x0063 # key: c
action = "Close"

[[actions]]
modifier = 0x0008 # key: l-alt
keysym = 0x006b # key: k
action = "SelectAbove"

[[actions]]
modifier = 0x0008 # key: l-alt
keysym = 0x006a # key: j
action = "SelectBelow"

[[actions]]
modifier = 0x0008 # key: l-alt
keysym = 0x0068 # key: h
action = "ShrinkFront"

[[actions]]
modifier = 0x0008 # key: l-alt
keysym = 0x006c # key: l
action = "ExpandFront"

# List of commands that are executed
[[commands]]
modifier = 0x0008 # key: l-alt
keysym = 0x0070 # key: p
command = "selector_run"

[[commands]]
modifier = 0x0008 # key: l-alt
keysym = 0x0073 # key: s
command = "st"

The changed lines are:

# What modifier to switch workspace
workspace_modifier = ["Alt"]

# What modifier to move window to workspace
workspace_move_window_modifier = ["Alt", "Shift"]

Change this from their previous lines

Another issue i also encountered was that proc_macro_span_shrink isn't valid anymore, but just removing the reference of that seemed to work fine

kingdomkind avatar Jun 30 '24 17:06 kingdomkind