Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:tools:linux:misc-tools [2023/09/30 14:47] crunchyslimeen:tools:linux:misc-tools [2024/01/28 12:44] (current) – [Download youtube vidéo from clipboard] crunchyslime
Line 8: Line 8:
     * [[man>swappy]]     * [[man>swappy]]
     * [[man>flameshot]]     * [[man>flameshot]]
-  * [[en:tools:linux:file-handling#file_sort_using_extensions|Sort file using their extensions]]+  * [[en:tools:linux:file-handling|File Handling]] 
 +  * 3D-2D 
 +    * [[man>cura]] 
 +    * [[man>openscad]] 
 +    * [[man>freecad]] 
 +    * [[man>gimp]] 
 +    * [[man>inkscape]] 
 +  * Dev 
 +    * [[man>base-devel]] 
 +    * [[man>git]] 
 +    * [[man>cmake]] 
 +  * Network 
 +    * [[man>nethogs]] 
 +    * [[man>nmap]] 
 +    * [[man>mosh]] 
 +    * [[man>mtr]] 
 +    * [[man>freerdp2-wayland]] - [[man>freerdp2-x11]] 
 +    * [[man>openvpn]] 
 +  * Communication 
 +    * [[man>thunderbird]] 
 +    * [[man>discord]] 
 +    * [[man>noto-fonts-emoji]] 
 +  * Utilities 
 +    * [[man>yt-dlp]] 
 +    * [[man>unrar]] 
 +    * [[man>ncdu]] 
 +    * [[man>btop]] 
 +    * [[man>obs-studio]] 
 + 
  
 ==== screenshots ==== ==== screenshots ====
Line 41: Line 70:
 ====Update timezone==== ====Update timezone====
  
-''timedatectl list-timezones'' +<code bash> 
-''timedatectl set-timezone Europe/Paris'' +timedatectl list-timezones 
 +timedatectl set-timezone Europe/Paris 
 +</code>
 ====access grub2==== ====access grub2====
  
 press on ''shift'' during the boot phase press on ''shift'' during the boot phase
  
-====install script==== 
- 
-<code bash> 
-#!/bin/bash 
-## 3D 
-sudo pacman -S cura openscad freecad 
-## base 
-sudo pacman -S base-devel git nethogs nmap mtr cmake noto-fonts-emoji unrar 
-## Utilitaires 
-sudo pacman -S conky flameshot audacity htop gimp 
-## productivity 
-sudo pacman -S thunderbird discord freerdp2-x11 openvpn 
-## freerdp2-wayland 
-## bonus 
-sudo pacman -S dolphin-emu signal-desktop obs-studio 
-</code> 
  
 ====yaourt==== ====yaourt====
Line 105: Line 119:
  
 [[https://stackoverflow.com/questions/17440585/how-to-get-pid-of-process-by-specifying-process-name-and-store-it-in-a-variable|source]] [[https://stackoverflow.com/questions/17440585/how-to-get-pid-of-process-by-specifying-process-name-and-store-it-in-a-variable|source]]
 +
 +====Bookmarks====
 +A quick bookmarking script first seen in this video ([[https://invidious.fdn.fr/watch?v=d_11QaTlf1I|invidous link]]).
 +The goal is to store the content of what was highlighted at the time (using [[man>xclip]]) in a file ''.bookmarks''. We then, read this file with [[man>dmenu]].
 +
 +<code bash>
 +#!/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
 +</code>
 +Then in my ''.config/i3/config'' i have the following shortcuts
 +<code>
 +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)"
 +</code>
 +
 +//⚠️ this script was written for i3 under X, using Wayland you will need to replace ''xdotool type'' with ''wtype'' and ''xclip -o'' by a command base on [[https://github.com/bugaevc/wl-clipboard|wl-clipboard]]//
 +
 +====Download youtube vidéo from clipboard====
 +Using X with [[man>xsel]] : ''yt-dlp --write-sub -f bestvideo+bestaudio `xsel -ob`''\\
 +Using wayland with [[man>wl-paste]] (seems that wl-type can't fully replace xsel in this situation, using a temp file as buffer) : 
 +<code bash>
 +#!/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
 +</code>
  
 ====bash tools==== ====bash tools====
  • en/tools/linux/misc-tools.1696078065.txt.gz
  • Last modified: 2023/09/30 14:47
  • by crunchyslime