• .img created 31 MAY 2020 and updated 7 JUNE 2020
  • kernel: 5.4.42-1-ARCH SMP PREEMPT
  • prepared for headless usage
  • SuperCollider v3.11.0-4 with sc3-plugins

plug and play

  • connect ethernet to rpi and powerup
  • login to user 'alarm' via ssh - password is alarm
  • start supercollider
    there is two ways of doing that
    1. type hlscnv and hit enter for (headless supercollider neovim using scnvim-arm)
      preconfigured scnvim control mappings:
      (the nvim leader is set to ,)
      type ,b (server will boot)
      type ,rc (recompile class library)
      F12 (hardstop - like cmd-period in scide)
      <S-k> looks up documentation under the cursor
      in normalmode enter toggles postwindow
      see repo for more mappings also note that hlscnv is just an alias for offscreen and scnvim
    2. offscreen && scnvim same as above. You only have to run offscreen once per session.
    3. if you just want to use sclang do -> offscreen && sclang from tty/pty(pts)
  • nevertheless. reek auditory mayhem
  • while hacking away you could open a horizontal split terminal with :T or a vertical split terminal with :VT
    and type fire to get som flames going

things done after sys install

as root

  • did a full system upgrade -> pacman -Syy -Syu

  • installed the following with pacman -S:

    sudo fakeroot binutils 
  • changed wheel group permissions visudo /etc/sudoers

    %wheel ALL=(ALL) ALL
  • added user alarm to the wheel (sudo) and audio group
    usermod -aG wheel,audio alarm

  • enabled audio from the real bad minijack output
    added dtparam=audio=on in the boot configuration /boot/config.txt

  • created /etc/security/limits.d/audio.conf containing:

    @audio   -  rtprio     98
    @audio   -  memlock    unlimited
  • wrote a greeting in /

  • changes the login welcome screen /etc/motd

as alarm

  • installed the following with sudo pacman -S

    nnn ranger git htop wget nmap neofetch 
    man neovim zsh zsh-syntax-highlighting
    alsa-utils sox tmux skim the_silver_searcher 
    fzf make gcc python python-pynvim w3m imlib2 libcaca
    supercollider sc3-plugins jack2 cpupower
  • created /home/alarm/SCDs (SuperCollider Documents)

  • created and mildly populated:


    i recommend you take a look at these

  • installed pure prompt see $HOME/.zsh/pure

  • changed default shell for user 'alarm' chsh -s /bin/zsh

  • changed default locale to en.DK_UTF-8
    this makes tmux work out of the box

    • and changed keymap to dk
      ! set your preferred locale, lang and keymap (see further down in this readme)
  • cloned and build yay in /home/alarm

    git clone
    cd yay
    makepkg -si
  • removed go (dependency of yay build, freing up ~394mb)

  • installed python-html2text (community repo)

  • installed vim-plug

    sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \'       
  • did a :PlugInstall in nvim
    and a :SCNvimTags generating SuperCollider Tags, Snippets and such.

  • created ~/.jackdrc with:
    echo /usr/bin/jackd -P75 -dalsa -dhw:0 -r44100 -p1024 -n3 > ~/.jackdrc

  • changed default cpu scaling governor to performance in /etc/default/cpupower started and enabled the service sudo systemctl enable --now cpupower.service
    which created the symlink /etc/systemd/system/ → /usr/lib/systemd/system/cpupower.service

section for you (the downloader, the image flasher)

recommended first actions after flashing image

  • login via ssh to user 'alarm' - password is alarm

  • switch to 'root' su - password is root

  • change 'root' password passwd

  • change alarm user password passwd alarm

  • change hostname nvim /etc/hostname

  • change hosts entries to match new hostname nvim /etc/hosts   localhost
    ::1     localhost   <NEW_HOSTNAME>.localdomain   <NEW_HOSTNAME>
  • please note. to get a working global clipboard (see nvim :checkhealth) use tmux in your ssh sessions.


to connect to a WiFi network (no persistance after reboot)
simply use _ wifi-menu -> please note that _ = sudo

to set up wifi and save and create a profile run the following commands...

first find the name of your wifi device with:
basename $(ls -d /sys/class/net/w*) this probably posts wlan0

