From 8efbfd0164b95d6b83197e8278a2365f98254038 Mon Sep 17 00:00:00 2001 From: ZennDev1337 Date: Thu, 25 Jul 2024 08:28:53 +0200 Subject: [PATCH] Add .config files --- .config/alacritty/alacritty.toml | 18 ++++++++++++++++ .config/zed/initPython.sh | 19 +++++++++++++++++ .config/zed/settings.json | 25 +++++++++++++++++++++++ .config/zed/tasks.json | 35 ++++++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+) create mode 100644 .config/alacritty/alacritty.toml create mode 100644 .config/zed/initPython.sh create mode 100644 .config/zed/settings.json create mode 100644 .config/zed/tasks.json diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..ece1086 --- /dev/null +++ b/.config/alacritty/alacritty.toml @@ -0,0 +1,18 @@ +live_config_reload = true + +[window] + +opacity = 0.8 +dynamic_padding = false +padding.x = 20 +padding.y = 20 + +decorations = "buttonless" +decorations_theme_variant = "Light" # "Dark" + +[font] +normal = { family = "ComicShannsMonoNerdFontMono", style = "regular" } +size = 13.0 + +[env] +TERM = "xterm-256color" diff --git a/.config/zed/initPython.sh b/.config/zed/initPython.sh new file mode 100644 index 0000000..0e79bdd --- /dev/null +++ b/.config/zed/initPython.sh @@ -0,0 +1,19 @@ +# Überprüfen, ob pyrightconfig.json existiert, wenn nicht, erstelle es mit dem angegebenen Inhalt +if [ ! -f "pyrightconfig.json" ]; then + echo '{"venvPath": ".", "venv": ".venv"}' > pyrightconfig.json +fi + +# Überprüfen, ob das Verzeichnis .venv existiert, wenn nicht, erstelle ein virtuelles Python-Umfeld +if [ ! -d ".venv" ]; then + python3 -m venv .venv +fi + +# Überprüfen, ob requirements.txt existiert, wenn nicht, erstelle eine leere Datei +if [ ! -f "requirements.txt" ]; then + touch requirements.txt +fi + +# Überprüfen, ob requirements.txt nicht leer ist, wenn nicht, installiere die Anforderungen +if [ -s "requirements.txt" ]; then + ./.venv/bin/pip install -r requirements.txt +fi \ No newline at end of file diff --git a/.config/zed/settings.json b/.config/zed/settings.json new file mode 100644 index 0000000..b56dbf3 --- /dev/null +++ b/.config/zed/settings.json @@ -0,0 +1,25 @@ +// Zed settings +// +// For information on how to configure Zed, see the Zed +// documentation: https://zed.dev/docs/configuring-zed +// +// To see all of Zed's default settings without changing your +// custom settings, run the `open default settings` command +// from the command palette or from `Zed` application menu. +{ + "ui_font_size": 16, + "buffer_font_size": 16, + "theme": { + "mode": "system", + "light": "One Light", + "dark": "Ayu Mirage" + }, + "file_scan_exclusions": [ + ".idea", + ".git", + ".code", + ".venv", + "**/.run", + "**/__pycache__" + ] +} diff --git a/.config/zed/tasks.json b/.config/zed/tasks.json new file mode 100644 index 0000000..8a06266 --- /dev/null +++ b/.config/zed/tasks.json @@ -0,0 +1,35 @@ +// Static tasks configuration. +// +// Example: +[ + { + "label": "Run python selection", + "command": "python3", + "args": ["-c", "\"$ZED_SELECTED_TEXT\""], + "use_new_terminal": false + }, + { + "label": "Run python file", + "command": "python3", + "args": ["$ZED_FILE"], + "use_new_terminal": false + }, + { + "label": "Create new venv", + "command": "python3", + "args": ["-m", "venv", "$ZED_WORKTREE_ROOT/.venv"], + "use_new_terminal": false + }, + { + "label": "Delete venv", + "command": "rm", + "args": ["-rf", "$ZED_WORKTREE_ROOT/.venv"], + "use_new_terminal": false + }, + { + "label": "Setup Python Project (pyrightconfig.json)", + "command": "bash", + "args": ["~/.config/zed/initPython.sh"], + "use_new_terminal": false + } +]