diff --git a/how_to b/how_to index 5bb7c95..053c88a 100644 --- a/how_to +++ b/how_to @@ -19,6 +19,7 @@ Usefull packages : Desktop environment : dwm Dynamic Window Manager dmenu + sway Office : sent Simple slides tool Misc : @@ -28,6 +29,72 @@ Usefull packages : jedi-vim Pretty log pager: lnav + Backlight management: + light # http://haikarainen.github.io/light/ + +System setup: + display/drivers: + xorg-server + xorg-xinit + xorg-xev + xf86-video-{intel,amdgpu,etc...} + xf86-input-libinput + mesa + lib32-mesa + xinput + light # backlight control + mesa-demos + desktop; + dwm + dmenu + dunst + libnotify + sound: + pulseaudio + pavucontrol + alsa-utils{,-runit} + tools: + kitty + zsh + git + vim + xsel + xclip + htop + ncdu + usbutils # contains lsusb + arch: + trizen + highlight + multimedia: + imagemagick + feh + mpv + mpd + ffmpeg + youtube-dl + qrencode + maim + gimp + security + keepassxc + connectivity: + wpa_supplicant + networkmanager{,-runit} + qutebrowser # With jblock + openssh{,-runit] + liferea + bluez{,-runit} + fonts: + ttf-Hack + mail: + neomutt + fdm + isync + msmtp + notmuch + misc: + miscfiles keyboard : @@ -218,12 +285,13 @@ Drag & drop files: Fix hardware clock (with chrony): sudo chronyc makestep - trimrtc + trimrtc quit Alternative to trimrtc: sudo hwclock --systohc Network Manager: + # Yes it is bloated, but it #JustWorks(TM) nmtui : add/edit connections nmcli : informations Fix nm-applet/nmtui only working with root/sudo: @@ -235,6 +303,12 @@ Network Manager: }); sudo usermod -aG network + Ethernet sharing: + install dnsmasq + Add new ethernet connection + Under IPv4: + select Shared + Power saving : echo "vm.dirty_writeback_centisecs = 6000" >> /etc/sysctl.d/dirty.conf echo "vm.laptop_mode = 5" >> /etc/sysctl.d/laptop.conf @@ -274,6 +348,24 @@ Video and audio editing: Gif to mp4 for browsers/the web: # https://unix.stackexchange.com/a/294892 ffmpeg -i in.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4 + mp4 to gif: + # https://superuser.com/questions/556029/how-do-i-convert-a-video-to-gif-using-ffmpeg-with-reasonable-quality + ffmpeg -i in.mp4 -vf "fps=10,scale=320:-1:flags=lanczos,split[x][z];[z]palettegen[y];[x][y]paletteuse" -loop 0 out.gif + Convert video to YUV420 for the Web: + # https://stackoverflow.com/a/37969294 + ffmpeg -i 1/25359.mp4 -vf "scale=2*trunc(iw/2):-2,setsar=1" -profile:v main -pix_fmt yuv420p out.mp4 + Record screen: + # https://www.reddit.com/r/linux/comments/8n3ylp/screen_recording_in_x11_with_ffmpeg/ + ffmpeg -video_size 702x779 -framerate 30 -f x11grab -i "$DISPLAY+0,19" out.mp4 + # With some sound capture + ffmpeg -video_size 702x779 -framerate 30 -f x11grab -i "$DISPLAY+0,19" -f pulse -ac 2 -i default out.mp4 + # How to get window geometry + xdotool selectwindow getwindowgeometry + # Awful one liner + # About the YUV420 conversion: https://stackoverflow.com/a/37969294 + xdotool selectwindow getwindowgeometry | awk '/Position/{printf $2" "$4" "} /Geometry/{printf $2" "}' | sed 's/)//' | read OFFSET SCREEN SIZE; ffmpeg -video_size $SIZE -framerate 30 -f x11grab -i "$DISPLAY.$SCREEN+$OFFSET" -vf "scale=2*trunc(iw/2):-2,setsar=1" -pix_fmt yuv420p out.mp4 + Filter doc: + # https://trac.ffmpeg.org/wiki/FilteringGuide ImageMagick: crop to aspect ratio @@ -714,6 +806,12 @@ Android diagnostic debug phone codes: Android wpa_supplicant conf file path: /data/misc/wifi/wpa_supplicant.conf +Grub2 theme customization: + theme.txt reference: + http://wiki.rosalab.ru/en/index.php/Grub2_theme_/_reference#Main_file_syntax + Example theme: + https://github.com/shvchk/fallout-grub-theme + Limit bandwidth, download/upload speed of process: Non-forking processes netbrake -r [args] @@ -721,8 +819,52 @@ Limit bandwidth, download/upload speed of process: Pacman -> /etc/pacman.conf XferCommand = /usr/bin/wget --limit-rate 100K --passive-ftp -c -O %o %u -Grub2 theme customization: - theme.txt reference: - http://wiki.rosalab.ru/en/index.php/Grub2_theme_/_reference#Main_file_syntax - Example theme: - https://github.com/shvchk/fallout-grub-theme +Qutebrowser + Adblocking: + https://gitlab.com/jgkamat/jblock + Config: + :set auto-save.session true + +Alsa set default card + Get list of cards: + $ aplay -l + In ~/.asoundrc: + pcm.!default { + type hw + card + } + ctl.!default { + type hw + card + } + Testing: + $ aplay -D default:PCH /usr/share/sounds/alsa/Front_Center.wav + +mpc/mpc shuffle whole library and save as playlist + $ mpc crop && mpc listall | mpc add && mpc shuffle && (mpc rm all; mpc save all) + +GNU miscfiles: + Dictionary wordlist + Airport codes + Chat abbreviations + Cities/countries list + Currency ISO code + list of connective words + phone country codes + north america area codes + C operator associativity + Imcomplete proper name list + Unicode characters + +Dictionary: + sdcv # CLI stardict tool. Dictionaries not included + stardict-wornet # English dictionary (AUR) + miscfiles # GNU miscfiles project include a wordlist file + grep "word" /usr/share/dict/words + +Gandi for server setup: + Dynamic DNS: + install gandi-automatic-dns (AUR) + Let's encrypt/letsencrypt: + install certbot-dns-gandi-git (AUR) + # Email address is kept private