ironbar: Scripts don't work while running ironbar under a systemd service NixOS
Describe the bug
Scripts don’t work while running ironbar under a systemd service
To Reproduce Steps to reproduce the behavior:
- Use script
- See error
Expected behavior
Scripts work
System information:
- Distro: NixOS unstable (aka 23.05)
- Compositor: Hyprland
- Ironbar version: 0.11 (latest commit on master)
Configuration
Config (generated json from nix)
{
"anchor_to_edges": true,
"center": [
{
"bar": [
{
"class": "music-img-img",
"src": "{{poll:5000:playerctl metadata mpris:artUrl}}",
"type": "image"
}
],
"class": "music-img",
"name": "music-img",
"on_mouse_enter": {
"cmd": "/nix/store/7kaxirybmsqz1wnq290aj9fifwgdisjx-mctrls-shower/bin/mctrls-shower"
},
"on_mouse_exit": {
"cmd": "/nix/store/c6swqv9dw2sbiw5zsxar5f3s5zl1m0ix-mctrls-hider/bin/mctrls-hider"
},
"type": "custom"
},
{
"format": "{title}",
"icons": {
"pause": "icon:media-playback-pause",
"play": "icon:media-playback-start"
},
"music_dir": "/home/yavor/Music",
"on_mouse_enter": {
"cmd": "/nix/store/7kaxirybmsqz1wnq290aj9fifwgdisjx-mctrls-shower/bin/mctrls-shower"
},
"on_mouse_exit": {
"cmd": "/nix/store/c6swqv9dw2sbiw5zsxar5f3s5zl1m0ix-mctrls-hider/bin/mctrls-hider"
},
"player_type": "mpris",
"show_status_icon": false,
"truncate": "end",
"type": "music"
},
{
"bar": [
{
"class": "music-ctrls-prev",
"label": "玲",
"on_click": "!/nix/store/nxip05k3sg7m937vvavjpfdak6k3ica0-iron-previous/bin/iron-previous",
"type": "button"
},
{
"class": "music-ctrls-pp",
"label": "{{poll:100:/nix/store/jha3arpk5fpcspbam0nkdrrdsvx79l09-pp-icon/bin/pp-icon}}",
"on_click": "!/nix/store/rqacrmlhvwnmp90i88wmmx14bismvjp2-iron-play-pause/bin/iron-play-pause",
"type": "button"
},
{
"class": "music-ctrls-next",
"label": "怜",
"on_click": "!/nix/store/qf2246j28xybmz7h9yb23nxi4b0yhm13-iron-next/bin/iron-next",
"type": "button"
}
],
"class": "music-ctrls",
"name": "music-ctrls",
"on_mouse_enter": {
"cmd": "/nix/store/7kaxirybmsqz1wnq290aj9fifwgdisjx-mctrls-shower/bin/mctrls-shower"
},
"on_mouse_exit": {
"cmd": "/nix/store/c6swqv9dw2sbiw5zsxar5f3s5zl1m0ix-mctrls-hider/bin/mctrls-hider"
},
"show_if": {
"cmd": "/nix/store/i9mm84k7myf1fis2xgnbsqxj3jd1ygn6-mctrls-checker/bin/mctrls-checker",
"interval": 500,
"mode": "poll"
},
"transition_type": "slide_start",
"type": "custom"
}
],
"end": [
{
"type": "tray"
},
{
"format": [
" {cpu_percent}%",
" {memory_percent}%"
],
"type": "sys_info"
},
{
"bar": [
{
"label": "",
"name": "power-btn",
"on_click": "popup:toggle",
"type": "button"
}
],
"class": "power-menu",
"popup": [
{
"orientation": "vertical",
"type": "box",
"widgets": [
{
"label": "Power menu",
"name": "header",
"type": "label"
},
{
"type": "box",
"widgets": [
{
"class": "power-btn",
"label": "<span font-size='40pt'></span>",
"on_click": "!shutdown now",
"type": "button"
},
{
"class": "power-btn",
"label": "<span font-size='40pt'></span>",
"on_click": "!reboot",
"type": "button"
}
]
},
{
"label": "Uptime: {{30000:/nix/store/ws0j8bcqxcy08d664cbbbg6j0xlg1vg6-fmt-uptime/bin/fmt-uptime}}",
"name": "uptime",
"type": "label"
}
]
}
],
"tooltip": "Up: {{30000:/nix/store/ws0j8bcqxcy08d664cbbbg6j0xlg1vg6-fmt-uptime/bin/fmt-uptime}}",
"type": "custom"
},
{
"format": "%l:%M %P",
"type": "clock"
}
],
"height": 32,
"icon_theme": "Papirus-Dark",
"position": "top",
"start": [
{
"bar": [
{
"label": "",
"on_click": "!hyprctl dispatch exec \"zsh -c 'rofi -show drun'\"",
"type": "button"
}
],
"class": "nix-launcher",
"name": "nix-launcher",
"type": "custom"
},
{
"all_monitors": false,
"name_map": {
"1": "●",
"10": "●",
"2": "●",
"3": "●",
"4": "●",
"5": "●",
"6": "●",
"7": "●",
"8": "●",
"9": "●"
},
"type": "workspaces"
}
]
}
Additional context
Works while executing normally, and not under systemd service
Screenshots

From journalctl and is same for like every occurance of the issue, which is like a lot cuz its polling (and retrying? I presume)
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (17 by maintainers)
Commits related to this issue
- fix: scripts don't work while running ironbar under a systemd service Fixes #134 — committed to JakeStanger/ironbar by JakeStanger a year ago
makes sense, then
Not sure either but it went away
It does