12
168
Fork
You've already forked fnott
32

Change theme on the fly #38

Open
opened 2022年01月13日 19:05:30 +01:00 by flipflop133 · 6 comments

Is there any way to reload the config file (for dark/light theme switching purposes) or maybe to define sections where we can define dark and light theme variants and send a message to fnott to use the proper section.

Is there any way to reload the config file (for dark/light theme switching purposes) or maybe to define sections where we can define dark and light theme variants and send a message to fnott to use the proper section.
Owner
Copy link

Currently, no. There's no include statement, no dark/light "modes" and no way to trigger a configuration reload.

If this is something that is wanted, we'd first have to decide on which method to support, and then implement it.

Currently, no. There's no `include` statement, no dark/light "modes" and no way to trigger a configuration reload. If this is something that is wanted, we'd first have to decide on which method to support, and then implement it.

Mako is using makoctl -reload command, waybar is using killall -SIGUSR2 waybar, either of those to reload the configuration file would be fine, I didn't look at fnott implementation, so I have no idea which one would fit best.
Also, as you said, an include statement would be perfect because instead of parsing the file and changing every color, one could just change the include statement.

Mako is using `makoctl -reload` command, waybar is using `killall -SIGUSR2 waybar`, either of those to reload the configuration file would be fine, I didn't look at fnott implementation, so I have no idea which one would fit best. Also, as you said, an `include` statement would be perfect because instead of parsing the file and changing every color, one could just change the include statement.
Contributor
Copy link

I have proposed adding a systemd service file. If it were added, then you could do systemctl --user restart fnott:

#48

systemd in turn will be issuing TERM and possibly KILL signals, and then starting fnott again.

I have proposed adding a systemd service file. If it were added, then you could do `systemctl --user restart fnott`: https://codeberg.org/dnkl/fnott/pulls/48 systemd in turn will be issuing TERM and possibly KILL signals, and then starting `fnott` again.
Contributor
Copy link

The systemd unit would theoretically work but would have the side-effect of killing off any current notifications with it. I would think something like a signal-based reload, or adding a custom fnottctl sub-command to reload the config.

As for setting the color values, I use crudini to directly modify the INI values in the config file.

The `systemd` unit would theoretically work but would have the side-effect of killing off any current notifications with it. I would think something like a signal-based reload, or adding a custom `fnottctl` sub-command to reload the config. As for setting the color values, I use `crudini` to directly modify the INI values in the config file.

fnott -reload

fnott -reload
Contributor
Copy link

Recently created https://github.com/tranzystorekk/catppuccin-fnott, would love to have a less confusing how-to-use guide 😅

Recently created https://github.com/tranzystorekk/catppuccin-fnott, would love to have a less confusing how-to-use guide 😅
Sign in to join this conversation.
No Branch/Tag specified
master
releases/1.8
releases/1.7
releases/1.6
releases/1.5
release/1.4
parse-font-apply-fontconfig-rules
releases/1.3
releases/1.2
releases/1.1
releases/1.0
1.8.0
1.7.1
1.7.0
1.6.0
1.5.0
1.4.1
1.4.0
1.3.0
1.2.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
0.0.0
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
6 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dnkl/fnott#38
Reference in a new issue
dnkl/fnott
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?