Author: | roland.puntaier@gmail.com |
---|---|
License: | https://opensource.org/licenses/GPL-3.0 |
Uses XDG,
reproducing FHS under ~/.local
.
Non-standard XDG_LIB_HOME
, XDG_LOG_HOME
and XDG_STATE_HOME
are for FHS compliance.
etc: | XDG_CONFIG_HOME , configurations for apps |
---|---|
share: | XDG_DATA_HOME , data for apps and user scripts |
lib: | XDG_LIB_HOME , user libs |
var/cache: | XDG_CACHE_HOME , cache for apps |
var/lib: | XDG_STATE_HOME , non-tracked automatically downloaded libraries for apps |
var/log: | XDG_LOG_HOME , app generated logs |
opt: | for not well integrated apps |
bin: | user scripts |
home: | files symlinked from ~ for apps not honoring XDG |
install: | installation script according rollarch |
readme.rst: | this file |
rollarch fills /etc/security/pam_env.conf with XDG variables.
Some files in these dotfiles reference separately managed directories, because they are actual user data.
~/.password-store
~/.gnupg
~/my
~/Mail
Note
To free these dotfiles from user-specific things, grep for usrstuff
.
Installation is handled by the install
script according rollarch.
The install script has a list of all packages including user packages for python and nodejs or possibly AUR packages using yay.
A whole ArchLinux system, including these dotfiles
, can be installed with rollarch.
If AIP2
is used, a local proxy must be prepared as described in rollarch.
On the AIP2
proxy:
cd ~/mine/rollarch
sudo -E bash ./build pkg/rpuntaie
Then
curl -OLs https://git.io/installarch
# replace the defines at least in the first line
DSK=/dev/sda USR=u PW=p HST=u121 IP2=1.121 ZONE=Vienna DOTS=fjVcp bash installarch
# log out and in
Alternatively
mkdir mine
mount -t nfs -o nfsvers=3 192.168.1.108:/home/roland/mine mine
lsblk
DSK=/dev/sda SWAP=off USR=u PW=p HST=u121 IP2=1.121 ZONE=Vienna DOTS=mine/dotfiles/install bash mine/rollarch/rollarch
DSK IS FORMATTED. DON'T CHOOSE THE WRONG ONE.
The variables can be sourced from a file.
PW
will be asked if omitted.
After changing or adding a file to the dotfiles
one must run
restowdots
#or ~/dotfiles/install
to update ~/.local
.
I chose
gnu stow --no-folding
over directly cloning into .local
to keep the dotfiles
repo clean from files filling up the .local
FHS,
a nuisance when grep'ing.
man
,info
wiki-search
: Help for Archlinux at command line.wikit
: Wikipedia search on command line.
C- = CTRL-
, S- = SHIFT-
, M- = ALT-
, X- = WIN- = SUPER-
(mod4Mask on Xmonad)
vim
:digraph
,keymap
0setxkbmap
wrapssetxkbmap
and defaults toen
.ibus
:C-S-e
emoji,C-S-u
unicode,ibus-setup
in terminal
On X11 use xev
to show keysym and keycode.
Use ralt
(etc/X11/xinitrc) as compose/ComposeKey/Multi_key for etc/X11/XCompose
On X11, showkey
can't get a file descriptor referring to the console.
C-M-Fx
to switch to real virtual terminal (VT).
X11 uses one VT, e.g. F1: Use C-M-F1
to go back to X11.
pacman -Rns $(pacman -Qtdq) #orphans
paccache -ruk0
paccache -rk1
ncdu
rmlint
rmlint reduces space by making files share disk blocks with same data
using a linux feature.
And it produces rmlint.sh
to show you file duplications,
which you may clean up selectively by editing the script.
I use vim
as TUI to the system.
Note for Windows: bash dotfiles/bin/restowdots
only sets up vimfiles.
Vim embeds Python and others and it has
:term
:
[C-w N]
normal mode[C-w C-w]
switch window[C-w ""]
paste"
into term
For Python and restructuredText
(RST) I use
- vim plugin vim_py3_rst
- python package rstdoc
For mappings and plugins see myvimrc.
zsh
through vim :term
or urxvt
.
urxvt
depends on a proper /etc/locale.conf
.
For shell scripting I use bash
instead of zsh
.
They are not the same.
Therefore I use :term bash
in vim to try solutions.
urxvt
settings in Xresources
, xrdb -load <pth>
for re-loading.
Shortcuts:
- copy/paste:
C-M-c/v
to copy/paste selected orC-M-x
to enterurxvt-vim-scrollback
CapitalY
to yank into clipboard. - edit command line with vim:
ESC-v
andESC-:
- search:
C-T
for fzfC-g[f b t r h]
for git
Commands:
v, vvsp, vvhs
open a file ingvim
.nvr
open a file in nvr-openednvim
.z <substring>
jumps to a file in history
CLI tools:
slock
to lock screen via CLIscrot
to make screen shots via shortcutsX-s
, andX-u
for current window.feh
for imagesranger
for filesw3m -dump <url>
for text from URLfd
to search for filesfzf
fuzzy find filesrg
(ripgrep) andag
(the_silver_searcher) to search for text in filesbc
for ad-hoc CLI calculations, e.g echo 2+2 | bcncdu
likedu
, but with ncursestop
andhtop
to view processes
I added little to the defaults. See xmonad.hs.
X-s
screenshot
X-u
screenshot allowing seleection
X-S-p
passmenu
- no display manager
startx
defaults toxmonad
, but you could doWM=qtile startx
to change WM
dunst is started via xinitrc.
gpg
for private/public key encryption:
gpg2 --full-gen-key gpg2 --list-keys --with-colons gpg2 --edit-key <email> passwd save gpg2 --armor --output my-secret-key.asc --export-secret-keys <email> gpg2 --delete-secret-key <email> gpg2 --armor --output my-secret-key.asc --export-secret-subkeys <email> gpg2 --import my-secret-subkeys.asc gpg2 --recv-keys gpg2 --sign-key <keyid> gpg2 --send-key <keyid> gpg2 --encrypt <file> gpg2 --encrypt <file> --recipient <receiver> gpg2 --decrypt <file>.gpg gpg2 --sign <file> gpg2 --sign --encrypt <file> -r <receiver> gpg2 --detached-sign <file> gpg2 --verify <file>.asc
~/dotfiles/bin/gpgofflinemaster
works with the separate offline master key.
~/.gnupg
:
GNUPGHOME
is kept at the default location, to be managed separately and offline.
Set it up before dotfiles
, as restowdots
will
use it for ssh.
Else, just restowdots
again.
~/.password-store
:
pass
for password management, managed separately.
browserpass
uses it to serve browserpass-chromium
and browserpass-firefox
.
keybase
for secure chat and file exchange (KBFS).
Local mpd.service
, keybase.service
and mailsync.timer
are not enabled by default.
Do e.g.:
systemctl --user enable --now mpd.service
install
downloads mw
and uses it to generate email settings in
~/.local/etc/getmail/*
~/.local/etc/isync/mbsyncrc
~/.local/etc/msmtp/config
~/.local/etc/mutt/*
mw
is also used to sync those accounts.
On every sync the mw
account muttrc's are recreated.
To enable automatic syncing:
systemctl --user enable --now mailsync.timer
else manually in mutt with gm
or on CLI:
gm # or mw
A Maildir mailbox
is a directory with {cur,new,tmp}/<messagefiles> as text files.
It can be used by programming languages and tools:
isync
's mbsync supports IMAP. It syncs between remote and local mailboxes. (Alternative to offlineimap, which still uses python2)getmail supports IMAP and POP.
msmtp
sends mails, not just formutt
, but also for themail
command (s-nail
andmsmtp-mta
packages)notmuch [new]
indexes (new) mails, thennotmuch address|count|dump|reply|search|show|tag
can be used.mutt
lists messages in already existing maildir folders, independent of whether created via POP or IMAP.alot shows mails based on tags using
notmuch
(alot taglist
).Vim can be used as a MUA via notmuch.
mailx
:echo 'message body test' | mailx -s "test with mailx" <email>
afew is a python wrapper on
notmuch
for tagging and moving mails. Note, that the query format is not generally regular expressions:notmuch search <test your search pattern>
. Specificallyto:
meansTo:
andCc:
and accepts only names or email addresses.gm
callsgetmail/isync
, thennotmuch
, which callsafew
via the~/Mail/.notmuch/hooks/post-new
configuration.My afew config folders similar mails into mailboxes with same name accross emails. Via FolderNameFilter they get the same tag and can be viewed/searched accross emails with
alot
/notmuch
.
Since the messages are text, they can be search with ag
, rg`, ``vimgrep
, ...
My local arch package rpuntaie contains packages for languages I worked with so far
Native:
- C/C++: gcc, clang, cling
- Pascal: fpc
.NET:
- C#: mono dotnet-sdk
JVM:
- Java: jdk-openjdk
Interpreted:
- Python. Packages not arch repos: my_python.
- R (maths)
- octave (matlab alternative)
- SQL: sqlite mariadb
- JavaScript: nodejs Packages not in arch repos: my_nodejs.
These I fiddled around with or intend to or rather not:
- Native: haskell (ghc), go, rust, apple: objc and swift, D
- Interpreted: julia, examples, ruby, lua, php, ocaml
- JVM: clojure, kotlin, groovy, scala
- Erlang: elixir
C++ is very expressive and has
- standard library
- boost
- and can call any C system libraries without glue code (glibc, libusb, ...)
but as a compiled language, the code-test cycle is cumbersome, although cling helps:
#include "myfile.hpp"
#pragma cling load("myfile.so.9.220.0")
Python is interpreted by design and has an amazing standard library.
Interactive languages, like Python, are a step forward from a CLI, because they augment the concept space of processes, files and pipes with those of threads and data structures and APIs, without the need to compile in between (REPL).
Generally I've moved away from GUIs, as they are not easily automated. Languages can be automated and are more flexible and trackable. Every application area has its DSL. I prefer an imlementation in a general REPL language, specifically Python, though.
Typesetting: | I prefer light markup, specifically rst, for which I made rstdoc. |
---|---|
Graphics: | Basically those supported by rstdoc: svg, eps, dot, tikz, plantuml, matplotlib, pillow, imagemagick, pyx, pygal |
CAD: | |
Mathematics: |
Python: sympy |
Electronics: |
Python: pyspice |