From 728457f71c8722951fa25b4aa50a196eb8029893 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Sat, 19 Jul 2025 17:15:10 +0200 Subject: [PATCH] add config assets, backup round --- .gitignore | 4 +- analyse_speed_limits_essonne.py | 82 --- assets/.bash_custom_aliases | 14 +- assets/.config/filetags/.filetags | 37 ++ assets/.config/geeqie/accels | 330 +++++++++++ .../geeqie/applications/add-tags.desktop | 12 + .../geeqie/applications/append-name.desktop | 12 + .../applications/guess-filename.desktop | 12 + .../.config/geeqie/applications/m2a.desktop | 12 + .../geeqie/applications/prepend-name.desktop | 12 + .../geeqie/applications/rangereal.desktop | 12 + .../geeqie/applications/remove-tags.desktop | 12 + .../applications/tag-administratif.desktop | 12 + .../geeqie/applications/tag-cosplay.desktop | 12 + .../geeqie/applications/tag-illu.desktop | 12 + .../applications/tag-nourriture.desktop | 12 + assets/.config/geeqie/geeqie accels config | 330 +++++++++++ assets/.config/geeqie/geeqierc.xml | 390 +++++++++++++ .../guessfilename}/guessfilenameconfig.py | 0 assets/.ssh/config | 20 + backup-management/round.sh | 137 +++++ histogramme_from_csv.py | 18 - initialization/check_installed.sh | 2 +- initialization/fast.sh | 82 ++- initialization/functions.sh | 548 ++++++++++++++++++ workflow_variables.sh | 11 +- 26 files changed, 2011 insertions(+), 126 deletions(-) delete mode 100644 analyse_speed_limits_essonne.py create mode 100644 assets/.config/filetags/.filetags create mode 100644 assets/.config/geeqie/accels create mode 100644 assets/.config/geeqie/applications/add-tags.desktop create mode 100644 assets/.config/geeqie/applications/append-name.desktop create mode 100644 assets/.config/geeqie/applications/guess-filename.desktop create mode 100644 assets/.config/geeqie/applications/m2a.desktop create mode 100644 assets/.config/geeqie/applications/prepend-name.desktop create mode 100644 assets/.config/geeqie/applications/rangereal.desktop create mode 100644 assets/.config/geeqie/applications/remove-tags.desktop create mode 100644 assets/.config/geeqie/applications/tag-administratif.desktop create mode 100644 assets/.config/geeqie/applications/tag-cosplay.desktop create mode 100644 assets/.config/geeqie/applications/tag-illu.desktop create mode 100644 assets/.config/geeqie/applications/tag-nourriture.desktop create mode 100644 assets/.config/geeqie/geeqie accels config create mode 100644 assets/.config/geeqie/geeqierc.xml rename assets/{ => .config/guessfilename}/guessfilenameconfig.py (100%) create mode 100644 assets/.ssh/config create mode 100755 backup-management/round.sh delete mode 100644 histogramme_from_csv.py create mode 100644 initialization/functions.sh diff --git a/.gitignore b/.gitignore index 80cc184..9d779ce 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ .vscode bin/Nextcloud* -bin/Veracrypt* \ No newline at end of file +bin/Veracrypt* +/bin/VeraCrypt-1.26.24-x86_64.AppImage +/bin/Nextcloud-3.16.6-x86_64.AppImage diff --git a/analyse_speed_limits_essonne.py b/analyse_speed_limits_essonne.py deleted file mode 100644 index 934137f..0000000 --- a/analyse_speed_limits_essonne.py +++ /dev/null @@ -1,82 +0,0 @@ -import osmnx as ox -import pandas as pd -import matplotlib.pyplot as plt -import networkx as nx - -# 1. Télécharger les routes principales de l'Essonne -# On cible les types de routes principales -highway_types = ["motorway", "trunk", "primary", "secondary"] - -# Essonne (département 91, France) -place = "Essonne, France" - -print("Téléchargement du graphe routier...") -G = ox.graph_from_place(place, network_type='drive', custom_filter='["highway"~"motorway|trunk|primary|secondary"]') - -# 2. Extraire les limitations de vitesse et calculer la longueur -edges = ox.graph_to_gdfs(G, nodes=False, edges=True) - -# On normalise les limitations de vitesse - -def parse_maxspeed(val): - # Si c'est une liste ou un array, on prend le premier élément - if isinstance(val, (list, tuple)): - if len(val) == 0: - return None - val = val[0] - if pd.isna(val): - return None - try: - # On ne garde que le nombre - return int(str(val).split()[0]) - except Exception: - return None - -edges['maxspeed_norm'] = edges['maxspeed'].apply(parse_maxspeed) - -# Calcul de la longueur en km -edges['length_km'] = edges['length'] / 1000 - -# 3. Statistiques -speed_stats = edges.groupby('maxspeed_norm')['length_km'].sum().reset_index() -speed_stats = speed_stats.rename(columns={'maxspeed_norm': 'limitation_vitesse', 'length_km': 'longueur_km'}) - -# Combien de km sans limitation ? -no_speed = edges[edges['maxspeed_norm'].isna()]['length_km'].sum() - -# Remplacer les NaN par -1 pour les routes sans limitation spécifiée -speed_stats['limitation_vitesse'] = speed_stats['limitation_vitesse'].fillna(-1).astype(int) - -# 4. Export CSV -speed_stats.to_csv('limitations_vitesse_essonne.csv', index=False) - -# 5. Graphique SVG -fig, ax = plt.subplots(figsize=(12, 12)) -# Routes avec limitation: gris, sans limitation: rouge -edges_with_speed = edges[edges['maxspeed_norm'].notna()] -edges_no_speed = edges[edges['maxspeed_norm'].isna()] - -edges_with_speed.plot(ax=ax, linewidth=0.7, color='grey', alpha=0.5) -edges_no_speed.plot(ax=ax, linewidth=1.2, color='red', alpha=0.8) - -ax.set_title("Routes principales de l'Essonne sans limitation de vitesse (en rouge)") -ax.axis('off') -plt.tight_layout() -plt.savefig('routes_sans_limitation_essonne.svg', format='svg') - -# 5b. Histogramme des limitations de vitesse -plt.figure(figsize=(10,6)) -plt.bar(speed_stats['limitation_vitesse'].astype(str), speed_stats['longueur_km'], color='skyblue', edgecolor='black') -plt.xlabel('Limitation de vitesse (km/h)') -plt.ylabel('Longueur totale (km)') -plt.title("Histogramme des limitations de vitesse sur les routes principales de l'Essonne") -plt.tight_layout() -plt.savefig('histogramme_limitations_vitesse_essonne.png') -print("Histogramme sauvegardé sous histogramme_limitations_vitesse_essonne.png") - -# 6. Résumé console -print("\nRésumé:") -print(speed_stats) -print(f"\nLongueur totale sans limitation de vitesse: {no_speed:.2f} km") -print("CSV sauvegardé sous limitations_vitesse_essonne.csv") -print("SVG sauvegardé sous routes_sans_limitation_essonne.svg") \ No newline at end of file diff --git a/assets/.bash_custom_aliases b/assets/.bash_custom_aliases index 9815dfe..d921b05 100644 --- a/assets/.bash_custom_aliases +++ b/assets/.bash_custom_aliases @@ -6,9 +6,8 @@ # load variables # echo "bash custom aliases: load functions to sync files" source "$HOME/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh" +source "$HOME/Nextcloud/ressources/workflow_nextcloud/public_workflow/initialization/functions.sh" source "$HOME/Nextcloud/ressources/workflow_nextcloud/secrets_vars.sh" -source "$WORKFLOW_PATH/install/functions_sync.sh" -source "$WORKFLOW_PATH/install/functions_tk.sh" @@ -17,6 +16,7 @@ alias work="cd $www_folder/scripts/mapping_geojson_to_osm_tags" ########## lieux ########### alias gow="cd $WORKFLOW_PATH" # go to folder of nextcloud where i store my scripts +alias gopw="cd $WORKFLOW_PUBLIC_PATH" # go to folder of nextcloud where i store my scripts ###### lieux locaux alias goj="ssh -p 3910 tykayn@bbb.liness.org" @@ -106,8 +106,6 @@ alias hgrep="history |grep" alias whatport="sudo netstat -pna | grep " alias runport="firefox https://localhost:$1" alias dff='df -h --exclude-type=squashfs --exclude-type=devtmpfs --exclude-type=tmpfs' # voir l'espace libre sans les paritions snap -alias pup='/home/tykayn/.local/pipx/venvs/panoramax-cli/bin/panoramax_cli upload --api-url https://panoramax.openstreetmap.fr .' #panoramax upload avec mon compte perso -alias pum='/home/tykayn/.local/pipx/venvs/panoramax-cli/bin/panoramax_cli upload --api-url https://panoramax.openstreetmap.fr . --token="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnZW92aXNpbyIsInN1YiI6IjQ1NmJmMWQ1LTgxNzEtNDdlMy05MmQ1LWNkNTM1MjBiOWZkMyJ9.JqedjxqgwVY6bB9vKe4v5HiSvZAndiXICre_iI06Auc" --disable-duplicates-check --parallel-uploads 15' #panoramax upload motocultrice export RUBY_ENV=devlopment @@ -239,7 +237,7 @@ function gc() { git push } -export PATH="~/.pyenv/bin/:~/.cargo/bin:/snap/bin:$WORKFLOW_PATH/bin:$PATH" +export PATH="~/.pyenv/bin/:~/.cargo/bin:/snap/bin:$WORKFLOW_PATH/bin:$WORKFLOW_PUBLIC_PATH/bin:$PATH" #export PATH="$HOME/.rbenv/bin:$PATH" export PATH="~/.npm-global/bin:$PATH" export PATH="$PATH:$HOME/.npm-global/bin" @@ -250,4 +248,8 @@ eval "$(zoxide init zsh)" # zoxyde, navigation de dossier avec fuzzy finder export alias please='sudo !!' -export alias plz='please' \ No newline at end of file +export alias plz='please' + +# pour debug +# echo "custom aliases chargés depuis:" +# pwd \ No newline at end of file diff --git a/assets/.config/filetags/.filetags b/assets/.config/filetags/.filetags new file mode 100644 index 0000000..b0cdfce --- /dev/null +++ b/assets/.config/filetags/.filetags @@ -0,0 +1,37 @@ +amis +animaux +bâtiment +brouillon final +carte +chantier +chat +chien +claire +dodo +doudou +famille +festival +fête +gopro +gopro-back +gopro-front +graph +gull +has_no_tag +hélia +illustration +maison +manif +matériel +nourriture +papier +plan +portrait +public private +regulus +sélection +sexy +taiga +tykayn +voiture +voyage diff --git a/assets/.config/geeqie/accels b/assets/.config/geeqie/accels new file mode 100644 index 0000000..54aaf85 --- /dev/null +++ b/assets/.config/geeqie/accels @@ -0,0 +1,330 @@ +; geeqie GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; +; (gtk_accel_path "/MenuActions/ToggleMark4Alt1" "KP_4") +; (gtk_accel_path "/MenuActions/RatingM1" "KP_Subtract") +; (gtk_accel_path "/MenuActions/ColorProfile2" "") +; (gtk_accel_path "/MenuActions/SlideShowSlower" "minus") +(gtk_accel_path "/MenuActions/Thumbnails" "") +; (gtk_accel_path "/MenuActionsExternal/tethered-photography.desktop" "") +; (gtk_accel_path "/MenuActions/FilterMark4" "") +; (gtk_accel_path "/MenuActions/FirstPage" "") +; (gtk_accel_path "/MenuActions/ConnectZoom200" "") +; (gtk_accel_path "/MenuActionsExternal/tag-cosplay.desktop" "") +; (gtk_accel_path "/MenuActions/ColorProfile1" "") +; (gtk_accel_path "/MenuActions/ClearMarks" "") +; (gtk_accel_path "/MenuActions/ViewMenu" "") +; (gtk_accel_path "/MenuActions/ViewIcons" "i") +; (gtk_accel_path "/MenuActions/FilterMark3" "") +; (gtk_accel_path "/MenuActions/Back" "") +; (gtk_accel_path "/MenuActions/CloseWindow" "w") +; (gtk_accel_path "/MenuActions/ColorProfile0" "") +; (gtk_accel_path "/MenuActions/HistogramChanCycle" "k") +; (gtk_accel_path "/MenuActionsExternal/eom.desktop" "") +; (gtk_accel_path "/MenuActions/HistogramChanV" "") +; (gtk_accel_path "/MenuActions/ToggleMark5Alt1" "KP_5") +; (gtk_accel_path "/MenuActions/FilterMark2" "") +; (gtk_accel_path "/MenuActions/Rename" "r") +; (gtk_accel_path "/MenuActions/ImageHistogram" "") +; (gtk_accel_path "/MenuActions/SetMark9" "") +; (gtk_accel_path "/MenuActions/FilterMark1" "") +; (gtk_accel_path "/MenuActions/ImageOverlayCycle" "i") +; (gtk_accel_path "/MenuActions/ImageOverlay" "") +; (gtk_accel_path "/MenuActions/AlterNone" "o") +; (gtk_accel_path "/MenuActions/ZoomOutAlt1" "KP_Subtract") +; (gtk_accel_path "/MenuActions/SBar" "k") +; (gtk_accel_path "/MenuActions/SetMark8" "") +; (gtk_accel_path "/MenuActions/IgnoreAlpha" "a") +; (gtk_accel_path "/MenuActions/FilterMark0" "") +(gtk_accel_path "/MenuActions/Animate" "") +; (gtk_accel_path "/MenuActions/AddMark9" "") +; (gtk_accel_path "/MenuActions/IntMark9" "") +; (gtk_accel_path "/MenuActions/ZoomFillHor" "h") +; (gtk_accel_path "/MenuActions/HelpMenu" "") +; (gtk_accel_path "/MenuActions/SelectMark9" "9") +; (gtk_accel_path "/MenuActions/ToggleMark6Alt1" "KP_6") +; (gtk_accel_path "/MenuActions/SetMark7" "") +; (gtk_accel_path "/MenuActions/SelectMark0Alt1" "KP_0") +; (gtk_accel_path "/MenuActions/HelpKbd" "") +; (gtk_accel_path "/MenuActions/AddMark8" "") +; (gtk_accel_path "/MenuActions/IntMark8" "") +; (gtk_accel_path "/MenuActionsExternal/export-jpeg.desktop" "") +; (gtk_accel_path "/MenuActions/SelectMark8" "8") +; (gtk_accel_path "/MenuActions/HistogramChanR" "") +; (gtk_accel_path "/MenuActions/SetMark6" "") +; (gtk_accel_path "/MenuActions/AddMark7" "") +; (gtk_accel_path "/MenuActions/IntMark7" "") +(gtk_accel_path "/MenuActionsExternal/remove-tags.desktop" "r") +; (gtk_accel_path "/MenuActions/Move" "m") +; (gtk_accel_path "/MenuActions/SelectMark7" "7") +; (gtk_accel_path "/MenuActions/ZoomFit" "x") +; (gtk_accel_path "/MenuActions/SetMark5" "") +; (gtk_accel_path "/MenuActionsExternal/image-crop.desktop" "") +; (gtk_accel_path "/MenuActionsExternal/gimp.desktop" "") +; (gtk_accel_path "/MenuActions/AddMark6" "") +; (gtk_accel_path "/MenuActions/IntMark6" "") +; (gtk_accel_path "/MenuActions/ToggleMark7Alt1" "KP_7") +; (gtk_accel_path "/MenuActionsExternal/tag-administratif.desktop" "") +; (gtk_accel_path "/MenuActions/SelectMark6" "6") +; (gtk_accel_path "/MenuActions/SelectMark1Alt1" "KP_1") +; (gtk_accel_path "/MenuActions/SetMark4" "") +; (gtk_accel_path "/MenuActionsExternal/prepend-name.desktop" "") +; (gtk_accel_path "/MenuActions/CopyPath" "") +; (gtk_accel_path "/MenuActions/EditMenu" "") +; (gtk_accel_path "/MenuActions/AddMark5" "") +; (gtk_accel_path "/MenuActions/IntMark5" "") +; (gtk_accel_path "/MenuActions/NewWindow" "") +; (gtk_accel_path "/MenuActions/SetMark3" "") +; (gtk_accel_path "/MenuActions/SelectMark5" "5") +; (gtk_accel_path "/MenuActions/RectangularSelection" "r") +; (gtk_accel_path "/MenuActions/ViewInNewWindow" "v") +; (gtk_accel_path "/MenuActionsExternal/symlink.desktop" "") +; (gtk_accel_path "/MenuActions/ConnectZoomFit" "x") +; (gtk_accel_path "/MenuActions/AddMark4" "") +; (gtk_accel_path "/MenuActions/IntMark4" "") +; (gtk_accel_path "/MenuActions/ColorMenu" "") +; (gtk_accel_path "/MenuActions/SelectMark4" "4") +; (gtk_accel_path "/MenuActions/ExifRotate" "x") +; (gtk_accel_path "/MenuActions/SetMark2" "") +; (gtk_accel_path "/MenuActions/ConnectZoomOutAlt1" "KP_Subtract") +; (gtk_accel_path "/MenuActions/ToggleMark8Alt1" "KP_8") +; (gtk_accel_path "/MenuActions/AddMark3" "") +; (gtk_accel_path "/MenuActions/IntMark3" "") +; (gtk_accel_path "/MenuActions/Flip" "f") +; (gtk_accel_path "/MenuActions/Search" "F3") +; (gtk_accel_path "/MenuActions/SelectMark2Alt1" "KP_2") +; (gtk_accel_path "/MenuActions/SplitPreviousPane" "Left") +; (gtk_accel_path "/MenuActions/SelectMark3" "3") +; (gtk_accel_path "/MenuActions/RatingMenu" "") +; (gtk_accel_path "/MenuActions/SetMark1" "") +; (gtk_accel_path "/MenuActions/ConnectZoomFillHor" "h") +; (gtk_accel_path "/MenuActions/HelpContents" "F1") +; (gtk_accel_path "/MenuActions/AddMark2" "") +; (gtk_accel_path "/MenuActions/IntMark2" "") +(gtk_accel_path "/MenuActions/Refresh" "") +; (gtk_accel_path "/MenuActions/DeleteAlt1" "Delete") +; (gtk_accel_path "/MenuActions/SetMark0" "") +; (gtk_accel_path "/MenuActions/SelectMark2" "2") +; (gtk_accel_path "/MenuActions/DeleteAlt2" "KP_Delete") +; (gtk_accel_path "/MenuActions/NextImageAlt2" "KP_Next") +; (gtk_accel_path "/MenuActions/NextImageAlt1" "Page_Down") +; (gtk_accel_path "/MenuActions/AddMark1" "") +; (gtk_accel_path "/MenuActions/IntMark1" "") +; (gtk_accel_path "/MenuActions/DrawRectangle" "") +; (gtk_accel_path "/MenuActions/DeleteWindow" "") +; (gtk_accel_path "/MenuActions/OpenArchive" "o") +; (gtk_accel_path "/MenuActions/SelectMark1" "1") +; (gtk_accel_path "/MenuActions/PermanentDelete" "Delete") +; (gtk_accel_path "/MenuActions/ToggleMark9Alt1" "KP_9") +; (gtk_accel_path "/MenuActions/SelectMark3Alt1" "KP_3") +; (gtk_accel_path "/MenuActions/Rotate180" "r") +; (gtk_accel_path "/MenuActions/ConnectZoomInAlt1" "KP_Add") +; (gtk_accel_path "/MenuActions/AddMark0" "") +; (gtk_accel_path "/MenuActions/IntMark0" "") +; (gtk_accel_path "/MenuActions/GoMenu" "") +; (gtk_accel_path "/MenuActions/Zoom33" "") +; (gtk_accel_path "/MenuActions/SelectMark0" "0") +(gtk_accel_path "/MenuActionsExternal/guess-filename.desktop" "g") +; (gtk_accel_path "/MenuActions/HideBars" "grave") +; (gtk_accel_path "/MenuActionsExternal/PTBatcherGUI.desktop" "") +; (gtk_accel_path "/MenuActionsExternal/m2a.desktop" "") +; (gtk_accel_path "/MenuActions/FileMenu" "") +; (gtk_accel_path "/MenuActions/SaveMetadata" "s") +; (gtk_accel_path "/MenuActions/ZoomIn" "equal") +; (gtk_accel_path "/MenuActions/SlideShow" "s") +; (gtk_accel_path "/MenuActions/NextPage" "") +; (gtk_accel_path "/MenuActions/Copy" "c") +; (gtk_accel_path "/MenuActions/SplitQuad" "") +; (gtk_accel_path "/MenuActions/SelectMark4Alt1" "KP_4") +; (gtk_accel_path "/MenuActions/Quit" "q") +; (gtk_accel_path "/MenuActions/Maintenance" "") +; (gtk_accel_path "/MenuActions/OpenRecent" "") +; (gtk_accel_path "/MenuActions/SelectMenu" "") +; (gtk_accel_path "/MenuActions/FirstImage" "Home") +; (gtk_accel_path "/MenuActionsExternal/org.kde.gwenview.desktop" "") +; (gtk_accel_path "/MenuActions/Plugins" "") +; (gtk_accel_path "/MenuActions/HistogramChanG" "") +; (gtk_accel_path "/MenuActions/PrevImage" "BackSpace") +; (gtk_accel_path "/MenuActions/ConnectZoomFillVert" "w") +; (gtk_accel_path "/MenuActions/PrevImageAlt2" "KP_Page_Up") +; (gtk_accel_path "/MenuActions/StereoSBS" "") +; (gtk_accel_path "/MenuActions/FullScreenAlt2" "F11") +; (gtk_accel_path "/MenuActions/Zoom100Alt1" "KP_Divide") +; (gtk_accel_path "/MenuActions/SplitDownPane" "Down") +; (gtk_accel_path "/MenuActions/SplitPaneSync" "") +; (gtk_accel_path "/MenuActions/PrevImageAlt1" "Page_Up") +; (gtk_accel_path "/MenuActions/SelectMark5Alt1" "KP_5") +; (gtk_accel_path "/MenuActions/NextImage" "space") +; (gtk_accel_path "/MenuActions/NewWindowDefault" "n") +; (gtk_accel_path "/MenuActions/Zoom300" "") +; (gtk_accel_path "/MenuActions/OverUnderExposed" "e") +; (gtk_accel_path "/MenuActions/ConnectZoom50" "") +; (gtk_accel_path "/MenuActions/FullScreenAlt1" "v") +; (gtk_accel_path "/MenuActions/OverlayMenu" "") +; (gtk_accel_path "/MenuActions/FindDupes" "d") +; (gtk_accel_path "/MenuActions/HideTools" "h") +; (gtk_accel_path "/MenuActions/ZoomFillVert" "w") +; (gtk_accel_path "/MenuActions/StereoAuto" "") +; (gtk_accel_path "/MenuActions/PluginsMenu" "") +; (gtk_accel_path "/MenuActions/StereoOff" "") +; (gtk_accel_path "/MenuActions/ConnectZoom25" "") +; (gtk_accel_path "/MenuActions/ZoomFitAlt1" "KP_Multiply") +; (gtk_accel_path "/MenuActions/SelectAll" "a") +; (gtk_accel_path "/MenuActions/SelectMark6Alt1" "KP_6") +; (gtk_accel_path "/MenuActions/SlideShowPause" "p") +; (gtk_accel_path "/MenuActions/ConnectZoom300" "") +; (gtk_accel_path "/MenuActions/HistogramChanB" "") +; (gtk_accel_path "/MenuActions/ExifWin" "e") +; (gtk_accel_path "/MenuActions/Zoom100" "z") +; (gtk_accel_path "/MenuActions/OpenCollection" "o") +; (gtk_accel_path "/MenuActions/HelpSearch" "") +; (gtk_accel_path "/MenuActions/LogWindow" "") +; (gtk_accel_path "/MenuActionsExternal/rangereal.desktop" "") +; (gtk_accel_path "/MenuActions/StereoMenu" "") +; (gtk_accel_path "/MenuActions/HelpShortcuts" "") +; (gtk_accel_path "/MenuActions/Print" "p") +; (gtk_accel_path "/MenuActions/ResetMark9" "") +; (gtk_accel_path "/MenuActions/KeywordAutocomplete" "k") +; (gtk_accel_path "/MenuActions/ShowFileFilter" "") +; (gtk_accel_path "/MenuActions/SelectMark7Alt1" "KP_7") +; (gtk_accel_path "/MenuActions/SplitHorizontal" "e") +; (gtk_accel_path "/MenuActions/Mirror" "m") +; (gtk_accel_path "/MenuActions/ConnectZoom100Alt1" "KP_Divide") +; (gtk_accel_path "/MenuActions/ResetMark8" "") +; (gtk_accel_path "/MenuActions/LastImage" "End") +; (gtk_accel_path "/MenuActions/ConnectZoom100" "z") +; (gtk_accel_path "/MenuActionsExternal/rotate-270.desktop" "") +; (gtk_accel_path "/MenuActions/FullScreen" "f") +; (gtk_accel_path "/MenuActions/ResetMark7" "") +; (gtk_accel_path "/MenuActions/Delete" "d") +; (gtk_accel_path "/MenuActions/RenameWindow" "") +; (gtk_accel_path "/MenuActions/About" "") +; (gtk_accel_path "/MenuActions/SelectMark8Alt1" "KP_8") +; (gtk_accel_path "/MenuActions/ResetMark6" "") +; (gtk_accel_path "/MenuActions/SplitSingle" "y") +; (gtk_accel_path "/MenuActions/Up" "") +(gtk_accel_path "/MenuActionsExternal/append-name.desktop" "a") +; (gtk_accel_path "/MenuActions/NewFolder" "f") +; (gtk_accel_path "/MenuActions/NewCollection" "c") +; (gtk_accel_path "/MenuActionsExternal/tag-nourriture.desktop" "") +; (gtk_accel_path "/MenuActions/ConnectZoomFitAlt1" "KP_Multiply") +; (gtk_accel_path "/MenuActions/ResetMark5" "") +; (gtk_accel_path "/MenuActions/Preferences" "o") +; (gtk_accel_path "/MenuActions/HistogramModeLog" "") +; (gtk_accel_path "/MenuActions/ResetMark4" "") +; (gtk_accel_path "/MenuActions/HelpNotes" "") +; (gtk_accel_path "/MenuActions/ToggleMark9" "9") +; (gtk_accel_path "/MenuActions/StereoCross" "") +; (gtk_accel_path "/MenuActions/EscapeAlt1" "q") +; (gtk_accel_path "/MenuActions/SelectMark9Alt1" "KP_9") +; (gtk_accel_path "/MenuActions/ResetMark3" "") +; (gtk_accel_path "/MenuActions/WriteRotationKeepDate" "") +; (gtk_accel_path "/MenuActions/ToggleMark8" "8") +; (gtk_accel_path "/MenuActions/WriteRotation" "") +(gtk_accel_path "/MenuActionsExternal/add-tags.desktop" "t") +; (gtk_accel_path "/MenuActionsExternal/tag-illu.desktop" "") +; (gtk_accel_path "/MenuActions/ResetMark2" "") +; (gtk_accel_path "/MenuActions/HistogramChanRGB" "") +; (gtk_accel_path "/MenuActions/ToggleMark7" "7") +; (gtk_accel_path "/MenuActionsExternal/camera-import.desktop" "") +; (gtk_accel_path "/MenuActions/WindowsMenu" "") +; (gtk_accel_path "/MenuActions/SelectInvert" "i") +; (gtk_accel_path "/MenuActions/ConnectZoomMenu" "") +; (gtk_accel_path "/MenuActions/ResetMark1" "") +; (gtk_accel_path "/MenuActions/HistogramModeCycle" "j") +; (gtk_accel_path "/MenuActions/UnselMark9" "") +; (gtk_accel_path "/MenuActions/ToggleMark6" "6") +; (gtk_accel_path "/MenuActions/SplitNextPane" "Right") +; (gtk_accel_path "/MenuActions/SplitUpPane" "Up") +; (gtk_accel_path "/MenuActions/SearchAndRunCommand" "slash") +; (gtk_accel_path "/MenuActions/ResetMark0" "") +; (gtk_accel_path "/MenuActions/UnselMark8" "") +; (gtk_accel_path "/MenuActions/ToggleMark5" "5") +; (gtk_accel_path "/MenuActions/HideToolbar" "") +; (gtk_accel_path "/MenuActions/SelectNone" "a") +; (gtk_accel_path "/MenuActions/PrevPage" "") +; (gtk_accel_path "/MenuActions/SlideShowFaster" "equal") +; (gtk_accel_path "/MenuActions/Mark9" "") +; (gtk_accel_path "/MenuActions/Escape" "Escape") +; (gtk_accel_path "/MenuActions/UnselMark7" "") +; (gtk_accel_path "/MenuActions/Home" "") +; (gtk_accel_path "/MenuActions/ToggleMark4" "4") +; (gtk_accel_path "/MenuActions/ZoomInAlt1" "KP_Add") +; (gtk_accel_path "/MenuActions/HistogramModeLin" "") +; (gtk_accel_path "/MenuActions/SBarSort" "s") +; (gtk_accel_path "/MenuActions/ToggleMark0Alt1" "KP_0") +; (gtk_accel_path "/MenuActions/Mark8" "") +; (gtk_accel_path "/MenuActions/Forward" "") +; (gtk_accel_path "/MenuActions/RotateCW" "bracketright") +; (gtk_accel_path "/MenuActions/UnselMark6" "") +; (gtk_accel_path "/MenuActions/ToggleMark3" "3") +; (gtk_accel_path "/MenuActions/OrientationMenu" "") +; (gtk_accel_path "/MenuActions/Mark7" "") +; (gtk_accel_path "/MenuActions/ConnectZoom33" "") +; (gtk_accel_path "/MenuActions/ZoomOut" "minus") +; (gtk_accel_path "/MenuActions/UnselMark5" "") +; (gtk_accel_path "/MenuActions/ToggleMark2" "2") +; (gtk_accel_path "/MenuActions/SplitMenu" "") +; (gtk_accel_path "/MenuActions/Mark6" "") +; (gtk_accel_path "/MenuActions/ZoomMenu" "") +; (gtk_accel_path "/MenuActions/UnselMark4" "") +; (gtk_accel_path "/MenuActions/ToggleMark1" "1") +; (gtk_accel_path "/MenuActions/FloatTools" "l") +; (gtk_accel_path "/MenuActions/ToggleMark1Alt1" "KP_1") +; (gtk_accel_path "/MenuActions/ConnectZoomIn" "plus") +; (gtk_accel_path "/MenuActions/CopyPathUnquoted" "") +; (gtk_accel_path "/MenuActions/Mark5" "") +; (gtk_accel_path "/MenuActions/UnselMark3" "") +; (gtk_accel_path "/MenuActions/ToggleMark0" "0") +; (gtk_accel_path "/MenuActions/FileDirMenu" "") +; (gtk_accel_path "/MenuActions/UseColorProfiles" "") +; (gtk_accel_path "/MenuActions/ConnectZoomOut" "underscore") +; (gtk_accel_path "/MenuActions/Mark4" "") +; (gtk_accel_path "/MenuActions/SplitVertical" "u") +; (gtk_accel_path "/MenuActionsExternal/random-image.desktop" "") +; (gtk_accel_path "/MenuActions/UnselMark2" "") +; (gtk_accel_path "/MenuActions/NewWindowFromCurrent" "") +; (gtk_accel_path "/MenuActions/Grayscale" "g") +; (gtk_accel_path "/MenuActions/LayoutConfig" "") +; (gtk_accel_path "/MenuActions/Rating5" "KP_5") +; (gtk_accel_path "/MenuActions/Mark3" "") +; (gtk_accel_path "/MenuActions/UnselMark1" "") +; (gtk_accel_path "/MenuActions/ToggleMark2Alt1" "KP_2") +; (gtk_accel_path "/MenuActionsExternal/rotate-90.desktop" "") +; (gtk_accel_path "/MenuActions/ShowMarks" "m") +; (gtk_accel_path "/MenuActions/LastPage" "") +; (gtk_accel_path "/MenuActions/Rating4" "KP_4") +; (gtk_accel_path "/MenuActionsExternal/rotate.desktop" "") +; (gtk_accel_path "/MenuActions/Mark2" "") +; (gtk_accel_path "/MenuActions/Zoom400" "") +; (gtk_accel_path "/MenuActions/UnselMark0" "") +; (gtk_accel_path "/MenuActions/ShowInfoPixel" "") +; (gtk_accel_path "/MenuActions/StereoCycle" "") +; (gtk_accel_path "/MenuActions/ImageBack" "") +; (gtk_accel_path "/MenuActions/FilterMark9" "") +; (gtk_accel_path "/MenuActions/Rating3" "KP_3") +; (gtk_accel_path "/MenuActions/Mark1" "") +; (gtk_accel_path "/MenuActionsExternal/hugin.desktop" "") +; (gtk_accel_path "/MenuActions/ColorProfile5" "") +; (gtk_accel_path "/MenuActions/FilterMark8" "") +; (gtk_accel_path "/MenuActions/Rating2" "KP_2") +; (gtk_accel_path "/MenuActionsExternal/display-im6.q16.desktop" "") +; (gtk_accel_path "/MenuActions/ToggleMark3Alt1" "KP_3") +; (gtk_accel_path "/MenuActions/Mark0" "") +; (gtk_accel_path "/MenuActions/Zoom50" "") +; (gtk_accel_path "/MenuActions/ConnectZoom400" "") +; (gtk_accel_path "/MenuActions/FilterMark7" "") +; (gtk_accel_path "/MenuActions/Rating1" "KP_1") +; (gtk_accel_path "/MenuActions/ColorProfile4" "") +; (gtk_accel_path "/MenuActions/FolderTree" "t") +; (gtk_accel_path "/MenuActions/UseImageProfile" "") +; (gtk_accel_path "/MenuActions/Zoom200" "") +; (gtk_accel_path "/MenuActions/Zoom25" "") +; (gtk_accel_path "/MenuActions/FilterMark6" "") +; (gtk_accel_path "/MenuActions/Rating0" "KP_0") +; (gtk_accel_path "/MenuActions/ColorProfile3" "") +; (gtk_accel_path "/MenuActions/PanView" "j") +; (gtk_accel_path "/MenuActions/ViewList" "l") +; (gtk_accel_path "/MenuActions/RotateCCW" "bracketleft") +; (gtk_accel_path "/MenuActions/ImageForward" "") +; (gtk_accel_path "/MenuActions/FilterMark5" "") diff --git a/assets/.config/geeqie/applications/add-tags.desktop b/assets/.config/geeqie/applications/add-tags.desktop new file mode 100644 index 0000000..f192c3a --- /dev/null +++ b/assets/.config/geeqie/applications/add-tags.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=filetags add +GenericName=filetags +Comment= +Exec=$HOME/areas/www/misc/vk-filetags-interactive-adding-wrapper-with-gnome-terminal.sh %F +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/applications/append-name.desktop b/assets/.config/geeqie/applications/append-name.desktop new file mode 100644 index 0000000..6ac91d9 --- /dev/null +++ b/assets/.config/geeqie/applications/append-name.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=filetags append file name +GenericName=filetags +Comment= +Exec=$HOME/areas/www/misc/vk-filetags-interactive-append-file-name-wrapper-with-gnome-terminal.sh %F +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/applications/guess-filename.desktop b/assets/.config/geeqie/applications/guess-filename.desktop new file mode 100644 index 0000000..1d3923e --- /dev/null +++ b/assets/.config/geeqie/applications/guess-filename.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=filetags guess file name +GenericName=filetags +Comment= +Exec=$HOME/areas/www/misc/vk-filetags-interactive-guess-filename-with-gnome-terminal.sh %F | tee -a $HOME/guessfilename_history.txt 2>&1 +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/applications/m2a.desktop b/assets/.config/geeqie/applications/m2a.desktop new file mode 100644 index 0000000..a5a9ead --- /dev/null +++ b/assets/.config/geeqie/applications/m2a.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=m2a +GenericName=m2a +Comment= +Exec=$HOME/areas/www/misc/vk-m2a-wrapper-with-gnome-terminal.sh %F +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/applications/prepend-name.desktop b/assets/.config/geeqie/applications/prepend-name.desktop new file mode 100644 index 0000000..7e74ea6 --- /dev/null +++ b/assets/.config/geeqie/applications/prepend-name.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=filetags append file name +GenericName=filetags +Comment= +Exec=$HOME/areas/www/misc/vk-filetags-interactive-prepend-file-name-wrapper-with-gnome-terminal.sh %F +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/applications/rangereal.desktop b/assets/.config/geeqie/applications/rangereal.desktop new file mode 100644 index 0000000..82da002 --- /dev/null +++ b/assets/.config/geeqie/applications/rangereal.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=rangereal +GenericName=filetags +Comment= +Exec=$HOME/areas/www/misc/vk-filetags-interactive-rangereal-with-gnome-terminal.sh %F | tee -a $HOME/rangereal_history.txt 2>&1 +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/applications/remove-tags.desktop b/assets/.config/geeqie/applications/remove-tags.desktop new file mode 100644 index 0000000..f64ffb7 --- /dev/null +++ b/assets/.config/geeqie/applications/remove-tags.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=filetags remove +GenericName=filetags +Comment= +Exec=$HOME/areas/www/misc/vk-filetags-interactive-removing-wrapper-with-gnome-terminal.sh %F +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/applications/tag-administratif.desktop b/assets/.config/geeqie/applications/tag-administratif.desktop new file mode 100644 index 0000000..5a0947e --- /dev/null +++ b/assets/.config/geeqie/applications/tag-administratif.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=tag administratif +GenericName=filetags +Comment= +Exec=$HOME/areas/www/misc/vk-filetags-append-tag-administratif.sh %F +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/applications/tag-cosplay.desktop b/assets/.config/geeqie/applications/tag-cosplay.desktop new file mode 100644 index 0000000..808e728 --- /dev/null +++ b/assets/.config/geeqie/applications/tag-cosplay.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=tag cosplay +GenericName=filetags +Comment= +Exec=$HOME/areas/www/misc/vk-filetags-append-tag-cosplay.sh %F +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/applications/tag-illu.desktop b/assets/.config/geeqie/applications/tag-illu.desktop new file mode 100644 index 0000000..6c13d2f --- /dev/null +++ b/assets/.config/geeqie/applications/tag-illu.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=tag illustration +GenericName=filetags +Comment= +Exec=$HOME/areas/www/misc/vk-filetags-append-tag-illu.sh %F +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/applications/tag-nourriture.desktop b/assets/.config/geeqie/applications/tag-nourriture.desktop new file mode 100644 index 0000000..dba9736 --- /dev/null +++ b/assets/.config/geeqie/applications/tag-nourriture.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=tag nourriture +GenericName=filetags +Comment= +Exec=$HOME/areas/www/misc/vk-filetags-append-tag-nourriture.sh %F +Icon= +Terminal=true +Type=Application +Categories=Application;Graphics; +hidden=false +MimeType=image/*;video/*;image/mpo;image/thm +Categories=X-Geeqie; diff --git a/assets/.config/geeqie/geeqie accels config b/assets/.config/geeqie/geeqie accels config new file mode 100644 index 0000000..f866ff4 --- /dev/null +++ b/assets/.config/geeqie/geeqie accels config @@ -0,0 +1,330 @@ +; geeqie GtkAccelMap rc-file -*- scheme -*- +; this file is an automated accelerator map dump +; +; (gtk_accel_path "/MenuActions/ToggleMark4Alt1" "KP_4") +; (gtk_accel_path "/MenuActions/RatingM1" "KP_Subtract") +; (gtk_accel_path "/MenuActions/ColorProfile2" "") +; (gtk_accel_path "/MenuActions/SlideShowSlower" "KP_Subtract") +; (gtk_accel_path "/MenuActions/Thumbnails" "t") +; (gtk_accel_path "/MenuActionsExternal/tethered-photography.desktop" "") +; (gtk_accel_path "/MenuActions/FilterMark4" "") +; (gtk_accel_path "/MenuActions/FirstPage" "") +; (gtk_accel_path "/MenuActions/ConnectZoom200" "") +; (gtk_accel_path "/MenuActions/ColorProfile1" "") +; (gtk_accel_path "/MenuActions/ClearMarks" "") +; (gtk_accel_path "/MenuActions/ViewMenu" "") +; (gtk_accel_path "/MenuActions/ViewIcons" "i") +; (gtk_accel_path "/MenuActions/FilterMark3" "") +; (gtk_accel_path "/MenuActions/Back" "") +; (gtk_accel_path "/MenuActions/CloseWindow" "w") +; (gtk_accel_path "/MenuActions/ColorProfile0" "") +; (gtk_accel_path "/MenuActions/HistogramChanCycle" "k") +; (gtk_accel_path "/MenuActionsExternal/eom.desktop" "") +; (gtk_accel_path "/MenuActions/HistogramChanV" "") +; (gtk_accel_path "/MenuActions/ToggleMark5Alt1" "KP_5") +; (gtk_accel_path "/MenuActions/FilterMark2" "") +; (gtk_accel_path "/MenuActions/Rename" "r") +; (gtk_accel_path "/MenuActions/ImageHistogram" "") +; (gtk_accel_path "/MenuActions/SetMark9" "") +; (gtk_accel_path "/MenuActions/FilterMark1" "") +; (gtk_accel_path "/MenuActions/ImageOverlayCycle" "i") +; (gtk_accel_path "/MenuActions/ImageOverlay" "") +; (gtk_accel_path "/MenuActions/AlterNone" "o") +; (gtk_accel_path "/MenuActions/ZoomOutAlt1" "KP_Subtract") +; (gtk_accel_path "/MenuActions/SBar" "k") +; (gtk_accel_path "/MenuActions/SetMark8" "") +; (gtk_accel_path "/MenuActions/IgnoreAlpha" "a") +; (gtk_accel_path "/MenuActionsExternal/qView.desktop" "") +; (gtk_accel_path "/MenuActions/FilterMark0" "") +; (gtk_accel_path "/MenuActions/Animate" "a") +; (gtk_accel_path "/MenuActions/AddMark9" "") +; (gtk_accel_path "/MenuActions/IntMark9" "") +; (gtk_accel_path "/MenuActions/ZoomFillHor" "h") +; (gtk_accel_path "/MenuActions/HelpMenu" "") +; (gtk_accel_path "/MenuActions/SelectMark9" "9") +; (gtk_accel_path "/MenuActions/ToggleMark6Alt1" "KP_6") +; (gtk_accel_path "/MenuActions/SetMark7" "") +; (gtk_accel_path "/MenuActions/SelectMark0Alt1" "KP_0") +; (gtk_accel_path "/MenuActions/HelpKbd" "") +; (gtk_accel_path "/MenuActions/AddMark8" "") +; (gtk_accel_path "/MenuActions/IntMark8" "") +; (gtk_accel_path "/MenuActionsExternal/export-jpeg.desktop" "") +; (gtk_accel_path "/MenuActions/SelectMark8" "8") +; (gtk_accel_path "/MenuActions/HistogramChanR" "") +; (gtk_accel_path "/MenuActions/SetMark6" "") +; (gtk_accel_path "/MenuActions/AddMark7" "") +; (gtk_accel_path "/MenuActions/IntMark7" "") +; (gtk_accel_path "/MenuActions/Move" "m") +; (gtk_accel_path "/MenuActions/SelectMark7" "7") +; (gtk_accel_path "/MenuActions/ZoomFit" "x") +; (gtk_accel_path "/MenuActions/SetMark5" "") +; (gtk_accel_path "/MenuActionsExternal/image-crop.desktop" "") +; (gtk_accel_path "/MenuActionsExternal/gimp.desktop" "") +; (gtk_accel_path "/MenuActions/AddMark6" "") +; (gtk_accel_path "/MenuActions/IntMark6" "") +; (gtk_accel_path "/MenuActions/ToggleMark7Alt1" "KP_7") +; (gtk_accel_path "/MenuActions/SelectMark6" "6") +; (gtk_accel_path "/MenuActions/SelectMark1Alt1" "KP_1") +; (gtk_accel_path "/MenuActions/SetMark4" "") +; (gtk_accel_path "/MenuActions/CopyPath" "") +; (gtk_accel_path "/MenuActions/EditMenu" "") +; (gtk_accel_path "/MenuActions/AddMark5" "") +; (gtk_accel_path "/MenuActions/IntMark5" "") +; (gtk_accel_path "/MenuActions/NewWindow" "") +; (gtk_accel_path "/MenuActions/SetMark3" "") +; (gtk_accel_path "/MenuActions/SelectMark5" "5") +; (gtk_accel_path "/MenuActions/RectangularSelection" "r") +; (gtk_accel_path "/MenuActions/ViewInNewWindow" "v") +; (gtk_accel_path "/MenuActions/ConnectZoomFit" "x") +; (gtk_accel_path "/MenuActions/AddMark4" "") +; (gtk_accel_path "/MenuActions/IntMark4" "") +; (gtk_accel_path "/MenuActionsExternal/symlink.desktop" "") +; (gtk_accel_path "/MenuActions/SelectMark4" "4") +; (gtk_accel_path "/MenuActions/ExifRotate" "x") +; (gtk_accel_path "/MenuActions/SetMark2" "") +; (gtk_accel_path "/MenuActions/ConnectZoomOutAlt1" "KP_Subtract") +; (gtk_accel_path "/MenuActions/IntMark3" "") +; (gtk_accel_path "/MenuActions/ToggleMark8Alt1" "KP_8") +; (gtk_accel_path "/MenuActions/AddMark3" "") +; (gtk_accel_path "/MenuActions/Flip" "f") +; (gtk_accel_path "/MenuActions/Search" "F3") +; (gtk_accel_path "/MenuActions/SelectMark2Alt1" "KP_2") +; (gtk_accel_path "/MenuActions/SplitPreviousPane" "Left") +; (gtk_accel_path "/MenuActions/SelectMark3" "3") +; (gtk_accel_path "/MenuActions/ColorMenu" "") +; (gtk_accel_path "/MenuActions/SetMark1" "") +; (gtk_accel_path "/MenuActions/SetMark0" "") +; (gtk_accel_path "/MenuActions/ConnectZoomFillHor" "h") +; (gtk_accel_path "/MenuActions/HelpContents" "F1") +; (gtk_accel_path "/MenuActions/AddMark2" "") +; (gtk_accel_path "/MenuActions/IntMark2" "") +; (gtk_accel_path "/MenuActions/Refresh" "r") +; (gtk_accel_path "/MenuActions/SelectMark2" "2") +; (gtk_accel_path "/MenuActions/RatingMenu" "") +; (gtk_accel_path "/MenuActions/DeleteAlt2" "KP_Delete") +; (gtk_accel_path "/MenuActions/NextImageAlt2" "KP_Next") +; (gtk_accel_path "/MenuActions/DeleteAlt1" "Delete") +; (gtk_accel_path "/MenuActions/AddMark1" "") +; (gtk_accel_path "/MenuActions/IntMark1" "") +; (gtk_accel_path "/MenuActions/DrawRectangle" "") +; (gtk_accel_path "/MenuActions/DeleteWindow" "") +; (gtk_accel_path "/MenuActions/NextImageAlt1" "Page_Down") +; (gtk_accel_path "/MenuActions/SelectMark1" "1") +; (gtk_accel_path "/MenuActions/PermanentDelete" "Delete") +; (gtk_accel_path "/MenuActions/ToggleMark9Alt1" "KP_9") +; (gtk_accel_path "/MenuActions/SelectMark3Alt1" "KP_3") +; (gtk_accel_path "/MenuActions/Rotate180" "r") +; (gtk_accel_path "/MenuActions/ConnectZoomInAlt1" "KP_Add") +; (gtk_accel_path "/MenuActions/AddMark0" "") +; (gtk_accel_path "/MenuActions/IntMark0" "") +; (gtk_accel_path "/MenuActions/GoMenu" "") +; (gtk_accel_path "/MenuActions/Zoom33" "") +; (gtk_accel_path "/MenuActions/SelectMark0" "0") +; (gtk_accel_path "/MenuActions/HideBars" "grave") +; (gtk_accel_path "/MenuActionsExternal/PTBatcherGUI.desktop" "") +; (gtk_accel_path "/MenuActions/FileMenu" "") +; (gtk_accel_path "/MenuActions/SaveMetadata" "s") +; (gtk_accel_path "/MenuActions/ZoomIn" "equal") +; (gtk_accel_path "/MenuActions/SlideShow" "s") +; (gtk_accel_path "/MenuActions/NextPage" "") +; (gtk_accel_path "/MenuActions/Copy" "c") +; (gtk_accel_path "/MenuActions/SplitQuad" "") +; (gtk_accel_path "/MenuActions/SelectMark4Alt1" "KP_4") +; (gtk_accel_path "/MenuActions/Quit" "q") +; (gtk_accel_path "/MenuActions/Maintenance" "") +; (gtk_accel_path "/MenuActions/OpenRecent" "") +; (gtk_accel_path "/MenuActions/SelectMenu" "") +; (gtk_accel_path "/MenuActions/FirstImage" "Home") +; (gtk_accel_path "/MenuActionsExternal/org.kde.gwenview.desktop" "") +; (gtk_accel_path "/MenuActions/Plugins" "") +; (gtk_accel_path "/MenuActions/HistogramChanG" "") +; (gtk_accel_path "/MenuActions/PrevImage" "BackSpace") +; (gtk_accel_path "/MenuActions/ConnectZoomFillVert" "w") +; (gtk_accel_path "/MenuActions/PrevImageAlt2" "KP_Page_Up") +; (gtk_accel_path "/MenuActions/StereoSBS" "") +; (gtk_accel_path "/MenuActions/FullScreenAlt2" "F11") +; (gtk_accel_path "/MenuActions/Zoom100Alt1" "KP_Divide") +; (gtk_accel_path "/MenuActions/SplitDownPane" "Down") +; (gtk_accel_path "/MenuActions/SplitPaneSync" "") +; (gtk_accel_path "/MenuActions/PrevImageAlt1" "Page_Up") +; (gtk_accel_path "/MenuActions/SelectMark5Alt1" "KP_5") +; (gtk_accel_path "/MenuActions/NextImage" "space") +; (gtk_accel_path "/MenuActions/NewWindowDefault" "n") +; (gtk_accel_path "/MenuActionsExternal/cura.desktop" "") +; (gtk_accel_path "/MenuActions/Zoom300" "") +; (gtk_accel_path "/MenuActions/OverUnderExposed" "e") +; (gtk_accel_path "/MenuActions/ConnectZoom50" "") +; (gtk_accel_path "/MenuActions/FullScreenAlt1" "v") +; (gtk_accel_path "/MenuActions/OverlayMenu" "") +; (gtk_accel_path "/MenuActions/FindDupes" "d") +; (gtk_accel_path "/MenuActions/HideTools" "h") +; (gtk_accel_path "/MenuActions/ZoomFillVert" "w") +; (gtk_accel_path "/MenuActions/StereoAuto" "") +; (gtk_accel_path "/MenuActions/PluginsMenu" "") +; (gtk_accel_path "/MenuActions/StereoOff" "") +; (gtk_accel_path "/MenuActions/ConnectZoom25" "") +; (gtk_accel_path "/MenuActions/ZoomFitAlt1" "KP_Multiply") +; (gtk_accel_path "/MenuActions/SelectAll" "a") +; (gtk_accel_path "/MenuActions/SelectMark6Alt1" "KP_6") +; (gtk_accel_path "/MenuActions/SlideShowPause" "p") +; (gtk_accel_path "/MenuActions/ConnectZoom300" "") +; (gtk_accel_path "/MenuActions/HistogramChanB" "") +; (gtk_accel_path "/MenuActionsExternal/org.gnome.Evince.desktop" "") +; (gtk_accel_path "/MenuActions/ExifWin" "e") +; (gtk_accel_path "/MenuActions/Zoom100" "z") +; (gtk_accel_path "/MenuActions/OpenCollection" "o") +; (gtk_accel_path "/MenuActions/HelpSearch" "") +; (gtk_accel_path "/MenuActions/LogWindow" "") +; (gtk_accel_path "/MenuActions/ImageGuidelines" "") +; (gtk_accel_path "/MenuActions/StereoMenu" "") +; (gtk_accel_path "/MenuActions/HelpShortcuts" "") +; (gtk_accel_path "/MenuActions/Print" "p") +; (gtk_accel_path "/MenuActions/ResetMark9" "") +; (gtk_accel_path "/MenuActions/KeywordAutocomplete" "k") +; (gtk_accel_path "/MenuActions/ShowFileFilter" "") +; (gtk_accel_path "/MenuActions/SelectMark7Alt1" "KP_7") +; (gtk_accel_path "/MenuActions/SplitHorizontal" "e") +; (gtk_accel_path "/MenuActions/Mirror" "m") +; (gtk_accel_path "/MenuActions/ConnectZoom100Alt1" "KP_Divide") +; (gtk_accel_path "/MenuActions/ResetMark8" "") +; (gtk_accel_path "/MenuActions/LastImage" "End") +; (gtk_accel_path "/MenuActions/ConnectZoom100" "z") +; (gtk_accel_path "/MenuActionsExternal/rotate-270.desktop" "") +; (gtk_accel_path "/MenuActions/FullScreen" "f") +; (gtk_accel_path "/MenuActions/ResetMark7" "") +; (gtk_accel_path "/MenuActions/Delete" "d") +; (gtk_accel_path "/MenuActions/RenameWindow" "") +; (gtk_accel_path "/MenuActions/SelectMark8Alt1" "KP_8") +; (gtk_accel_path "/MenuActions/ResetMark6" "") +; (gtk_accel_path "/MenuActions/About" "") +; (gtk_accel_path "/MenuActions/SplitSingle" "y") +; (gtk_accel_path "/MenuActions/Up" "") +; (gtk_accel_path "/MenuActions/NewFolder" "f") +; (gtk_accel_path "/MenuActions/NewCollection" "c") +; (gtk_accel_path "/MenuActions/ConnectZoomFitAlt1" "KP_Multiply") +; (gtk_accel_path "/MenuActions/ResetMark5" "") +; (gtk_accel_path "/MenuActions/Preferences" "o") +; (gtk_accel_path "/MenuActions/HistogramModeLog" "") +; (gtk_accel_path "/MenuActions/ResetMark4" "") +; (gtk_accel_path "/MenuActions/HelpNotes" "") +; (gtk_accel_path "/MenuActions/ToggleMark9" "9") +; (gtk_accel_path "/MenuActions/StereoCross" "") +; (gtk_accel_path "/MenuActions/EscapeAlt1" "q") +; (gtk_accel_path "/MenuActions/SelectMark9Alt1" "KP_9") +; (gtk_accel_path "/MenuActions/ResetMark3" "") +; (gtk_accel_path "/MenuActionsExternal/mypaint.desktop" "") +; (gtk_accel_path "/MenuActions/WriteRotationKeepDate" "") +; (gtk_accel_path "/MenuActions/ToggleMark8" "8") +; (gtk_accel_path "/MenuActions/WriteRotation" "") +; (gtk_accel_path "/MenuActions/ResetMark2" "") +; (gtk_accel_path "/MenuActions/HistogramChanRGB" "") +; (gtk_accel_path "/MenuActions/ToggleMark7" "7") +; (gtk_accel_path "/MenuActionsExternal/camera-import.desktop" "") +; (gtk_accel_path "/MenuActions/WindowsMenu" "") +; (gtk_accel_path "/MenuActions/SelectInvert" "i") +; (gtk_accel_path "/MenuActions/ConnectZoomMenu" "") +; (gtk_accel_path "/MenuActions/ResetMark1" "") +; (gtk_accel_path "/MenuActions/HistogramModeCycle" "j") +; (gtk_accel_path "/MenuActions/UnselMark9" "") +; (gtk_accel_path "/MenuActions/ToggleMark6" "6") +; (gtk_accel_path "/MenuActions/SplitNextPane" "Right") +; (gtk_accel_path "/MenuActions/SplitUpPane" "Up") +; (gtk_accel_path "/MenuActions/SearchAndRunCommand" "slash") +; (gtk_accel_path "/MenuActions/ResetMark0" "") +; (gtk_accel_path "/MenuActions/UnselMark8" "") +; (gtk_accel_path "/MenuActions/ToggleMark5" "5") +; (gtk_accel_path "/MenuActions/HideToolbar" "") +; (gtk_accel_path "/MenuActions/PrevPage" "") +; (gtk_accel_path "/MenuActions/SlideShowFaster" "KP_Add") +; (gtk_accel_path "/MenuActions/Mark9" "") +; (gtk_accel_path "/MenuActions/Escape" "Escape") +; (gtk_accel_path "/MenuActions/UnselMark7" "") +; (gtk_accel_path "/MenuActions/Home" "") +; (gtk_accel_path "/MenuActions/ToggleMark4" "4") +; (gtk_accel_path "/MenuActions/ZoomInAlt1" "KP_Add") +; (gtk_accel_path "/MenuActions/HistogramModeLin" "") +; (gtk_accel_path "/MenuActions/SBarSort" "s") +; (gtk_accel_path "/MenuActions/ToggleMark0Alt1" "KP_0") +; (gtk_accel_path "/MenuActions/Mark8" "") +; (gtk_accel_path "/MenuActions/Forward" "") +; (gtk_accel_path "/MenuActions/RotateCW" "bracketright") +; (gtk_accel_path "/MenuActions/UnselMark6" "") +; (gtk_accel_path "/MenuActions/ToggleMark3" "3") +; (gtk_accel_path "/MenuActions/OrientationMenu" "") +; (gtk_accel_path "/MenuActionsExternal/org.kde.kolourpaint.desktop" "") +; (gtk_accel_path "/MenuActions/Mark7" "") +; (gtk_accel_path "/MenuActions/ConnectZoom33" "") +; (gtk_accel_path "/MenuActions/ZoomOut" "minus") +; (gtk_accel_path "/MenuActions/UnselMark5" "") +; (gtk_accel_path "/MenuActions/ToggleMark2" "2") +; (gtk_accel_path "/MenuActions/SplitMenu" "") +; (gtk_accel_path "/MenuActions/Mark6" "") +; (gtk_accel_path "/MenuActions/ZoomMenu" "") +; (gtk_accel_path "/MenuActions/UnselMark4" "") +; (gtk_accel_path "/MenuActions/ToggleMark1" "1") +; (gtk_accel_path "/MenuActions/FloatTools" "l") +; (gtk_accel_path "/MenuActions/ToggleMark1Alt1" "KP_1") +; (gtk_accel_path "/MenuActions/ConnectZoomIn" "plus") +; (gtk_accel_path "/MenuActions/CopyPathUnquoted" "") +; (gtk_accel_path "/MenuActions/Mark5" "") +; (gtk_accel_path "/MenuActions/UnselMark3" "") +; (gtk_accel_path "/MenuActions/ToggleMark0" "0") +; (gtk_accel_path "/MenuActions/FileDirMenu" "") +; (gtk_accel_path "/MenuActions/UseColorProfiles" "") +; (gtk_accel_path "/MenuActions/ConnectZoomOut" "underscore") +; (gtk_accel_path "/MenuActions/Mark4" "") +; (gtk_accel_path "/MenuActions/SplitVertical" "u") +; (gtk_accel_path "/MenuActionsExternal/random-image.desktop" "") +; (gtk_accel_path "/MenuActions/UnselMark2" "") +; (gtk_accel_path "/MenuActions/NewWindowFromCurrent" "") +; (gtk_accel_path "/MenuActions/Grayscale" "g") +; (gtk_accel_path "/MenuActions/LayoutConfig" "") +; (gtk_accel_path "/MenuActions/Rating5" "KP_5") +; (gtk_accel_path "/MenuActions/Mark3" "") +; (gtk_accel_path "/MenuActionsExternal/org.gnome.eog.desktop" "") +; (gtk_accel_path "/MenuActions/UnselMark1" "") +; (gtk_accel_path "/MenuActions/ToggleMark2Alt1" "KP_2") +; (gtk_accel_path "/MenuActionsExternal/rotate-90.desktop" "") +; (gtk_accel_path "/MenuActions/ShowMarks" "m") +; (gtk_accel_path "/MenuActions/LastPage" "") +; (gtk_accel_path "/MenuActions/Rating4" "KP_4") +; (gtk_accel_path "/MenuActionsExternal/rotate.desktop" "") +; (gtk_accel_path "/MenuActions/Mark2" "") +; (gtk_accel_path "/MenuActions/Zoom400" "") +; (gtk_accel_path "/MenuActions/UnselMark0" "") +; (gtk_accel_path "/MenuActions/ShowInfoPixel" "") +; (gtk_accel_path "/MenuActions/StereoCycle" "") +; (gtk_accel_path "/MenuActions/ImageBack" "") +; (gtk_accel_path "/MenuActions/FilterMark9" "") +; (gtk_accel_path "/MenuActions/Rating3" "KP_3") +; (gtk_accel_path "/MenuActions/Mark1" "") +; (gtk_accel_path "/MenuActionsExternal/hugin.desktop" "") +; (gtk_accel_path "/MenuActions/ColorProfile5" "") +; (gtk_accel_path "/MenuActions/FilterMark8" "") +; (gtk_accel_path "/MenuActions/Rating2" "KP_2") +; (gtk_accel_path "/MenuActionsExternal/display-im6.q16.desktop" "") +; (gtk_accel_path "/MenuActions/ToggleMark3Alt1" "KP_3") +; (gtk_accel_path "/MenuActions/Mark0" "") +; (gtk_accel_path "/MenuActions/Zoom50" "") +; (gtk_accel_path "/MenuActions/ConnectZoom400" "") +; (gtk_accel_path "/MenuActions/FilterMark7" "") +; (gtk_accel_path "/MenuActions/Rating1" "KP_1") +; (gtk_accel_path "/MenuActions/ColorProfile4" "") +; (gtk_accel_path "/MenuActions/FolderTree" "t") +; (gtk_accel_path "/MenuActions/UseImageProfile" "") +; (gtk_accel_path "/MenuActions/Zoom200" "") +; (gtk_accel_path "/MenuActions/Zoom25" "") +; (gtk_accel_path "/MenuActions/FilterMark6" "") +; (gtk_accel_path "/MenuActions/Rating0" "KP_0") +; (gtk_accel_path "/MenuActions/ColorProfile3" "") +; (gtk_accel_path "/MenuActions/PanView" "j") +; (gtk_accel_path "/MenuActions/ViewList" "l") +; (gtk_accel_path "/MenuActions/RotateCCW" "bracketleft") +; (gtk_accel_path "/MenuActions/ImageForward" "") +; (gtk_accel_path "/MenuActions/FilterMark5" "") + +(gtk_accel_path "/MenuActions/SelectNone" "") +(gtk_accel_path "/MenuActionsExternal/add-tags.desktop" "a") +(gtk_accel_path "/MenuActionsExternal/remove-tags.desktop" "r") +(gtk_accel_path "/MenuActionsExternal/guess-filename.desktop" "g") +(gtk_accel_path "/MenuActionsExternal/rangereal.desktop" "r") \ No newline at end of file diff --git a/assets/.config/geeqie/geeqierc.xml b/assets/.config/geeqie/geeqierc.xml new file mode 100644 index 0000000..b6706dc --- /dev/null +++ b/assets/.config/geeqie/geeqierc.xml @@ -0,0 +1,390 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/guessfilenameconfig.py b/assets/.config/guessfilename/guessfilenameconfig.py similarity index 100% rename from assets/guessfilenameconfig.py rename to assets/.config/guessfilename/guessfilenameconfig.py diff --git a/assets/.ssh/config b/assets/.ssh/config new file mode 100644 index 0000000..00e8365 --- /dev/null +++ b/assets/.ssh/config @@ -0,0 +1,20 @@ +Host * + SetEnv TERM="xterm" + ServerAliveInterval 300 + ServerAliveCountMax 2 + +Host cluster-moji.openstreetmap.fr + User tykayn + +Host mobilizon.vm.openstreetmap.fr + ProxyJump cluster-moji.openstreetmap.fr + IdentityFile ~/.ssh/id_rsa_spaceship + User tykayn + +Host sotm.vm.openstreetmap.fr + ProxyJump osm26.openstreetmap.fr + +Host github.com + IdentityFile ~/.ssh/github.pub + User git + IdentitiesOnly yes \ No newline at end of file diff --git a/backup-management/round.sh b/backup-management/round.sh new file mode 100755 index 0000000..a1b65a1 --- /dev/null +++ b/backup-management/round.sh @@ -0,0 +1,137 @@ +#!/bin/bash + +# Script to check if mounted disks have up-to-date borg2 backups +# Compares the last modification date of borg_archives/borg2 on each disk +# with /home/poule/borg_archives/borg2 + +# Set colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +NC='\033[0m' # No Color + +echo "Checking mounted disks for borg2 backup status..." + +# Reference directory +REFERENCE_DIR="/home/poule/borg_archives/borg2" + +# Check if reference directory exists +if [ ! -d "$REFERENCE_DIR" ]; then + echo -e "${RED}Error: Reference directory $REFERENCE_DIR does not exist.${NC}" + exit 1 +fi + +# Get current time +CURRENT_TIME=$(date +%s) +# Calculate time 24 hours ago +TIME_24H_AGO=$((CURRENT_TIME - 86400)) + +# Get only mount points in /media/$USER/ +MOUNT_POINTS=$(df -h | grep "/media/$USER/" | awk '{print $6}') + +# Initialize arrays for results +OUTDATED_DISKS=() +OUTDATED_TIMES=() +UP_TO_DATE_DISKS=() +NO_BORG_DISKS=() +LOW_SPACE_DISKS=() +LOW_SPACE_VALUES=() + +# Function to calculate time difference in years, months, days +calculate_time_diff() { + local timestamp=$1 + local now=$(date +%s) + local diff=$((now - timestamp)) + + # Calculate years, months, days + local days=$((diff / 86400)) + local years=$((days / 365)) + local remaining_days=$((days % 365)) + local months=$((remaining_days / 30)) + remaining_days=$((remaining_days % 30)) + + echo "${years}y ${months}m ${remaining_days}d" +} + +# Check each mount point +for MOUNT in $MOUNT_POINTS; do + BORG_DIR="$MOUNT/borg_archives/borg2" + + # Skip the reference directory itself + if [ "$MOUNT" == "/home" ] || [ "$MOUNT" == "/" ]; then + continue + fi + + echo -e "${YELLOW}Checking $MOUNT...${NC}" + + # Check available disk space + AVAILABLE_SPACE=$(df -BG "$MOUNT" | awk 'NR==2 {print $4}' | sed 's/G//') + if [ "$AVAILABLE_SPACE" -lt 10 ]; then + echo -e " ${RED}! Low disk space: ${AVAILABLE_SPACE}GB available${NC}" + LOW_SPACE_DISKS+=("$MOUNT") + LOW_SPACE_VALUES+=("$AVAILABLE_SPACE") + fi + + # Check if borg_archives/borg2 exists on this mount + if [ -d "$BORG_DIR" ]; then + # Get last modification time of the borg directory + BORG_TIME=$(stat -c %Y "$BORG_DIR") + + # Compare times - consider up-to-date if modified within the last 24 hours + if [ "$BORG_TIME" -ge "$TIME_24H_AGO" ]; then + echo -e " ${GREEN}✓ Backup is up to date${NC}" + UP_TO_DATE_DISKS+=("$MOUNT") + else + echo -e " ${RED}✗ Backup is outdated${NC}" + OUTDATED_DISKS+=("$MOUNT") + OUTDATED_TIMES+=("$BORG_TIME") + fi + else + echo -e " ${YELLOW}! No borg2 backup directory found${NC}" + NO_BORG_DISKS+=("$MOUNT") + fi +done + +# Print summary +echo -e "\n${YELLOW}=== Backup Status Summary ===${NC}" + +if [ ${#UP_TO_DATE_DISKS[@]} -gt 0 ]; then + echo -e "\n${GREEN}Up-to-date disks:${NC}" + for DISK in "${UP_TO_DATE_DISKS[@]}"; do + echo " - $DISK" + done +fi + +if [ ${#OUTDATED_DISKS[@]} -gt 0 ]; then + echo -e "\n${RED}Outdated disks (need backup):${NC}" + for i in "${!OUTDATED_DISKS[@]}"; do + DISK="${OUTDATED_DISKS[$i]}" + BORG_TIME="${OUTDATED_TIMES[$i]}" + FORMATTED_DATE=$(date -d "@$BORG_TIME" "+%Y-%m-%d %H:%M:%S") + TIME_DIFF=$(calculate_time_diff "$BORG_TIME") + echo " - $DISK (Last modified: $FORMATTED_DATE, Age: $TIME_DIFF)" + done +fi + +if [ ${#NO_BORG_DISKS[@]} -gt 0 ]; then + echo -e "\n${YELLOW}Disks without borg2 backup directory:${NC}" + for DISK in "${NO_BORG_DISKS[@]}"; do + echo " - $DISK" + done +fi + +if [ ${#LOW_SPACE_DISKS[@]} -gt 0 ]; then + echo -e "\n${RED}Disks with low space (less than 10GB free):${NC}" + for i in "${!LOW_SPACE_DISKS[@]}"; do + DISK="${LOW_SPACE_DISKS[$i]}" + SPACE="${LOW_SPACE_VALUES[$i]}" + echo " - $DISK (${SPACE}GB available)" + done +fi + +# Exit with error code if there are outdated disks +if [ ${#OUTDATED_DISKS[@]} -gt 0 ]; then + exit 1 +else + exit 0 +fi diff --git a/histogramme_from_csv.py b/histogramme_from_csv.py deleted file mode 100644 index 009f86b..0000000 --- a/histogramme_from_csv.py +++ /dev/null @@ -1,18 +0,0 @@ -import pandas as pd -import matplotlib.pyplot as plt - -# Charger le CSV -csv_path = 'limitations_vitesse_essonne.csv' -df = pd.read_csv(csv_path) - -# Générer l'histogramme -plt.figure(figsize=(10,6)) -plt.bar(df['limitation_vitesse'].astype(str), df['longueur_km'], color='skyblue', edgecolor='black') -plt.xlabel('Limitation de vitesse (km/h)') -plt.ylabel('Longueur totale (km)') -plt.title("Histogramme des limitations de vitesse sur les routes principales de l'Essonne") -plt.tight_layout() - -# Sauvegarder en SVG -plt.savefig('histogramme_limitations_vitesse_essonne.svg', format='svg') -print("Histogramme sauvegardé sous histogramme_limitations_vitesse_essonne.svg") \ No newline at end of file diff --git a/initialization/check_installed.sh b/initialization/check_installed.sh index c0bf001..afe4093 100755 --- a/initialization/check_installed.sh +++ b/initialization/check_installed.sh @@ -5,7 +5,7 @@ source $HOME/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_va # Check if apt-installed packages are present echo "Checking apt-installed packages..." -PACKAGES="adduser ansible arp-scan automysqlbackup borgbackup calibre certbot curl docker docker-compose etckeeper eza fail2ban geeqie git gnupg htop jq meld nano ncdu nginx npm pandoc php-curl php-mysql php-xml php8.4 php8.4-fpm php8.4-xml python3 python3-pip python3-setuptools rbenv restic rsync smartmontools snapd sshfs syncthing testdisk texlive tig unattended-upgrades vrms zsh" +PACKAGES="adduser ansible arp-scan automysqlbackup borgbackup calibre certbot curl docker docker-compose etckeeper eza fail2ban geeqie git gnupg ghostty htop jq meld nano ncdu nginx npm pandoc php-curl php-mysql php-xml php8.4 php8.4-fpm php8.4-xml python3 python3-pip python3-setuptools rbenv restic rsync smartmontools snapd sshfs syncthing testdisk texlive tig unattended-upgrades vrms zsh" MISSING_PACKAGES="" for pkg in $PACKAGES; do diff --git a/initialization/fast.sh b/initialization/fast.sh index d472857..5905bf9 100644 --- a/initialization/fast.sh +++ b/initialization/fast.sh @@ -9,27 +9,83 @@ git clone https://source.cipherbliss.com/tykayn/workflow public_workflow cd $HOME/Nextcloud/ressources/workflow_nextcloud/public_workflow git pull +# copie des assets de config +cp assets/.bash_custom_aliases $HOME/.bash_custom_aliases +cp assets/.bash_aliases $HOME/.bash_aliases +cp assets/.bashrc $HOME/.bashrc +cp assets/.zshrc $HOME/.zshrc +cp assets/.konsole.profile $HOME/.konsole.profile + +mkdir -p $HOME/.config/filetags +mkdir -p $HOME/.config/guessfilename +mkdir -p $HOME/.config/geeqie + +cp -r assets/filetags $HOME/.config/filetags +cp -r assets/geeqie $HOME/.config/geeqie +cp -r assets/guessfilename $HOME/.config/guessfilename + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B188E2B695BD4743 source "$HOME/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh" source "$HOME/Nextcloud/ressources/workflow_nextcloud/secrets_vars.sh" +echo 'deb http://download.opensuse.org/repositories/home:/clayrisser:/bookworm/Debian_12/ /' | sudo tee /etc/apt/sources.list.d/home:clayrisser:bookworm.list +curl -fsSL https://download.opensuse.org/repositories/home:clayrisser:bookworm/Debian_12/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_clayrisser_bookworm.gpg > /dev/null +sudo apt update -apt install ansible python3-pip arp-scan borgbackup curl docker docker-compose etckeeper git gnupg jq meld nano ncdu nginx restic npm pandoc php8.4 python3 python3-pip tig zsh testdisk texlive rbenv htop python3-setuptools automysqlbackup certbot smartmontools fail2ban snapd unattended-upgrades php8.4-fpm php-xml php-mysql rsync php8.4-xml php-curl vrms syncthing sshfs geeqie calibre adduser snapd borgbackup eza adduser +# ceci a été testé sur debian 12 + +# Définition des listes thématiques de paquets +# Outils de développement +DEV_TOOLS="ansible git npm python3 python3-pip python3-setuptools rbenv rustup" + +# Langages et frameworks +LANGUAGES="php8.4 php8.4-fpm php-xml php-mysql php8.4-xml php-curl" + +# Outils système +SYSTEM_TOOLS="arp-scan curl etckeeper ghostty gnupg htop jq meld nano ncdu testdisk tig vrms exa" + +# Outils de sauvegarde et sécurité +# borgbackup est mis dans le dossier bin +BACKUP_SECURITY="automysqlbackup certbot fail2ban restic smartmontools unattended-upgrades" + +# Outils réseau et serveur +NETWORK_SERVER="docker docker-compose nginx syncthing sshfs" + +# Outils de texte et documents +TEXT_DOCS="pandoc texlive" + +# Shells et terminaux +SHELLS="fzf zsh" + +# Autres outils +OTHERS="adduser calibre geeqie rsync snapd krita gimp ffmpeg" + +# Fusion des listes et tri alphabétique global +ALL_PACKAGES=$(echo "$DEV_TOOLS $LANGUAGES $SYSTEM_TOOLS $BACKUP_SECURITY $NETWORK_SERVER $TEXT_DOCS $SHELLS $OTHERS" | tr ' ' '\n' | sort | tr '\n' ' ') + +# Installation des paquets +sudo apt install $ALL_PACKAGES cd $HOME/Nextcloud/ressources/workflow_nextcloud/public_workflow/bin -wget https://github.com/nextcloud-releases/desktop/releases/download/v3.16.6/Nextcloud-3.16.6-x86_64.AppImage -chmod +x Nextcloud-3.16.6-x86_64.AppImage -wget https://launchpad.net/veracrypt/trunk/1.26.24/+download/VeraCrypt-1.26.24-x86_64.AppImage -chmod +x VeraCrypt-1.26.24-x86_64.AppImage +if [ ! -f "Nextcloud-3.16.6-x86_64.AppImage" ]; then + wget https://github.com/nextcloud-releases/desktop/releases/download/v3.16.6/Nextcloud-3.16.6-x86_64.AppImage + chmod +x Nextcloud-3.16.6-x86_64.AppImage +fi -snap install btop -snap install czkawka +if [ ! -f "VeraCrypt-1.26.24-x86_64.AppImage" ]; then + wget https://launchpad.net/veracrypt/trunk/1.26.24/+download/VeraCrypt-1.26.24-x86_64.AppImage + chmod +x VeraCrypt-1.26.24-x86_64.AppImage +fi + +sudo snap install btop czkawka snap install emacs --classic -cd -wget https://source.cipherbliss.com/tykayn/workflow/raw/branch/main/assets/.bash_custom_aliases -O .bash_aliases -wget https://source.cipherbliss.com/tykayn/workflow/raw/branch/main/assets/.bashrc -wget https://source.cipherbliss.com/tykayn/workflow/raw/branch/main/assets/.zshrc -curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > install_oh_my_zsh.sh -bash install_oh_my_zsh.sh \ No newline at end of file + +if [ ! -f "$HOME/.oh-my-zsh" ]; then + echo -e "\e[31m oh my zsh missing.\e[0m" + curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh > install_oh_my_zsh.sh + bash install_oh_my_zsh.sh +fi + +if[! -f $HOME/.oh-my-zsh ] diff --git a/initialization/functions.sh b/initialization/functions.sh new file mode 100644 index 0000000..21df3cd --- /dev/null +++ b/initialization/functions.sh @@ -0,0 +1,548 @@ +#!/bin/bash +# ----------------- documentation ----------------- +# +# @author functions_sync by @tykayn - contact at cipherbliss.com +#!/bin/bash +# ----------------- documentation ----------------- +# +# @author functions_sync by @tykayn - contact at cipherbliss.com + +source $HOME/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh + +logInOrgmodeInbox() { + local message=$1 + echo "TODO: ERREUR functions sync: /!\ $message" | tee >>$inbox_orgmode + echo "CREATED: [$(date +%Y-%m-%d_%H-%M-%S)]" | tee >>$inbox_orgmode +} +export logInOrgmodeInbox + +if [ ! -f ~/.tk-borg-passphrase-light ]; then + logInOrgmodeInbox "$HOST : il manque le fichier de borg passphrase dans ~/.tk-borg-passphrase-light" + +fi + +# --------- log de la date courante -------- # +logDate() { + echo -e "${txtcyn}${txtbold}---${txtreset}" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 + date "+%Y-%m-%d %H:%M:%S" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 + echo -e "${txtcyn}${txtbold} $1 ${txtreset}" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 + + echo "${txtcyn}---${txtreset} " | tee -a $LOG_FILE_BACKUP_DATES 2>&1 +} +export logDate + +#logDate "exclusions de rsync: \n ${exclude_opts[@]}" +# --------- syncro uniquement de borg backup -------- # +# du -sch /home/poule/borg_archives/backup_land4to +clearDiskSyncBorg() { + local diskName=$1 + echo " " >>$LOG_FILE_BACKUP_DATES + echo " ---------- sync borg folder to disk $diskName " >>$LOG_FILE_BACKUP_DATES + # chech that the disk exists + FILE=/media/$USER/$diskName + if test -d "$FILE"; then + echo "### $FILE , $diskName exists." >>$LOG_FILE_BACKUP_DATES + + echo "### $FILE , dernière syncro:" >>$LOG_FILE_BACKUP_DATES + date -r /media/$USER/$diskName/borg_archives/borg2 "+%Y-%m-%d %H:%M:%S" >>$LOG_FILE_BACKUP_DATES + + echo "### ${today} replicate to disk $diskName" >>$LOG_FILE_BACKUP_DATES + logDate "disk $diskName : partie $SPACESHIP_NEW_BORG_REPO" + # log the date of the last big syncro + touch $SPACESHIP_NEW_BORG_REPO/last_synced_from_$HOST.txt + date -r /media/$USER/$diskName/borg_archives/borg2 "+%Y-%m-%d %H:%M:%S" >$SPACESHIP_NEW_BORG_REPO/last_synced_from_$HOST.txt + + rsync -avhWP /home/poule/borg_archives /media/$USER/$diskName --perms --delete-before --inplace + date "+%Y-%m-%d %H:%M:%S" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 + echo "---- clearDiskSyncBorg $diskName faite -----------------------" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 + + else + echo "### $FILE introuvable." >>$LOG_FILE_BACKUP_DATES + fi + +} +export clearDiskSyncBorg + +# syncroniser un laptop avec un disque usb contenant stockage syncable +# exemple: +# getStockageSyncableFromDisk louisbraille +getStockageSyncableFromDisk() { + local diskName=$1 + echo " " >>$LOG_FILE_BACKUP_DATES + echo " ---------- get stockage syncable from disk $diskName " >>$LOG_FILE_BACKUP_DATES + FILE=/media/$USER/$diskName + if test -d "$FILE"; then + rsync -avhWP /media/$USER/$diskName/encrypted/stockage-syncable/photos $ARCHIVE_SYNCABLE --perms --delete-before --inplace + rsync -avhWP /media/$USER/$diskName/encrypted/stockage-syncable/ressources $ARCHIVE_SYNCABLE --perms --delete-before --inplace + rsync -avhWP /media/$USER/$diskName/encrypted/stockage-syncable/dessins $ARCHIVE_SYNCABLE --perms --delete-before --inplace + else + echo "### $FILE introuvable." >>$LOG_FILE_BACKUP_DATES + fi + date "+%Y-%m-%d %H:%M:%S" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 + echo "---- get stockage syncable from disk $diskName faite -----------------------" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 +} +export getStockageSyncableFromDisk + +clearDiskSyncBorgServer() { + local diskName=$1 + echo " " >>$LOG_FILE_BACKUP_DATES + echo " ---------- sync borg server folder to disk $diskName " >>$LOG_FILE_BACKUP_DATES + # chech that the disk exists + FILE=/media/$USER/$diskName + + # enlever le borg backup d'avant + # if test -d "/media/$USER/$diskName/backup_land4to"; then + # rm -rf /media/$USER/$diskName/backup_land4to + # fi + + if test -d "$FILE"; then + echo "### $FILE , $diskName exists." >>$LOG_FILE_BACKUP_DATES + echo "### $FILE , dernière syncro:" >>$LOG_FILE_BACKUP_DATES + date -r /media/$USER/$diskName/borg_archives/borg2 "+%Y-%m-%d %H:%M:%S" >>$LOG_FILE_BACKUP_DATES + + echo "### ${today} replicate to disk $diskName" >>$LOG_FILE_BACKUP_DATES + logDate "disk $diskName : partie borg2" + # log the date of the last big syncro + touch /home/poule/borg_archives/borg2/last_synced.txt + + mkdir -p /media/$USER/$diskName/borg_archives/production-servers-backup + # rsync -avhWP /home/poule/borg_archives/production-servers-backup/rise /media/$USER/$diskName/borg_archives/production-servers-backup --perms --delete-before --inplace + + rsync -avhWP /home/poule/borg_archives/borg2/* /media/$USER/$diskName/borg_archives/borg2/ --perms --delete-before --inplace + + else + echo "### $FILE introuvable." >>$LOG_FILE_BACKUP_DATES + fi + date "+%Y-%m-%d %H:%M:%S" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 + echo "---- clearDiskSyncBorgServer $diskName faite -----------------------" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 +} + +export clearDiskSyncBorgServer + +# --------- recopie des éléments de poule zfs -------- # +# les disques de desintation doivent avoir environ 2.5To de place disponible +# chacun doit refléter la partie interne de /home/poule ainsi que le dossier music +syncToBigDiskName() { + local diskName=$1 + echo " " >>$LOG_FILE_BACKUP_DATES + #check that the disk exists + FILE=/media/$USER/$diskName + + if test -d "$FILE"; then + echo "### $FILE , $diskName exists." >>$LOG_FILE_BACKUP_DATES + # tester si y'a de la place disponible + if test -d "$stockage_syncable_folder"; then + + echo "### ${today} replicate to disk $diskName" >>$LOG_FILE_BACKUP_DATES + + # logDate "disk $diskName : part home"; + # rsync -avhWP /home/poule/encrypted/home /media/$USER/$diskName/encrypted --perms --delete-before --inplace "${exclude_opts[@]}" + + logDate "${txtgrn} disk $diskName : part stockage-syncable : ressources ${txtreset}" + rsync -avhWP $stockage_syncable_folder/ressources/* /media/$USER/$diskName/encrypted/stockage-syncable/ressources/ --delete-before --inplace "${exclude_opts[@]}" + + logDate "${txtgrn} disk $diskName : part wulfi borg ${txtreset}" + + rsync -avhWP /home/poule/borg_archives/wulfi_backup_borg/ /media/$USER/$diskName/borg_archives/wulfi_backup_borg/ --delete-before --inplace "${exclude_opts[@]}" + + logDate "disk $diskName : syncro borg2" + + clearDiskSyncBorgServer $1 + + # log the date of the last big syncro + touch /home/poule/encrypted/last_synced.text + touch $stockage_syncable_folder/source-is-zfs-spaceship.txt + else + echo "### le dossier d'archives $stockage_syncable_folder est introuvable. Zfs n'a pas été dévérouillé par l'administrateur " >>$LOG_FILE_BACKUP_DATES + fi + # else + # echo "disque $diskName trop rempli" + # notify_desktop "ERREUR Syncronisation de sauvegarde: disque $diskName trop rempli" + # fi + else + echo "### $FILE introuvable." >>$LOG_FILE_BACKUP_DATES + fi + date "+%Y-%m-%d %H:%M:%S" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 + echo "---- syncToBigDiskName $diskName faite -----------------------" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 + + disque_libre $diskName + # marquer visuellement la dernière syncronisation à la racine du disque + rm "/media/$USER/$diskName/last synced from $HOST.txt" + rm "/media/$USER/$diskName/*synced from $HOST.txt" + touch "/media/$USER/$diskName/last synced from $HOST.txt" + +} +export syncToBigDiskName +# ---------------------------------------------------------------------- + +# --------- le laptop fatland n"a que 2 To de disponible -------- # +getwulfinas() { + rsync -avhWP "tykayn@192.168.1.15:/volume1/bidules_partagés/wulfila_home/*" /home/poule/encrypted/backup_du_nas/wulfi_home_backup --delete-before --inplace --perms "${exclude_opts[@]}" --exclude "TK-LAND" --exclude=npm --delete-excluded + borg create -r /home/poule/borg_archives/wulfi_backup_borg wulfi_backup_borg::wulfi_home_{now} /home/poule/encrypted/backup_du_nas/wulfi_home_backup --progress --stats + borg prune -v --list --stats --keep-daily=8 --keep-weekly=6 --keep-monthly=3 --keep-yearly=2 -r /home/poule/borg_archives/wulfi_backup_borg +} +export getwulfinas + +pushnas() { + rsync -avPz -e ssh /home/poule/borg_archives/borg2/* "tykayn@192.168.1.15:/volume1/bidules_partagés/backup a ne pas modifier/poule/borg_archives/borg2" --delete-before + rsync -avPz -e ssh /home/poule/borg_archives/wulfi_backup_borg/* "tykayn@192.168.1.15:/volume1/bidules_partagés/backup a ne pas modifier/poule/borg_archives/wulfi_backup_borg" --delete-before +} +export pushnas + +syncdisksusb() { + + syncToBigDiskName brossadent + syncToBigDiskName louisbraille + syncToBigDiskName rugged + syncToBigDiskName hulk + syncToBigDiskName ironman + +} +export syncdisksusb + +syncfatland() { + echo " " >>$LOG_FILE_BACKUP_DATES + echo " - envoi vers FATland" >>$LOG_FILE_BACKUP_DATES + #### vers le laptop FATland + rsync $stockage_syncable_folder/photos/$CURRENT_YEAR tykayn@192.168.1.12:$stockage_syncable_folder/photos -avhWP --delete-before "${exclude_opts[@]}" + rsync -avhWP $stockage_syncable_folder/photos/* tykayn@192.168.1.12:$stockage_syncable_folder/photos --delete-before "${exclude_opts[@]}" + rsync $stockage_syncable_folder tykayn@192.168.1.12:/home/poule/encrypted -avhWP --delete-before "${exclude_opts[@]}" + rsync /home/poule/borg_archives/* tykayn@192.168.1.12:/home/poule/borg_archives -avhWP --delete-before + date | tee -a $LOG_FILE_BACKUP_DATES 2>&1 + echo "sync fatland fait" | tee -a $LOG_FILE_BACKUP_DATES 2>&1 +} +export syncfatland +# ----------------- BORG ----------------- +# partie contenant tout stockage-syncable +upBorg() { + + #killall borg + logDate "### --------- SPACESHIP | creating borg archive at $SPACESHIP_BORG_REPO" + rm -rf ~/.cache/borg/150867528afd85114c8aba98af201a7ad8cf01869c507a87c025d2f8701040a9/lock.exclusive + rm -rf $SPACESHIP_BORG_REPO/lock.exclusive + + # borg 2 way to create archive, dans /home/poule/borg_archives/borg2 + borg create encrypted_spaceship_{now} $ARCHIVE_SYNCABLE "${exclude_opts[@]}" --progress --verbose --stats --compression zstd,9 | tee -a $LOG_FILE_BACKUP 2>&1 + borg prune -v --list --stats --keep-daily=8 --keep-weekly=6 --keep-monthly=3 --keep-yearly=2 -r /home/poule/borg_archives/borg2 + + # small archive + borg create -r /home/poule/borg_archives/small_stockage_syncable small::{now}_stockage_syncable_small /home/poule/encrypted/stockage-syncable/dessins "${exclude_opts[@]}" --progress --verbose --stats --compression zstd,9 --exclude photos --exclude BAZAR --exclude www --exclude archives + borg prune -v --list --stats --keep-daily=8 --keep-weekly=6 --keep-monthly=3 --keep-yearly=2 -r /home/poule/borg_archives/small_stockage_syncable + + borg create -r /home/poule/borg_archives/borg_tk_stockage_photos stockage_syncable::{now}_photos_only /home/poule/encrypted/stockage-syncable/photos/ --exclude imageries -v --stats --progress --verbose --stats --compression zstd,9 + borg prune -v --list --stats --keep-daily=8 --keep-weekly=6 --keep-monthly=3 --keep-yearly=2 -r /home/poule/borg_archives/borg_tk_stockage_photos + + borg create -r /home/poule/borg_archives/borg_tk_stockage_tout_sauf_photos tout_sauf_photos::stockage_syncable_{now} /home/poule/encrypted/stockage-syncable --exclude photos --progress --stats --compression zstd,9 + borg prune -v --list --stats --keep-daily=8 --keep-weekly=6 --keep-monthly=3 --keep-yearly=2 -r /home/poule/borg_archives/borg_tk_stockage_tout_sauf_photos + + rsync -avhWP "tykayn@192.168.1.15:/volume1/bidules_partagés/wulfila_home/*" /home/poule/encrypted/backup_du_nas/wulfi_home_backup --delete-before --inplace --perms "${exclude_opts[@]}" --exclude "TK-LAND" --exclude=npm --delete-excluded + # wulfi backup + borg create -r /home/poule/borg_archives/wulfi_backup_borg wulfi_backup_borg::wulfi_home_{now} /home/poule/encrypted/backup_du_nas/wulfi_home_backup --progress --stats + borg prune -v --list --stats --keep-daily=8 --keep-weekly=6 --keep-monthly=3 --keep-yearly=2 -r /home/poule/borg_archives/wulfi_backup_borg + + echo " " | tee -a $LOG_FILE_BACKUP 2>&1 + logDate "### --------- ${today} | SPACESHIP | pruning old archives" | tee -a $LOG_FILE_BACKUP 2>&1 + # nettoyage tk_backup + borg prune -v --list --stats --keep-daily=8 --keep-weekly=6 --keep-monthly=3 --keep-yearly=2 --repo $SPACESHIP_BORG_REPO | tee -a $LOG_FILE_BACKUP 2>&1 + logDate "### --------- pruning done" +} +export upBorg + +getRiseupBorgArchivesToPoule() { + rsync -avzPW "tykayn@proxmox.coussinet.org:/poule/encrypted/*" /home/poule/borg_archives/production-servers-backup/rise/encrypted --inplace --delete-before --exclude do_not_sync_back --exclude borgbackup_tkland --exclude backup_land4to --exclude imagerie_carto --exclude borg2 --exclude mastodon + +} +export getRiseupBorgArchivesToPoule + +# envoi vers le serveur riseup de l'archive borg2 +sendBorg2ToRiseupServer() { + rsync -avzhWP /home/poule/borg_archives/borg2/* tykayn@proxmox.coussinet.org:/poule/encrypted/borg2 --delete-before + + rsync -avzhWP /home/poule/borg_archives/wulfi_backup_borg/* tykayn@proxmox.coussinet.org:/poule/encrypted/borg_archives/wulfi_backup_borg --delete-before + +} +export sendBorg2ToRiseupServer + +upPhotosADispatcher() { + cd $stockage_syncable_folder/photos/a_dispatcher + /home/tykayn/.local/bin/guessfilename IMG* + /home/tykayn/.local/bin/guessfilename *.jpg + /home/tykayn/.local/bin/guessfilename *.png + /home/tykayn/.local/bin/guessfilename *.mp4 + /home/tykayn/.local/bin/guessfilename *.avi + /home/tykayn/.local/bin/date2name --files -w *.jpg + /home/tykayn/.local/bin/date2name --files -w *.png + /home/tykayn/.local/bin/date2name --files -w *.mp4 + /home/tykayn/.local/bin/date2name --files -w *.avi + /home/tykayn/.local/bin/filetags "*Capture d'écran*" --tags="screenshots -screenshot" + mv $stockage_syncable_folder/photos/a_dispatcher/*screenshot* /home/poule/encrypted/stockage-syncable/photos/screenshots/ + /home/tykayn/.local/bin/filetags /home/poule/encrypted/stockage-syncable/photos/screenshots/*.jpg --tags="screenshots -screenshot" + /home/tykayn/.local/bin/filetags /home/poule/encrypted/stockage-syncable/photos/screenshots/*.png --tags="screenshots -screenshot" + /home/tykayn/.local/bin/guessfilename /home/poule/encrypted/stockage-syncable/photos/screenshots/*.jpg + /home/tykayn/.local/bin/guessfilename /home/poule/encrypted/stockage-syncable/photos/screenshots/*.png + + mkdir -p $stockage_syncable_folder/photos/$CURRENT_YEAR + + mv $stockage_syncable_folder/photos/a_dispatcher/$CURRENT_YEAR* $stockage_syncable_folder/photos/$CURRENT_YEAR + move2archive --archivepath /home/poule/encrypted/stockage-syncable/photos --batchmode 20* +} +export upPhotosADispatcher + +function syncFromSpaceship() { + echo "functions_sync.sh: récupération du dossier stockage syncable depuis spaceship 192.168.1.17" + rsync -avzP "tykayn@192.168.1.17:/home/poule/encrypted/stockage-syncable/photos" /home/poule/encrypted/stockage-syncable/ --delete-before --exclude Nextcloud --inplace "${exclude_opts[@]}" +} +export syncFromSpaceship + +disque_libre() { + local disque=$1 + # vérifier que le disque existe + if [ ! -d "/media/$USER/$disque" ]; then + # echo "Le disque $disque n'existe pas dans /media/$USER/" + if [ -e "/dev/disk/by-label/$disque" ] && [ ! -d "/media/$USER/$disque" ]; then + echo "Le disque $disque existe mais n'est pas monté dans /media/$USER/" + else + echo "Le disque $disque n'existe pas, il n'est probablement pas branché." + fi + return 1 + fi + # seuil en Mo + local seuil=1024 + + local espace_disponible=$(df -H -k --output=avail "/media/$USER/$disque" | tail -n 1 | awk '{print $1}') + local espace_disponible_gb=$(echo "scale=2; $espace_disponible/1024/1024" | bc) + echo "espace disponible: $espace_disponible_gb GB" + if [ "$espace_disponible" -lt "$seuil" ]; then + echo "Il reste moins de 1Go d'espace disponible sur le disque $disque" + return 0 + else + echo "Il reste de la place sur le disque $disque" + return 1 + fi +} + +export disque_libre +# ---------------------------------------------------------------------- + + +# ------- # renommage des fichiers go pro en gardant le nom original et en ajoutant les tags +gopro_rename() { + + echo "renommage des fichiers gorpo dans le dossier courant" + + for current_file in ./*; do + if [[ $current_file == *"GPFR"* ]]; then + echo " " + echo "C'est une capture gopro frontale'" + exiftool '-filename&1 + } + export logGit_csv + +# écrire un log des commits réalisés groupés par jour pour le dossier courant +logGit_per_day() { + while read -r -u 9 since name; do + until=$(date "+%Y-%m-%d %H:%M:%S") + + echo "$since $name" + echo + + GIT_PAGER=cat git log \ + --no-merges \ + --committer="$name" \ + --since="$since 00:00:00 +0000" \ + --until="$until 00:00:00 +0000" \ + --format=" * [%h] %s" + + echo + done 9< <(git log --no-merges --format=$"%cd %cn" --date=short --since=8.weeks | sort --unique --reverse) + + } + + export logGit_per_day + +logGit_to_org() { + folder_name=${PWD##*/} + touch log_git_list.org + echo "* Log git $folder_name\n" >log_git_list.org + pwd >>log_git_list.org + cat log_git_list.org + logGit_per_day | tee -a log_git_list.org 2>&1 +} +export logGit_to_org + +updateTags() { + cp $WORKFLOW_PATH/files_management/.filetags ~/ + cp $WORKFLOW_PATH/files_management/.filetags $stockage_syncable_folder/photos + + cat $WORKFLOW_PATH/files_management/.filetags + echo "tags mis à jour depuis $WORKFLOW_PATH/files_management/.filetags" +} +export updateTags + +# trouver un fichier dans mon corpus de textes org qui contient un certain terme recherché +trouve() +{ + + # chercher dans mes textes du dossier orgmode + DOSSIER=$orgmode_path + + # Rechercher le mot dans les fichiers du dossier + RESULTATS=$(rg -n -i --glob "*.{org,md,txt}" "$1" "$DOSSIER") + + # Proposer de sélectionner le fichier avec fzf + SELECTION=$(echo "$RESULTATS" | fzf --prompt "Sélectionner un fichier : ") + + # Ouvrir le fichier sélectionné dans gedit et aller à la ligne du résultat + FICHIER=$(echo "$SELECTION" | cut -d: -f1) + LIGNE=$(echo "$SELECTION" | cut -d: -f2) + + if [ -n "$FICHIER" ]; then + gedit +$LIGNE "$FICHIER" + emacsclient --daemon --eval "(find-file \"$FICHIER\")(goto-line $LIGNE)" & + fi + +} +export trouve + +# recherche de fichier selon un terme contenu dans son nom +trouve_file() +{ + # Définir le dossier à rechercher + DOSSIER="." + + # Demander le terme à rechercher + TERME=$1 + + # Rechercher le terme dans les noms de fichiers avec rg + RESULTATS=$(rg -i --files-with-matches --glob "*$TERME*" "$DOSSIER") + + # Proposer de sélectionner le fichier avec fzf + SELECTION=$(echo "$RESULTATS" | fzf --prompt "Sélectionner un fichier : ") + + # Ouvrir le fichier sélectionné + if [ -n "$SELECTION" ]; then + gedit "$SELECTION" + fi +} +export trouve_file + +# faire une notification sur le bureau quand un disque est plein +notify_desktop() { + local ICON="dialog-information" + local DURATION=10000 + local TITLE=$1 + local MESSAGE=$2 + + local TIMESTAMP=$(date +%s) + local LAST_NOTIFICATION=$(cat /tmp/last_notification 2>/dev/null) + + if [ -z "$LAST_NOTIFICATION" ]; then + LAST_NOTIFICATION=0 + fi + + local ELAPSED_TIME=$((TIMESTAMP - LAST_NOTIFICATION)) + + if [ $ELAPSED_TIME -gt 60 ]; then + LAST_NOTIFICATION=$TIMESTAMP + echo $LAST_NOTIFICATION > /tmp/last_notification + notify-send -i "$ICON" -t "$DURATION" "$TITLE" "$MESSAGE" + else + local NOTIFICATION_COUNT=$(cat /tmp/notification_count 2>/dev/null) + if [ -z "$NOTIFICATION_COUNT" ]; then + NOTIFICATION_COUNT=0 + fi + + if [ $NOTIFICATION_COUNT -lt 3 ]; then + ((NOTIFICATION_COUNT++)) + echo $NOTIFICATION_COUNT > /tmp/notification_count + notify-send -i "$ICON" -t "$DURATION" "$TITLE" "$MESSAGE" + fi + fi +} +export notify_desktop + +## rsync qui vérifie les erreurs et fait une notification de bureau +rsync_secure() { + local SOURCE=$1 + local DESTINATION=$2 + shift 2 + local RSYNC_OPTIONS=("$@") + + if [ ! -d "$SOURCE" ]; then + notify_desktop "Erreur" "Le dossier source n'existe pas" "Veuillez vérifier le chemin du dossier source" + return 1 + fi + + if [ ! -d "$DESTINATION" ]; then + notify_desktop "Erreur" "Le dossier de destination n'existe pas" "Veuillez vérifier le chemin du dossier de destination" + return 1 + fi + + local DISK_SPACE=$(df -h "$DESTINATION" | awk '{print $5}' | sed's/%//g') + if [ $DISK_SPACE -gt 90 ]; then + notify_desktop "Erreur" "La destination est trop remplie" "Veuillez libérer de l'espace disque avant de poursuivre. Dossier: $DESTINATION" + return 1 + fi + + rsync "${RSYNC_OPTIONS[@]}" "$SOURCE" "$DESTINATION" + if [ $? -ne 0 ]; then + notify_desktop "Erreur" "Erreur lors de la synchronisation" "Veuillez vérifier les journaux pour plus d'informations" + return 1 + fi + + notify_desktop "Succès" "La synchronisation a été effectuée avec succès" "" +} +export rsync_secure diff --git a/workflow_variables.sh b/workflow_variables.sh index 7020330..16b7460 100644 --- a/workflow_variables.sh +++ b/workflow_variables.sh @@ -1,7 +1,7 @@ #!/bin/bash # ajouter dans les scripts avec cette ligne: # -# source ~/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh +# source $HOME/Nextcloud/ressources/workflow_nextcloud/public_workflow/workflow_variables.sh # # export load_only_once=true @@ -20,14 +20,15 @@ if [ -z ${load_only_once+x} ]; then export backup_laptop_archive_path="/home/poule/backup/encrypted" - export WORKFLOW_PATH=~/Nextcloud/ressources/workflow_nextcloud - export WORKFLOW_PATH_PUBLIC=~/Nextcloud/ressources/workflow_nextcloud/public_workflow + export WORKFLOW_PATH=$HOME/Nextcloud/ressources/workflow_nextcloud + export WORKFLOW_PATH_PUBLIC=$HOME/Nextcloud/ressources/workflow_nextcloud/public_workflow + export WORKFLOW_PUBLIC_PATH=$WORKFLOW_PATH_PUBLIC export WORKFLOW_PATH_ROOT=/home/$main_user/Nextcloud/ressources/workflow_nextcloud export ALIASES_PATH=$WORKFLOW_PATH_PUBLIC/assets/.bash_custom_aliases # fichiers orgmode, wiki personnel - export orgmode_path=~/Nextcloud/textes/orgmode + export orgmode_path=$HOME/Nextcloud/textes/orgmode export inbox_orgmode=$orgmode_path/incoming_inbox.org - export orgroam_path=~/Nextcloud/textes/orgmode/org-roam + export orgroam_path=$HOME/Nextcloud/textes/orgmode/org-roam export backup_texts_folder=~/archives/backup_automatique export HOME_OF_SCRIPTS=$www_folder/scripts