Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:tools:linux:misc-tools [2023/09/30 14:05] – crunchyslime | en:tools:linux:misc-tools [2024/01/28 12:44] (current) – [Download youtube vidéo from clipboard] crunchyslime | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| * [[man> | * [[man> | ||
| * [[man> | * [[man> | ||
| - | * ... | + | * [[en: |
| + | * 3D-2D | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * Dev | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * Network | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * Communication | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * Utilities | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | * [[man> | ||
| + | |||
| ==== screenshots ==== | ==== screenshots ==== | ||
| Line 25: | Line 54: | ||
| </ | </ | ||
| - | ==== File sort using extensions | + | |
| - | Moves files to folders based on their extension : | + | ====Update time and date from network clock==== |
| <code bash> | <code bash> | ||
| - | #!/bin/sh | + | #!/bin/bash |
| + | curlinero=`curl https:// | ||
| + | heure=`echo $curlinero | grep -oE ' | ||
| + | date=`echo $curlinero | grep -oE ' | ||
| + | echo $date | ||
| + | echo $heure | ||
| + | sudo date +%F -s $date | ||
| + | sudo date -s $heure | ||
| + | </ | ||
| - | cd ~/ | + | ====Update timezone==== |
| - | pwd | + | |
| - | ## Image | + | <code bash> |
| - | echo "+ moving images" | + | timedatectl list-timezones |
| + | timedatectl set-timezone Europe/ | ||
| + | </ | ||
| + | ====access grub2==== | ||
| - | find . -maxdepth 1 -type f \ | + | press on '' |
| - | -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | | xargs -I '{}' | + | |
| - | ## Document | + | ====yaourt==== |
| - | echo "+ moving documents" | + | [[https:// |
| + | <code bash> | ||
| + | #!/ | ||
| + | git clone https:// | ||
| + | cd package-query | ||
| + | makepkg -si | ||
| + | cd .. | ||
| + | git clone https:// | ||
| + | cd yaourt | ||
| + | makepkg -si | ||
| + | cd .. | ||
| + | rm -rf package-query | ||
| + | rm -rf yaourt | ||
| + | </ | ||
| - | find . -maxdepth 1 -type f \ | + | ====Thèmes Kvantum==== |
| - | -name " | + | [[https:// |
| - | -o -name "*.doc" -o -name "*.DOC" \ | + | '' |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | | xargs -I '{}' | + | |
| + | - 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" | ||
| - | ## CAO | + | to install a theme, download the archive and copy the folder containing the '' |
| - | echo "+ moving CAO files" | + | |
| - | find . -maxdepth 1 -type f \ | + | [[https:// |
| - | -name " | + | [[https:// |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | | xargs -I ' | + | |
| - | ## Vidéo | + | ====Kill process in 1 line==== |
| - | echo "+ moving videos" | + | |
| - | find . -maxdepth 1 -type f \ | + | show the process : |
| - | -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | | xargs -I ' | + | |
| + | '' | ||
| - | ## Div execs / data / archives | + | pipe to sh to kill it |
| - | echo "+ moving the rest" | + | |
| - | find . -maxdepth 1 -type f \ | + | '' |
| - | -name " | + | |
| - | -o -name "*iso" -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name "*sh" -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | -o -name " | + | |
| - | | xargs -I '{}' | + | |
| - | ## remove ext | + | [[https:// |
| - | echo "- removing exts" | + | |
| - | rm *.ext 2>/dev/null | + | |
| - | ## End information | + | ====Bookmarks==== |
| - | echo "" | + | A quick bookmarking script first seen in this video ([[https:// |
| - | echo " | + | The goal is to store the content of what was highlighted at the time (using [[man> |
| - | ls -al | grep '^-' | + | |
| - | echo "" | + | |
| - | echo "Size on disk " | + | |
| - | du -sh | + | |
| - | echo "" | + | |
| - | echo "done" | + | <code bash> |
| + | # | ||
| + | |||
| + | bookmark=`xclip -o` | ||
| + | file=" | ||
| + | |||
| + | if grep -q " | ||
| + | notify-send " | ||
| + | else | ||
| + | notify-send " | ||
| + | echo "$bookmark" | ||
| + | fi | ||
| </ | </ | ||
| + | Then in my '' | ||
| + | < | ||
| + | bindsym $mod+Shift+b exec ~/ | ||
| + | bindsym $mod+b exec xdotool type " | ||
| + | bindsym $mod+n exec xdotool type " | ||
| + | </ | ||
| + | |||
| + | //⚠️ this script was written for i3 under X, using Wayland you will need to replace '' | ||
| + | |||
| + | ====Download youtube vidéo from clipboard==== | ||
| + | Using X with [[man> | ||
| + | Using wayland with [[man> | ||
| + | <code bash> | ||
| + | #!/bin/bash | ||
| + | cd "/ | ||
| + | wl-paste > / | ||
| + | #launching in a detached terminal to make it work with shortcuts | ||
| + | xfce4-terminal -e ' | ||
| + | rm / | ||
| + | </ | ||
| + | |||
| + | ====bash tools==== | ||
| + | |||
| + | <code bash> | ||
| + | # check for root access | ||
| + | SUDO= | ||
| + | if [ "$(id -u)" -ne 0 ]; then | ||
| + | # Si l' | ||
| + | SUDO=$(command -v sudo 2> /dev/null) | ||
| + | |||
| + | if [ ! -x " | ||
| + | echo " | ||
| + | exit 1 | ||
| + | fi | ||
| + | fi | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | # check if command is available | ||
| + | check_cmd() { | ||
| + | command -v " | ||
| + | } | ||
| + | |||
| + | if check_cmd curl; then | ||
| + | echo "curl is accessible" | ||
| + | fi | ||
| + | |||
| + | if ! check_cmd curl; then | ||
| + | echo "Curl is needed to proceed with the installation" | ||
| + | exit 1 | ||
| + | fi | ||
| + | </ | ||
| + | |||
| + | <code bash> | ||
| + | # execute script from URL | ||
| + | sh <(curl -sSf https:// | ||
| + | |||
| + | # if curl missing | ||
| + | sh <(wget -qO - https:// | ||
| + | </ | ||
| + | |||