diff --git a/README.md b/README.md index d3c1d033..efd6b21a 100644 --- a/README.md +++ b/README.md @@ -322,24 +322,6 @@ Together with grub-btrfs, this configuration is integrated into GRUB so that the --- -## wiki -This wiki is my personal cybersecurity knowledge base. -It centralizes course notes, lab write‑ups and reference material for networking, blue team and red team topics, so I can grow a coherent skill set over time instead of scattered notes. -The structure is intentionally simple: foundations first, then focused sections for tools and defensive/offensive techniques, plus dedicated reference indexes to quickly jump back to key resources when needed. - -All my notes live in a Neovim‑driven wiki. -From a terminal session, I just launch: -```shell -nvim -``` -and use -``` -ww -``` -to open my main index page, then navigate through Markdown links like a lightweight personal documentation site. - ---- - ## Other configs Additional directories complete the environment: @@ -452,13 +434,14 @@ stow *\ ```shell yay -S \ - mangowm-git swayfx wofi i3status-rust kitty neovim zsh \ + mangowm-git sway wofi i3status-rust kitty neovim zsh \ starship fzf fd ripgrep eza fastfetch yazi bat \ cliphist calcure zoxide pyenv git \ gtk3 gtk4 catppuccin-gtk-theme-mocha \ - catppuccin-cursors-mocha swaylock-effects \ + catppuccin-cursors-mocha swaylock \ swayidle greetd greetd-tuigreet grim slurp \ - snapper brtfs-progs grub-snapper uwsm + snapper brtfs-progs grub-snapper uwsm \ + autotiling atuin ``` ### greetd-tuigreet config @@ -475,7 +458,7 @@ vt = 1 # The default session, also known as the greeter. [default_session] -command = "tuigreet tuigreet --time --greeting 'Welcome to ArchASP' --theme 'container=brightblack;border=magenta;text=white;greet=brightmagenta;prompt=cyan;input=brightcyan;time=brightyellow;error=red;button=green;action=green' --cmd 'uwsm start default' --power-shutdown 'shutdown -h now' --power-reboot 'reboot'" +command = "tuigreet --time --greeting 'Welcome to ArchASP' --theme 'container=brightblack;border=magenta;text=white;greet=brightmagenta;prompt=cyan;input=brightcyan;time=brightyellow;error=red;button=green;action=green' --cmd 'uwsm start default' --power-shutdown 'shutdown -h now' --power-reboot 'reboot'" # The user to run the command as. The privileges this user must have depends # on the greeter. A graphical greeter may for example require the user to be diff --git a/bin/.local/bin/agy b/bin/.local/bin/agy new file mode 100755 index 00000000..0727d346 Binary files /dev/null and b/bin/.local/bin/agy differ diff --git a/bin/.local/bin/batlimit b/bin/.local/bin/batlimit index 0f2ef226..42792a2e 100755 --- a/bin/.local/bin/batlimit +++ b/bin/.local/bin/batlimit @@ -2,28 +2,38 @@ set -euo pipefail -BATTERY="${1:-BAT1}" +readonly BATTERY="BAT1" +readonly THRESHOLD_FILE="/sys/class/power_supply/${BATTERY}/charge_control_end_threshold" +readonly CAPACITY_FILE="/sys/class/power_supply/${BATTERY}/capacity" +readonly STATUS_FILE="/sys/class/power_supply/${BATTERY}/status" +readonly HELPER="/usr/local/sbin/batlimit-set" + +if [[ ! -e "$THRESHOLD_FILE" ]]; then + echo "Erreur : aucun seuil de charge disponible pour ${BATTERY}." + exit 1 +fi read -rp "Niveau max de charge voulu [%] : " STOP -if ! [[ "$STOP" =~ ^[0-9]+$ ]]; then - echo "Erreur: entre un nombre." - exit 1 +if [[ ! "$STOP" =~ ^[0-9]+$ ]]; then + echo "Erreur : entre un nombre entier." + exit 1 fi if (( STOP < 40 || STOP > 100 )); then - echo "Erreur: choisis une valeur entre 40 et 100." - exit 1 + echo "Erreur : choisis une valeur entre 40 et 100." + exit 1 fi -START=$((STOP - 5)) +if ! sudo -n "$HELPER" "$STOP"; then + echo "Erreur : impossible d’appliquer le seuil." + exit 1 +fi -echo "Batterie : $BATTERY" -echo "Seuil début charge : $START%" -echo "Seuil arrêt charge : $STOP%" - -sudo tlp setcharge "$START" "$STOP" "$BATTERY" +CURRENT_THRESHOLD=$(<"$THRESHOLD_FILE") echo -echo "État actuel :" -sudo tlp-stat -b | grep -E "Battery|threshold|charge|Plugin|Supported" +echo "Batterie : ${BATTERY}" +echo "Seuil appliqué : ${CURRENT_THRESHOLD}%" +echo "Charge actuelle : $(<"$CAPACITY_FILE")%" +echo "État : $(<"$STATUS_FILE")" diff --git a/bin/.local/bin/llama-cli b/bin/.local/bin/llama-cli new file mode 120000 index 00000000..a8d98a46 --- /dev/null +++ b/bin/.local/bin/llama-cli @@ -0,0 +1 @@ +/home/fy59/.local/src/llama.cpp/build/bin/llama-cli \ No newline at end of file diff --git a/bin/.local/bin/llama-server b/bin/.local/bin/llama-server new file mode 120000 index 00000000..d100fa48 --- /dev/null +++ b/bin/.local/bin/llama-server @@ -0,0 +1 @@ +/home/fy59/.local/src/llama.cpp/build/bin/llama-server \ No newline at end of file diff --git a/bin/.local/bin/nextcloud-sync b/bin/.local/bin/nextcloud-sync new file mode 100755 index 00000000..76576b20 --- /dev/null +++ b/bin/.local/bin/nextcloud-sync @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +set -u + +readonly LOCAL_DIR="$HOME/Documents" +readonly SERVER_URL="https://cloud.labfytools.com" +readonly LOG_DIR="$HOME/.local/state/nextcloud" +readonly LOG_FILE="$LOG_DIR/sync.log" +readonly LOCK_FILE="${XDG_RUNTIME_DIR:-/tmp}/nextcloud-sync.lock" + +mkdir -p "$LOG_DIR" + +# Empêche deux synchronisations simultanées. +exec 9>"$LOCK_FILE" + +if ! flock -n 9; then + notify-send \ + -a "Nextcloud" \ + -u normal \ + "Nextcloud" \ + "Une synchronisation est déjà en cours." + exit 0 +fi + +notify-send \ + -a "Nextcloud" \ + -u low \ + "Nextcloud" \ + "Synchronisation en cours…" + +{ + printf '\n=== %s ===\n' "$(date --iso-8601=seconds)" +} >> "$LOG_FILE" + +if nextcloudcmd \ + -n \ + "$LOCAL_DIR" \ + "$SERVER_URL" >> "$LOG_FILE" 2>&1 +then + notify-send \ + -a "Nextcloud" \ + -u normal \ + "Nextcloud" \ + "✅ Synchronisation réussie." + + printf 'Résultat : réussite\n' >> "$LOG_FILE" +else + status=$? + + notify-send \ + -a "Nextcloud" \ + -u critical \ + "Nextcloud" \ + "❌ Synchronisation échouée — code ${status}." + + printf 'Résultat : échec, code %d\n' "$status" >> "$LOG_FILE" + exit "$status" +fi diff --git a/bin/.local/bin/thunderbird-proton b/bin/.local/bin/thunderbird-proton new file mode 100755 index 00000000..4d4e0571 --- /dev/null +++ b/bin/.local/bin/thunderbird-proton @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +set -u + +# Empêche deux lanceurs simultanés. +exec 9>"${XDG_RUNTIME_DIR:-/tmp}/thunderbird-proton.lock" + +if ! flock -n 9; then + notify-send "Thunderbird" "Thunderbird est déjà en cours d’utilisation." + exit 0 +fi + +# Le Bridge utilise le trousseau GNOME pour ses identifiants. +systemctl --user start gnome-keyring-daemon.service + +if ! systemctl --user start protonmail-bridge.service; then + notify-send -u critical \ + "Proton Mail Bridge" \ + "Impossible de démarrer le service." + exit 1 +fi + +notify-send "Proton Mail Bridge" "Démarrage du serveur de messagerie…" + +# Attendre que les processus du Bridge soient réellement présents. +for _ in {1..20}; do + if pgrep -f '/usr/lib/protonmail/bridge/bridge' >/dev/null; then + break + fi + sleep 0.5 +done + +sleep 2 + +thunderbird "$@" & + +# Attendre la fermeture complète de Thunderbird. +while pgrep -x thunderbird >/dev/null; do + sleep 2 +done + +systemctl --user stop protonmail-bridge.service +notify-send "Proton Mail Bridge" "Arrêté après la fermeture de Thunderbird." diff --git a/bin/.local/bin/vmware-on-demand b/bin/.local/bin/vmware-on-demand new file mode 100755 index 00000000..f84c9208 --- /dev/null +++ b/bin/.local/bin/vmware-on-demand @@ -0,0 +1,48 @@ +#!/usr/bin/env bash + +set -u + +readonly STACK_HELPER="/usr/local/sbin/vmware-stack" +readonly LOCK_FILE="${XDG_RUNTIME_DIR:-/tmp}/vmware-on-demand.lock" + +services_started=0 + +cleanup() { + if (( services_started == 1 )); then + notify-send "VMware" "Arrêt du réseau VMware et de Samba…" + + if sudo -n "$STACK_HELPER" stop; then + notify-send "VMware" "Réseau VMware et Samba arrêtés." + else + notify-send -u critical \ + "VMware" \ + "Impossible d’arrêter les services." + fi + fi +} + +exec 9>"$LOCK_FILE" + +if ! flock -n 9; then + notify-send "VMware" "Une session VMware est déjà lancée." + exit 0 +fi + +notify-send "VMware" "Démarrage du réseau VMware et de Samba…" + +if ! sudo -n "$STACK_HELPER" start; then + notify-send -u critical \ + "VMware" \ + "Impossible de démarrer les services." + exit 1 +fi + +services_started=1 +trap cleanup EXIT INT TERM + +vmware "$@" & + +while pgrep -x vmware >/dev/null || + pgrep -x vmware-vmx >/dev/null; do + sleep 3 +done diff --git a/fastfetch/.config/fastfetch/config.jsonc b/fastfetch/.config/fastfetch/config.jsonc index 01883bae..fec7b13d 100644 --- a/fastfetch/.config/fastfetch/config.jsonc +++ b/fastfetch/.config/fastfetch/config.jsonc @@ -1,12 +1,20 @@ // ~/.config/fastfetch/config.jsonc { - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "display": { - "separator": "• " - }, - "logo":{ - "type": "sixel", - "width": 30 +// "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", +// "display": { +// "separator": "• " +// }, +// "logo":{ +// "type": "sixel", +// "width": 30 +// }, + "logo": { + "type": "small", + "padding": { + "top": 4, // Top padding + "left": 3, // Left padding + "right": 3 // Right padding + } }, "modules": [ "break", @@ -16,7 +24,7 @@ }, { "type": "custom", - "format": "╭───────────────────────────────╮" + "format": "╭────────────────────────────────────────────╮" }, { "type": "os", @@ -57,7 +65,7 @@ }, { "type": "custom", - "format": "╰───────────────────────────────╯" + "format": "╰────────────────────────────────────────────╯" }, { "type": "custom", diff --git a/gtk-3.0/.config/gtk-3.0/bookmarks b/gtk-3.0/.config/gtk-3.0/bookmarks index 3b11a0eb..eec8c45d 100644 --- a/gtk-3.0/.config/gtk-3.0/bookmarks +++ b/gtk-3.0/.config/gtk-3.0/bookmarks @@ -1,8 +1,5 @@ +file:///home/fy59/Downloads file:///home/fy59/Ansible file:///home/fy59/Documents -file:///home/fy59/Musique -file:///home/fy59/Images -file:///home/fy59/Vid%C3%A9os -file:///home/fy59/T%C3%A9l%C3%A9chargements -file:///home/fy59/Pictures/Assets/ -file:///home/fy59/Share/ +file:///home/fy59/Pictures/Assets +file:///home/fy59/Share diff --git a/hyprwhspr/.config/hyprwhspr/.recovery_notification_lock/lock b/hyprwhspr/.config/hyprwhspr/.recovery_notification_lock/lock deleted file mode 100644 index 06f4b432..00000000 --- a/hyprwhspr/.config/hyprwhspr/.recovery_notification_lock/lock +++ /dev/null @@ -1 +0,0 @@ -1780435997:success:suspend_resume diff --git a/hyprwhspr/.config/hyprwhspr/audio_level b/hyprwhspr/.config/hyprwhspr/audio_level new file mode 120000 index 00000000..9cd328f1 --- /dev/null +++ b/hyprwhspr/.config/hyprwhspr/audio_level @@ -0,0 +1 @@ +/run/user/1000/hyprwhspr/audio_level \ No newline at end of file diff --git a/hyprwhspr/.config/hyprwhspr/mic_osd.pid b/hyprwhspr/.config/hyprwhspr/mic_osd.pid deleted file mode 100644 index 4a9ddcd7..00000000 --- a/hyprwhspr/.config/hyprwhspr/mic_osd.pid +++ /dev/null @@ -1 +0,0 @@ -2429102 \ No newline at end of file diff --git a/hyprwhspr/.config/hyprwhspr/recording_control b/hyprwhspr/.config/hyprwhspr/recording_control new file mode 120000 index 00000000..f34a3af9 --- /dev/null +++ b/hyprwhspr/.config/hyprwhspr/recording_control @@ -0,0 +1 @@ +/run/user/1000/hyprwhspr/recording_control \ No newline at end of file diff --git a/hyprwhspr/.config/hyprwhspr/recording_status b/hyprwhspr/.config/hyprwhspr/recording_status new file mode 120000 index 00000000..ee20e38f --- /dev/null +++ b/hyprwhspr/.config/hyprwhspr/recording_status @@ -0,0 +1 @@ +/run/user/1000/hyprwhspr/recording_status \ No newline at end of file diff --git a/hyprwhspr/.config/hyprwhspr/recovery_result b/hyprwhspr/.config/hyprwhspr/recovery_result deleted file mode 100644 index f19a56d4..00000000 --- a/hyprwhspr/.config/hyprwhspr/recovery_result +++ /dev/null @@ -1 +0,0 @@ -success:suspend_resume:1781079536 \ No newline at end of file diff --git a/i3status-rust/.config/i3status-rust/config.toml b/i3status-rust/.config/i3status-rust/config.toml index 46952ee0..8e218140 100644 --- a/i3status-rust/.config/i3status-rust/config.toml +++ b/i3status-rust/.config/i3status-rust/config.toml @@ -7,12 +7,19 @@ icons = "material-nf" [[block]] block = "scratchpad" +[block.theme_overrides] +idle_bg = "#fab387" +idle_fg = "#1e1e2e" + [[block]] block = "focused_window" [block.format] full = " $title.str(max_w:15) |" short = " $title.str(max_w:10) |" +[block.theme_overrides] +idle_bg = "#f9e2af" +idle_fg = "#1e1e2e" [[block]] block = "music" @@ -28,8 +35,17 @@ action = "toggle_format" [[block]] block = "bluetooth" mac = "E4:61:F4:F4:A1:F7" -format = " JBL Tune " -disconnected_format = " 󰂲" +format = " 󰂯 JBL Tune " +disconnected_format = " 󰂲 JBL Tune " +[[block.click]] +button = "left" +action = "blueman-manager" + +[[block]] +block = "bluetooth" +mac = "1C:57:85:33:54:7F" +format = " 󰂯 EDENWOOD " +disconnected_format = " 󰂲 EDENWOOD " [[block.click]] button = "left" action = "blueman-manager" @@ -38,26 +54,46 @@ action = "blueman-manager" block = "net" device = "wlp1s0" format = " $icon {$signal_strength $ssid} " +[block.theme_overrides] +idle_bg = "#a6e3a1" +idle_fg = "#1e1e2e" [[block]] block = "sound" step_width = 3 max_vol = 100 +[block.theme_overrides] +idle_bg = "#94e2d5" +idle_fg = "#1e1e2e" [[block]] block = "backlight" device = "amdgpu_bl1" invert_icons = true minimum = 10 +[block.theme_overrides] +idle_bg = "#89dceb" +idle_fg = "#1e1e2e" [[block]] block = "battery" format = " $icon $percentage " +[block.theme_overrides] +idle_bg = "#a6e3a1" +warning_bg = "#f9e2af" +critical_bg = "#f38ba8" + +idle_fg = "#1e1e2e" +warning_fg = "#1e1e2e" +critical_fg = "#1e1e2e" [[block]] block = "custom" command = "~/.local/bin/tlp-profile.sh" interval = 5 +[block.theme_overrides] +idle_bg = "#74c7ec" +idle_fg = "#1e1e2e" [[block]] block = "packages" @@ -74,7 +110,10 @@ aur_command = "yay -Qua" [[block]] block = "time" interval = 60 -format = " $timestamp.datetime(f:'%d/%m %H:%M')" +format = " $timestamp.datetime(f:'%d/%m %H:%M') " +[block.theme_overrides] +idle_bg = "#b4befe" +idle_fg = "#1e1e2e" [[block]] block = "menu" diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf index 9c32adc2..d747ca7a 100644 --- a/kitty/.config/kitty/kitty.conf +++ b/kitty/.config/kitty/kitty.conf @@ -31,3 +31,4 @@ shell_integration no-cursor include kitty-themes/themes/mocha.conf +map alt+c no_cp diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 8e72d2f5..60fc2396 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,7 +1,7 @@ { "LuaSnip": { "branch": "master", "commit": "0abc8f390b278c3b4aabc4c004ac8a088b65cf24" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, - "catppuccin": { "branch": "main", "commit": "0303a7208dba448c459767486a38a6ec05c4216b" }, + "catppuccin": { "branch": "main", "commit": "c7c692a0ad3080710893abbae100171819a3e4be" }, "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, @@ -9,25 +9,25 @@ "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "0a695750d747db1e7e70bcf0267ef8951c95fc83" }, - "mason.nvim": { "branch": "main", "commit": "16ba83bfc8a25f52bb545134f5bee082b195c460" }, - "mini.starter": { "branch": "main", "commit": "a7d8b353cf120fee32bb5d88e7a9de5eaec746e7" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7adc933dabcc7c86ae6b07aff7ee68eac398491f" }, + "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, + "mini.starter": { "branch": "main", "commit": "25de4998197d59673f1918968a8f4060195edca0" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "ebd66767191714e008ce73b769518a763ff31bdc" }, "neowiki.nvim": { "branch": "main", "commit": "85dddf6057b07d4d6772b2f90e754a18e958a865" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, - "nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" }, - "nvim-colorizer.lua": { "branch": "master", "commit": "664c0b7cea1de71f8b65dfe951b7996fc3e6ccde" }, + "nvim-cmp": { "branch": "main", "commit": "2ffe79f1f021def8dd1fcd81deb16f1bb0d989f3" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "72a05f62c52241bc7441c820eb53946f92b2e6a4" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "b9c795d3973e8eec22706af14959bc60c579e771" }, - "nvim-lspconfig": { "branch": "master", "commit": "ed19590a3a9792901553c388d1aadafce012f80d" }, + "nvim-lspconfig": { "branch": "master", "commit": "d592c1e6ad9a0a01b3d5ed3f0345d68407167181" }, "nvim-tcss": { "branch": "main", "commit": "bf9001416158f32fe7e92c42de94de3595aa13e5" }, - "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, + "nvim-treesitter": { "branch": "main", "commit": "a45a920ec04cda5624f6dea0ff6454c81c3ad2d5" }, "nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" }, - "nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, + "nvim-web-devicons": { "branch": "master", "commit": "2ae6958df7ced50baac5035cec0c15799eedfbf7" }, "nvim-window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" }, "outline.nvim": { "branch": "main", "commit": "2a132953b944561d45b52e4541ebfff71934a742" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, - "render-markdown.nvim": { "branch": "main", "commit": "5adf0895310c1904e5abfaad40a2baad7fe44a07" }, + "render-markdown.nvim": { "branch": "main", "commit": "f422cb5c6855f150e2ddcfaf44e7157b98b34f6a" }, "rustaceanvim": { "branch": "main", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "3610dc7dc91f06aa98b11dca5cc30dfa98626b7e" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, diff --git a/nvim/.config/nvim/lua/config/lsp-setup.lua b/nvim/.config/nvim/lua/config/lsp-setup.lua index b851a34d..2f18bfe7 100644 --- a/nvim/.config/nvim/lua/config/lsp-setup.lua +++ b/nvim/.config/nvim/lua/config/lsp-setup.lua @@ -1,16 +1,29 @@ --- capabilities avec cmp si disponible +-- Capabilities avec cmp si disponible local capabilities = vim.lsp.protocol.make_client_capabilities() local ok_cmp, cmp_lsp = pcall(require, "cmp_nvim_lsp") + if ok_cmp then capabilities = cmp_lsp.default_capabilities(capabilities) end --- Keymaps + format on save (déclenché à chaque attach LSP) +-- Groupe nettoyé à chaque chargement de la configuration +local lsp_attach_group = vim.api.nvim_create_augroup( + "fy59_lsp_attach", + { clear = true } +) + +-- Keymaps LSP vim.api.nvim_create_autocmd("LspAttach", { + group = lsp_attach_group, + callback = function(args) local bufnr = args.buf + local map = function(lhs, rhs, desc) - vim.keymap.set("n", lhs, rhs, { buffer = bufnr, desc = desc }) + vim.keymap.set("n", lhs, rhs, { + buffer = bufnr, + desc = desc, + }) end map("ld", vim.lsp.buf.definition, "LSP: Go to definition") @@ -20,31 +33,18 @@ vim.api.nvim_create_autocmd("LspAttach", { map("rn", vim.lsp.buf.rename, "LSP: Rename") map("ca", vim.lsp.buf.code_action, "LSP: Code action") map("e", vim.diagnostic.open_float, "LSP: Show diagnostic") - -- diagnostics dépréciés en 0.11 → remplacés par vim.diagnostic.jump - map("[d", function() vim.diagnostic.jump({ count = -1 }) end, "LSP: Prev diagnostic") - map("]d", function() vim.diagnostic.jump({ count = 1 }) end, "LSP: Next diagnostic") - -- Format on save - -- vim.api.nvim_create_autocmd("BufWritePre", { - -- buffer = bufnr, - -- callback = function() - -- vim.lsp.buf.format({ async = false }) - -- end, - -- }) - vim.api.nvim_create_autocmd("BufWritePre", { - callback = function() - local ft = vim.bo.filetype - if ft == "c" or ft == "cpp" then - return - end + map("[d", function() + vim.diagnostic.jump({ count = -1 }) + end, "LSP: Prev diagnostic") - vim.lsp.buf.format({ async = false }) - end, - }) + map("]d", function() + vim.diagnostic.jump({ count = 1 }) + end, "LSP: Next diagnostic") end, }) --- Config des serveurs via la nouvelle API vim.lsp.config +-- Configuration des serveurs vim.lsp.config("pyright", { capabilities = capabilities, }) @@ -55,22 +55,35 @@ vim.lsp.config("bashls", { vim.lsp.config("lua_ls", { capabilities = capabilities, + settings = { Lua = { - diagnostics = { globals = { "vim" } }, + diagnostics = { + globals = { "vim" }, + }, }, }, }) vim.lsp.config("clangd", { - cmd = { "clangd", "--background-index", "--clang-tidy" }, + capabilities = capabilities, + cmd = { + "clangd", + "--background-index", + "--clang-tidy", + }, - on_attach = function(client, bufnr) + on_attach = function(client) client.server_capabilities.semanticTokensProvider = nil end, }) -- Activation des serveurs -vim.lsp.enable({ "clangd", "pyright", "bashls", "lua_ls" }) +vim.lsp.enable({ + "clangd", + "pyright", + "bashls", + "lua_ls", +}) --- rust_analyzer géré par rustaceanvim, ne pas l'activer ici +-- rust_analyzer est géré par rustaceanvim diff --git a/opencode/.config/opencode/opencode.json.pre-reset- b/opencode/.config/opencode/opencode.json.pre-reset- new file mode 100644 index 00000000..cb7edd01 --- /dev/null +++ b/opencode/.config/opencode/opencode.json.pre-reset- @@ -0,0 +1,105 @@ +{ + "$schema": "https://opencode.ai/config.json", + + "autoupdate": false, + + "enabled_providers": [ + "ollama" + ], + + "model": "ollama/labfy-coder:latest", + + "provider": { + "ollama": { + "npm": "@ai-sdk/openai-compatible", + "name": "Ollama local", + "options": { + "baseURL": "http://127.0.0.1:11434/v1", + "timeout": 600000, + "chunkTimeout": 120000 + }, + "models": { + "labfy-coder:latest": { + "name": "Labfy Coder", + "limit": { + "context": 6144, + "output": 1024 + } + } + } + } + }, + + "permission": { + "*": "ask", + + "read": { + "*": "allow", + "*.env": "deny", + "*.env.*": "deny", + "Enquete.sqlite": "deny", + "**/Enquete.sqlite": "deny" + }, + + "glob": "allow", + "grep": "allow", + "lsp": "allow", + "question": "allow", + + "edit": { + "*": "ask", + "Enquete.sqlite": "deny", + "**/Enquete.sqlite": "deny" + }, + + "bash": { + "*": "ask", + + "git status*": "allow", + "git diff*": "allow", + "git log*": "allow", + "git branch --show-current": "allow", + "git grep*": "allow", + "rg *": "allow", + "grep *": "allow", + + "git commit*": "deny", + "git push*": "deny", + "git reset*": "deny", + "git clean*": "deny", + + "rm *": "deny", + "sudo *": "deny", + "doas *": "deny", + + "curl *": "deny", + "wget *": "deny", + "ssh *": "deny", + "scp *": "deny", + "rsync *": "deny" + }, + + "external_directory": "deny", + "websearch": "allow", + "webfetch": "ask", + "websearch": "deny", + "task": "deny", + "skill": "deny", + "doom_loop": "deny" + }, + + "compaction": { + "auto": true, + "prune": true, + "reserved": 2048 + }, + + "watcher": { + "ignore": [ + ".git/**", + "build/**", + "*.o", + "tests/tmp/**" + ] + } +} diff --git a/opencode/.config/opencode/opencode.jsonc b/opencode/.config/opencode/opencode.jsonc new file mode 100644 index 00000000..c3eb6a56 --- /dev/null +++ b/opencode/.config/opencode/opencode.jsonc @@ -0,0 +1,3 @@ +{ + "$schema": "https://opencode.ai/config.json" +} \ No newline at end of file diff --git a/sway/.config/sway/autostart b/sway/.config/sway/autostart index e728b343..97bf0279 100644 --- a/sway/.config/sway/autostart +++ b/sway/.config/sway/autostart @@ -12,12 +12,11 @@ exec python3 ~/.config/sway/scripts/inactive-windows-transparency.py # Règles d'assignation automatique # ================================================= -assign [app_id="org.mozilla.Thunderbird"] workspace 9 assign [class="Spotify"] workspace 10 # ================================================= # Lancement des applications # ================================================= -exec thunderbird exec spotify-launcher +exec autotiling diff --git a/sway/.config/sway/bar b/sway/.config/sway/bar index 1a22bab2..e83ac541 100644 --- a/sway/.config/sway/bar +++ b/sway/.config/sway/bar @@ -5,7 +5,7 @@ include ~/.config/sway/catppuccin-mocha bar { - font pango:JetBrainsMono Nerd Font 12 + font pango:Fira Code 12 position top status_command i3status-rs ~/.config/i3status-rust/config.toml colors { @@ -18,6 +18,6 @@ bar { focused_workspace $base $mauve $crust active_workspace $base $surface2 $text inactive_workspace $base $base $text - urgent_workspace $base $red $crust + urgent_workspace $base $peach $crust } } diff --git a/sway/.config/sway/bind b/sway/.config/sway/bind index 3794e7e4..7402e712 100644 --- a/sway/.config/sway/bind +++ b/sway/.config/sway/bind @@ -200,7 +200,7 @@ bindsym $mod+Ctrl+r Reload # ############################################### -bindsym $mod+Alt+i exec chromium +bindsym $mod+Alt+i exec ~/.local/bin/vmware-on-demand bindsym $mod+Alt+f exec firefox bindsym $mod+Alt+a exec AppFlowy bindsym $mod+Alt+g exec gimp @@ -209,10 +209,14 @@ bindsym $mod+Alt+b exec blueman-manager bindsym $mod+Alt+o exec swaylock bindsym $mod+Alt+l exec wofi --cache-file=/dev/null -Dimage_size=26 -Dynamic_lines=true --location top --yoffset=10 --width=600 --height=300 --gtk-dark --show drun bindsym $mod+Alt+p exec proton-pass -bindsym $mod+Alt+t exec thunar +bindsym $mod+Alt+t exec ~/.local/bin/thunderbird-proton bindsym $mod+Alt+y exec kitty -- sh -c "yazi" bindsym $mod+Alt+w exec gtk-launch chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Default bindsym $mod+Alt+v exec ~/.config/sway/scripts/copypast +bindsym $mod+Alt+c exec freecad +bindsym $mod+Alt+s exec sqlitebrowser +bindsym $mod+Alt+e exec sh -c 'cd /home/fy59/Documents/Enquetes/Template/labfy-investigation && exec ./labfy-investigation' +bindsym $mod+Alt+n exec ~/.local/bin/nextcloud-sync ############################################### # diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 1ce83b1f..020f1628 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -10,5 +10,5 @@ include ~/.config/sway/bar include ~/.config/sway/input include ~/.config/sway/rules include ~/.config/sway/style -include ~/.config/sway/swayfx +# include ~/.config/sway/swayfx include ~/.config/sway/autostart diff --git a/sway/.config/sway/scripts/inactive-windows-transparency.py b/sway/.config/sway/scripts/inactive-windows-transparency.py index 19ad94fd..13b2cbf9 100755 --- a/sway/.config/sway/scripts/inactive-windows-transparency.py +++ b/sway/.config/sway/scripts/inactive-windows-transparency.py @@ -58,7 +58,7 @@ if __name__ == "__main__": "--opacity", "-o", type=str, - default="0.70", + default="0.85", help="set inactive opacity value in range 0...1", ) parser.add_argument( diff --git a/sway/.config/sway/style b/sway/.config/sway/style index faf0b765..9795c28d 100644 --- a/sway/.config/sway/style +++ b/sway/.config/sway/style @@ -3,7 +3,7 @@ # # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) - output * bg ~/.wallpapers/sway.png fill + output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill output eDP-1 mode 3200x2000@60Hz pos 3200 0 scale 1.4 # @@ -22,13 +22,12 @@ # set gtk+ theme set $gnome-schema org.gnome.desktop.interface exec_always { - gsettings set $gnome-schema gtk-theme 'catppuccin-mocha-lavender-standard+default' gsettings set $gnome-schema font-name 'jetbrains mono nerd font 12' gsettings set $gnome-schema color-scheme 'prefer-dark' gsettings get $gnome-schema icon-theme 'Tela-circle-blue' } -set $cursor_theme catppuccin-mocha-lavender-cursors +set $cursor_theme Bibata-Modern-Classic set $cursor_size 24 seat seat0 xcursor_theme $cursor_theme $cursor_size diff --git a/swaylock/.config/swaylock/config b/swaylock/.config/swaylock/config index 0b0034bf..b01d8b00 100644 --- a/swaylock/.config/swaylock/config +++ b/swaylock/.config/swaylock/config @@ -1,17 +1,21 @@ -image=~/.wallpapers/sway.png +image=~/.wallpapers/swaylock.png + +ignore-empty-password +show-failed-attempts +show-keyboard-layout +indicator-idle-visible + +font=JetBrainsMono Nerd Font +font-size=40 -clock -indicator indicator-radius=100 -indicator-thickness=7 -effect-blur=7x5 -effect-vignette=0.5:0.5 -effect-pixelate=10 +indicator-thickness=12 + color=1e1e2e bs-hl-color=f5e0dc caps-lock-bs-hl-color=f5e0dc caps-lock-key-hl-color=a6e3a1 -inside-color=1e1e2e +inside-color=1e1e2e70 inside-clear-color=1e1e2e inside-caps-lock-color=1e1e2e inside-ver-color=1e1e2e @@ -37,5 +41,4 @@ text-caps-lock-color=fab387 text-ver-color=89b4fa text-wrong-color=eba0ac -grace=1 -fade-in=0.2 +line-uses-ring diff --git a/systemd/.config/systemd/user/graphical-session.target.wants/hyprwhspr.service b/systemd/.config/systemd/user/graphical-session.target.wants/hyprwhspr.service deleted file mode 120000 index a30c8fa3..00000000 --- a/systemd/.config/systemd/user/graphical-session.target.wants/hyprwhspr.service +++ /dev/null @@ -1 +0,0 @@ -/home/fy59/.config/systemd/user/hyprwhspr.service \ No newline at end of file diff --git a/systemd/.config/systemd/user/graphical-session.target.wants/proton-pass.service b/systemd/.config/systemd/user/graphical-session.target.wants/proton-pass.service deleted file mode 120000 index 17bc8fbf..00000000 --- a/systemd/.config/systemd/user/graphical-session.target.wants/proton-pass.service +++ /dev/null @@ -1 +0,0 @@ -/home/fy59/.config/systemd/user/proton-pass.service \ No newline at end of file diff --git a/systemd/.config/systemd/user/proton-bridge.service b/systemd/.config/systemd/user/proton-bridge.service deleted file mode 100644 index c46433e9..00000000 --- a/systemd/.config/systemd/user/proton-bridge.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Proton Mail Bridge (CLI headless) -After=network-online.target -Wants=network-online.target - -[Service] -Type=simple -ExecStartPre=/bin/sleep 5 -ExecStart=/usr/bin/protonmail-bridge -Restart=on-failure -RestartSec=10 - -[Install] -WantedBy=default.target diff --git a/systemd/.config/systemd/user/proton-pass.service b/systemd/.config/systemd/user/proton-pass.service deleted file mode 100644 index 5c1f618d..00000000 --- a/systemd/.config/systemd/user/proton-pass.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Proton Pass Service -PartOf=graphical-session.target -After=graphical-session.target - -[Service] -ExecStart=/usr/bin/proton-pass -Restart=on-failure - -[Install] -WantedBy=graphical-session.target diff --git a/systemd/.config/systemd/user/protonmail-bridge.service b/systemd/.config/systemd/user/protonmail-bridge.service new file mode 100644 index 00000000..bd9681d2 --- /dev/null +++ b/systemd/.config/systemd/user/protonmail-bridge.service @@ -0,0 +1,13 @@ +[Unit] +Description=Proton Mail Bridge +After=gnome-keyring-daemon.service +Wants=gnome-keyring-daemon.service + +[Service] +Type=simple +ExecStart=/usr/bin/protonmail-bridge +Restart=on-failure +RestartSec=3 + +[Install] +WantedBy=default.target diff --git a/wallpapers/.wallpapers/swaylock.png b/wallpapers/.wallpapers/swaylock.png new file mode 100644 index 00000000..ff1c3100 Binary files /dev/null and b/wallpapers/.wallpapers/swaylock.png differ diff --git a/yazi/.config/yazi/yazi.toml b/yazi/.config/yazi/yazi.toml index e471e0c4..aaebde5a 100644 --- a/yazi/.config/yazi/yazi.toml +++ b/yazi/.config/yazi/yazi.toml @@ -10,6 +10,10 @@ show_symlink = true [log] enabled = false # Active à true en cas de debug +[[opener.pdf]] +run = 'evince "$@"' +block = false + [opener] edit = [ { run = "${EDITOR:-vi} %s", desc = "$EDITOR", for = "unix", block = true }, @@ -48,6 +52,8 @@ rules = [ { mime = "vfs/{absent,stale}", use = "download" }, # Fallback { url = "*", use = [ "open", "reveal" ] }, + # Pdf + { mime = "application/pdf", use = "pdf" }, ] # A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. diff --git a/zsh/.zshrc b/zsh/.zshrc index d7198b56..0d7e030d 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -16,6 +16,7 @@ export HISTSIZE=10000 export SAVEHIST=10000 export EDITOR=/usr/bin/nvim export VISUAL=/usr/bin/nvim +export SYSTEMD_EDITOR=nvim export SUDO_EDITOR=/usr/bin/nvim export GPG_TTY=$(tty) @@ -159,7 +160,24 @@ gc() { alias gp='git push' alias gwiki='git add ~/.dotfiles/wiki/Wiki/ && gc && gp && ga && gc && gp' alias gl='git log --oneline --graph --decorate' +gpall() { + local branch + branch="$(git branch --show-current)" || return 1 + + if [[ -z "$branch" ]]; then + print -u2 "Erreur : aucune branche Git active." + return 1 + fi + + print "Push vers Forgejo..." + git push origin "$branch" || return 1 + + print "Push vers GitHub..." + git push github "$branch" || return 1 + + print "Synchronisation terminée pour la branche : $branch" +} # Grep / ripgrep alias grep='grep --color=auto' alias rg='rg --hidden --smart-case' @@ -331,6 +349,13 @@ aconfig() { alias ssh-admin='ssh-add ~/.ssh/id_ed25519-admin' +# ========================= +# Hyprwhspr +# ========================= +# +alias whon='systemctl --user start hyprwhspr.service' +alias whoff='systemctl --user stop hyprwhspr.service' + # ========================= # Android # ========================= @@ -369,3 +394,12 @@ export LESS_TERMCAP_se=$'\e[0m' # reset standout export LESS_TERMCAP_so=$'\e[1;44;33m' # standout (titres encadrés) export LESS_TERMCAP_ue=$'\e[0m' # reset underline export LESS_TERMCAP_us=$'\e[1;32m' # underline + +# Outils OSINT locaux Labfy +export PATH="$HOME/.local/share/labfy-osint/bin:$PATH" + + +# Added by Antigravity CLI installer +export PATH="/home/fy59/.local/bin:$PATH" + +export OPENCODE_ENABLE_EXA=1