Skip to content

Commit

Permalink
added support for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
wishrohitv committed Jun 29, 2024
1 parent 1a65ccd commit 1a43c64
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
aexamples
.idea
.gitignore
.gitignore
.venv
4 changes: 1 addition & 3 deletions actions/explorer_managment.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ def create_file_tree(folder_path):
return file_tree


if platform == "win":
if platform == "win" or platform == "linux" or platform == "macosx":
# folder_path = "C:\\Users\\user\\CatxCode-ide"
folder_path = storage_path
elif platform == "android":
# folder_path = "/storage/emulated/0/"
folder_path = storage_path
else:
folder_path = "/"

file_tree = create_file_tree(folder_path)
with open("tree.json", "w") as f:
Expand Down
2 changes: 1 addition & 1 deletion app_storage_implement/app_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

__all__ = ("storage_path",)

if platform == "win":
if platform == "win" or platform == "linux":
storage_path = "ide-workspace"
else:
from android.storage import app_storage_path
Expand Down
8 changes: 4 additions & 4 deletions components/sidemenu/side_menu.kv
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
group: "side_tabs"
size_hint: 1, None
height: "50dp"
background_normal: "assets/navigations/document-files-white.jpg" if self.state == "normal" else "assets/navigations/document-files-pink.jpg"
source: "assets/navigations/document-files-white.jpg" if self.state == "normal" else "assets/navigations/document-files-pink.jpg"
on_press:
root.left_tab_state(self)
app.on_left_tab_state(self)

LeftTabs:
id: search
name: "search"
background_normal: "assets/navigations/magnifying-glass-white.jpg" if self.state == "normal" else "assets/navigations/magnifying-glass-pink.jpg"
source: "assets/navigations/magnifying-glass-white.jpg" if self.state == "normal" else "assets/navigations/magnifying-glass-pink.jpg"
group: "side_tabs"
size_hint: 1, None
height: "50dp"
Expand All @@ -55,13 +55,13 @@
height: f"{Window.height-260}dp" if Window.height - 260 > 8 else 0
LeftTabs:
state: "down"
background_normal: "assets/navigations/terminal-white.jpg" if self.state == "normal" else "assets/navigations/terminal-pink.jpg"
source: "assets/navigations/terminal-white.jpg" if self.state == "normal" else "assets/navigations/terminal-pink.jpg"
size_hint: 1, None
height: "50dp"
text: "terminal"
on_press: app.open_console_and_close(self)
LeftTabs:
background_normal: "assets/navigations/info-white.jpg" if self.state == "normal" else "assets/navigations/info-pink.jpg"
source: "assets/navigations/info-white.jpg" if self.state == "normal" else "assets/navigations/info-pink.jpg"
size_hint: 1, None
height: "50dp"
text: "about"
Expand Down
4 changes: 1 addition & 3 deletions components/sidemenu/side_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ def app_info_open(self):
Factory.AboutModal().open()


# class LeftTabs(ToggleButtonBehavior, Image):
# pass
class LeftTabs(ToggleButton):
class LeftTabs(ToggleButtonBehavior, Image):
pass


Expand Down
4 changes: 2 additions & 2 deletions ide-workspace/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ def h():
class S:
g = 2
def __init__(self):
print(m, "rohit")
print(g, "rohit")
print(m, "local")
print(self.g, "properties")
S()
2 changes: 1 addition & 1 deletion tree.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name": "ide-workspace", "type": "folder", "source_path": "ide-workspace", "children": [{"name": "app.py", "type": "file", "children": [], "source_path": "ide-workspace\\app.py"}, {"name": "code.js", "type": "file", "children": [], "source_path": "ide-workspace\\code.js"}, {"name": "hii", "type": "file", "children": [], "source_path": "ide-workspace\\hii"}, {"name": "joker", "type": "folder", "source_path": "ide-workspace\\joker", "children": [{"name": "joker.asm", "type": "file", "children": [], "source_path": "ide-workspace\\joker\\joker.asm"}]}, {"name": "leika", "type": "folder", "source_path": "ide-workspace\\leika", "children": [{"name": "main.c", "type": "file", "children": [], "source_path": "ide-workspace\\leika\\main.c"}]}, {"name": "main.java", "type": "file", "children": [], "source_path": "ide-workspace\\main.java"}, {"name": "node.js", "type": "file", "children": [], "source_path": "ide-workspace\\node.js"}]}
{"name": "ide-workspace", "type": "folder", "source_path": "ide-workspace", "children": [{"name": "main.java", "type": "file", "children": [], "source_path": "ide-workspace/main.java"}, {"name": "code.js", "type": "file", "children": [], "source_path": "ide-workspace/code.js"}, {"name": "joker", "type": "folder", "source_path": "ide-workspace/joker", "children": [{"name": "joker.asm", "type": "file", "children": [], "source_path": "ide-workspace/joker/joker.asm"}]}, {"name": "app.py", "type": "file", "children": [], "source_path": "ide-workspace/app.py"}, {"name": "node.js", "type": "file", "children": [], "source_path": "ide-workspace/node.js"}, {"name": "leika", "type": "folder", "source_path": "ide-workspace/leika", "children": [{"name": "main.c", "type": "file", "children": [], "source_path": "ide-workspace/leika/main.c"}]}, {"name": "hii", "type": "file", "children": [], "source_path": "ide-workspace/hii"}]}

0 comments on commit 1a43c64

Please sign in to comment.