From 71332c0c34064aa11cb9a446ba876e79536cfc07 Mon Sep 17 00:00:00 2001 From: Chandler J Date: Thu, 1 Feb 2024 21:48:52 -0700 Subject: updated README --- README.md | 12 +++++++++++- src/tui.py | 25 +++++++++++++++---------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index cf53e7c..450d3cb 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This program will take in an image and generate a color palette based on the ima ## Usage -`python3 instant_rice.py [image_path] [-r] [--nolock]` +`python3 instant_rice.py [image_path] [-r] [-nolock]` - `-r`: pick a random image from your `Paths['wallpapers']` directory - `--nolock`: bypass generating an i3 lock screen @@ -19,6 +19,7 @@ This program will take in an image and generate a color palette based on the ima - Need Python3 version `> 3.6` - `numpy`, `cv2`, and `scipy_learn` module + - (optinal) install `rich` for pretty print - `viu` for displaying wallpaper previews - This program can be easily obtained from the Rust package manager using `cargo install viu` @@ -45,3 +46,12 @@ This program will take in an image and generate a color palette based on the ima 'lockscreen': '/home/chandler/.config/i3/' } ``` + + ## Things to change / anticipated features + + - Use less dependencies + - Specifically, implement `k-means` algorithm from scratch instead of using library. + - Additionally, Replace `rich` with escape sequences. + - Implement file initializers. Will put the copy over InstantRice config files to appropriate location + - Tui to adjust appearance of system (window boarders, titlebars, bar settings, etc) + - *Down the line* Rewrite in a better language. diff --git a/src/tui.py b/src/tui.py index fc702f9..7bb770f 100644 --- a/src/tui.py +++ b/src/tui.py @@ -1,20 +1,25 @@ import pytermgui as ptg -global gaps_enabled -gaps_enabled = False -def toggle_gaps(gaps): - gaps = not gaps +gapsToggle = ptg.Checkbox(parent_align=2) with ptg.WindowManager() as manager: - layout = ptg.Layout() - layout.add_slot("Body Left", index=0) - layout.add_slot("Body Right", width=0.5, index=1) + #layout = ptg.Layout() + #layout.add_slot("Body Left", index=0) + #layout.add_slot("Body Right", width=0.5, index=1) i3window = ( ptg.Window( "[bold]i3 Configuration Settings", ptg.Label("[italic gray]gaps", parent_align=0), - ptg.Splitter(ptg.Label("Toggle window gaps", parent_align=0), ptg.Checkbox(parent_align=2)) + ptg.Splitter(ptg.Label("Window gaps", parent_align=0), gapsToggle), + ptg.InputField(prompt="Inner Gaps: ", value="6"), + ptg.InputField(prompt="Outer Gaps: "), + ptg.Label(""), + ptg.Label("[italic gray]Window Boarders", parent_align=0), + ptg.Splitter(ptg.Label("Titlebars", parent_align=0), ptg.Checkbox(parent_align=2)), + ptg.Splitter(ptg.Label("Window Boarders", parent_align=0), ptg.Checkbox(parent_align=2)), + ptg.InputField(prompt="Boarder Width: "), + ptg.Button("Save Changes") ) .set_title("[italic inverse !gradient(60)]i3 Configuration[/!]") ) @@ -23,8 +28,8 @@ with ptg.WindowManager() as manager: "[bold]Polybar Configuration Settings" ).set_title("[italic inverse !gradient(45)]Polybar Configuration") ) - layout.assign(polybar_window, index=0) - layout.assign(i3window, index=1) + #layout.assign(polybar_window, index=0) + #layout.assign(i3window, index=1) manager.add(i3window) manager.add(polybar_window) -- cgit v1.2.3