XXIIVV

Unix is a family of computer operating systems that derive from the original Unix from Bell Labs.

Cheatsheet

lsList files in the directory
cdChange directory
rmRemove file or directory(-r)
cpCopy file or directory(-r)
mvMove file or directory
wcCount words in file
manRead the manual
mkdirMake new directory
dateShow system date

dwm

Shift+Alt+EnterOpen terminal session
Shift+Alt+CClose Application
Shift+Alt+QQuit
Alt+POpen Application
Alt+JPrevious Application
Alt+KNext Application
Alt+TTile Applications
Alt+MouseLeftMove floating window
Alt+MouseRightResize floating window

To change the content of the rightmost label in the menu bar, edit the content of ~/.xinitrc.

while true; do
  xsetroot -name $(arvelie)" "$(neralie)
  sleep 1m
done &

exec dwm

micro

Ctrl+TNew Tab
Ctrl+BRun shell command
Ctrl+ERun command

surf

Ctrl+HBack History
Ctrl+LNext History
Ctrl+BToggle Input
Ctrl+Shift+O

Git

Cache Password

git config remote.origin.url # Get URL
git config credential.helper store
git push REPOSITORY.git # Replace with URL

Merge

git remote add ft git@git.sr.ht:~ft/orca
git fetch ft
git merge ft/variable-index-0

SSH

ssh-keygen # Generate a key
vi ~/.ssh/id_rsa.pub # See the key

CMUS

Get cmus currently playing.

cmus-remote -Q | grep tag | head -n 3 | cut -d ' ' -f 3- 

Commands

Feh

feh -m # Montage mode
feh -w # Multi-window mode
feh -i # Index mode
feh -m --thumb-height 150 --thumb-width 200

EyeD3

pip install eyeD3
eyeD3 -a "Artist" -A "Album" -t "Track Title" song.mp3
eyeD3 song.mp3

Youtube-dl

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
// Single
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=sfIls6LMAGE
// Playlist
youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" 'https://www.youtube.com/watch?v=5KpK7yhDRXE&list=PLfGibfZATlGq4e4UsUiPLs3asiOqysjei'

Format SD Card

lsblk # Find device
sudo parted /dev/sdb --script -- mklabel msdos # Create partition, replace sbd with device name
sudo parted /dev/sdb --script -- mkpart primary fat32 1MiB 100% # Take all available space
sudo mkfs.vfat -F32 /dev/sdb1 # Format
sudo parted /dev/sdb --script print # Verify

Copy image to clipboard

xclip -selection clipboard -t image/png -i example.png

Config Micro

micro ~/.config/micro/settings.json
{
  "color_scheme": "Packages/Theme/Tech49.tmTheme",
  "font_size": 9,
  "margin": 2,
  "tab_size": 2,
  "theme": "Adaptive.sublime-theme",
  "translate_tabs_to_spaces": true
}

Fish

sudo apt-get install fish
chsh -s /usr/bin/fish

Make applications available globally

Edit ~/.bashrc, when finished run source ~/.bashrc.

export PATH=$PATH:/home/pi/applications

Elementary Theming

sudo apt-get install dconf-tools
dconf-editor
sudo add-apt-repository ppa:philip.scott/elementary-tweaks
sudo apt install elementary-tweaks

Themes

#000000:#51a196:#72dec2:#ffffff:#333333:#cccccc:#FF5950:#aaaaaa:#ff7777:#ffbda1:#ffbda1:#ffbda1:#ffbda1:#FF5950:#72dec2:#ffffff
// Sand
#323e37:#8a6b5f:#c2b6a9:#d7d4cd:#594843:#b4c3c5:#c4a58f:#a19083:#323e37:#8a6b5f:#c2b6a9:#d7d4cd:#594843:#b4c3c5:#c4a58f:#a19083
// Drab
#969492:#d4d8dc:#bdb4ab:#585a56:#30393a:#55514d:#897769:#484544:#969492:#d4d8dc:#bdb4ab:#585a56:#30393a:#55514d:#897769:#484544

Battery management

sudo powertop --auto-tune

Use a .deb File

sudo dpkg -i filename.deb
sudo dpkg -i ./bitwig-studio-3.1.3.deb # Updating bitwig

Shutdown/Restart

sudo shutdown now
sudo restart

Found a mistake? Submit an edit to unix.