Does Anyone has same error in zebar workspace button click event, when js import? #816
-
Error
Configconfig.yaml template/glazewm_workspaces:
styles: |
display: flex;
align-items: center;
.workspace {
background: rgb(255 255 255 / 5%);
margin-right: 4px;
padding: 4px 8px;
color: rgb(255 255 255 / 90%);
border: none;
border-radius: 2px;
cursor: pointer;
&.displayed {
background: rgb(255 255 255 / 15%);
}
&.focused,
&:hover {
background: rgb(75 115 255 / 50%);
}
}
providers: ['glazewm']
events:
- type: 'click'
fn_path: 'script.js#focusWorkspace'
selector: '.workspace'
template: |
@for (workspace of glazewm.currentWorkspaces) {
<button
class="workspace {{ workspace.hasFocus ? 'focused' : '' }} {{ workspace.isDisplayed ? 'displayed' : '' }}"
id="{{ workspace.name }}"
>
{{ workspace.displayName ?? workspace.name }}
</button>
} script.js export function focusWorkspace(event, context) {
console.log('Focus button clicked!', event, context);
const id = event.target.id;
context.providers.glazewm.focusWorkspace(id);
} ❯ ls ~/.glzr/zebar
Directory: C:\Users\who\.glzr\zebar
Mode LastWriteTime Length Name
---- ------------- ------ ----
la--- 2024/08/07 13:56 0 config.yaml -> C:\Users\who\Documents\GitHub\dotfiles\zebar\config.yaml
la--- 2024/08/07 13:56 0 script.js -> C:\Users\who\Documents\GitHub\dotfiles\zebar\script.js
la--- 2024/08/07 13:56 0 start.bat -> C:\Users\who\Documents\GitHub\dotfiles\zebar\start.bat
la--- 2024/08/07 13:56 0 start.sh -> C:\Users\who\Documents\GitHub\dotfiles\zebar\start.sh |
Beta Was this translation helpful? Give feedback.
Answered by
ShortArrow
Nov 3, 2024
Replies: 2 comments
-
Migration to zebar 2.4 or later, may have fixed this issue, I will investigate that. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lars-berger
-
Migration to zebar 2.4 or later, have fixed this issue, no happen, close this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Migration to zebar 2.4 or later, may have fixed this issue, I will investigate that.