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 13:56] – crunchyslime | en:tools:linux:misc-tools [2024/01/28 12:44] (current) – [Download youtube vidéo from clipboard] crunchyslime | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ==== Userfull list ==== | ==== Userfull list ==== | ||
| * [[man> | * [[man> | ||
| - | * screenshots | + | * [[en: |
| * [[man> | * [[man> | ||
| * [[man> | * [[man> | ||
| 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 24: | Line 53: | ||
| swappy -f $IMG | swappy -f $IMG | ||
| </ | </ | ||
| + | |||
| + | |||
| + | ====Update time and date from network clock==== | ||
| + | |||
| + | <code bash> | ||
| + | #!/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 | ||
| + | </ | ||
| + | |||
| + | ====Update timezone==== | ||
| + | |||
| + | <code bash> | ||
| + | timedatectl list-timezones | ||
| + | timedatectl set-timezone Europe/ | ||
| + | </ | ||
| + | ====access grub2==== | ||
| + | |||
| + | press on '' | ||
| + | |||
| + | |||
| + | ====yaourt==== | ||
| + | [[https:// | ||
| + | <code bash> | ||
| + | #!/bin/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 | ||
| + | </ | ||
| + | |||
| + | ====Thèmes Kvantum==== | ||
| + | [[https:// | ||
| + | '' | ||
| + | |||
| + | - 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" | ||
| + | |||
| + | to install a theme, download the archive and copy the folder containing the '' | ||
| + | |||
| + | [[https:// | ||
| + | [[https:// | ||
| + | |||
| + | |||
| + | ====Kill process in 1 line==== | ||
| + | |||
| + | show the process : | ||
| + | |||
| + | '' | ||
| + | |||
| + | pipe to sh to kill it | ||
| + | |||
| + | '' | ||
| + | |||
| + | [[https:// | ||
| + | |||
| + | ====Bookmarks==== | ||
| + | A quick bookmarking script first seen in this video ([[https:// | ||
| + | The goal is to store the content of what was highlighted at the time (using [[man> | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/bash | ||
| + | |||
| + | bookmark=`xclip -o` | ||
| + | file=" | ||
| + | |||
| + | if grep -q " | ||
| + | notify-send " | ||
| + | else | ||
| + | notify-send " | ||
| + | echo " | ||
| + | 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:// | ||
| + | </ | ||
| + | |||