mirror of
https://github.com/JakeStanger/ironbar.git
synced 2026-07-11 09:15:22 +01:00
[GH-ISSUE #468] Hot reload css files imported in style.css #154
Labels
No labels
A:Build
A:CI
A:Client
A:Config
A:Core
A:Documentation
A:Documentation
A:IPC
A:Testing
A:UX/UI
blocked
BREAKING CHANGE
duplicate
good first issue
GTK4
help wanted
invalid
M:Battery
M:Battery
M:Bindmode
M:Bluetooth
M:Brightness
M:Cairo
M:Clipboard
M:Clock
M:Clock
M:Custom
M:Focused
M:Keyboard
M:Launcher
M:Menu
M:Music
M:Music
M:Music
M:Network Manager
M:Notifications
M:SysInfo
M:Tray
M:Volume
M:Workspaces
partially resolved
P:Critical
P:High
P:Low
P:Medium
pull-request
T:Bug
T:Bug
T:Core Enhancement
T:Module Enhancement
T:New Module
T:Question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
JakeStanger/ironbar#154
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sabisho on GitHub (Feb 24, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/468
I am using wallust (rust replacement for pywal) and whenever I change my colorscheme it doesn't reload the css colors stored in
~/.cache/wal/colors.cssbut if I open and save thestyle.cssfile, it reloads the css style.I know I can do
ironbar load-cssto hot-reload any external css file, but it would be awesome if ironbar hot-reloads the css files imported with@importinstyle.cssby default.Currently I have exec-once = sleep 3; ironbar load-css ~/.cache/wal/colors.css in my hyprland.conf which does the job.
Let me know if this is possible to do in future.
@JakeStanger commented on GitHub (Feb 24, 2024):
From a quick glance through the GTK API docs, this may be possible if I can easily parse the imports.
The file watcher watches the stylesheet's parent directory for changes in order to support temp files from editors such as vim. This would need to be repeated for every import, and I guess ideally recursively in case an import handles an import. The logic around that might get a little tricky and I don't want to overcomplicate things, so I'll see what I can do.
@sabisho commented on GitHub (Feb 25, 2024):
It works on waybar have a look at the last option in bar config.
The
"reload_style_on_change": trueoption makes it work like that and I have tested it.I really like this project more than waybar mainly because of rust :) and favorite workspaces hope it makes it to the next release.
@JakeStanger commented on GitHub (Feb 25, 2024):
Cheers for that, good to know it's at least possible. It looks like they just pull out the import paths with a regex. I'd prefer to...not do that if possible but I'll have a play, and resort to that if needed.
To set realistic expectations, it's unlikely I'll get to this myself for a while, and almost certainly not for next release as I've got a big pile of issues to work through. If anybody else wants to pick this up though, PRs are welcome as always :)