for manual enabling networks use:
_ wifi-menu -o select network and enter password _ netctl list if successful this should list your network name _ netctl enable wlan0-MYNETWORK edit to match your network name

for automatically connecting to a known network (or the strongest) use:
_ systemctl enable netctl-auto@wlan0.service edit wlan0 if basename above posted another device id _ wifi-menu -o select network and enter password

cpugovernor (default is performance)

  • set cpu-guvorner to ondemand (for example if you want to have your battery last longer) The official way of setting cpu scaling governor is in the /etc/default/cpupower.

to check which governor is being used for all cores use: cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

the symlinked file from cpupower.service contains:

Description=Apply cpupower configuration



rt kernel patchset and performance tweaks

add kernel=rt-kernel.img to the end of the boot parameters. do a sudo reboot. Verify the rt-kernel usage with uname -r

realtime process management made easy

only difference between these privileges and the ones i have already set up in the audio group is rtprio 98. but the realtime-privileges package by Runge is very convenient. especially when setting up a new user like suggested in the end of this README.

  • sudo pacman -S realtime-privileges

after install it will say: The 'realtime' group has been created. Add your user to it and re-login to use realtime privileges

usermod -aG realtime alarm && sudo reboot

see this for more information on the subject

locale, keymap, time

  • update and set your locale: nvim /etc/locale.gen
    uncomment the locale you need, example -> en_DK.UTF-8 UTF-8

  • edit the locale conf nvim /etc/locale.conf -> set LANG=en_DK.UTF-8

  • generate the locale locale-gen

  • set a persistent keymap (example) localectl set-keymap dk creating and setting -> /etc/vconsole.conf cat /etc/vconsole.conf should output


    check vconsole.conf man (set the console font and more)

  • setup the timezone

    • first we check the current setting: ls -l /etc/localtime If there is no file named /etc/localtime then you need to set it up. If there is a file, but it comes back something like the following: ... /etc/localtime -> /usr/share/zoneinfo/Europe/London And you don’t want to be in this timezone, then you need to change it. If the file already exists but is wrong, delete it: rm /etc/localtime Now recreate the file by sym-linking to an existing timezone file: ln -s /usr/share/zoneinfo/Europe/Oslo /etc/localtime

set up new user

  • create new user useradd -m <NEW_USER>

  • set password passwd <NEW_USER>

  • add to the wheel and audio group usermod -aG wheel,audio <NEW_USER>

  • for audio work, duplicate the setup above

in case of connecting a screen

  • add user to video group
    try w3m w3m will then be able to show images

  • change appropiate overlays for hdmi, fkms, kms etc.

  • disable audit (stop it from bombarding the tty)
    You can quickly disable audit temporarily with:
    sudo auditctl -e 0
    for persistance:
    add audit=0 to the /boot/cmdline.txt file. changing the kernel command line.

convenient things

  • terminal key bindings and cmd aliases
    1. <ALT+c> change directory with fzf
    2. <CTRL+r> search in previously used commands (fzf)
    3. <CTRL+t> triggers fzf in the working directory
    4. skim-search insanely robust and fast content search (sk and ag)
    5. scanlocal list devices on lan (nmap)
    6. _ = sudo
    7. ad list 'audio devices' -> aplay -l
    8. am control volume via alsamixer
    9. 1 = cd - go back to previous directory
    10. <CTRL+l> clear prompt (classic)

the pre created configs are:

  • zsh config .zshrc
# pure prompt
autoload -U promptinit; promptinit
zstyle :prompt:pure:path color yellow
zstyle :prompt:pure:user color blue
zstyle :prompt:pure:host color cyan
zstyle :prompt:pure:prompt:success color yellow
zstyle :prompt:pure:execution_time color yellow
zstyle :prompt:pure:git:stash show yes
prompt pure

# exports
export SC_DOC_DIR="$HOME/SCDs"
export SC_EXT_DIR="$HOME/.local/share/SuperCollider/Extensions"
export SC_QUARK_DIR="$HOME/.local/share/SuperCollider/downloaded-quarks"

#source aliases
source $HOME/.zsh_aliases

# source fzf
source /usr/share/fzf/key-bindings.zsh
source /usr/share/fzf/completion.zsh

