TODO optimize GRUB - remove unused entries
TODO console audio player
TODO bindsym - rsync current dirs in mc (left > right | left < right | both)
TODO highlight console command result (for example
ls -l
)
TODO fast zsh navigation (for example
/h/w
should substitute full path/home/work
manjaro-i3-20.1-200913-linux58.iso
$ screenfetch
██████████████████ ████████ ------
██████████████████ ████████ OS: Manjaro 20.1 Mikah
██████████████████ ████████ Kernel: x86_64 Linux 5.8.6-1-MANJARO
██████████████████ ████████ Uptime: 4h 17m
████████ ████████ Packages: 1048
████████ ████████ ████████ Shell: bash 5.0.18
████████ ████████ ████████ Resolution: 1920x1080
████████ ████████ ████████ WM: i3
████████ ████████ ████████ GTK Theme: Adapta-Nokto-Eta-Maia [GTK2/3]
████████ ████████ ████████ Icon Theme: Papirus-Adapta-Nokto-Maia
████████ ████████ ████████ Font: Noto Sans 10
████████ ████████ ████████ Disk: 40G / 459G (10%)
████████ ████████ ████████ CPU: Intel Core i7-9750H @ 12x 4.5GHz [58.0°C]
████████ ████████ ████████ GPU: Quadro T1000
RAM: 1733MiB / 7608MiB
https://manjaro.org/download/
🠖 Editions
🠖 Community
🠖 i3
🠖 Download
🠖 ( manjaro-i3-xx.xx-xxxxxx-linuxXX.iso
, GPG Signature
, SHA1
)
$ mv latest.sig manjaro-i3-xx.xx-xxxxxx-linuxXX.iso.sig
$ pacman-key -v manjaro-i3-20.1-200913-linux58.iso.sig
Docs: https://wiki.manjaro.org/index.php?title=How-to_verify_GPG_key_of_official_.ISO_images
# setup GPG
$ sudo pacman -S gnupg wget
$ wget github.com/manjaro/packages-core/raw/master/manjaro-keyring/manjaro.gpg
$ gpg --import manjaro.gpg
$ gpg --keyserver hkp://pool.sks-keyservers.net --search-keys 11C7F07E
# verify GPG
$ cd ~/Downloads
$ ls
manjaro-i3-20.1-200913-linux58.iso manjaro-i3-20.1-200913-linux58.iso.sig
$ gpg --verify manjaro-i3-20.1-200913-linux58.iso.sig
$ sha1sum manjaro-i3-20.1-200913-linux58.iso
ccac883a02aad952063fc823c919ba6aeb445977 # should be equal SHA1 on site
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 28,8G 0 disk # target USB flash
├─sda1 8:1 1 2,1G 0 part
└─sda2 8:2 1 4M 0 part
nvme0n1 259:0 0 238,5G 0 disk
├─nvme0n1p1 259:1 0 260M 0 part
...
# write iso image to the USB
$ sudo dd bs=4M if=~/Downloads/manjaro-i3-20.1-200913-linux58.iso of=/dev/sda status=progress oflag=sync
Select tz=UTC
, keyboard=en
, drivers=nonfree
in the initial setup screen.
WARN: if you select tz
or keyboard
with different values, for example keyboard=ru
then you will not be able to change keyboard layout in the console
# determine GPT or MBR
$ sudo parted -l
TODO swap with hibernate
You can change disk structure from LiveManjaro 🠖 gparted
WARN: there is the one attempt of configuring each partition in the partition editor. If you configure a some partition and then configure it again, then two these actions will be applied. Please verify partitions edit summary log before it will be applied.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT FORMAT FLAGS
nvme0n1 259:0 0 238,5G 0 disk # SSD INTEL 250 Gb
├─nvme0n1p1 259:1 0 260M 0 part - # fat32 SYSTEM EFI
├─nvme0n1p2 259:2 0 16M 0 part -
├─nvme0n1p3 259:3 0 237,2G 0 part /mnt/win -
└─nvme0n1p4 259:4 0 1000M 0 part -
nvme1n1 259:5 0 465.8G 0 disk # SSD Samsung 500 Gb
├─nvme1n1p1 259:6 0 550M 0 part /boot/efi [F] [boot] # grub
├─nvme1n1p2 259:7 0 100G 0 part / [F]
├─nvme1n1p3 259:8 0 363.2G 0 part /home -
└─nvme1n1p4 259:9 0 2G 0 part [SWAP] [F]
$ sudo systemctl status fstrim.timer
$ sudo systemctl start fstrim.timer
$ cat /proc/sys/vm/swappiness
60
$ sudo vim /etc/sysctl.d/100-manjaro.conf
vm.swappiness=10
$ sudo reboot
$ sudo ntpd -qg
manjaro-settings-manager
🠖 Time and Date
🠖 turn on Set time and date automatically
check-box
gufw
🠖 enable Status
check-box
pamac-manager
🠖 Preferences
🠖 Official repositories
🠖 Use mirrors from:
🠖 select country and then press Refresh Mirrors List
pamac-manager
🠖 Preferences
🠖 AUR
🠖 turn on Enable AUR support
check-box and Check for updates
$ sudo pacman -Syyu
$ sudo pacman -S git gvim wget mc
$ setxkbmap -layout us,ru -option 'grp:shifts_toggle'
Also can be defined in the config ~/.i3/config
:
exec_always --no-startup-id setxkbmap -layout us,ru -option 'grp:shifts_toggle'
# unlock locked user: CTRL+ALT+F2 and then
$ faillock --reset --user username
# disable login attempts
$ sudo vim /etc/security/faillock.conf
deny = 0
TODO config
TODO configure
https://wiki.archlinux.org/index.php/Improving_performance/Boot_process
$ mhwd -l
$ sudo mhwd -a pci nonfree 0300
$ sudo reboot
$ sudo nvidia-settings
Brother DCP -L2560DWR
pamac-manager
🠖 brother-dcp-l2550dw
$ curl cheat.sh
$ curl cheat.sh/ls
sudo pacman -S ncdu
https://github.com/aristocratos/bpytop
TODO autosuggestion /h/w/ -> tab does not work
zsh
, zsh-autosuggestions
, zsh-syntax-highlighting
packages are installed and enabled by default in the .zshrc
# change shell
$ echo $SHELL
$ chsh -l
$ chsh -s /usr/bin/zsh
$ zsh
# logout
# disable zsh manjaro-config
$ vim ~/.zshrc
# comment all lines
# enable history
$ vim ~/.zshrc
HISTFILE=~/.zsh_history
SAVEHIST=10000
pamac-manager
🠖 zsh-autosuggestions
, zsh-syntax-highlighting
$ echo 'source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh' >>! ~/.zshrc
$ echo 'source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh' >>! ~/.zshrc
pamac-manager
🠖 AUR: zsh-theme-powerlevel10k
, ttf-meslo-nerd-font-powerlevel10k
$ echo 'source /usr/share/zsh-theme-powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc
# configuring powerlevel10k
$ p10k configure
vim ~/.p10k.zsh
...
# disable os icon
# os_icon # os identifier
...
# change prompt cursor
typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='' #'❯'
...
# set max branch name length 255
(( $#branch > 255 )) && branch[13,-13]="…" # <-- this line
pamac-manager
🠖 alacritty
# configure alacritty
$ mkdir -p ~/.config/alacritty
$ cp /usr/share/doc/alacritty/example/alacritty.yml
$ vim ~/.config/alacritty/alacritty.yml
env:
TERM: xterm-256color # fix mc in ssh connection
...
font:
size: 13
normal:
family: MesloLGS NF
style: Regular
...
selection:
save_to_clipboard: true # automatically copy selection to clipboard
# configure i3 terminal
$ vim ~/.i3/config
...
bindsym $mod+Return exec alacritty
Dependencies - git
, cmake
, go
, nodejs
, npm
, jdk-openjdk
Install gvim
package which contains already vim
with enabled xterm_clipboard
property. This allows working with system clipboard
$ vim --version | grep `xterm_clipboard`
... +xterm_clipboard // system clipboard is supported
... -xterm_clipboard // system clipboard is not supported
Plugin manager - https://github.com/junegunn/vim-plug
Plugin repository - https://vimawesome.com/
You should run vim
before the next steps to download enabled plugins automatically.
# setup YouCompleteMe plugin
$ cd ~/.vim/bundle/youcompleteme
$ python3 install.py --all
# setup darcula theme https://github.com/blueshirts/darcula
$ mkdir ~/.vim/colors
$ wget https://raw.githubusercontent.com/blueshirts/darcula/master/colors/darcula.vim -O ~/.vim/colors/darcula.vim
Working with system clipboard:
"+p // paste from system clipboard in NORMAL mode
ctrl+V // select text
"+y // copy to system clipboard
ctrl+a
/ctrl+x
- increase/decrease number under cursor
// enter the following strings
0
0
0
ctrl+v // select column
ctrl+a // all numbers in the selected column will be increased as following:
1
1
1
g ctrl+a // all numbers in the selected column will be increased as following:
1
2
3
Folding selected lines:
ctrl+V // select lines
zf // fold selected
zo // unfold selected (alternative: set cursor to the folded line and press <space>)
Folding paragraph:
ctrl+( // go to start paragraph or set cursor to the start paragraph
zf ctrl+)
- ranger filemanager: https://github.com/ranger/ranger
- config:
set draw_borders both
- plugins:
- devicons: https://github.com/alexanderjeurissen/ranger_devicons
- image preview:
pip3 install ueberzug # add to ~/.config/ranger/rc.conf set preview_images true set preview_images_method ueberzug
- explore nerd fonts https://www.nerdfonts.com/
$ notify-send 'Hello, world'
$ notify-send "Hello, world"
$ sudo pacman -Syyu && notify-send 'Pacman update has been completed'
$ sudo pacman -S rofi
$ vim ~/.i3/config
bindsym Mod1+Tab exec rofi -show window -font "MesloLGS NF 16" -show-icons -theme sidebar
bindsym Mod1+F2 exec rofi -show run -font "MesloLGS NF 16" -show-icons -theme blue
TODO upload to server
TODO gpg alice
Dependencies - xclip
, scrot
Use scrot
instead of i3-scrot
usage in ~/.i3/config
# screenshots
set $scrdir ~/Pictures
bindsym Print --release exec "scrot -z -e 'mv $f $scrdir && xclip -selection clipboard -t image/png -i $scrdir/$n'; sleep 1; exec notify-send 'screenshot has been saved to $scrdir'"
bindsym $mod+Print --release exec "scrot -z -ue 'mv $f $scrdir && xclip -selection clipboard -t image/png -i $scrdir/$n'; sleep 1; exec notify-send 'screenshot has been saved to $scrdir'"
bindsym $mod+Shift+Print --release exec "scrot -z -se 'mv $f $scrdir && xclip -selection clipboard -t image/png -i $scrdir/$n'; sleep 1; exec notify-send 'screenshot has been saved to $scrdir'"
TODO upload to server
TODO gpg alice
pamac-manager
🠖 peek
pamac-manager
🠖 vokoscreenNG
pamac-manager
🠖 speedometer
# get network interfaces
$ ip address
...
3: wlp82s0
..
$ speedometer -r wlp82s0
https://superuser.com/a/611582
pamac-manager
🠖 termdown
grsync
TODO clarify
TODO clarify
TODO clarify
TODO clarify
Location ~/.i3/*
$ cp /etc/i3status.conf ~/.i3status.conf
Dependencies xdotool
, wmctrl
Dependencies perl-anyevent-i3
# save layout to json
$ i3-save-tree --workspace 1 > ~/.i3/ws-layout.json
$ vim ~/.i3/ws-mount.json
# complete correct json - uncomment and define all fields
$ vim ~/.i3/config
# bind key and populate layout by the exec seqence
# each application will be placed to the proper place which is defined by regex in the `ws-layout.json`
bindsym ... exec i3-msg "append_layout ~/.i3/ws-layout.json" ; exec ...
Example: how to define layout cell which will contain particular running app
$ alacritty -t watch_lsblk -e watch lsblk # run terminal with title and application
$ xprop # and then select tile which contain above executed `alacritty`
# find string `WM_CLASS(STRING) = "Alacritty", "Alacritty"`
# find string `WM_NAME(STRING) = "watch_lsblk"`
Define regex in the layout template $ vim ~/.i3/ws-layout.json
...
"name": "watch_lsblk",
"percent": 0.1,
"swallows": [
{
"class": "^Alacritty$",
"instance": "^Alacritty$",
"title": "^watch_lsblk$" // define regex for application
}
...
typora
- markdown editor
For fixing some characters - create file ~/.config/typora/themes/base.user.css
body {
font-family: MesloLGS NF;
}
Settings
🠖 Display
🠖 Graphics Controller
🠖 VboxSVGA
https://wiki.manjaro.org/index.php?title=VirtualBox
$ mhwd-kernel -li
Currently running: 5.8.6-1-MANJARO (linux58)
$ sudo pacman -Syu virtualbox linux58-virtualbox-host-modules
$ sudo modprobe vboxguest vboxvideo vboxsf
$ sudo vboxreload
# install FTP on guest machine
$ sudo pacman -S vsftpd
$ sudo systemctl enable vsftpd.service
$ sudo systemctl start vsftpd.service
# config FTP on guest machine
$ sudo vim /etc/hosts.allow
vsftpd: ALL # Allow all connections
vsftpd: 10.0.0.0/255.255.255.0 # IP address range
$ sudo vim /etc/vsftpd.conf
...
write_enable=YES
local_enable=YES
$ sudo systemctl restart vsftpd.service
-
Check current state on host machine
$ ip address show ... 2: wlp82s0 # main wireless adapter inet 192.168.1.67/24 ...
-
Add second network adapter
Machine 🠖 Settings 🠖 Network 🠖 Adapter 2 🠖 Bridged adapter 🠖 wlp82s0 (host main wireless adapter)
-
Check networking on guest machine
$ ip address show ... 2: enp0n3 # Adapter 1 NAT (internet) inet 10.0.2.15/24 ... 3: enp0s8 # Adapter 2 Bridged (local network) inet 192.168.1.48/24 ... # ping from guest to host machine $ ping 192.168.1.67
-
Check networking on host machine
$ ping 192.168.1.48 $ ftp -p 192.168.1.48
lsblk
, df -h
(watch lsblk
, watch df -h
)
# compare dirs
$ diff -qr /mnt/usb-a /mnt/usb-b
$ rsync -rvn /mnt/usb-a/ /mnt/usb-b/
xprop
# extract files
$ cpio -ivd -H tar < archive.tar
# sync two dirs
$ rsync -r /dir1/ /dir2/
xrandr
xrandr -s 1920x1080
Copy entire word under cursor
byw
Delete selected block
Ctrl+v 🠖 <select block>
x
Fill selected block
Ctrl+v 🠖 <select block>
Shift+i 🠖 <enter symbol>
Esc
Comment lines in bash syntax
Ctrl+v 🠖 <select column which will contain comments>
Shift+i
#
Esc
Uncomment lines in bash syntax
Ctrl+v 🠖 <select column which contains comment symbols '#'>
x
# run twice
$ rsync -r -t -v --progress -s /dir1/ /dir2/
$ rsync -r -t -v --progress -s /dir2/ /dir1/
pamac-manager
🠖 android-file-transfer
# 1. Connect phone to USB
# 2. Allow transfering data in the phone
# 3. Enter command:
$ android-file-transfer
# create control sum
$ sha256sum archive.tar.gz > archive.tar.gz.sha256
$ check control sum
$ sha256sum -c archive.tar.gz.sha256
# check gzip integrity
$ gunzip -t archive.tar.gz
# check tar inside gzip integrity
$ gunzip -c archive.tar.gz | tar t > /dev/null
Including extracting from TAR: Invalid or incomplete multibyte or wide character
pamac-manager
🠖 unarchiver
$ unar archive.tar
Q: Some key bindings aren't working (for example - win
+F2
etc)
A: Check and enable FnLock
(Fn
+Esc
)