Skip to content

specifies my archlinux setup including packages (via rollarch)

Notifications You must be signed in to change notification settings

rpuntaie/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles

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

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.

Help

  • man, info
  • wiki-search: Help for Archlinux at command line.
  • wikit: Wikipedia search on command line.

Input

C- = CTRL-, S- = SHIFT-, M- = ALT-, X- = WIN- = SUPER- (mod4Mask on Xmonad)

  • vim: digraph, keymap
  • 0setxkbmap wraps setxkbmap and defaults to en.
  • 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.

Cleaning

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.

Editor: Vim

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

For mappings and plugins see myvimrc.

CLI

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 or C-M-x to enter urxvt-vim-scrollback Capital Y to yank into clipboard.
  • edit command line with vim: ESC-v and ESC-:
  • search: C-T for fzf C-g[f b t r h] for git

Commands:

  • v, vvsp, vvhs open a file in gvim.
  • nvr open a file in nvr-opened nvim.
  • z <substring> jumps to a file in history

CLI tools:

  • slock to lock screen via CLI
  • scrot to make screen shots via shortcuts X-s, and X-u for current window.
  • feh for images
  • ranger for files
  • w3m -dump <url> for text from URL
  • fd to search for files
  • fzf fuzzy find files
  • rg (ripgrep) and ag (the_silver_searcher) to search for text in files
  • bc for ad-hoc CLI calculations, e.g echo 2+2 | bc
  • ncdu like du, but with ncurses
  • top and htop to view processes

Window Manager: Xmonad

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 to xmonad, but you could do WM=qtile startx to change WM

dunst is started via xinitrc.

Security

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).

Systemd User Services

Local mpd.service, keybase.service and mailsync.timer are not enabled by default. Do e.g.:

systemctl --user enable --now mpd.service

Email

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 for mutt, but also for the mail command (s-nail and msmtp-mta packages)

  • notmuch [new] indexes (new) mails, then notmuch 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>. Specifically to: means To: and Cc: and accepts only names or email addresses.

    gm calls getmail/isync, then notmuch, which calls afew 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, ...

Programming

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:

These I fiddled around with or intend to or rather not:

C++ is very expressive and has

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).

Applications

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.

html

latex

libreoffice

Graphics:

Basically those supported by rstdoc: svg, eps, dot, tikz, plantuml, matplotlib, pillow, imagemagick, pyx, pygal

Fontforge

Inkscape

Gimp

Blender

CAD:

OpenScad

Python: PythonOCC, pyOCCT

librecad

Mathematics:

Sagemath

Python: sympy

Electronics:

ngspice (doc)

Python: pyspice

kicad

About

specifies my archlinux setup including packages (via rollarch)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published