# add syntax highlighting (must be on last line in .zshrc file)
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  • aliases .zsh_aliases search in all aliases with alias | sk
# SuperCollider
alias scnvim='cd $SC_DOC_DIR && nvim `date +"%d-%m-%y"`.scd -c "SCNvimStart"'
alias hlscnv='offscreen && cd $SC_DOC_DIR && nvim `date +"%d-%m-%y"`.scd -c "SCNvimStart"'
alias sc="cd $HOME/.local/share/SuperCollider"

# QT
alias offscreen='export QT_QPA_PLATFORM=offscreen'

# sudo
alias _='sudo '

# skim
alias skim-search="sk --ansi -i -c 'ag --color "{}"'"
alias skim-time='ls  -al --time-style=+%D | sk'

# nvim
alias nv='nvim'
alias nvs='nv $(sk --height 50% --reverse)'
alias nvf='nv $(fzf --height 50% --reverse)'
alias nv-config-edit='nv $HOME/.config/nvim/init.vim'

# alsa
alias ad='aplay -l'
alias am='alsamixer'

# ranger
# make ranger quit to shell at last path location
alias ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"'
alias r='ranger'

alias n='nnn'

# sillyness
alias fire='cacafire'

# info
alias what='journalctl -f'
alias services='systemctl --type=service'

# list connected / mounted block devices
alias lsb='lsblk -p'
alias dfh='df -h'

# ls classics
alias ls='ls --color'
alias l='ls -lFh'           #size,show type,human readable
alias la='ls -lAFh'         #long list,show almost all,show type,human readable
alias lr='ls -tRFh'         #sorted by date,recursive,show type,human readable
alias lt='ls -ltFh'         #long list,sorted by date,show type,human readable
alias ll='ls -l'            #long list
alias ldot='ls -ld .*'      #long lost dot files
alias lS='ls -1FSsh'
alias lart='ls -1Fcart'
alias lrt='ls -1Fcrt'

# directory
alias md='mkdir -p'
alias rd=rmdir

# interactive
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# misc
alias 1='cd -'
alias cd..='cd ..'
alias cd...='cd ../..'
alias cd....='cd ../../..'
alias cd.....='cd ../../../..'
alias cd......='cd ../../../../..'
alias ...=../..
alias ....=../../..
alias .....=../../../..
alias ......=../../../../..
alias afind='ack -il'
alias egrep='egrep --color=auto --exclude-dir={.bzr,.git}'
alias fgrep='fgrep --color=auto --exclude-dir={.bzr,.git}'
alias e='echo'

# nmap
alias scanlocal='_ nmap -sn'
alias scanesp='sudo nmap -sP | grep -E -B2 '\''24:6F:28|80:7D:3A|68:C6:3A|24:0A:C4|60:01:94|90:97:D5|AC:D0:74|FC:F5:C4|98:F4:AB|D8:BF:C0|50:02:91|24:62:AB|A4:CF:12|CC:50:E3|BC:DD:C2|D8:A0:1D|24:B2:DE|A0:20:A6|5C:CF:7F|8C:AA:B5|7C:DF:A1|D8:F1:5B|C4:4F:33|30:AE:A4|E0:98:06|F4:CF:A2|10:52:1C|C8:2B:96|84:0D:8E|84:F3:EB|A4:7B:9D|18:FE:34|48:3F:DA|F0:08:D1|4C:11:AE|2C:F4:32|3C:71:BF|B4:E6:2D|DC:4F:22|EC:FA:BC|2C:3A:E8|54:5A:A6'\'
alias nmap_check_for_firewall='sudo nmap -sA -p1-65535 -v -T4'
alias nmap_check_for_vulns='nmap --script=vuln'
alias nmap_detect_versions='sudo nmap -sV -p1-65535 -O --osscan-guess -T4 -Pn'
alias nmap_fast='nmap -F -T5 --version-light --top-ports 300'
alias nmap_fin='sudo nmap -sF -v'
alias nmap_full='sudo nmap -sS -T4 -PE -PP -PS80,443 -PY -g 53 -A -p1-65535 -v'
alias nmap_full_udp='sudo nmap -sS -sU -T4 -A -v -PE -PS22,25,80 -PA21,23,80,443,3389 '
alias nmap_full_with_scripts='sudo nmap -sS -sU -T4 -A -v -PE -PP -PS21,22,23,25,80,113,31339 -PA80,113,443,10042 -PO --script all '
alias nmap_list_interfaces='nmap --iflist'
alias nmap_open_ports='nmap --open'
alias nmap_ping_scan='nmap -n -sP'
alias nmap_ping_through_firewall='nmap -PS -PA'
alias nmap_slow='sudo nmap -sS -v -T1'
alias nmap_traceroute='sudo nmap -sP -PE -PS22,25,80 -PA21,23,80,3389 -PU -PO --traceroute '
alias nmap_web_safe_osscan='sudo nmap -p 80,443 -O -v --osscan-guess --fuzzy '

