end-4 / dots-hyprland

i hate minimalism so...
https://end-4.github.io/dots-hyprland-wiki/en/
GNU General Public License v3.0
3.94k stars 267 forks source link

[Feature] Save AGS sideright settings to file #553

Open l4v3nx opened 4 months ago

l4v3nx commented 4 months ago

How will it help

since ags can't save effects options, on init, ags uses hyprland's defaults to apply effects options (for example, if user changes blur and passes to 3 and 2, but you have 14 and 2 in your dots, on login or ags reload it will apply hyprland's values instead of user configured ones), so it will be helpful to use user configured values to avoid touching hyprland config

Short description

ags would create a json file in cache folder (ex. .cache/ags/user/settings.json (or whatever file format it would be easy for you to work with)). when user makes changes into sideright settings, this file would be changed dynamically. example syntax:

{
    "quicktoggles": {
        // ...
        "raw_input": 1,
        "night_light": 1,
        "keep_awake": 1,
        // ...
    },
    "notifications": {
        "silence": 1
    },
    "audio": {
        "in": "",    // last user option or empty for default
        "out": ""    // last user option or empty for default
    },
    "settings": {
        "effects": {
            "transparency": 1,
            "blur": {
                "enabled": 1,
                "size": 3,
                "passes": 2
            },
            "animations": {
                "enabled": 1,
                "delay": 35
            },
        },
        "debug": {
            // corresponding options
        }
    }
}

and also add a button like "Make persistent"

Different approach since you already have an ability to save user custom options in .config/ags/user_options.js, ags can append these example options to the config and dynamically change it (i don't think it would a right way since it's easy to mess up with user config, unless you add a new constant for it) this approach may seem bad for me and other people who fork your repo, because they would have to upload dynamically changed user_options.js and it would be somehow complicated to push only changed options by user and avoid automatically made options