Commit graph

80 commits

Author SHA1 Message Date
tfuxu
70eca65be9
frontend/main: fix favorites list 2022-12-27 21:31:03 +01:00
tfuxu
d5fa02b2a6
linting: fix a majority of coding errors pointed by pylint 2022-12-27 21:28:58 +01:00
tfuxu
38e790c595
codebase: update some logger messages to utilize new exc option 2022-12-26 22:26:14 +01:00
tfuxu
dfb6104e1e
app: improve exception handling, remove duplicate code
* modify `get_presets_list` function from theming/preset_utils module
2022-12-22 01:11:19 +01:00
tfuxu
cf23aa9862
docs: update structure description files 2022-12-22 00:31:44 +01:00
tfuxu
61eb5fb865
frontend/cli: reenable monet command on Flatpak builds
* move sandbox check from `frontend/cli` module to `backend/globals`
2022-12-19 20:28:53 +01:00
tfuxu
03a63e7a33
frontend/cli: add new access-file command
* add try..except statement to shutil.copy operation in `import` command
2022-12-19 20:17:35 +01:00
tfuxu
354010ae22
frontend/cli: fix download command failing after indexing first preset 2022-12-18 18:59:43 +01:00
1e8de798db fix: text 2022-12-18 19:27:51 +03:00
tfuxu
db7347cf18
frontend/cli: add more messages in CLI to make it more user-friendly
* finish `apply` command
* remove `frontend/settings_schema` module from imports in backend modules
2022-12-18 16:36:25 +01:00
tfuxu
20994dfdf1
frontend/cli: add information for Flatpak users about monet command
This commit adds error message that shows up when `monet` command is executed on Flatpak builds.
2022-12-18 15:46:15 +01:00
tfuxu
50205619fa
frontend/cli: fix local builds support, add logic code for all remaining commands
* add logic code for `presets` and `favorites` command,
* disable `new` command for now (I need to think later how users should input required values in this command),
* add `No presets found` statement in `download` command,
* create new local_cli.sh script for easier CLI testing on local builds
2022-12-17 23:00:05 +01:00
tfuxu
d3df5c37da
backend: change the structure of log messages, and move preset listing function to backend
* add ability to name modules in logger object,
* slightly clean PresetDownloader class and return exceptions on error encounters
2022-12-17 18:42:29 +01:00
tfuxu
da0300e934
frontend/cli: use from now backend/logger module functions to print messages in CLI 2022-12-17 17:24:16 +01:00
tfuxu
3c850380be
frontend/cli: change some help messages 2022-12-13 19:27:20 +01:00
tfuxu
b36669b40e
frontend/cli: add logic to import command, and finish download command 2022-12-11 18:42:46 +01:00
tfuxu
7f8e3ccc80
backend: convert preset_downloader module to class
* add more exception handling to backend/preset_downloader and backend/models/preset modules
2022-12-11 17:53:30 +01:00
tfuxu
7c1a29561d
frontend/cli: add rudimentary logic code for apply, download and flatpak_theming commands 2022-12-11 13:23:12 +01:00
tfuxu
24d34296de
backend/globals: move official Gradience preset repositories list to globals module 2022-12-11 12:57:30 +01:00
tfuxu
c74bd9bfe2
backend: allow functions in flatpak_override module to be used without specifying an Adw.ToastOverlay object 2022-12-11 12:53:18 +01:00
tfuxu
f0afbd817d
frontend: introduce initial CLI interface
This commit adds a new CLI interface made using argparse library. Current status of CLI interface is very WIP, as it lacks logic for the majority of commands and doesn't work properly on Flatpak and local builds.
Currently working commands: monet, version
2022-12-10 17:03:38 +01:00
tfuxu
527a9dc90f
backend: seperate JSON encoding in Preset module to a new function
* add more checks in new_preset_from_monet function
* return full Preset object instead of dict data
* remove some unused code
2022-12-10 15:21:13 +01:00
tfuxu
e1e244db72
backend/theming: move apply, restore and reset preset functions to backend 2022-12-09 00:12:02 +01:00
tfuxu
22f476f766
backend: create new modules for preset generation utilities 2022-12-08 14:05:38 +01:00
tfuxu
e834e55b11
backend/models: refactor Preset model object
This commit is the first in a series of commits that will introduce new CLI interface for Gradience. Currently we need to move some parts of code that reside mostly in frontend modules to their new backend modules, and this commit is the beggining of this whole ordeal.

* Refactor Preset model object, in order to make it more readable and to allow `new` function that directly takes new values for properties
* Move presets_dir from models/preset to new backend/globals module
* Create new utils/colors module (will be used in later commits)
* Update all modules that are affected by above changes
2022-12-08 12:43:12 +01:00
tfuxu
771c0e58c1
feat: add error messages to preview demo functions
* allow demo functions to fail if shell returns an error
2022-12-06 19:37:20 +01:00
tfuxu
a8c83d1935
feat: introduce new backend/logger module
This commit introduces a new logger module and converts any log message that used buglog() to use one of five new functions from Logger class.
2022-12-04 00:00:18 +01:00
tfuxu
df73f3d006
misc: make code more readable 2022-12-02 23:37:41 +01:00
tfuxu
5e42501691
rename: change module name from utils.py to common.py 2022-12-02 23:21:55 +01:00
tfuxu
30a9fdb613
move modules to new backend/frontend directories 2022-12-02 22:52:47 +01:00