# git aliases
alias g=git
alias ga='git add'
alias gaa='git add --all'
alias gc='git commit -v'
alias 'gc!'='git commit -v --amend'
alias gca='git commit -v -a'
alias 'gca!'='git commit -v -a --amend'
alias gcb='git checkout -b'
alias gcf='git config --list'
alias gcl='git clone --recurse-submodules'
alias gcmsg='git commit -m'
alias gco='git checkout'
alias gd='git diff'
alias gf='git fetch'
alias gfg='git ls-files | grep'
alias gfo='git fetch origin'
alias ggpull='git pull origin "$(git_current_branch)"'
alias ggpush='git push origin "$(git_current_branch)"'
alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
alias gignored='git ls-files -v | grep "^[[:lower:]]"'
alias gl='git pull'
alias glg='git log --stat'
alias glgg='git log --graph'
alias glgga='git log --graph --decorate --all'
alias glgm='git log --graph --max-count=10'
alias glgp='git log --stat -p'
alias glol='git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'
alias glum='git pull upstream master'
alias gm='git merge'
alias gma='git merge --abort'
alias gmom='git merge origin/master'
alias gmum='git merge upstream/master'
alias gp='git push'
alias gpu='git push upstream'
alias gpv='git push -v'
alias gr='git remote'
alias gra='git remote add'
alias grm='git rm'
alias gss='git status -s'
alias gst='git status'
  • nvim config ~/.config/nvim/init.vim use nv-config-edit to quickly access it
let g:python3_host_prog = "/usr/bin/python"

let g:scnvim_scdoc_render_prg = '/usr/bin/html2text'
let g:scnvim_scdoc_render_args = '% > %'

let mapleader = ","
let maplocalleader="."

" make nvim use global clipboard
" clipbard yanking unamed is plus (global)
set clipboard=unnamedplus

