This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl MyApp { | |
/// Called once before the first frame. | |
pub fn new(cc: &eframe::CreationContext<'_>) -> Self { | |
// This is where you can customize the look and feel of egui using | |
// `cc.egui_ctx.set_visuals` and `cc.egui_ctx.set_fonts`. | |
Self::setup_fonts(cc); | |
// Load previous app state (if any). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated with https://claude.ai/public/artifacts/f8a4ae9b-7ad9-48bc-b867-f5e6652e9287 | |
use eframe::egui; | |
use egui::{Color32, RichText}; | |
pub struct MyApp { | |
text_input1: String, | |
text_input2: String, | |
text_input3: String, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Demo of snapshotting and loading DockState. | |
// | |
// The general idea is to allow a user to save their layout and then be able to reload it later. | |
// For example, in an IDE it might be helpful to have one layout for UI programming (e.g. a render | |
// window on one side) while more space for terminal output might be preferable in other situations. | |
// | |
// Being able to save and load DockState allows quickly swapping between layouts. It also allows | |
// the program to provide preset layouts that users could choose between. | |
use eframe::NativeOptions; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Demo of saving and loading UI layouts using egui_dock. | |
use eframe::NativeOptions; | |
use egui::containers::menu::MenuConfig; | |
use egui::{ | |
CentralPanel, PopupCloseBehavior, TopBottomPanel, Ui, ViewportBuilder, WidgetText, vec2, | |
}; | |
use egui_dock::tab_viewer::OnCloseResponse; | |
use egui_dock::{DockArea, DockState, NodeIndex, Style, SurfaceIndex, TabViewer}; | |
use serde::{Deserialize, Serialize}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import subprocess | |
BASE_DIR = "/home/omustardo/go/src/github.com/omustardo/omustardo.com/" | |
DEPLOY_DIR = BASE_DIR + "public/" | |
import os | |
from pathlib import Path | |
def convert_md_files_to_html(directory): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use eframe::egui; | |
use egui_dock::{DockState, NodeIndex, TabViewer}; | |
fn main() -> Result<(), eframe::Error> { | |
let options = eframe::NativeOptions { | |
viewport: egui::ViewportBuilder::default().with_inner_size([800.0, 600.0]), | |
..Default::default() | |
}; | |
eframe::run_native( | |
"Dock Tab Overlap Demo", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2025-07-13 16:22:44 [INFO ]: aw-watcher-window started (aw_watcher_window.main:70) | |
2025-07-13 16:22:45 [INFO ]: Connection to aw-server established by aw-watcher-window (aw_client.client:447) | |
2025-07-13 20:39:33 [WARNING]: I don't think this case will ever happen, but not sure so leaving this message here just in case. (aw_watcher_window.xlib:82) | |
2025-07-13 20:39:33 [ERROR]: Exception thrown while trying to get active window (aw_watcher_window.main:133) | |
Traceback (most recent call last): | |
File "aw_watcher_window/main.py", line 115, in heartbeat_loop | |
File "aw_watcher_window/lib.py", line 64, in get_current_window | |
File "aw_watcher_window/lib.py", line 17, in get_current_window_linux | |
File "aw_watcher_window/xlib.py", line 85, in get_window_name | |
AttributeError: 'NoneType' object has no attribute 'decode' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
# This program demonstrates how an application with a GUI might be created at its core. | |
# It creates a button by drawing a rectangle and handling mouse movement and clicks. | |
# It depends on tkinter (https://docs.python.org/3/library/tkinter.html) for creating a window, a drawable canvas, and getting mouse interactions. | |
# I generated this demo using Claude: https://claude.ai/share/62cd9df4-1ed7-40b7-a8f3-fb7e03e0146f | |
# Function to create and run our GUI application | |
def run_rectangle_demo(): | |
# Create the main window |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Flexible Layout Test Script for Fyne applications | |
# Usage: ./layout_test.sh [path] [iterations] | |
# Examples: | |
# ./layout_test.sh foo/main.go 10 # Specific Go file with 10 iterations | |
# Parse arguments | |
TARGET_PATH="${1:-.}" # Default to current directory if not specified | |
ITERATIONS="${2:-20}" # Default to 20 iterations if not specified |
NewerOlder