rofi icon indicating copy to clipboard operation
rofi copied to clipboard

[BUG] Theme selector creates a long list of entries in config.rasi whenever new theme was selected via Rofi Theme Selector

Open JaKooLit opened this issue 1 year ago • 2 comments

Rofi version (rofi -v or git commit in case of build issue)

Version: 1.7.8+wayland1-dirty

Configuration

https://gist.github.com/JaKooLit/4637ceef81e81904419becce74e705b3

Theme

https://gist.github.com/JaKooLit/94aaaa9a5826d53dcc1c891bf375ad65

Timing report

https://gist.github.com/JaKooLit/c0b90e239eb7e45ae9cd06abba1047bc

Launch command

launch Rofi Theme Selector

Step to reproduce

launch Rofi Theme Selector and then select a new theme

check contents of config.rasi

Image

Expected behavior

instead of writing a new line,

to just overwrite the line

@theme

Actual behavior

creating a long list of @themes

Additional information

I dont know what to say more

Using wayland display server protocol

  • [x] Yes, I use rofi with wayland support

I've checked if the issue exists in the latest stable release

  • [x] Yes, I have checked the problem exists in the latest stable version

JaKooLit avatar Feb 07 '25 03:02 JaKooLit

@JaKooLit the actual reproduction is to change theme with rofi-theme-selector several times in a row (eg: with several command invocations). Is that right?

In that case I don't really see a problem with the current version, probably it's even a feature:

  • it's functional, the latest selected theme will be applied
  • user will have an history of the themes they've tried in the config file
  • when they've made up their mind, they can manually clean up the config file which is plain text and is meant to be edited "by hand" anyway

rofi-theme-selector is not really meant to be used every day, it's more of a one-time helper afaik.

If you want to switch between themes on a regular basis, it probably calls for several config files.

lbonn avatar Feb 07 '25 15:02 lbonn

@lbonn

Thanks...

Could be a feature but some users may keep changing and at some point, there will be a long list. if users forgot to tinker or check

Perhaps Ill change my PR then to limit the history to say 10? or 20?

Its true, its not designed to change themes everyday but there are some handful users who wants to keep try other themes.

JaKooLit avatar Feb 07 '25 15:02 JaKooLit