" Plugins 
call plug#begin('~/.vim/plugged')

    " SuperCollider
    Plug 'salkin-mada/scnvim-arm', { 'do': { -> scnvim#install() } }
    " should use orig repo 'davidgranstrom/scnvim' when install script is merged -> see PR #72 and #86 ..
    "you can also use a use cloned repository like so:
    "Plug 'file://'.expand('~/scnvim-arm'), { 'do': { -> scnvim#install() } }

    " UltiSnips
    Plug 'SirVer/ultisnips'

    " Deoplete
    Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }

    " skim
    Plug 'lotabout/skim', { 'dir': '~/.skim', 'do': './install' }
    Plug 'lotabout/skim.vim'

    " GoYo
    Plug 'junegunn/goyo.vim'

    " Highlighted yank
    Plug 'machakann/vim-highlightedyank'

    " Auto pairs
    Plug 'jiangmiao/auto-pairs'

    " Multi cursors
    Plug 'terryma/vim-multiple-cursors'

    " Lightline
    Plug 'itchyny/lightline.vim'

    " Colors
    Plug 'haishanh/night-owl.vim'

call plug#end()

" UlitiSnips & Deoplete
let g:UltiSnipsSnippetDirectories = ['UltiSnips', 'scnvim-data']

let g:deoplete#enable_at_startup = 1

" Colors
if (has("termguicolors"))
 set termguicolors

" enable the nightowl theme
syntax enable
colorscheme night-owl

" Terminal
" escape terminal mode
tnoremap <Esc> <C-\><C-n>
command! -nargs=* T split | terminal <args>
command! -nargs=* VT vsplit | terminal <args>
" line numbers off in terminal mode
au TermOpen * setlocal listchars= nonumber norelativenumber
" always start terminal with insert mode
au TermOpen * startinsert

" Split Navigation
inoremap <C-J> <C-W><C-J>
inoremap <C-K> <C-W><C-K>
inoremap <C-L> <C-W><C-L>
inoremap <C-H> <C-W><C-H> 
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>

" Search Behavior
set hlsearch
set incsearch
" remove highlighted search
nnoremap <leader>. :noh<CR><CR>

" Line Numbers
:set number
:set relativenumber " show relative line numbers
nmap <C-N><C-N> :set invnumber<CR>

" Indentation
set autoindent
set noexpandtab
set shiftwidth=4
set tabstop=4

" Lightline
" enable the night owl lightline theme
let g:lightline = { 'colorscheme': 'nightowl' }
" components
let g:lightline.component_function = {
        \ 'server_status': 'scnvim#statusline#server_status',
        \ }

function! s:set_sclang_lightline_stl()
    let = {
        \ 'left':  [ [ 'mode', 'paste' ],
        \          [ 'readonly', 'filename', 'modified' ] ],
        \ 'right': [ [ 'lineinfo' ],
        \            [ 'percent' ],
        \            [ 'server_status'] ]
        \ }

" SuperCollider (SCNvim)
" wrap supercollider post window
autocmd FileType scnvim setlocal wrap

" scnvim neovim docs !
let g:scnvim_scdoc = 1

" vertical 'v' or horizontal 'h' split
let g:scnvim_postwin_orientation = 'v'

" position of the post window 'right' or 'left'
let g:scnvim_postwin_direction = 'right'

" default is half the terminal size for vertical and a third for horizontal
let g:scnvim_postwin_size = 40

" automatically open post window on a SuperCollider error
let g:scnvim_postwin_auto_toggle = 1

" duration of the highlight
let g:scnvim_eval_flash_duration = 135

" number of flashes. A value of 0 disables this feature.
let g:scnvim_eval_flash_repeats = 3

" set this variable if you don't want the "echo args" feature
let g:scnvim_echo_args = 1

" configure the color
highlight SCNvimEval guifg=green guibg=magenta ctermfg=green ctermbg=magenta

" create a custom status line for supercollider buffers
function! s:set_sclang_statusline()
    setlocal stl=
    setlocal stl+=%f
    setlocal stl+=%=
    setlocal stl+=%(%l,%c%)
    setlocal stl+=\ \|
    setlocal stl+=%18.18{scnvim#statusline#server_status()}

augroup scnvim_stl
    autocmd FileType supercollider call <SID>set_sclang_statusline()
augroup END

" Recompile
au filetype supercollider nnoremap <leader>rc :SCNvimRecompile<CR>

" Boot server
au filetype supercollider nnoremap <buffer> <leader>b :call scnvim#sclang#send_silent('Server.local.boot')<CR>

list of installed packages

pacman -Qe

alsa-utils 1.2.2-1
base 2-2
binutils 2.34-2
cpupower 5.7-1
crda 4.14-3
dhcpcd 9.1.1-1
dialog 1:1.3_20200327-1
fakeroot 1.24-2
fzf 0.21.1-2
gcc 9.3.0-1
git 2.27.0-1
haveged 1.9.8-2
htop 2.2.0-3
imlib2 1.6.1-2
jack2 1.9.14-1
libcaca 0.99.beta19-3
linux-raspberrypi4 5.4.42-1
make 4.3-3
man-db 2.9.2-1
nano 4.9.3-1
neofetch 7.0.0-1
neovim 0.4.3-3
net-tools 1.60.20181103git-2
netctl 1.23-1
nmap 7.80-2
nnn 3.2-1
openssh 8.3p1-1
python 3.8.3-1
python-html2text 2019.8.11-4
python-pynvim 0.4.1-1
ranger 1.9.3-1
raspberrypi-bootloader 20200528-1
raspberrypi-bootloader-x 20200528-1
raspberrypi-firmware 20200528-1
sc3-plugins 3.10.0-3
skim 0.8.1-1
sox 14.4.2-5
sudo 1.9.0-1
supercollider 3.11.0-4
the_silver_searcher 2.2.0-1
tmux 3.1_b-1
vi 1:070224-4
w3m 0.5.3.git20200507-1
wget 1.20.3-3
which 2.21-5
wireless_tools 30.pre9-3
wpa_supplicant 2:2.9-7
yay 9.4.7-1
zsh 5.8-1
zsh-syntax-highlighting 0.7.1-1