ThinkPad t480 - throttled

i3wm

tiling window manager

j4-dmenu-desktop

/usr/share/applications/

[gnome.developer] Desktop Entry Specification

[Desktop Entry]
Type=Application
Name=pass
Terminal=false
Exec=passmenu

Notes

# mkdir ~/notes
# ~/.bash_aliases
alias note="cd ~/notes/ && touch $(date +%F).txt && vim $(date +%F).txt"
# source ~/.bash_aliases

[hackernews] productivity app, a single .txt

Shell scripts

hacker-tools.github.io/shell

effective-shell.com

# find matching lines across files
grep --include *.js -rnwl ~/work/ -e "cypress"

# find matching lines across files
find library/src/ -type f -name "*.js" -exec grep -i "from\s\s*'semantic-ui-react'" {} \;

#find recent files
find . -ctime -3 > recentFiles2.txt
# find folders with a specific folder, ignore nested
find . -type d -name "node_modules" | sed 's/node_modules/%/g' | cut -d % -f 1-1 | sort | uniq
for i in $(seq 1 5); do echo hello $i; done

for file in *.heic; do heif-convert $file ${file/%.heic/.jpg}; done
# add extension to files without extension
find . -type f ! -name "*.*" -exec bash -c 'mv "$0" "$0".pug' {} \;
# count files in directory
find node_modules/ -type f | wc -l
# disk usage, sort human readable
du -hd1 node_modules/ | sort -h
# cut
# cut default delimiter is [tab], | tr -s ' ' '\t' |
# -d // delimiter
# -f // field
grep '\[DS\]' traffic.log | cut -d / -f 4- | cut -d ' ' -f -1 | sort | uniq -c | sort -rn
tail -n 20 access_log | tr -s ' ' '\t' | cut -f1
lsof | awk '{print $10}' | grep ^/home/ | sort -u
grep -hroP notifyService\.[a-z]+ | sort | uniq -c
# '{ split($3, a, ":"); print a[1] }'
tail /var/log/syslog | awk '{ split($3, a, ":"); print $3 " -> " a[1] ":" a[2] }'
# cut -d :
tail /var/log/syslog | awk '{ print $3 }' | cut -d : -f 1-2

AWK one liners explained

[catonmat.net] cheat sheets

Ranger

A VIM-inspired filemanager for the console

Mount

Jeśli w /etc/fstab damy opcję noauto, to montowanie dysków poprzez polecenie sudo mount /media/acer

blkid

fdisk -l

df -h

[wiki.archlinux] Udisks

Bluetooth

lack of support for headsets that only have the HFP (Handsfree) profile and no HSP

PulseAudio/Documentation/User/Bluetooth

[reddit] similar problem

pulseaudio-utils

Sound

Problem: dlaczego Firefox używa innej konfiguracji dźwięku od Chrome?

Możliwa odpowiedź: Chrome korzysta z konfiguracja ALSA, a Firefox z PulseAudio

why.linux.is.not.ready.for.the.desktop.current

PulseAudio examples

Alsa mixer - amixer

pactl load-module module-loopback latency_msec=1000
pactl unload-module module-loopback
alsamixer, 'type M'
#!/bin/bash
currentSink=$(pactl list short sink-inputs | head -n 1 | cut -f2)

if [[ "$currentSink" == "1" ]]
then
  newSink=0
else
  newSink=1
fi

pactl list short sink-inputs | while read stream; do
    streamId=$(echo $stream | cut '-d ' -f1)
    pactl move-sink-input "$streamId" "$newSink"
done

# pactl set-sink-volume @DEFAULT_SINK@ -5%
pactl set-default-sink $newSink

VIM

delete 5 lines below

# ma = set mark
# 'a = goto mark
maj5d'a

terminal guide 2019

[freshman.tech] vim javascript

vim-anti-patterns

[hackernews] vim-anti-patterns

[hackernews] Intermediate Vim (dn.ht)

File Manager[wiki.archlinux.org] GNOME -Files

xrandr slow

bugs.launchpad.net - xserver-xorg-video-intel

Mouse cursor theme

[askubuntu] /usr/share/icons/

Highdpi

qt5-applications QT_SCALE_FACTOR

Bootable usb

sudo dd if=ubuntu-20.04-desktop-amd64.iso of=/dev/sdc

Mouse Scroll Jups problem

imwheel

vscode issue