import tkinter as tk
import os

# Function to be called when Button 1 is clicked
def on_button1_click():
    os.chdir('bash')
    os.startfile('bash.py')
    os.chdir('..')

# Function to be called when Button 2 is clicked
def on_button2_click():
    os.chdir('user/apps')
    os.startfile('calender.py')
    os.chdir('..\..')

def on_button3_click():
    os.chdir('user/apps')
    os.startfile('createshortcut.py')
    os.chdir('..\..')

def on_button4_click():
    os.chdir('user/apps')
    os.startfile('notepadapp.py')
    os.chdir('..\..')

# Create the main window
root = tk.Tk()
root.title("Desktop Environment")
root.geometry("460x600")  # Set window size to 460x600 pixels
root.resizable(False, False)  # Disable resizing

# Create Button 1
button1 = tk.Button(root, text="Terminal", font=("Arial", 14), width=15, height=3, command=on_button1_click)
button1.pack(side=tk.TOP, pady=10)  # Add padding to the top of the button

# Create Button 2
button2 = tk.Button(root, text="Calendar", font=("Arial", 14), width=15, height=3, command=on_button2_click)
button2.pack(side=tk.TOP, pady=10)  # Add padding to the top of the button

# Create Button 3
button3 = tk.Button(root, text="Shortcut Creation", font=("Arial", 14), width=15, height=3, command=on_button3_click)
button3.pack(side=tk.TOP, pady=10)  # Add padding to the top of the button

# Create Button 4
button4 = tk.Button(root, text="Kite File Editor", font=("Arial", 14), width=15, height=3, command=on_button4_click)
button4.pack(side=tk.TOP, pady=10)  # Add padding to the top of the button

# Run the application
root.mainloop()
