Skip to content

Instantly share code, notes, and snippets.

View bonnebulle's full-sized avatar
🎯
Focusing

vincent_b bonnebulle

🎯
Focusing
View GitHub Profile
## QUICKSTART --> search :
##### GO --- EDIT ME :
# V1.3 - add cleanup json files + creat md + add contents
## WHAT
# - Extracts highlight marks in PDFs (input)
# - Merge them by page
# - Filtre/select by colors /or/ any/all
# --> Output json datas /then/ md (readable)
@bonnebulle
bonnebulle / wmxtool_close_other_windows.sh
Created March 13, 2025 14:07
xdotool close all current app windows not the active one
#!/bin/bash
current=$(xprop -root | grep '^_NET_ACTIVE_W' | awk -F'# 0x' '{print $2}' | awk -F', ' '{print $1}')
echo current $current
class=$(xdotool getwindowfocus getwindowclassname)
echo class $class
currapp_windows=$(wmctrl -mlpx | grep $class | awk '{print $1}')
echo currapp_windows $currapp_windows
#!/bin/bash
# GIST
# https://gist.github.com/bonnebulle/0ed8f0b5e3022a486d5586007e4a859b
# OBJECTIF
# Remove unused/dead menu entries in xfce/linux menu
# VARS
editor_modifications="codium"
install_commande_auto="yay -Syu --noconfirm --needed --overwrite \*"
@bonnebulle
bonnebulle / ffmpeg_batch_subfolders_each.sh
Created October 16, 2023 07:44
Convert all vidéos files in all sub-folders (batch) with ffmpeg
#!/bin/bash
# DO Convert all vidéos files in all sub-folders (batch) with ffmpeg
# DEP ffmpeg
# TODO Change quality (-crf) + output file_name.ext
# OPT "ffmpeg_batch_subfolders_each.sh infos" => GIVE ffmpeg files infos only...
# GIST https://gist.github.com/bonnebulle/907026a0f96d8497fa63dc15472b07ce
echo "Carefull, will find all files in sub-folders and move them here ="
pwd
echo ": */**.mkv"
@bonnebulle
bonnebulle / youte_youtube_infos_API.sh
Last active October 15, 2023 17:32
Get Youtube metadatas ( description + med_thumbnail ) using Youte + Google API
#!/bin/bash
# DO : Get Youtube metadatas ( description + med_thumbnail )
# DO : dwl img using curl + copy description to clipboard
# HOW = using Youte + Google API
# USAGE = youte_youtube_infos_API.sh https://www.youtube.com/watch?v=7_22jCiq4nk
# USAGE = youte_youtube_infos_API.sh 7_22jCiq4nk # <- id only
# USAGE = youte_youtube_infos_API.sh 7_22jCiq4nk img # <- img only
# TODO : search_replace "~/Bureau/YT/" -> Your Destination folder !
# TODO : mkdir ~/Bureau/YT/
@bonnebulle
bonnebulle / player_playerctl_next_prev_notify.sh
Last active June 10, 2024 14:33
Change track with playerctl + notify !
#!/bin/bash
# DO Change track with playerctl + notify !
# USE Keyboard_media_key => "this_script.sh OPT_1 OPT_2"
# OPT_1 play, playpause, next, previous, infos
# OPT_2 no_notifiy ( disable notif )
# OPT_3/2 target ( app name )
## EX: player_playerctl_next_prev_notify.sh playpause spotify
# FIX If not works => use xtool search app xith its $classname
# VAR $classname "WebApp-Bandcamp6262" cf. $currentapp
# VAR app classname ... change w/ your need ==> use `wmctrl -lx` to list all
@bonnebulle
bonnebulle / close_current_windows.sh
Last active October 8, 2023 08:50
Close current app windows (linux)
#!/bin/bash
# DO Close all windows in current/active app
# USAGE Keyboard Shortcut Ctrl+Alt+W (like macOS)
# SOURCE https://www.tuxtips.info/linux/how-to-close-all-open-windows-in-linux ( close ALL)
# SOURCE https://unix.stackexchange.com/a/588813 ( search only current app )
for n in $(xdotool search -class $(xdotool getactivewindow getwindowclassname) | awk $2 '!/-1/ {print $1}')
do
wmctrl -i -c $n;
done
@bonnebulle
bonnebulle / scrcpy_wifi_connection.sh
Last active December 26, 2022 23:12
SCRCPY Wifi / TCP-IP automation script (find IP)
# ADB SCRCPY via wifi
# https://github.com/Genymobile/scrcpy
#### DEPENDENCIE (notifications)
#### https://github.com/vlevit/notify-send.sh
export SCRCPY_CMD="scrcpy --always-on-top --power-off-on-close --shortcut-mod=lctrl --stay-awake --turn-screen-off"
export ANDROID_IDD="<YOUR ANDROID ID HERE>" # LIKE h73p2zed > $adb devices (when android is USB connected)
notify-send.sh "SCRCPY_WIFI" "\-\- Start : $ANDROID_IDD" --icon="scrcpy" -t 8000

Keybase proof

I hereby claim:

  • I am vb078 on github.
  • I am vincentb (https://keybase.io/vincentb) on keybase.
  • I have a public key ASA6QirHYJQbC_8GsOjVfHL3Ve36QL_6n-5EXpd5pl5F0Qo

To claim this, I am signing this object:

@bonnebulle
bonnebulle / keybase.md
Created June 16, 2019 12:39
keybase authentification

Keybase proof

I hereby claim:

  • I am vb078 on github.
  • I am vincentb (https://keybase.io/vincentb) on keybase.
  • I have a public key ASA6QirHYJQbC_8GsOjVfHL3Ve36QL_6n-5EXpd5pl5F0Qo

To claim this, I am signing this object: