Mon application favorite est flameshot sur X.

Flameshot est parfois buggé sur Wayland, on peut donc le remplacer avec le combo suivant grim, slurp, wl-copy et swappy :

#!/bin/bash
 
FILEDIR=~/Downloads/scrots/
IMG=$FILEDIR$(date +%F_%H-%M-%S).png
grim -g "$(slurp)" $IMG
wl-copy < $IMG
swappy -f $IMG
#!/bin/bash
curlinero=`curl https://savvytime.com/local/france 2>/dev/null | grep -i stLocationTimeM`
heure=`echo $curlinero | grep -oE '(([0-9]){2}:){2}([0-9]){2}'`
date=`echo $curlinero | grep -oE '([0-9]){4}-([0-9]){2}-([0-9]){2}'`
echo $date
echo $heure
sudo date +%F -s $date
sudo date -s $heure
timedatectl list-timezones
timedatectl set-timezone Europe/Paris

appuyer sur shift pendant la phase de boot

ArchWiki

#!/bin/bash
git clone https://aur.archlinux.org/package-query.git
cd package-query
makepkg -si
cd ..
git clone https://aur.archlinux.org/yaourt.git
cd yaourt
makepkg -si
cd ..
rm -rf package-query
rm -rf yaourt

source sudo pacman -S kvantum-qt5

- Select Kvantum from System Settings → Application Style → Widget Style and apply it. - Select Kvantum from System Settings → Color → Scheme and click Apply. You could change the color scheme later if you choose another Kvantum theme with Kvantum Manager (see “Using Other Themes” below).

pour installer un thème, télécharger l'archive et copier le dossier contenant le .kvconfig et le .svg dans /usr/share/Kvantum/$THEME_NAME/

source sweet source sweet ff

show the process :

ps axf | grep <process name> | grep -v grep | awk '{print “kill -9 ” $1}'

pipe to sh to kill it

ps axf | grep <process name> | grep -v grep | awk '{print “kill -9 ” $1}' | sh

source

un outils de bookmark facile et rapide comme vu dans cette vidéo (lien invidous). Notre objectif est de pouvoir stocker ce qui est surligné (en utilisant xclip) dans un fichier .bookmarks. On vient ensuite lire ce fichier avec dmenu

#!/bin/bash
 
bookmark=`xclip -o`
file="$HOME/.bookmarks"
 
if grep -q "^$bookmark" "$file"; then
	notify-send "already exists"
else
	notify-send "Bookmark added !" "$bookmark"
	echo "$bookmark" >> "$file"
fi

puis dans mon .config/i3/config j'ai les raccourcis suivants

bindsym $mod+Shift+b exec ~/s/add-bookmark
bindsym $mod+b exec xdotool type "$(grep -v '^#' ~/.bookmarks | dmenu -i -l 50 | cut -f1)" 
bindsym $mod+n exec xdotool type "$(grep -v '^#' ~/.bookmarks-ssh | dmenu -i -l 50 | cut -f1)"

⚠️ ce script a été rédigé pour i3 sous X, sous Wayland il conviendra de remplacer xdotool type par wtype et xclip -o par une commande basée sur wl-clipboard

Avec X en utilisant xsel : yt-dlp –write-sub -f bestvideo+bestaudio `xsel -ob`
Avec wayland en utilisant wl-paste (il semblerait que wl-paste ne reproduit pas exactement le comportement de xsel, utilisation d'un fichier temporaire tampon) :

#!/bin/bash
cd "/path/to/download/folder"
wl-paste > /tmp/youtube-paste-to-dl
#launching in a detached terminal to make it work with shortcuts
xfce4-terminal -e 'yt-dlp --write-sub -f bestvideo+bestaudio -a /tmp/youtube-paste-to-dl'
rm /tmp/youtube-paste-to-dl
# check for root access
SUDO=
if [ "$(id -u)" -ne 0 ]; then
# Si l'utilisateur est root, alors on utilise "SUDO" dans le script
    SUDO=$(command -v sudo 2> /dev/null)
 
    if [ ! -x "$SUDO" ]; then
        echo "Error: Run this script as root"
        exit 1
    fi
fi
# check if command is available
check_cmd() {
    command -v "$1" 2> /dev/null
}
 
if check_cmd curl; then
    echo "curl est accessible"
fi
 
if ! check_cmd curl; then
    echo "Curl is needed to proceed with the installation"
    exit 1
fi
# execute script from URL
sh <(curl -sSf https://downloads.nordcdn.com/apps/linux/install.sh)
 
# if curl missing
sh <(wget -qO - https://downloads.nordcdn.com/apps/linux/install.sh)
  • fr/tools/linux/misc-tools.txt
  • Dernière modification : 2024/01/28 12:44
  • de crunchyslime