From 547f1550666700a087acb13f1cc3ef010bbb78fc Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 15 May 2021 18:11:23 +0200 Subject: fvwm is back --- .config/i3/config | 1 + 1 file changed, 1 insertion(+) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index 48c461c..a1de2b3 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -87,6 +87,7 @@ for_window [class="vlc"] floating enable for_window [instance="wish"] floating enable for_window [class="wpa_gui"] floating enable for_window [class="XVroot"] floating enable +#for_window [class="XTerm"] floating enable for_window [class="zoom"] floating enable bindsym button3 floating toggle -- cgit v1.3 From 0b89577b1e7c46986bed003033d677f2d1ebf9cb Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sun, 15 Aug 2021 11:43:21 +0200 Subject: update --- .config/i3/config | 3 ++- .vimrc | 14 +++++++------- bin/gauth | 3 ++- bin/wol | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index a1de2b3..4a1136a 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -79,8 +79,9 @@ for_window [class="libreoffice"] floating enable for_window [class="llpp"] floating enable for_window [class="MuPDF"] floating enable for_window [class="Pavucontrol"] floating enable -for_window [class="Slack"] floating enable +for_window [class="Org.gnome.Software"] floating enable for_window [class="Signal"] floating enable +for_window [class="Slack"] floating enable for_window [class="Spotify"] floating enable for_window [class="Thunderbird"] floating enable for_window [class="vlc"] floating enable diff --git a/.vimrc b/.vimrc index f8fce87..68ae82a 100644 --- a/.vimrc +++ b/.vimrc @@ -1,5 +1,6 @@ " set background= -set t_te= t_ti= laststatus=2 +"set t_te= t_ti= laststatus=2 +set t_te= t_ti= ls=1 ruler syntax off filetype on @@ -7,23 +8,22 @@ filetype plugin on filetype plugin indent on let mapleader = "," +set rtp+=/opt/homebrew/opt/fzf let g:fzf_preview = 'cat {}' " vimki plugin -let g:vimki_lower = "a-zàçéèêếëîïñôöùûü" autocmd filetype vimki syntax on autocmd filetype vimki set autowrite -autocmd filetype vimki setlocal spell spelllang=fr +" autocmd filetype vimki setlocal spell spelllang=fr autocmd filetype vimki nmap z :FZF ~/Wiki -autocmd filetype vimki nnoremap = YpVr= -autocmd filetype vimki nnoremap - YpVr- - " vim-go plugin let g:go_def_mode = "gopls" let g:go_info_mode = "gopls" let g:go_list_type = "quickfix" -let g:go_fmt_command = "goimports" +" let g:go_fmt_command = "goimports" +let g:go_fmt_command = "gopls" +let g:go_gopls_gofumpt = 1 let g:go_metalinter_command = "golangci-lint" autocmd FileType go syntax on autocmd FileType go nmap b (go-build) diff --git a/bin/gauth b/bin/gauth index 575d6fc..53ddf30 100755 --- a/bin/gauth +++ b/bin/gauth @@ -1,7 +1,8 @@ #!/bin/sh # Use backup from andOTP -gpg -qd ~/.otp_accounts.json.gpg | +# gpg -qd ~/.otp_accounts.json.gpg | +cat ~/otp_accounts.json | jq -r '.[] | "\(.label) \(.secret)"' | while read -r l s; do echo "$l $(oathtool --totp -b "$s")" diff --git a/bin/wol b/bin/wol index 146e46a..7975df9 100755 --- a/bin/wol +++ b/bin/wol @@ -1,6 +1,6 @@ -#!/bin/sh -x +#!/bin/sh ip_plex=192.168.1.90 mac_plex=b0:83:fe:61:a7:aa eval "mac=\$mac_$1 ip=\$ip_$1" wakeonlan "$mac" -#ping -o "$ip" +while ! nc -zw 2 "$ip" 22; do printf .; sleep 2; done ssh "root@$ip" -- cgit v1.3 From e589eff80a403bfe7831c040fe55a6bcf5ba038b Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Mon, 6 Dec 2021 15:02:31 +0100 Subject: update --- .backupignore | 5 ++ .bashrc | 6 ++- .config/i3/config | 1 + .i3status.conf | 2 +- .otp_accounts.json.gpg | 70 +++++++++++++++++---------- .profile | 6 +-- .vimrc | 2 +- .xinitrc | 10 +++- bin/backup | 55 ++++++++++++--------- bin/backup-clean | 127 +++++++++++++++++++------------------------------ bin/byo | 4 +- bin/gauth | 6 +-- bin/p4a | 3 ++ 13 files changed, 161 insertions(+), 136 deletions(-) create mode 100644 .backupignore create mode 100755 bin/p4a (limited to '.config/i3') diff --git a/.backupignore b/.backupignore new file mode 100644 index 0000000..ade7961 --- /dev/null +++ b/.backupignore @@ -0,0 +1,5 @@ +.*[Cc]ache/ +*[Cc]ache/ +CacheStorage/ +go/pkg/ +gopath/pkg/ diff --git a/.bashrc b/.bashrc index c086d45..f20fbdd 100644 --- a/.bashrc +++ b/.bashrc @@ -32,6 +32,8 @@ fixab() { printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" ; tail -c +25 "$1"; } #export LESS_TERMCAP_us=$(tput setaf 5) # underline (magenta) #export LESS_TERMCAP_ue=$'\E[0m' # end underline +export BACKUP=bip:/home/backup/marc@yoda + # gnuplot display in terminal export GNUTERM='sixelgd enhanced truecolor font "arial,9"' @@ -47,7 +49,7 @@ alias ll='ls -AlFhv' alias vi='vim' alias view='vim -R' #alias op='xdg-open' -alias git='hub' +#alias git='hub' #alias go='go1.14.1' alias go11='go1.11.13' alias go12='go1.12.10' @@ -58,6 +60,7 @@ alias goh='p go help' alias god='p go doc' alias gtr='go test -v -run' alias gtb='go test -v -cpuprofile cpu.out -memprofile mem.out -benchmem -bench' +alias kd='sudo cat /sys/kernel/debug/tracing/trace_pipe' #alias vi='vim' alias rvi='sudo vim' alias rxt='sudo xt' @@ -85,6 +88,7 @@ alias wai='~/go/src/github.co/traefik/whoami/whoami' # yaegi debug export YAEGI_DOT_CMD='dotty -' +export YAEGI_BPF=1 YAEGI_UNSAFE=1 YAEGI_SYSCALL=1 YAEGI_UNRESTRICTED=1 mosht() { mosh "$@" -- tmux new -A; } export -f mosht diff --git a/.config/i3/config b/.config/i3/config index 4a1136a..84f31c2 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -76,6 +76,7 @@ for_window [class="gnuplot_qt"] floating enable for_window [instance="gxditview"] floating enable for_window [class="Keybase"] floating enable for_window [class="libreoffice"] floating enable +for_window [class="Liferea"] floating enable for_window [class="llpp"] floating enable for_window [class="MuPDF"] floating enable for_window [class="Pavucontrol"] floating enable diff --git a/.i3status.conf b/.i3status.conf index 87656f8..7590d2b 100644 --- a/.i3status.conf +++ b/.i3status.conf @@ -93,8 +93,8 @@ memory { cpu_temperature 0 { format = "🌡%degrees °C" #path = "/sys/class/hwmon/hwmon0/temp1_input" - #path = "/sys/class/hwmon/hwmon7/temp1_input" path = "/sys/class/hwmon/hwmon6/temp1_input" + #path = "/sys/class/hwmon/hwmon7/temp1_input" } tztime local { diff --git a/.otp_accounts.json.gpg b/.otp_accounts.json.gpg index bbf1956..e99f48a 100644 --- a/.otp_accounts.json.gpg +++ b/.otp_accounts.json.gpg @@ -1,27 +1,49 @@ -----BEGIN PGP MESSAGE----- -hQIMA+yVXrx81qjVAQ/8DgattaALSr1kOyqcTFdn43dNBwLSBD369Cs3zu7ez5xz -DpBBecMNSuCVFPq0QfocNlDmz3BZxrkrttmAz3W7iK5rDKZeYTAG10ZT7NzI5K/C -43WgEbf3W7FLxJGy6ASv2wRI/NRDZyjWe8yEEE5OF5ZTLawV57R/xW2UHemegI3l -aAC4nU1hWHnmErdaubdxzgCva/hrd3SzroSVfmuQp+Cq1/AszDAe9LQltSAIo2oZ -wwct6GIBNXoiA61YB3+m7oZfMfMa+1fNEobYReN/9E8iVMz01fWWOGsYRIue07yd -0aAMj+ywQ1VU5G2SJ++B3pchbD+ViXvLEy1bnNF37PplKYnjN06db0MuflkfDM+A -ICMTvhGlR58DwBueuLrWBh6dAbSOuz8tHQXzs5nlBI/Vvd2YUkw5Stcn+VBi7Bwg -xvq2WiMhRT0nIvb1yuNGCpwWt2W1ckba79opBe4j1mvXYOq9vTT2VjJnAKe3k55B -KWQBEkRe+T5FgcSfpRiMTogIvA8aOXTxkOltzjWjH5GXza65en4R9LNg7HB/lUd7 -zb3KVEg++XuPFVU08hFF8B4vb3zsLDy0Uf26Ilv63lNgvKR9TAC9VDEfY91qMXWl -e1yeiGQCoAmU2BLm4MopwqBBEADjYSJETS1Kvz3hiR2AvcR5gMcpxp6C121723/S -wWgBuVgsKQmnYVNMzkNhaKj5qWOak5jXq1py751jkGKkVUwSkVQwjMr99A06fNE+ -p0k1XjA36flRSzQgh3vcOTTutXaLe1TfEHC3TWOaXu30/S5ptkpcHFfBLSoVhZ3o -2PN5/3WcRvHL30vvLW7noB5wH32l0AzSHVnZ5cFqlNH5M00HrlPOH+Uy5WfYy684 -V7zyOpg+J7DdJQNS7HBGjSNdK738HUdxWHkNuxaK2HEuzc9YyWy6fpPrefY1z9nH -+H3pgmr4UxiUf0+LbYvL9xcaN265S1RIvx7QJJq7iTwZYtg/qc+SRfgVpvXUr40X -W3bTEO1baPeVpydhLMWyqReN1i3tClTG3uaVNYX5adqaaqBCaKyXexiHrSFJzaIb -mikACoQEFsh2acP+2cp8oCVGS5vdwEfkWfZSld4KfM/v37aDb4Mwq9Ap9/OAHwSt -RWONXZFWftgfhHXnem/iUswob+O+SvF2CSCs7cCqcB5gS0RZTsV3eiRfPbZTSSQD -xz95R4lZ2NIt99vDKi1NWrbIfTletCnYaOahKkC5bHqlzjZ10VKCOkYUBXyewSPy -4d+RCxlF9T6Pya0NKLjKEJwUG67Nr79w9OR6mVWR0e8f+ppw41ApUih3a3sLTuWl -DJFkJiYEL/EwBoAaAtfnMxqlPi6BXAJQXWngS8XMTmksr1PCVovFrr57e0tIyaLt -X4pDpxmElysDbZqLtpDtFU7OU4pMimSmSmQ= -=NBYN +hQIMA+yVXrx81qjVAQ/+LlxKCUSXoeouLcdeA1hA6N52r66XXUmak1hdMuII2d1u +uOfnYaC6uhjohbGF+OoSS/bMSmTz2rSDaSKJFzFyjcB8HMV65ZBb/4dg7ujdugXI +47dkqvwJC/ipJ8FC86sXYVSVCPNHyvOfU8vA0F289v+40UJPWv8ocIM+ZCeCblxD +CK+FCpdVVWF5j20qn1CxlUWxUs4d2ztogYUKoWNUy2grKENhEmkqRkCYk85Macmn +zsO0tpRUuFlt3Lj07l2BGLb6ZIh2sRis/rv4NGLUgdwS+j3hLVQCcWiKZmhWdDcQ +KcNg2LdR95O6izwX9K2GAP9go5RSDc+kSnz5o0w0DepxDu75lf5cL77ndaTY9Bi/ +JdK1qE1VHrNRuJ1iOn2dDxFlQfFj2MnVABtG6h7BBlTQwz7lumYeuL4gM2m/Y5U9 +0p5/bSkt2ANIVCI+C8cukbMAdVaFxrUZ0J+Ir+RXnyF28ECBVfFfP6r4wLXYdbOp ++4sNo2x9wuBED1Qhkxp1lesRE1MUN9seJXMYM48HLDuRluSo+RQeK2FS1uc5c9kY +Ozjq3xehK7RqI0kBD5eW+BQzOrkq+YmMy7kYlH4uFx43tsE1Ie4BeEex3SReQcO1 +9BsNZPqEvd9eoa6hg/6rtiM7LCL3qs6xKUG3St1scw39O0oz4b2vpMZqw5dd8XuF +AYwD4gO8x2JTLcUBC/4lwe4w+sFiOiweYXUSDna+hDctogknBjx2e6vKxEmub87d +EMHjG2RIjbIOEu2Heyb24SphqSxe/dqi9vkj5hldUyN6ZLAcqOmYflGlLMkQN321 +Vn7fGnQM8da3n5tc3WBL4AdgmXhgj9bTbnVGiXL10MUGxkBtnc4hkGQwVMhyauot +02Sahrh0f9miunzbvH3Y00lZFc60ZOxInoIQdoBViEQ4pJztUHHrn5JKf2ajkGZS +e+PAwp0zi2JVl+2Rf039FRdghKeDdvZYobNV0GsBsRpbO5L5el+FHAZQwc/Yo7ya +AMhGb6Ewz/Lk5pWq4PbPJOUY3MvYrJOjDyCOz6DDEnuo5eoHwq2KmGGnkiiZ29Kf +dkcEsbxCM8twJa7N7LoBsGFesLw6uTz2BoIFVyTAHgxVxm85X5suiMgoPdxESXTj +gKY27mzessrxBoYMGjTThLJEOI4V4jlznA/1JJks24setxf03qd1FK5/dXNe87+I +3uFkNPUsyK7D5FtEMgbSw+gBAJW493F1qUTGrU5KmgNo94ApQcC9fKUwMzGbcLa6 +P43SxaM4qdq9gx9uIrjzAH4EZX7BE1H96pJfYrgoswdvPvGSjM4OYVxOANieN5xo +dkwQ1vHifSZ/xmEU6XdJPLEWr8oSFUhjjpd4C5jL2Xq9QLS/rLkyuV8ONck/FZkR +fQoNmLCWsllW1BpTlxArGUvwJsrR+l2/PXyU6VVXj8ntb1Wjl6MiL+JTv7vkPNyH +C56eoKORca0EtScVDMhIPWfn8wdeoroPr9eoSvyL/Dcol7spkHVbQ5jITwSwS9F8 +wUw9dxOn6chwbZqwSe7Sg/npNwaq+b0TEjGhwChu3vNIC4IgjOZYkkzGkC7z75Cq +9boUEvfo9Z4SO91PjKdrs8D+t/X5znqy+TmH0Ovr5y7FRqlZs7uf/CqeuSGNkomI +89x6aXM+081w/6zme1rnoPrMbTTLwuEX2wJ9Z4s9Zq8BrkC19h9cmKhZyd8yb9NU +KENQUdfSiNjmjLhT3vafPRvIt5nMyDmq/fir+e5fCHZS69+SoLm5x1U2VHD1NoBB +KvH8l8o5l4zBKsD1C1LiNzcIZ39N+xl83aFk1Y0WaKX/PFubztHj2iHKtaGBjJLk +OL/3kmQhNW8XWjS9swbrxIYRVfTLXoQ4npMCxY1dvViWpt0r7PbxJMcbjG1adEvk +HsmPQUhSHgjxaezd1it7kYu1GpgNEHW2grKMDt23p2QUEuU6beqrQ84A2HgCYei0 +TqUXk3W1NXAZAe9rSwJgwBBWidLfXGgNAoP0dDG1d9ANYFktC9gIt1ZLDPZWxs/x +v/dfMaO3/+C80ON5B1eK/ZpFc4WKboZMa9Aqzwav3XnXok/w+nazLa+FsgoROxSh +ZDO16Khr3hQ2bPf53Cj7FGJRUfmi3Jt/2na4rSrvjjhG6nNgZurIJE7ZW/ggIJ6f +GjdG0Ni8tzpTk5thI05gHDdY8JLZ/zwVZ1yUrhS5n9azDam2Oo+M4L20nxjrMnfE +nGNiYLZKpCn63y5W19eznm/8gPjp1Jh9UIhXrtii+a2rIXK9z6Y2a9oPqnxsO7s0 +dGgFLa/Wb7WHAfEmuJ5H0T+pRP22cVK7bxKvgRxhq8INTUCpm+I6dCXx3KU+v2XX +cp0/WK4KPDiEIlGjyVZBcF08wvmNG4yEtNqaJQ21FPrBE3reLq08gDdEvMdg5FDh +CPbexx0yoMiPU16SC7fPGo27j22OYQaWlMQBSA+951NWAMhdRY7c+5ehIO62aChn +/w7ww8Rxx6BBc4meBROtPnyCb4b/PMkWrmFp3h8qeUvvLKsxwrd32rglw332KrTz +F2Amnc7eiS9N7Y5uxjx6AOpIDyNovGpShY+ReFUp2kUnClMrQERz/gBF8SdFiBZj +Ud1V1FR7HoSp3rVpHUzv6c12DoyQiUkOOzJ6oCHV9NnOhB349wKtTpo671v5h6sK +dx6v9bCwKEFmRGZd6Vb+v7u0VY/t4I9iOQiGJm57Y0jUAS7HNxVMXEUgCrWXfzJh +T3enPB81c2Ohsp0FBVuxU+FucBY2B4h6qtcG3Uyne/Gq4TcWRYlt5/Em6IXojprm +0I6oD0UBjnXA +=OCjq -----END PGP MESSAGE----- diff --git a/.profile b/.profile index acb8299..cb09e87 100644 --- a/.profile +++ b/.profile @@ -5,6 +5,6 @@ PATH=~/bin:$PATH:~/go/bin [ "${SHELL##*/}" = bash ] && . ~/.bashrc # Last action: auto start X11 when logged on first console -#case $HOSTNAME in -#([sS]wift|yoda) [ "$(tty)" != /dev/tty1 ] || exec startx ;; -#esac +case $HOSTNAME in +([sS]wift|yoda) [ "$(tty)" != /dev/tty1 ] || exec startx ;; +esac diff --git a/.vimrc b/.vimrc index 68ae82a..1380fe8 100644 --- a/.vimrc +++ b/.vimrc @@ -8,7 +8,7 @@ filetype plugin on filetype plugin indent on let mapleader = "," -set rtp+=/opt/homebrew/opt/fzf +" set rtp+=/opt/homebrew/opt/fzf let g:fzf_preview = 'cat {}' " vimki plugin diff --git a/.xinitrc b/.xinitrc index 92f75e1..2ab853e 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,4 +1,10 @@ #!/bin/sh + +. /etc/X11/xinit/xinitrc.d/50-systemd-user.sh +#eval $(ssh-agent) +eval $(gnome-keyring-daemon --start) +export SSH_AUTH_SOCK + # start pulseaudio on crux only. Should be handled by systemd on arch #pulseaudio --start --exit-idle-time=-1 --log-target=syslog & @@ -20,5 +26,5 @@ xsetroot -solid rgb:1/3/4 #slock # Start window manager -exec fvwm -#exec i3 +#exec fvwm +exec i3 diff --git a/bin/backup b/bin/backup index 72c69c3..3964927 100755 --- a/bin/backup +++ b/bin/backup @@ -1,36 +1,47 @@ #!/bin/sh -# Incremental backup using rsync(1). -[ "$USER" = root ] || exec sudo "$0" "$@" +usage() { + echo "Usage: $0 [-nv] [[[user@]host]:dir] -backup() { - date=$(date +%Y%m%d_%H%M%S) - last=$(rsync --list-only "$dest/" 2>/dev/null | cut -b 47- | tail -1) +Incremental backup using rsync(1). If run as root, a full system +backup is performed. Otherwise, the user's home directory is backed. - case $last in - ([12]*) opt_link=--link-dest=../$last;; - (*) opt_link=;; - esac +Options: +-n dry-run +-v verbose - rsync -HSxa$optv --exclude-from=$ignore $opt_link / /boot "$dest/$date" -} +Files: +- $HOME/.backupignore exclude files from user backup (non root) +- /etc/backupignore exclude files from system backup (root) -dest=/.history -ignore=/etc/backup/ignore +Environment: +- BACKUP backup directory" +} -while getopts :d:i:nv opt; do +while getopts :nv opt; do case $opt in - (d) dest="$OPTARG" ;; - (i) ignore="$OPTARG" ;; (n|v) optv="$opt$optv" ;; - (*) echo "Usage: $0 [-nv] [-d [host:]dir] [clean|diff]"; exit 1 ;; + (*) usage; exit 1 ;; esac done shift $((OPTIND - 1)) -[ "$1" ] && cmd=$1 && shift || cmd="" -case $cmd in -(""|save) backup ;; -(clean) exec backup-clean ${optv+-$optv} "$dest";; -(diff) exec diffdir "$@";; +BACKUP=${1:-$BACKUP} +[ "$BACKUP" ] || { usage; exit 1; } + +[ "$USER" = root ] && + ignore=/etc/backupignore volumes='/ /boot' || + ignore="$HOME/.backupignore" volumes="$HOME" +[ -f "$ignore" ] && ignore="--exclude-from=$ignore" || ignore= + +last=$(rsync --list-only "$BACKUP/" 2>/dev/null | awk '{r=$NF} END {print r}') +case $last in +([12]*) opt_link=--link-dest=../$last;; +(*) opt_link=;; esac + +date=$(date +%Y-%m-%d-%H%M%S) + +[ "$optv" ] && echo "# Backup $volumes to $BACKUP/$date" + +exec rsync -HSxa$optv $ignore $opt_link $volumes "$BACKUP/$date" diff --git a/bin/backup-clean b/bin/backup-clean index 30d25db..1c752d9 100755 --- a/bin/backup-clean +++ b/bin/backup-clean @@ -1,89 +1,62 @@ #!/bin/sh -# backup garbage collector -[ "$USER" = root ] || exec sudo "$0" "$@" -# Durations, in number of seconds. -hd=3600 # hour duration: 60s * 60 -h12=43200 # 12h: hd * 12 -dd=86400 # day duration: hd * 24 -wd=604800 # week duration: dd * 7 -md=2592000 # month duration: dd * 30 -yd=31557600 # year duration: dd * 365.25 +usage() { + echo "Usage: $0 [-nv] [[[user@]host:]dir] -now=$(date +'%Y%m%d_%H%M%S') +$0 removes old backups and keeps: +- backups for the current day +- 1 backup per past day for the current month +- 1 backup per past month for the current year +- 1 backup per past year -# The following works only for busybox date, not coreutils -# Kept for reference only. -#date2ts() { d=${1%_*} t=${1#*_}; date -d "$d${t%??}" +%s; } +Options: +-n dry run +-v verbose -# Convert date to timestamp, using date from GNU coreutils, -# works also with busybox date. -date2ts() { - t=$1; r=${t#????}; Y=${t%$r} # Year (with century) - t=$r; r=${t#??}; m=${t%$r} # Month - t=$r; r=${t#??}; d=${t%$r} # Day - t=${r#_}; r=${t#??}; H=${t%$r} # Hour - t=$r; r=${t#??}; M=${t%$r} # Minute - S=${t#??} # Second - date -d "$Y-$m-$d $H:$M:$S" +%s - #date -jf "%Y-%m-%d %H:%M:%S" "$Y-$m-$d $H:$M:$S" +%s # BSD, MacOS (not tested) +Environment variables: +- BACKUP - backup directory" } -ts2date() { date -d "@$1" +'%Y%m%d_%H%M%S'; } - -tsn=$(date2ts "$now") - -# Minimal retention delay in seconds, according to backup age, -# implemented using POSIX shell arithmetic. -retention_delay() { - d=$((tsn - $1)) - if [ $((d < h12)) = 1 ]; then - r=0 # keep all backups in the last 12 hours - elif [ $((d < dd)) = 1 ]; then - r=$hd # keep 1 backup per hour in the last day - elif [ $((d < wd)) = 1 ]; then - r=$dd # keep 1 backup per day in the last week - elif [ $((d < md)) = 1 ]; then - r=$wd # keep 1 backup per week in the last month - elif [ $((d < yd)) = 1 ]; then - r=$md # keep 1 backup per month in the last year - else - r=$yd # keep 1 backup per year in the previous years - fi - echo $r -} - -dest=/.history -while getopts :d:nv opt; do +while getopts :nv opt; do case $opt in - (d) tsn=$(date2ts "$OPTARG") ;; - (n) optn=1 ;; - (v) optv=1 ;; - (*) echo "Usage: $0 [-nv] [dir]"; exit 1 ;; + (n) optn=echo ;; + (v) optv=-t ;; + (*) usage; exit 1 ;; esac done -shift $((OPTIND - 1)) -[ "$1" ] && dest=$1 +shift $((OPTIND -1)) -# Sorted list of backups, most recent first. -lbu=$(ls -rv "$dest") -lasy=${lbu##* +BACKUP=${1:-$BACKUP} +[ "$BACKUP" ] || { usage; exit 1; } + +host=${BACKUP%:*} dir=${BACKUP#*:} +ls='ls -r' rm="xargs -r $optv $optn rm -rf" +[ "$host" = "$dir" ] || ls="ssh $host $ls" rm="ssh $host $rm" + +[ "$optv" ] && echo "# Cleaning backups on $BACKUP" + +$ls "$dir" | +awk -v now=$(date +%Y-%m-%d) -v dir="$dir" ' +BEGIN { + yn = substr(now, 1, 4) # Year now + mn = substr(now, 6, 2) # Month now + dn = substr(now, 9, 2) # Day now } -for d in $lbu; do - tsc=$(date2ts "$d") - if ! [ "$tsp" ]; then - [ "$optv" ] && echo "keep $dest/$d" - tsp=$tsc - continue - fi - mrd=$(retention_delay "$tsp") - dp=$((tsp - tsc)) - #if [ $((dp < mrd)) = 1 ]; then - if [ "$d" != "last" -a $((dp < mrd)) = 1 ]; then - [ "$optv" ] && echo "delete $dest/$d" - [ "$optn" ] || rm -rf "${dest:?}/$d" - else - [ "$optv" ] && echo "keep $dest/$d" - tsp=$tsc - fi -done +{ + yb = substr($0, 1, 4) # Year backup + mb = substr($0, 6, 2) # Month backup + db = substr($0, 9, 2) # Day backup + $0 = dir "/" $0 + + if (yb != yn) { + if (yb in yearly) print; else yearly[yb] = 1 + next + } + if (mb != mn) { + if (mb in monthly) print; else monthly[mb] = 1 + next + } + if (db != dn) { + if (db in dayly) print; else dayly[db] = 1 + } +}' | $rm diff --git a/bin/byo b/bin/byo index bc09fb8..93bb7f0 100755 --- a/bin/byo +++ b/bin/byo @@ -26,8 +26,8 @@ yoda_uuid='8c463221-6bb7-414e-9060-c9570bb3a6bb' dest=/mnt/backup/$(hostname) [ -b /dev/mapper/yoda ] && noclose=1 || cryptsetup open "$dev" yoda findmnt /dev/mapper/yoda /mnt >/dev/null && noumount=1 || mount /dev/mapper/yoda /mnt -time backup -v -d "$dest" -[ ! "$optC" ] || backup -v -d "$dest" clean +time backup -v "$dest" +# [ ! "$optC" ] || backup -v -d "$dest" clean [ ! "$optd" ] || time duperemove -drh --hashfile="$dest/.hashfile" "$dest" df -h / "$dest" ls -v "$dest" diff --git a/bin/gauth b/bin/gauth index 53ddf30..b18f73d 100755 --- a/bin/gauth +++ b/bin/gauth @@ -1,9 +1,9 @@ #!/bin/sh # Use backup from andOTP -# gpg -qd ~/.otp_accounts.json.gpg | -cat ~/otp_accounts.json | +# cat ~/.otp_accounts.json | +gpg -qd ~/.otp_accounts.json.gpg 2>/dev/null | jq -r '.[] | "\(.label) \(.secret)"' | while read -r l s; do echo "$l $(oathtool --totp -b "$s")" -done +done | column -t diff --git a/bin/p4a b/bin/p4a new file mode 100755 index 0000000..30e54ff --- /dev/null +++ b/bin/p4a @@ -0,0 +1,3 @@ +#!/bin/sh +adb forward tcp:8222 tcp:8022 +ssh ssh://u0_a250@localhost:8222 -- cgit v1.3 From 053556962bb2d29ac76bcca51cabd1df238f80e3 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 7 Jan 2022 15:24:15 +0100 Subject: update --- .Xresources | 2 + .bashrc | 7 +- .config/i3/config | 4 +- .vim/plugin/cscope_maps.vim | 167 ++++++++++++++++++++++++++++ bin/hdmi | 8 +- bin/vm | 258 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 439 insertions(+), 7 deletions(-) create mode 100644 .vim/plugin/cscope_maps.vim create mode 100755 bin/vm (limited to '.config/i3') diff --git a/.Xresources b/.Xresources index 7ca66a3..64ab14c 100644 --- a/.Xresources +++ b/.Xresources @@ -30,6 +30,8 @@ xterm*decTerminalID: vt340 xterm*allowWindowOps : False xterm*disallowedWindowOps : 1,2,3,4,5,6,7,8,9,11,13,18,19,20,21,GetSelection,SetSelection,SetWinLines,SetXprop +! Colors optimized for a light background +! ! Black + DarkGrey *color0: #000000 *color8: #555753 diff --git a/.bashrc b/.bashrc index f20fbdd..642c6d7 100644 --- a/.bashrc +++ b/.bashrc @@ -46,6 +46,7 @@ alias cl='cf xft:Mono:size=12' alias cp='cp --reflink' alias ls='ls --color=auto -v' alias ll='ls -AlFhv' +alias more='less' alias vi='vim' alias view='vim -R' #alias op='xdg-open' @@ -131,7 +132,9 @@ unset base # Display git status in prompt . ~/.bash-powerline.sh -# export PS1='; ' +# export PS1='; ' # load Nix config files (aka auto-completion etc.) -export XDG_DATA_DIRS="$HOME/.nix-profile/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" +#export XDG_DATA_DIRS="$HOME/.nix-profile/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + +eval "$(direnv hook bash)" diff --git a/.config/i3/config b/.config/i3/config index 84f31c2..182f119 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -68,6 +68,7 @@ for_window [class="Display"] floating enable for_window [class="Feedreader"] floating enable for_window [class="feh"] floating enable for_window [class="firefox"] floating enable +for_window [class="fluent-reader"] floating enable for_window [class="Geeqie"] floating enable for_window [class="Gpicview"] floating enable for_window [class="Ghb"] floating enable @@ -79,8 +80,9 @@ for_window [class="libreoffice"] floating enable for_window [class="Liferea"] floating enable for_window [class="llpp"] floating enable for_window [class="MuPDF"] floating enable -for_window [class="Pavucontrol"] floating enable for_window [class="Org.gnome.Software"] floating enable +for_window [class="Pavucontrol"] floating enable +for_window [title="QEMU"] floating enable for_window [class="Signal"] floating enable for_window [class="Slack"] floating enable for_window [class="Spotify"] floating enable diff --git a/.vim/plugin/cscope_maps.vim b/.vim/plugin/cscope_maps.vim new file mode 100644 index 0000000..abcae71 --- /dev/null +++ b/.vim/plugin/cscope_maps.vim @@ -0,0 +1,167 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" CSCOPE settings for vim +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" +" This file contains some boilerplate settings for vim's cscope interface, +" plus some keyboard mappings that I've found useful. +" +" USAGE: +" -- vim 6: Stick this file in your ~/.vim/plugin directory (or in a +" 'plugin' directory in some other directory that is in your +" 'runtimepath'. +" +" -- vim 5: Stick this file somewhere and 'source cscope.vim' it from +" your ~/.vimrc file (or cut and paste it into your .vimrc). +" +" NOTE: +" These key maps use multiple keystrokes (2 or 3 keys). If you find that vim +" keeps timing you out before you can complete them, try changing your timeout +" settings, as explained below. +" +" Happy cscoping, +" +" Jason Duell jduell@alumni.princeton.edu 2002/3/7 +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + +" This tests to see if vim was configured with the '--enable-cscope' option +" when it was compiled. If it wasn't, time to recompile vim... +if has("cscope") + + """"""""""""" Standard cscope/vim boilerplate + + " use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t' + set cscopetag + + " check cscope for definition of a symbol before checking ctags: set to 1 + " if you want the reverse search order. + set csto=0 + + " add any cscope database in current directory + if filereadable("cscope.out") + cs add cscope.out + " else add the database pointed to by environment variable + elseif $CSCOPE_DB != "" + cs add $CSCOPE_DB + endif + + " show msg when any other cscope db added + set cscopeverbose + + + """"""""""""" My cscope/vim key mappings + " + " The following maps all invoke one of the following cscope search types: + " + " 's' symbol: find all references to the token under cursor + " 'g' global: find global definition(s) of the token under cursor + " 'c' calls: find all calls to the function name under cursor + " 't' text: find all instances of the text under cursor + " 'e' egrep: egrep search for the word under cursor + " 'f' file: open the filename under cursor + " 'i' includes: find files that include the filename under cursor + " 'd' called: find functions that function under cursor calls + " + " Below are three sets of the maps: one set that just jumps to your + " search result, one that splits the existing vim window horizontally and + " diplays your search result in the new window, and one that does the same + " thing, but does a vertical split instead (vim 6 only). + " + " I've used CTRL-\ and CTRL-@ as the starting keys for these maps, as it's + " unlikely that you need their default mappings (CTRL-\'s default use is + " as part of CTRL-\ CTRL-N typemap, which basically just does the same + " thing as hitting 'escape': CTRL-@ doesn't seem to have any default use). + " If you don't like using 'CTRL-@' or CTRL-\, , you can change some or all + " of these maps to use other keys. One likely candidate is 'CTRL-_' + " (which also maps to CTRL-/, which is easier to type). By default it is + " used to switch between Hebrew and English keyboard mode. + " + " All of the maps involving the macro use '^$': this is so + " that searches over '#include " return only references to + " 'time.h', and not 'sys/time.h', etc. (by default cscope will return all + " files that contain 'time.h' as part of their name). + + + " To do the first type of search, hit 'CTRL-\', followed by one of the + " cscope search types above (s,g,c,t,e,f,i,d). The result of your cscope + " search will be displayed in the current window. You can use CTRL-T to + " go back to where you were before the search. + " + + " MV: replace C-\ by C-, + nmap s :cs find s =expand("") + nmap g :cs find g =expand("") + nmap c :cs find c =expand("") + nmap t :cs find t =expand("") + nmap e :cs find e =expand("") + nmap f :cs find f =expand("") + nmap i :cs find i ^=expand("")$ + nmap d :cs find d =expand("") + + + " Using 'CTRL-spacebar' (intepreted as CTRL-@ by vim) then a search type + " makes the vim window split horizontally, with search result displayed in + " the new window. + " + " (Note: earlier versions of vim may not have the :scs command, but it + " can be simulated roughly via: + " nmap s :cs find s =expand("") + + " MV: replace C-@ by C-; + nmap s :scs find s =expand("") + nmap g :scs find g =expand("") + nmap c :scs find c =expand("") + nmap t :scs find t =expand("") + nmap e :scs find e =expand("") + nmap f :scs find f =expand("") + nmap i :scs find i ^=expand("")$ + nmap d :scs find d =expand("") + + + " Hitting CTRL-space *twice* before the search type does a vertical + " split instead of a horizontal one (vim 6 and up only) + " + " (Note: you may wish to put a 'set splitright' in your .vimrc + " if you prefer the new window on the right instead of the left + + nmap s :vert scs find s =expand("") + nmap g :vert scs find g =expand("") + nmap c :vert scs find c =expand("") + nmap t :vert scs find t =expand("") + nmap e :vert scs find e =expand("") + nmap f :vert scs find f =expand("") + nmap i :vert scs find i ^=expand("")$ + nmap d :vert scs find d =expand("") + + + """"""""""""" key map timeouts + " + " By default Vim will only wait 1 second for each keystroke in a mapping. + " You may find that too short with the above typemaps. If so, you should + " either turn off mapping timeouts via 'notimeout'. + " + "set notimeout + " + " Or, you can keep timeouts, by uncommenting the timeoutlen line below, + " with your own personal favorite value (in milliseconds): + " + "set timeoutlen=4000 + " + " Either way, since mapping timeout settings by default also set the + " timeouts for multicharacter 'keys codes' (like ), you should also + " set ttimeout and ttimeoutlen: otherwise, you will experience strange + " delays as vim waits for a keystroke after you hit ESC (it will be + " waiting to see if the ESC is actually part of a key code like ). + " + "set ttimeout + " + " personally, I find a tenth of a second to work well for key code + " timeouts. If you experience problems and have a slow terminal or network + " connection, set it higher. If you don't set ttimeoutlen, the value for + " timeoutlent (default: 1000 = 1 second, which is sluggish) is used. + " + "set ttimeoutlen=100 + +endif + + diff --git a/bin/hdmi b/bin/hdmi index d6f206a..e6e3094 100755 --- a/bin/hdmi +++ b/bin/hdmi @@ -2,8 +2,8 @@ # Toggle auxiliary HDMI screen on/off when connected/disconnected. opt="--auto --left-of eDP1" -#opt="--auto --right-of eDP-1" -#opt="--auto --above eDP-1" +#opt="--auto --right-of eDP1" +#opt="--auto --above eDP1" # Also add the following rule to /etc/udev/rules.d/hdmi.rules # KERNEL=="card0", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/marc/.Xauthority", RUN+="/home/marc/bin/hdmi" @@ -11,5 +11,5 @@ opt="--auto --left-of eDP1" # wait for the screen to settle sleep 3 -xrandr | grep -q 'HDMI1 connected' || opt="--off" -xrandr --output HDMI1 $opt +xrandr | grep -q '^DP1 connected' || opt="--off" +xrandr --output DP1 $opt diff --git a/bin/vm b/bin/vm new file mode 100755 index 0000000..8b4da42 --- /dev/null +++ b/bin/vm @@ -0,0 +1,258 @@ +#!/bin/sh + +# Manage virtual machines +# +# Prereq: +# - curl +# - cdrtools (isoinfo) +# - expect +# - qemu +# - screen +# +# TODO: +# - extract bzImage and initrd.gz with isoinfo +# - ssh scripts to finish install (once ssh is ready) +# +# DONE: +# - setup vde and networking +# - setup ssh keys so it is possible to ssh in vm from host +# +unset CDPATH +export LC_ALL=C IFS=' +' + +version='vm-0.1' + +arch=$(uname -m) +sys=$(uname -s) +alpine_version='3.15.0' +pubkey=$HOME/.ssh/id_rsa.pub +dir="${VM_DIR:-$HOME/.vm}" + +console() { + usage 'console name' 'Attach a console to a virtual machine' && return + [ "$1" ] || die "missing argument" + is_running "$1" && screen -r "vm!$1!" +} + +create() { + usage 'create [-s size] name' 'Create an alpinelinux disk image' && return + size=8g + while getopts :s: opt; do + case $opt in + s) size=$OPTARG ;; + *) Opth=2 create_alpine_image; return ;; + esac + done + shift $((OPTIND - 1)) + [ -d "$dir/$1" ] && die "create failed: $dir/$1 already exists" + mkdir "$dir/$1" + cd "$dir/$1" || die "create failed: invalid directory $dir/$1" + qemu-img create "$1.raw" "$size" || die "create failed" + mac=$(new_macaddr) + ip=$(new_ip) + hdd="$1.raw" + echo "hdd=$hdd +mac=$mac +ip=$ip" >> config + + # Before install do not use virtio, as devices may not recognized as bootable + # TODO: alternate way: extract kernel and initrd files and pass them directly to qemu + screen -S "vm!$1!" -d -m qemu-system-$arch -nographic \ + -cdrom ../alpine-iso/alpine-virt-$alpine_version-$arch.iso \ + -hdd "$hdd" -net nic,macaddr=$mac -net vde + setup_alpine "$1" + post_setup_alpine "$1" +} + +die() { [ "$1" ] && echo "$0: $*" >&2; exit 1; } + +help() { + usage 'help' 'Print this help text' && return + printf "$version\n Manage virtual machines\n\nUsage: vm command [options] [args]\n" + Opth=1; for c in $Cmdlist; do $c; done +} + +init() { + mkdir -p "$dir" +} + +init_alpine_iso() { + usage init_alpine_iso '' && return + mkdir -p "$dir/alpine-iso" + iso_url="https://dl-cdn.alpinelinux.org/alpine/v${alpine_version%.*}/releases/$arch" + iso="alpine-virt-$alpine_version-$arch.iso" + cd "$dir/alpine-iso" + [ -f "$iso" ] || curl -LO "$iso_url/$iso" || rm -f "$iso" + echo "iso=$iso +" > config + echo 10 > ../index +} + +is_running() { screen -ls "vm!$1!" >/dev/null 2>&1; } + +ls() { + usage 'ls' 'list virtual machines' && return + init && cd "$dir" || die "could not change dir to $dir" + for i in */; do + i=${i%/} + [ "$i" = '*' ] && continue + is_running "$i" && state=active || state=stopped + printf "%-20s %s\n" "$i" "$state" + done +} + +new_ip() { + read index < $dir/index + index=$((index + 1)) + echo "$index" > $dir/index + echo "10.0.2.$index/24" +} + +new_macaddr() { printf 'de:ad:be:ef:%02x:%02x\n' $((RANDOM % 256)) $((RANDOM % 256)); } + +pidof() { + usage 'pidof name' 'print the PID of a virtual machine' && return + p=$(screen -ls "vm!$1!" | awk 'NR==2 {print substr($1, 1, index($1, ".")-1)}') + [ "$p" ] && pgrep -P $p +} + +post_setup_alpine() { + start "$1" + read proto key id < "$pubkey" + # echo ' + expect -c ' + set timeout -1 + spawn screen -x "vm!'$1'!" + expect { + " login: " { send "root\r"; exp_continue } + "Password: " { send "root\r"; exp_continue } + ":~# " + } + send "mkdir -pm 0700 .ssh\r" + expect ":~# " + send "echo '$proto' '$key' '$id' >.ssh/authorized_keys\r" + expect ":~# " + send "exit\r" + ' +} + +# setup_alpine automates alpine installation from iso to image. +# When done, base image system is ready, with storage and network up. +# No user nor ssh access configured yet. +# TODO: custom network (in case of no dhcp). +setup_alpine() { + usage 'setup_alpine' && return + expect -c ' + set timeout -1 + spawn screen -x "vm!'$1'!" + expect { + "localhost login: " { send "root\r"; exp_continue } + "localhost:~# " { send "SWAP_SIZE=0 setup-alpine\r"; exp_continue } + "Select keyboard layout: " { send "\r"; exp_continue } + "Enter system hostname" { send "'$1'\r"; exp_continue } + "Which one do you want to initialize?" { send "\r"; exp_continue } + "Ip address for eth0?" { send "'$ip'\r"; exp_continue } + "Gateway?" { send "10.0.2.2\r"; exp_continue } + "manual network configuration?" { send "\r"; exp_continue } + "DNS domain name?" { send "lan\r"; exp_continue } + "DNS nameserver(s)?" { send "10.0.2.2 1.1.1.1\r"; exp_continue } + "New password:" { send "root\r"; exp_continue } + "Retype password:" { send "root\r"; exp_continue } + "Which timezone are you in?" { send "\r"; exp_continue } + "HTTP/FTP proxy URL?" { send "\r"; exp_continue } + "Enter mirror number " { send "\r"; exp_continue } + "Which SSH server?" { send "\r"; exp_continue } + "Which disk(s) would you like to use?" { send "sda\r"; exp_continue } + "How would you like to use it?" { send "sys\r"; exp_continue } + "Erase the above disk(s) and continue?" { send "y\r"; exp_continue } + "Installation is complete" { send "poweroff\r" } + } + interact + ' +} + +start_vde() { + usage start_vde && return + sudo sh <<- EOT + vde_switch -tap tap0 -sock /tmp/vde.ctl -daemon -mod 666 + sleep 1 + ip address add 10.0.2.2/24 dev tap0 + ip link set tap0 up + echo 1 > /proc/sys/net/ipv4/ip_forward + iptables -t nat -A POSTROUTING -s 10.0.2.0/24 -o eth0 -j MASQUERADE + iptables -t nat -A POSTROUTING -s 10.0.2.0/24 -o wlan0 -j MASQUERADE + EOT + #slirpvde --dhcp --daemon +} + +stop_vde() { + # killall slirpvde + sudo sh <<- EOT + iptables -t nat -D POSTROUTING -s 10.0.2.0/24 -o eth0 -j MASQUERADE + iptables -t nat -D POSTROUTING -s 10.0.2.0/24 -o wlan0 -j MASQUERADE + ip link set tap0 down + killall vde_switch + EOT +} + +start() { + usage 'start [-acd] name' 'start a virtual machine' && return + while getopts :acd opt; do + case $opt in + a) opta=1 ;; + c) boot=c ;; + d) boot=d ;; + esac + done + shift $((OPTIND -1)) + [ "$1" ] || die 'start failed: name missing' + cd "$dir/$1" || die "start failed: invalid directory $dir/$1" + is_running "$1" || start_qemu "$1" + [ "$opta" ] && console "$1" +} + +start_qemu() ( + opt='-nographic -cpu max' + [ "$sys" = Linux ] && opt="$opt -enable-kvm" + . ./config || die "could not source $PWD/config" + exec 1>>qemu.log 2>&1 + date +%F_%T + set -x + screen -S "vm!$1!" -d -m qemu-system-$arch $opt \ + ${smp+-smp $smp} \ + ${ram+-m $ram} \ + ${mac+-net nic,macaddr=$mac,model=virtio-net-pci} -net vde \ + ${hdd+-drive file="$hdd",if=virtio,media=disk,format=raw} \ + ${iso+-drive file="$iso",if=virtio,media=cdrom,format=raw} \ + ${boot+-boot $boot} +) + +stop() { + usage 'stop name' 'stop a virtual machine' && return + is_running "$1" && kill "$(pidof "$1")" +} + +usage() { + case $Opth in + 1) printf " %-34s %s\n" "$1" "$2" ;; + 2) printf "$0 $1\n\t$2\n" ;; + *) return 1 ;; + esac +} + +version() { + usage 'version' 'Print version' && return + echo "$version" +} + +Cmdlist='console create help init_alpine_iso ls pidof setup_alpine start start_vde stop version' +[ "$1" ] && C=$1 && shift 1 || { help; exit 1; } +#for c in $Cmdlist; do +# case $c in +# ("$C") cmd=$c; break ;; +# ("$C"*) [ "$cmd" ] && die "ambiguous command $C" || cmd=$c ;; +# esac +#done +cmd=$C +[ "$cmd" ] || { help; exit 1; } && $cmd "$@" -- cgit v1.3 From a3a3a61742950d45f1573a45a928e9b04c115634 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Thu, 3 Feb 2022 14:43:32 +0100 Subject: update --- .config/i3/config | 4 +++- .profile | 6 +++--- .xsession | 6 ++++-- bin/hdmi | 10 +++++----- bin/vm | 30 +++++++++++++++++++++++++++++- 5 files changed, 44 insertions(+), 12 deletions(-) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index 182f119..5284bcc 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -59,6 +59,8 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU # enable floating mode for_window [class="Arandr"] floating enable for_window [class="Brave-browser"] floating enable +for_window [class="Blueberry.py"] floating enable +for_window [class="Blueman-manager"] floating enable for_window [class="Chromium"] floating enable for_window [title="Task Manager - Chromium"] floating enable for_window [title="Gestionnaire de tâches – Chromium"] floating enable @@ -68,7 +70,7 @@ for_window [class="Display"] floating enable for_window [class="Feedreader"] floating enable for_window [class="feh"] floating enable for_window [class="firefox"] floating enable -for_window [class="fluent-reader"] floating enable +for_window [class="fluent-reader"] floating enable border normal for_window [class="Geeqie"] floating enable for_window [class="Gpicview"] floating enable for_window [class="Ghb"] floating enable diff --git a/.profile b/.profile index cb09e87..acb8299 100644 --- a/.profile +++ b/.profile @@ -5,6 +5,6 @@ PATH=~/bin:$PATH:~/go/bin [ "${SHELL##*/}" = bash ] && . ~/.bashrc # Last action: auto start X11 when logged on first console -case $HOSTNAME in -([sS]wift|yoda) [ "$(tty)" != /dev/tty1 ] || exec startx ;; -esac +#case $HOSTNAME in +#([sS]wift|yoda) [ "$(tty)" != /dev/tty1 ] || exec startx ;; +#esac diff --git a/.xsession b/.xsession index 92f75e1..278c5fc 100755 --- a/.xsession +++ b/.xsession @@ -2,6 +2,8 @@ # start pulseaudio on crux only. Should be handled by systemd on arch #pulseaudio --start --exit-idle-time=-1 --log-target=syslog & +eval $(ssh-agent) + # enable tapping and natural scrolling on touchpad # see xinput --list[-props] for ids xinput --set-prop 'SYNA7DAB:00 06CB:CD40 Touchpad' 'libinput Tapping Enabled' 1 @@ -20,5 +22,5 @@ xsetroot -solid rgb:1/3/4 #slock # Start window manager -exec fvwm -#exec i3 +#exec fvwm +exec i3 diff --git a/bin/hdmi b/bin/hdmi index e6e3094..0a81716 100755 --- a/bin/hdmi +++ b/bin/hdmi @@ -1,9 +1,9 @@ #!/bin/sh # Toggle auxiliary HDMI screen on/off when connected/disconnected. -opt="--auto --left-of eDP1" -#opt="--auto --right-of eDP1" -#opt="--auto --above eDP1" +opt="--auto --left-of eDP-1" +#opt="--auto --right-of eDP-1" +#opt="--auto --above eDP-1" # Also add the following rule to /etc/udev/rules.d/hdmi.rules # KERNEL=="card0", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/marc/.Xauthority", RUN+="/home/marc/bin/hdmi" @@ -11,5 +11,5 @@ opt="--auto --left-of eDP1" # wait for the screen to settle sleep 3 -xrandr | grep -q '^DP1 connected' || opt="--off" -xrandr --output DP1 $opt +xrandr | grep -q '^DP-1 connected' || opt="--off" +xrandr --output DP-1 $opt diff --git a/bin/vm b/bin/vm index 8b4da42..35a107e 100755 --- a/bin/vm +++ b/bin/vm @@ -35,13 +35,41 @@ console() { is_running "$1" && screen -r "vm!$1!" } +create_arch() { + usage 'create_arch [-s size] name' 'Create an archlinux disk image' && return + size=8g + while getopts :s: opt; do + case $opt in + s) size=$OPTARG ;; + *) Opth=2 create_arch; return ;; + esac + done + shift $((OPTIND - 1)) + [ -d "$dir/$1" ] && die "create failed: $dir/$1 already exists" + mkdir "$dir/$1" + cd "$dir/$1" || die "create failed: invalid directory $dir/$1" + qemu-img create "$1.raw" "$size" || die "create failed" + mac=$(new_macaddr) + ip=$(new_ip) + hdd="$1.raw" + echo "hdd=$hdd +mac=$mac +ip=$ip" >> config + + mkfs.ext4 "$1.raw" + mkdir -p mnt + sudo mount "$1.raw" mnt + sudo pacstrap mnt base base-devel + sudo umount mnt +} + create() { usage 'create [-s size] name' 'Create an alpinelinux disk image' && return size=8g while getopts :s: opt; do case $opt in s) size=$OPTARG ;; - *) Opth=2 create_alpine_image; return ;; + *) Opth=2 create_arch; return ;; esac done shift $((OPTIND - 1)) -- cgit v1.3 From 6c3f8a99905545cea8e36434ec01455ad8ce355f Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 21 May 2022 09:05:56 +0200 Subject: update --- .config/i3/config | 1 + .i3status.conf | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index 5284bcc..468fdfc 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -85,6 +85,7 @@ for_window [class="MuPDF"] floating enable for_window [class="Org.gnome.Software"] floating enable for_window [class="Pavucontrol"] floating enable for_window [title="QEMU"] floating enable +for_window [class="RSS Guard"] floating enable for_window [class="Signal"] floating enable for_window [class="Slack"] floating enable for_window [class="Spotify"] floating enable diff --git a/.i3status.conf b/.i3status.conf index 7590d2b..411a648 100644 --- a/.i3status.conf +++ b/.i3status.conf @@ -93,8 +93,9 @@ memory { cpu_temperature 0 { format = "🌡%degrees °C" #path = "/sys/class/hwmon/hwmon0/temp1_input" - path = "/sys/class/hwmon/hwmon6/temp1_input" + #path = "/sys/class/hwmon/hwmon6/temp1_input" #path = "/sys/class/hwmon/hwmon7/temp1_input" + #path = "/sys/class/hwmon/hwmon8/temp1_input" } tztime local { -- cgit v1.3 From 9bedd1ff5d11077241fa761a6988018c31c8d51b Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sun, 21 Aug 2022 16:09:20 +0200 Subject: update --- .bashrc | 1 + .config/i3/config | 1 + .xinitrc | 1 + 3 files changed, 3 insertions(+) (limited to '.config/i3') diff --git a/.bashrc b/.bashrc index 09ac7b2..60ed9e4 100644 --- a/.bashrc +++ b/.bashrc @@ -71,6 +71,7 @@ alias rvi='sudo vim' alias rxt='sudo xt' alias rxvi='sudo xvi' alias ww='vi ~/Wiki/home_page.md' +alias s='vi ~/Wiki/scratch.md' alias dotfiles='git --git-dir=$HOME/dotfiles --work-tree=$HOME' #alias uc='systemctl --user' diff --git a/.config/i3/config b/.config/i3/config index 468fdfc..05fb6fd 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -64,6 +64,7 @@ for_window [class="Blueman-manager"] floating enable for_window [class="Chromium"] floating enable for_window [title="Task Manager - Chromium"] floating enable for_window [title="Gestionnaire de tâches – Chromium"] floating enable +for_window [class="DeltaChat"] floating enable for_window [instance="DOTTY"] floating enable for_window [class="discord"] floating enable for_window [class="Display"] floating enable diff --git a/.xinitrc b/.xinitrc index 2ab853e..c384f84 100644 --- a/.xinitrc +++ b/.xinitrc @@ -27,4 +27,5 @@ xsetroot -solid rgb:1/3/4 # Start window manager #exec fvwm +#lxpolkit exec i3 -- cgit v1.3 From 21d2bd0a3bebcec2cf6adab854d96196f59463ce Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Mon, 22 Aug 2022 15:04:00 +0200 Subject: update --- .config/i3/config | 2 ++ .vimrc | 2 +- bin/start_godoc | 4 +++- swift/boot/loader/entries/arch.conf | 5 +++++ swift/boot/loader/entries/arch2.conf | 7 +++++++ swift/boot/loader/loader.conf | 3 +++ swift/etc/X11/xorg.conf.d/10-input.conf | 6 ++++++ swift/etc/X11/xorg.conf.d/10-keyboard.conf | 6 ++++++ swift/etc/X11/xorg.conf.d/20-intel.conf | 4 ++++ swift/etc/fstab | 14 ++++++++++++++ swift/etc/qemu/bridge.conf | 1 + swift/etc/systemd/network/20-wired.network | 8 ++++++++ swift/etc/systemd/network/25-wireless.network | 8 ++++++++ swift/etc/systemd/network/bind.network | 5 +++++ swift/etc/systemd/network/bridge.netdev | 4 ++++ swift/etc/systemd/network/bridge.network | 5 +++++ swift/etc/systemd/resolved.conf | 3 +++ 17 files changed, 85 insertions(+), 2 deletions(-) create mode 100755 swift/boot/loader/entries/arch.conf create mode 100755 swift/boot/loader/entries/arch2.conf create mode 100755 swift/boot/loader/loader.conf create mode 100644 swift/etc/X11/xorg.conf.d/10-input.conf create mode 100644 swift/etc/X11/xorg.conf.d/10-keyboard.conf create mode 100644 swift/etc/X11/xorg.conf.d/20-intel.conf create mode 100644 swift/etc/fstab create mode 100644 swift/etc/qemu/bridge.conf create mode 100644 swift/etc/systemd/network/20-wired.network create mode 100644 swift/etc/systemd/network/25-wireless.network create mode 100644 swift/etc/systemd/network/bind.network create mode 100644 swift/etc/systemd/network/bridge.netdev create mode 100644 swift/etc/systemd/network/bridge.network create mode 100644 swift/etc/systemd/resolved.conf (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index 05fb6fd..ff15c0d 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -58,6 +58,7 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU # enable floating mode for_window [class="Arandr"] floating enable +for_window [class="Asunder"] floating enable for_window [class="Brave-browser"] floating enable for_window [class="Blueberry.py"] floating enable for_window [class="Blueman-manager"] floating enable @@ -85,6 +86,7 @@ for_window [class="llpp"] floating enable for_window [class="MuPDF"] floating enable for_window [class="Org.gnome.Software"] floating enable for_window [class="Pavucontrol"] floating enable +for_window [class="Picard"] floating enable for_window [title="QEMU"] floating enable for_window [class="RSS Guard"] floating enable for_window [class="Signal"] floating enable diff --git a/.vimrc b/.vimrc index 858bc52..cf4a9e4 100644 --- a/.vimrc +++ b/.vimrc @@ -3,7 +3,7 @@ "set t_te= t_ti= set ls=1 ruler set ai ts=4 sw=4 noet -set mouse=a +"set mouse=a syntax off filetype on filetype plugin on diff --git a/bin/start_godoc b/bin/start_godoc index 6433377..c6a716b 100755 --- a/bin/start_godoc +++ b/bin/start_godoc @@ -1,3 +1,5 @@ #!/bin/sh -/home/marc/go/bin/godoc >/tmp/godoc.out 2>&1 & +# Start a godoc server on port 6060 + +exec /home/marc/go/bin/godoc >/tmp/godoc.out 2>&1 & diff --git a/swift/boot/loader/entries/arch.conf b/swift/boot/loader/entries/arch.conf new file mode 100755 index 0000000..5392c64 --- /dev/null +++ b/swift/boot/loader/entries/arch.conf @@ -0,0 +1,5 @@ +title Yoda Arch Linux +linux /vmlinuz-linux +initrd /intel-ucode.img +initrd /initramfs-linux.img +options root=/dev/disk/by-uuid/8c89d665-a17b-47da-aa19-4c855f134d54 net.ifnames=0 rw acpi_osi=Linux acpi_backlight=video diff --git a/swift/boot/loader/entries/arch2.conf b/swift/boot/loader/entries/arch2.conf new file mode 100755 index 0000000..69d70b6 --- /dev/null +++ b/swift/boot/loader/entries/arch2.conf @@ -0,0 +1,7 @@ +title Yoda2 Arch Linux +linux /vmlinuz-linux +initrd /intel-ucode.img +initrd /initramfs-linux.img +#options root=/dev/disk/by-uuid/8c89d665-a17b-47da-aa19-4c855f134d54 net.ifnames=0 rw acpi_osi=Linux acpi_backlight=video +options root=/dev/disk/by-uuid/fd0bd5d9-abfd-46e2-bbec-cc5042c19507 net.ifnames=0 rw acpi_osi=Linux acpi_backlight=video +#options root=/dev/disk/by-uuid/fd0bd5d9-abfd-46e2-bbec-cc5042c19507 net.ifnames=0 rw acpi_osi=Linux acpi_backlight=video snd_sof_intel_hda_common.hda_model=alc255-acer diff --git a/swift/boot/loader/loader.conf b/swift/boot/loader/loader.conf new file mode 100755 index 0000000..340ea34 --- /dev/null +++ b/swift/boot/loader/loader.conf @@ -0,0 +1,3 @@ +default arch2 +timeout 4 +console-mode max diff --git a/swift/etc/X11/xorg.conf.d/10-input.conf b/swift/etc/X11/xorg.conf.d/10-input.conf new file mode 100644 index 0000000..d719095 --- /dev/null +++ b/swift/etc/X11/xorg.conf.d/10-input.conf @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "HP 3 button mouse" + Driver "libinput" + Option "ScrollMethod" "button" + Option "ScrollButton" "2" +EndSection diff --git a/swift/etc/X11/xorg.conf.d/10-keyboard.conf b/swift/etc/X11/xorg.conf.d/10-keyboard.conf new file mode 100644 index 0000000..131f8f3 --- /dev/null +++ b/swift/etc/X11/xorg.conf.d/10-keyboard.conf @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "Keyboard Defaults" + MatchIsKeyboard "yes" + Option "XkbLayout" "fr" + Option "XkbOptions" "caps:super,altwin:menu_win" +EndSection diff --git a/swift/etc/X11/xorg.conf.d/20-intel.conf b/swift/etc/X11/xorg.conf.d/20-intel.conf new file mode 100644 index 0000000..28e460c --- /dev/null +++ b/swift/etc/X11/xorg.conf.d/20-intel.conf @@ -0,0 +1,4 @@ +Section "ServerLayout" + Identifier "Main" + Option "Xinerama" "0" +EndSection diff --git a/swift/etc/fstab b/swift/etc/fstab new file mode 100644 index 0000000..00d3167 --- /dev/null +++ b/swift/etc/fstab @@ -0,0 +1,14 @@ +# /dev/nvme1n1p5 +UUID=fd0bd5d9-abfd-46e2-bbec-cc5042c19507 / xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 1 + +# /dev/nvme1n1p1 +UUID=120F-B472 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2 + +# /dev/nvme1n1p3 +UUID=E23C1C4C3C1C1DDB /mnt/windows ntfs-3g gid=1000,uid=1000,dmask=022,fmask=133,noauto 0 0 + +# /dev/nvme0n1p1 +UUID=8c89d665-a17b-47da-aa19-4c855f134d54 /data xfs rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota 0 2 + +# Sony walkman NW-A55L external flash +/dev/sdb1 /mnt/sdb1 exfat noauto,gid=20,uid=501,dmask=002,fmask=113 0 0 diff --git a/swift/etc/qemu/bridge.conf b/swift/etc/qemu/bridge.conf new file mode 100644 index 0000000..a573665 --- /dev/null +++ b/swift/etc/qemu/bridge.conf @@ -0,0 +1 @@ +allow virbr0 diff --git a/swift/etc/systemd/network/20-wired.network b/swift/etc/systemd/network/20-wired.network new file mode 100644 index 0000000..9ac4295 --- /dev/null +++ b/swift/etc/systemd/network/20-wired.network @@ -0,0 +1,8 @@ +[Match] +Name=e* + +[Network] +DHCP=ipv4 + +[DHCP] +RouteMetric=10 diff --git a/swift/etc/systemd/network/25-wireless.network b/swift/etc/systemd/network/25-wireless.network new file mode 100644 index 0000000..3bb9c39 --- /dev/null +++ b/swift/etc/systemd/network/25-wireless.network @@ -0,0 +1,8 @@ +[Match] +Name=wl* + +[Network] +DHCP=ipv4 + +[DHCP] +RouteMetric=20 diff --git a/swift/etc/systemd/network/bind.network b/swift/etc/systemd/network/bind.network new file mode 100644 index 0000000..c0313fe --- /dev/null +++ b/swift/etc/systemd/network/bind.network @@ -0,0 +1,5 @@ +[Match] +Name=wl* + +[Network] +Bridge=br0 diff --git a/swift/etc/systemd/network/bridge.netdev b/swift/etc/systemd/network/bridge.netdev new file mode 100644 index 0000000..fe9c2ad --- /dev/null +++ b/swift/etc/systemd/network/bridge.netdev @@ -0,0 +1,4 @@ +[NetDev] +Name=br0 +Kind=bridge +MACAddress=3c:f0:11:73:77:51 diff --git a/swift/etc/systemd/network/bridge.network b/swift/etc/systemd/network/bridge.network new file mode 100644 index 0000000..684ce83 --- /dev/null +++ b/swift/etc/systemd/network/bridge.network @@ -0,0 +1,5 @@ +[Match] +Name=br0 + +[Network] +Address=10.0.2.1/24 diff --git a/swift/etc/systemd/resolved.conf b/swift/etc/systemd/resolved.conf new file mode 100644 index 0000000..186c2ec --- /dev/null +++ b/swift/etc/systemd/resolved.conf @@ -0,0 +1,3 @@ +[Resolve] +DNSSEC=no +DNSOverTLS=no -- cgit v1.3 From 8eb6076d992378ef9fbdd54fd46ed2be88d9d1a3 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Tue, 23 Aug 2022 10:17:37 +0200 Subject: update --- .config/i3/config | 1 + 1 file changed, 1 insertion(+) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index ff15c0d..ac85a15 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -57,6 +57,7 @@ bindsym $mod+KP_Enter exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ to bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status # enable floating mode +for_window [class="aft-linux-qt"] floating enable for_window [class="Arandr"] floating enable for_window [class="Asunder"] floating enable for_window [class="Brave-browser"] floating enable -- cgit v1.3 From bbe7b2670d2900dfdd260447b5d79eead21427d7 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Thu, 25 Aug 2022 17:41:44 +0200 Subject: update --- .config/i3/config | 1 + swift/etc/modprobe.d/swift5.conf | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 swift/etc/modprobe.d/swift5.conf (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index ac85a15..7f094d2 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -87,6 +87,7 @@ for_window [class="llpp"] floating enable for_window [class="MuPDF"] floating enable for_window [class="Org.gnome.Software"] floating enable for_window [class="Pavucontrol"] floating enable +for_window [class="Pcmanfm"] floating enable for_window [class="Picard"] floating enable for_window [title="QEMU"] floating enable for_window [class="RSS Guard"] floating enable diff --git a/swift/etc/modprobe.d/swift5.conf b/swift/etc/modprobe.d/swift5.conf new file mode 100644 index 0000000..bda0f22 --- /dev/null +++ b/swift/etc/modprobe.d/swift5.conf @@ -0,0 +1,10 @@ +#options snd_hda_intel model=dell-headset-multi +#options snd_hda_intel power_save=1 +#options snd-intel-dspcfg dsp_driver=1 +options snd_sof_intel_hda_common hda_model=alc255-acer + +options i915 enable_fbc=1 +options i915 enable_psr=1 disable_power_well=0 +options i915 modeset=1 + +#blacklist snd_soc_skl -- cgit v1.3 From 5e90fa775e4c654d5383e7a14876dde51ee94913 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 26 Aug 2022 15:45:27 +0200 Subject: update --- .config/i3/config | 5 +- .fvwm2rc | 5 +- .local/share/applications/thunderbird.desktop | 173 ++++++++++++++++++++++++++ .xsession | 3 +- 4 files changed, 181 insertions(+), 5 deletions(-) create mode 100644 .local/share/applications/thunderbird.desktop (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index 7f094d2..563bd4c 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -37,7 +37,7 @@ exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -c 000000 --nofork # Notification daemon (see ~/.config/dunst/dunstrc for configuration) exec --no-startup-id dunst -bindsym $mod+a exec --no-startup-id dunstctl action +#bindsym $mod+a exec --no-startup-id dunstctl action bindsym $mod+c exec --no-startup-id dunstctl context bindsym $mod+n exec --no-startup-id dunstctl close bindsym $mod+twosuperior exec --no-startup-id dunstctl history-pop @@ -95,11 +95,11 @@ for_window [class="Signal"] floating enable for_window [class="Slack"] floating enable for_window [class="Spotify"] floating enable for_window [class="Thunderbird"] floating enable +for_window [class="UXTerm"] floating enable for_window [class="vlc"] floating enable for_window [instance="wish"] floating enable for_window [class="wpa_gui"] floating enable for_window [class="XVroot"] floating enable -#for_window [class="XTerm"] floating enable for_window [class="zoom"] floating enable bindsym button3 floating toggle @@ -109,6 +109,7 @@ floating_modifier $mod # start a terminal bindsym $mod+Return exec --no-startup-id xt +bindsym $mod+a exec --no-startup-id uxterm # kill focused window bindsym $mod+Shift+a kill diff --git a/.fvwm2rc b/.fvwm2rc index fac2b23..e8b061b 100644 --- a/.fvwm2rc +++ b/.fvwm2rc @@ -127,8 +127,9 @@ AddToMenu "Utilities" + "&Xterm" Exec exec xt + "&Black Xterm" Exec exec bxt + "&Top" Exec exec xt -T Top -n Top -e /bin/top -+ "&Web" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache +#+ "&Web" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache #+ "&Web" Exec exec brave ++ "&Web" Exec exec firefox #+ "&Firefox" Exec exec firefox #+ "&Chromium" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache + "&Mail" Exec exec thunderbird @@ -138,7 +139,7 @@ AddToMenu "Utilities" + "&System" Popup Settings + "&Desktop" Popup Desktop-Apps + "M&ultimedia" Popup Multimedia -+ "ssh bip" Exec exec uxterm -j -sl 500 -cr red -e mosh bip +#+ "ssh bip" Exec exec uxterm -j -sl 500 -cr red -e mosh bip #+ "ssh dev.ugrid.net" Exec exec uxterm -j -sl 500 -cr red -e ssh dev.ugrid.net + "" Nop + "&Quit" Popup Quit-Verify diff --git a/.local/share/applications/thunderbird.desktop b/.local/share/applications/thunderbird.desktop new file mode 100644 index 0000000..e1e8dc0 --- /dev/null +++ b/.local/share/applications/thunderbird.desktop @@ -0,0 +1,173 @@ +[Desktop Entry] +Name=Thunderbird +Comment=Send and receive mail with Thunderbird +Comment[ast]=Lleer y escribir corréu electrónicu +Comment[ca]=Llegiu i escriviu correu +Comment[cs]=Čtení a psaní pošty +Comment[da]=Skriv/læs e-post/nyhedsgruppe med Mozilla Thunderbird +Comment[de]=E-Mails und Nachrichten mit Thunderbird lesen und schreiben +Comment[el]=Διαβάστε και γράψτε γράμματα με το Mozilla Thunderbird +Comment[es]=Lea y escriba correos y noticias con Thunderbird +Comment[fi]=Lue ja kirjoita sähköposteja +Comment[fr]=Lire et écrire des courriels +Comment[gl]=Lea e escriba correo electrónico +Comment[he]=קריאה/כתיבה של דוא״ל/חדשות באמצעות Mozilla Thunderbird +Comment[hr]=Čitajte/šaljite e-poštu s Thunderbird +Comment[hu]=Levelek írása és olvasása a Thunderbirddel +Comment[it]=Per leggere e scrivere email +Comment[ja]=メールの読み書き +Comment[ko]=Mozilla Thunderbird 메일/뉴스 읽기 및 쓰기 클라이언트 +Comment[nl]=E-mail/nieuws lezen en schrijven met Mozilla Thunderbird +Comment[pl]=Czytanie i wysyłanie e-maili +Comment[pt_BR]=Leia e escreva suas mensagens +Comment[ru]=Читайте и пишите письма +Comment[sk]=Čítajte a píšte poštu pomocou programu Thunderbird +Comment[sv]=Läs och skriv e-post +Comment[ug]=ئېلخەت ۋە خەۋەرلەرنى Mozilla Thunderbird دا كۆرۈش ۋە يېزىش +Comment[uk]=Читання та написання листів +Comment[vi]=Đọc và soạn thư điện tử +Comment[zh_CN]=阅读邮件或新闻 +Comment[zh_TW]=以 Mozilla Thunderbird 讀寫郵件或新聞 +GenericName=Mail Client +GenericName[ast]=Client de correu +GenericName[ca]=Client de correu +GenericName[cs]=Poštovní klient +GenericName[da]=E-postklient +GenericName[de]=E-Mail-Anwendung +GenericName[el]=Λογισμικό αλληλογραφίας +GenericName[es]=Cliente de correo +GenericName[fi]=Sähköpostiohjelma +GenericName[fr]=Client de messagerie +GenericName[gl]=Cliente de correo electrónico +GenericName[he]=לקוח דוא״ל +GenericName[hr]=Klijent e-pošte +GenericName[hu]=Levelezőkliens +GenericName[it]=Client email +GenericName[ja]=電子メールクライアント +GenericName[ko]=메일 클라이언트 +GenericName[nl]=E-mailprogramma +GenericName[pl]=Klient poczty +GenericName[pt_BR]=Cliente de E-mail +GenericName[ru]=Почтовый клиент +GenericName[sk]=Poštový klient +GenericName[ug]=ئېلخەت دېتالى +GenericName[uk]=Поштова програма +GenericName[vi]=Phần mềm khách quản lý thư điện tử +GenericName[zh_CN]=邮件新闻客户端 +GenericName[zh_TW]=郵件用戶端 +Exec=env MOZ_USE_XINPUT2=1 /usr/lib/thunderbird/thunderbird %u +Terminal=false +Type=Application +Icon=thunderbird +Categories=Network;Email; +MimeType=message/rfc822;x-scheme-handler/mailto;application/x-xpinstall; +StartupNotify=true +Actions=ComposeMessage;OpenAddressBook; + +[Desktop Action ComposeMessage] +Name=Write new message +Name[ar]=اكتب رسالة جديدة +Name[ast]=Redactar mensaxe nuevu +Name[be]=Напісаць новы ліст +Name[bg]=Съставяне на ново съобщение +Name[br]=Skrivañ ur gemennadenn nevez +Name[ca]=Escriu un missatge nou +Name[cs]=Napsat novou zprávu +Name[da]=Skriv en ny meddelelse +Name[de]=Neue Nachricht verfassen +Name[el]=Σύνταξη νέου μηνύματος +Name[es_AR]=Escribir un nuevo mensaje +Name[es_ES]=Redactar nuevo mensaje +Name[et]=Kirjuta uus kiri +Name[eu]=Idatzi mezu berria +Name[fi]=Kirjoita uusi viesti +Name[fr]=Rédiger un nouveau message +Name[fy_NL]=Skriuw in nij berjocht +Name[ga_IE]=Scríobh teachtaireacht nua +Name[gd]=Sgrìobh teachdaireachd ùr +Name[gl]=Escribir unha nova mensaxe +Name[he]=כתיבת הודעה חדשה +Name[hr]=Piši novu poruku +Name[hu]=Új üzenet írása +Name[hy_AM]=Գրել նոր նամակ +Name[is]=SKrifa nýjan póst +Name[it]=Scrivi nuovo messaggio +Name[ja]=新しいメッセージを作成する +Name[ko]=새 메시지 작성 +Name[lt]=Rašyti naują laišką +Name[nb_NO]=Skriv ny melding +Name[nl]=Nieuw bericht aanmaken +Name[nn_NO]=Skriv ny melding +Name[pl]=Nowa wiadomość +Name[pt_BR]=Nova mensagem +Name[pt_PT]=Escrever nova mensagem +Name[rm]=Scriver in nov messadi +Name[ro]=Scrie un mesaj nou +Name[ru]=Создать новое сообщение +Name[si]=නව ලිපියක් ලියන්න +Name[sk]=Nová e-mailová správa +Name[sl]=Sestavi novo sporočilo +Name[sq]=Shkruani mesazh të ri +Name[sr]=Писање нове поруке +Name[sv_SE]=Skriv ett nytt meddelande +Name[ta_LK]=புதிய செய்தியை எழுதுக +Name[tr]=Yeni ileti yaz +Name[uk]=Написати нового листа +Name[vi]=Viết thư mới +Name[zh_CN]=编写新消息 +Name[zh_TW]=寫一封新訊息 +Exec=env MOZ_USE_XINPUT2=1 /usr/lib/thunderbird/thunderbird -compose + +[Desktop Action OpenAddressBook] +Name=Open address book +Name[ar]=افتح دفتر العناوين +Name[ast]=Abrir llibreta de direiciones +Name[be]=Адкрыць адрасную кнігу +Name[bg]=Отваряне на адресник +Name[br]=Digeriñ ur c'harned chomlec'hioù +Name[ca]=Obre la llibreta d'adreces +Name[cs]=Otevřít Adresář +Name[da]=Åbn adressebog +Name[de]=Adressbuch öffnen +Name[el]=Άνοιγμα ευρετηρίου διευθύνσεων +Name[es_AR]=Abrir libreta de direcciones +Name[es_ES]=Abrir libreta de direcciones +Name[et]=Ava aadressiraamat +Name[eu]=Ireki helbide-liburua +Name[fi]=Avaa osoitekirja +Name[fr]=Ouvrir un carnet d'adresses +Name[fy_NL]=Iepenje adresboek +Name[ga_IE]=Oscail leabhar seoltaí +Name[gd]=Fosgail leabhar-sheòlaidhean +Name[gl]=Abrir a axenda de enderezos +Name[he]=פתיחת ספר כתובות +Name[hr]=Otvori adresar +Name[hu]=Címjegyzék megnyitása +Name[hy_AM]=Բացել Հասցեագիրքը +Name[is]=Opna nafnaskrá +Name[it]=Apri rubrica +Name[ja]=アドレス帳を開く +Name[ko]=주소록 열기 +Name[lt]=Atverti adresų knygą +Name[nb_NO]=Åpne adressebok +Name[nl]=Adresboek openen +Name[nn_NO]=Opne adressebok +Name[pl]=Książka adresowa +Name[pt_BR]=Catálogo de endereços +Name[pt_PT]=Abrir livro de endereços +Name[rm]=Avrir il cudeschet d'adressas +Name[ro]=Deschide agenda de contacte +Name[ru]=Открыть адресную книгу +Name[si]=ලිපින පොත විවෘත කරන්න +Name[sk]=Otvoriť adresár +Name[sl]=Odpri adressar +Name[sq]=Hapni libër adresash +Name[sr]=Отвори адресар +Name[sv_SE]=Öppna adressboken +Name[ta_LK]=முகவரி பத்தகத்தை திறக்க +Name[tr]=Adres defterini aç +Name[uk]=Відкрити адресну книгу +Name[vi]=Mở sổ địa chỉ +Name[zh_CN]=打开通讯录 +Name[zh_TW]=開啟通訊錄 +Exec=env MOZ_USE_XINPUT2=1 /usr/lib/thunderbird/thunderbird -addressbook diff --git a/.xsession b/.xsession index ea74ab4..6d4b699 100755 --- a/.xsession +++ b/.xsession @@ -17,7 +17,8 @@ hdmi xrdb ~/.Xresources #xsetroot -solid rgb:3/4/5 -xsetroot -solid rgb:1/3/4 +#xsetroot -solid rgb:1/3/4 +feh --bg-fill ~/night1.jpg #feh --bg-fill ~/Downloads/Alaska_Range.jpg #conky #slock -- cgit v1.3 From 8f53ffef1295dabee8fd296a5f5cc9c849935af0 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 27 Aug 2022 15:25:58 +0200 Subject: update --- .config/i3/config | 4 ++-- bin/gauth | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index 563bd4c..470f819 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -37,7 +37,7 @@ exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -c 000000 --nofork # Notification daemon (see ~/.config/dunst/dunstrc for configuration) exec --no-startup-id dunst -#bindsym $mod+a exec --no-startup-id dunstctl action +bindsym $mod+a exec --no-startup-id dunstctl action bindsym $mod+c exec --no-startup-id dunstctl context bindsym $mod+n exec --no-startup-id dunstctl close bindsym $mod+twosuperior exec --no-startup-id dunstctl history-pop @@ -109,7 +109,7 @@ floating_modifier $mod # start a terminal bindsym $mod+Return exec --no-startup-id xt -bindsym $mod+a exec --no-startup-id uxterm +bindsym $mod+t exec --no-startup-id uxterm # kill focused window bindsym $mod+Shift+a kill diff --git a/bin/gauth b/bin/gauth index 169fd3b..2da5ee2 100755 --- a/bin/gauth +++ b/bin/gauth @@ -1,8 +1,8 @@ #!/bin/sh # Use backup from andOTP -#gpg -qd ~/.otp_accounts.json.gpg 2>/dev/null | -cat ~/.otp_accounts.json | +#cat ~/.otp_accounts.json | +gpg -qd ~/.otp_accounts.json.gpg 2>/dev/null | jq -r '.[] | "\(.label) \(.secret)"' | while read -r l s; do echo "$l $(oathtool --totp -b "$s")" -- cgit v1.3 From b5bfa659d79895d3217377aea14ff14eb31a6319 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Wed, 31 Aug 2022 23:36:21 +0200 Subject: update --- .config/gtk-3.0/settings.ini | 2 ++ .config/i3/config | 2 +- bin/update_hosts | 6 ++++-- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to '.config/i3') diff --git a/.config/gtk-3.0/settings.ini b/.config/gtk-3.0/settings.ini index a3da8ab..30af16a 100644 --- a/.config/gtk-3.0/settings.ini +++ b/.config/gtk-3.0/settings.ini @@ -1,2 +1,4 @@ [Settings] +gtk-icon-theme-name = Adwaita +gtk-theme-name = Adwaita gtk-font-name = Liberation Sans 9 diff --git a/.config/i3/config b/.config/i3/config index 470f819..b59ded5 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -94,7 +94,7 @@ for_window [class="RSS Guard"] floating enable for_window [class="Signal"] floating enable for_window [class="Slack"] floating enable for_window [class="Spotify"] floating enable -for_window [class="Thunderbird"] floating enable +for_window [class="thunderbird"] floating enable for_window [class="UXTerm"] floating enable for_window [class="vlc"] floating enable for_window [instance="wish"] floating enable diff --git a/bin/update_hosts b/bin/update_hosts index 40ec470..74bf25b 100755 --- a/bin/update_hosts +++ b/bin/update_hosts @@ -7,9 +7,11 @@ echo 'Checking from https://github.com/StevenBlack/hosts:' lsd=$(curl -s 'https://api.github.com/repos/StevenBlack/hosts/commits?path=hosts&page=1&per_page=1' | jq -r '.[0].commit.committer.date') -echo "last source update: $(date -j -f "%FT%TZ" "$lsd")" +#echo "last source update: $(date -j -f "%FT%TZ" "$lsd")" +echo "last source update: $(date --date="$lsd")" echo "last local update: $(date -r /etc/hosts)" -[ $(date -j -f "%FT%TZ" "$lsd" +%s) -lt $(date -r /etc/hosts +%s) ] && echo 'Nothing to do' && exit +# [ $(date -j -f "%FT%TZ" "$lsd" +%s) -lt $(date -r /etc/hosts +%s) ] && echo 'Nothing to do' && exit +[ $(date --date="$lsd" +%s) -lt $(date -r /etc/hosts +%s) ] && echo 'Nothing to do' && exit cd /etc cp -p hosts hosts.old -- cgit v1.3 From f70f37cfc0e59f9d3710bcf34d7cb9e0b9ad5c00 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sun, 4 Sep 2022 22:13:46 +0200 Subject: update --- .config/i3/config | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index b59ded5..f819e94 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -69,6 +69,7 @@ for_window [title="Gestionnaire de tâches – Chromium"] floating enable for_window [class="DeltaChat"] floating enable for_window [instance="DOTTY"] floating enable for_window [class="discord"] floating enable +for_window [class="easyeffects"] floating enable for_window [class="Display"] floating enable for_window [class="Feedreader"] floating enable for_window [class="feh"] floating enable @@ -80,20 +81,25 @@ for_window [class="Ghb"] floating enable for_window [class="Gitk"] floating enable for_window [class="gnuplot_qt"] floating enable for_window [instance="gxditview"] floating enable +for_window [class="index"] floating enable for_window [class="Keybase"] floating enable for_window [class="libreoffice"] floating enable for_window [class="Liferea"] floating enable for_window [class="llpp"] floating enable for_window [class="MuPDF"] floating enable +for_window [class="io.elementary.music"] floating enable +for_window [class="org.gnome.Music"] floating enable for_window [class="Org.gnome.Software"] floating enable for_window [class="Pavucontrol"] floating enable for_window [class="Pcmanfm"] floating enable for_window [class="Picard"] floating enable for_window [title="QEMU"] floating enable +for_window [class="Quodlibet"] floating enable for_window [class="RSS Guard"] floating enable for_window [class="Signal"] floating enable for_window [class="Slack"] floating enable for_window [class="Spotify"] floating enable +for_window [class="Tauon Music Box"] floating enable for_window [class="thunderbird"] floating enable for_window [class="UXTerm"] floating enable for_window [class="vlc"] floating enable -- cgit v1.3 From df883d962dd99845eeb941b6a82365cba4da6438 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sun, 4 Sep 2022 23:37:45 +0200 Subject: update --- .config/i3/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index f819e94..9069684 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -56,7 +56,7 @@ bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ to bindsym $mod+KP_Enter exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status -# enable floating mode +# enable floating mode and border for_window [class="aft-linux-qt"] floating enable for_window [class="Arandr"] floating enable for_window [class="Asunder"] floating enable @@ -69,7 +69,7 @@ for_window [title="Gestionnaire de tâches – Chromium"] floating enable for_window [class="DeltaChat"] floating enable for_window [instance="DOTTY"] floating enable for_window [class="discord"] floating enable -for_window [class="easyeffects"] floating enable +for_window [class="easyeffects"] floating enable border normal for_window [class="Display"] floating enable for_window [class="Feedreader"] floating enable for_window [class="feh"] floating enable -- cgit v1.3 From e7896c409cbcd41b980fa487c312fef986af00ec Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Mon, 26 Sep 2022 17:29:45 +0200 Subject: update --- .config/i3/config | 3 +++ .fvwm2rc | 1 + 2 files changed, 4 insertions(+) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index 9069684..f642364 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -96,6 +96,9 @@ for_window [class="Picard"] floating enable for_window [title="QEMU"] floating enable for_window [class="Quodlibet"] floating enable for_window [class="RSS Guard"] floating enable +#for_window [class="Navigator"] floating enable +for_window [class="SeaMonkey"] floating enable +#for_window [window_role="browser"] floating enable for_window [class="Signal"] floating enable for_window [class="Slack"] floating enable for_window [class="Spotify"] floating enable diff --git a/.fvwm2rc b/.fvwm2rc index e8b061b..1159092 100644 --- a/.fvwm2rc +++ b/.fvwm2rc @@ -102,6 +102,7 @@ AddToMenu "Desktop-Apps" + "&Keybase" Exec exec keybase-gui + "S&ignal" Exec exec signal-desktop + "&Slack" Exec exec slack ++ "Sea&Monkey" Exec exec seamonkey + "&Zoom" Exec exec zoom DestroyMenu "Settings" -- cgit v1.3 From abaaf4b6a33c497f233fd797272ba36152eb6961 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Thu, 29 Sep 2022 15:16:15 +0200 Subject: yoda: slight improvements --- .config/i3/config | 1 + bin/byo | 9 ++++++--- bin/yoda | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index f642364..6220086 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -108,6 +108,7 @@ for_window [class="UXTerm"] floating enable for_window [class="vlc"] floating enable for_window [instance="wish"] floating enable for_window [class="wpa_gui"] floating enable +for_window [class="Xdialog"] floating enable for_window [class="XVroot"] floating enable for_window [class="zoom"] floating enable diff --git a/bin/byo b/bin/byo index 93bb7f0..33ba3b7 100755 --- a/bin/byo +++ b/bin/byo @@ -2,23 +2,26 @@ # Backup to yoda [ "$USER" = root ] || exec sudo "$0" "$@" -usage='Usage: byo [-cdk] [/dev/sda2] +usage='Usage: byo [-cdkx] [/dev/sda2] Backup local disk to yoda external disk. Options: -c close and umount yoda -d dedupe yoda -k do not umount and close yoda + -x enable debug traces ' -while getopts :Ccdk opt; do +while getopts :Ccdkx opt; do case $opt in - (C|c|d|k) eval "opt$opt=$opt" ;; + (C|c|d|k|x) eval "opt$opt=$opt" ;; (*) printf %s "$usage"; exit 1 ;; esac done shift $((OPTIND - 1)) +[ "$optx" ] && set -x + dev=$1 yoda_uuid='8c463221-6bb7-414e-9060-c9570bb3a6bb' [ "$dev" ] || dev=$(blkid --uuid "$yoda_uuid") diff --git a/bin/yoda b/bin/yoda index 8ff9e81..a5d5c5b 100755 --- a/bin/yoda +++ b/bin/yoda @@ -138,12 +138,13 @@ EOT cat > /mnt/etc/locale.gen << \EOT en_US.UTF-8 UTF-8 +en_GB.UTF-8 UTF-8 fr_FR.UTF-8 UTF-8 EOT echo yoda > /mnt/etc/hostname echo 'KEYMAP=fr-latin1' > /mnt/etc/vconsole.conf - echo 'LANG=en_US.UTF-8' > /mnt/etc/locale.conf + echo 'LANG=en_GB.UTF-8' > /mnt/etc/locale.conf ln -sf /usr/share/zoneinfo/Europe/Paris /mnt/etc/localtime cat > /mnt/etc/systemd/network/20-wired.network << \EOT @@ -171,6 +172,7 @@ EOT cat > /mnt/etc/systemd/resolved.conf << \EOT [Resolve] DNSSEC=no +DNSOverTLS=no EOT packages="linux linux-firmware intel-ucode amd-ucode sof-firmware \ -- cgit v1.3 From 5b201b3fcd94c8bad917e2b45dbb1105cb060cdb Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 1 Oct 2022 12:41:24 +0200 Subject: update --- .Xresources | 1 + .config/i3/config | 6 ++++-- .screenrc | 2 ++ bin/backup | 26 +++++++++++++++++--------- 4 files changed, 24 insertions(+), 11 deletions(-) (limited to '.config/i3') diff --git a/.Xresources b/.Xresources index 8fc5281..ec47c2e 100644 --- a/.Xresources +++ b/.Xresources @@ -21,6 +21,7 @@ URxvt.keysym.C-Next: font-size:decrease !URxvt.background: black xterm*termName: xterm-256color +xterm*internalBorder: 4 xterm*VT100.Translations: #override \ Ctrl Next: smaller-vt-font() \n\ Ctrl Prior: larger-vt-font() \n diff --git a/.config/i3/config b/.config/i3/config index 6220086..1740966 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -120,6 +120,7 @@ floating_modifier $mod # start a terminal bindsym $mod+Return exec --no-startup-id xt bindsym $mod+t exec --no-startup-id uxterm +bindsym $mod+Shift+t exec --no-startup-id xtb # kill focused window bindsym $mod+Shift+a kill @@ -133,9 +134,10 @@ bindsym --release button2 kill # installed. #bindsym $mod+d exec --no-startup-id i3-dmenu-desktop -dmenu="dmenu -i -fn 'Mono-9'" #bindsym F1 exec --no-startup-id i3-dmenu-desktop -dmenu="dmenu -i -fn 'Mono-9'" -bindsym $mod+d exec --no-startup-id i3-dmenu-desktop +#bindsym $mod+d exec --no-startup-id i3-dmenu-desktop #bindsym F1 exec --no-startup-id i3-dmenu-desktop -entry-type=command -bindsym F1 exec --no-startup-id i3-dmenu-desktop -dmenu="dmenu -i -fn 'Fixed-12'" +#bindsym F1 exec --no-startup-id i3-dmenu-desktop -dmenu="dmenu -i -fn 'Fixed-12'" +bindsym $mod+d exec --no-startup-id i3-dmenu-desktop -dmenu="dmenu -i -fn 'Fixed-12'" # Use playerctl to control media player from keyboard bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause diff --git a/.screenrc b/.screenrc index 3337674..1a802d2 100644 --- a/.screenrc +++ b/.screenrc @@ -1 +1,3 @@ startup_message off +defmousetrack on +mousetrack on diff --git a/bin/backup b/bin/backup index d682849..9e73703 100755 --- a/bin/backup +++ b/bin/backup @@ -1,5 +1,7 @@ #!/bin/sh +# A backup a day keeps the doctor away. + usage() { echo "Usage: $0 [-nv] [[[user@]host]:dir] @@ -34,13 +36,19 @@ BACKUP=${1:-$BACKUP} ignore="$HOME/.backupignore" volumes="$HOME" [ -f "$ignore" ] && ignore="--exclude-from=$ignore" || ignore= -last=$(rsync --list-only "$BACKUP/" 2>/dev/null | awk '{r=$NF} END {print r}') -case $last in -([12]*) opt_link=--link-dest=../$last;; -(*) opt_link=;; -esac - -date=$(date +%Y-%m-%d-%H%M%S) +now=$(date +%F) +opt_link='' +past=$(rsync --list-only "$BACKUP/" 2>/dev/null | awk '{print $NF}' | sort -r) +for f in $past +do + case $f in + ([0-9][0-9][0-9][0-9]-*) ;; + (*) continue ;; + esac + [ "$f" = "$now" ] && continue + opt_link="--link-dest=../$f" + break +done -echo "# Backup $volumes to $BACKUP/$date" -exec rsync -HSxa$optv $ignore $opt_link $volumes "$BACKUP/$date" +echo "# Backup $volumes to $BACKUP/$now" +exec rsync -HSXxa$optv $ignore $opt_link $volumes "$BACKUP/$now" -- cgit v1.3 From aee3773f166f25475394cd0fe3fb7be7e818698d Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Wed, 5 Oct 2022 19:02:09 +0200 Subject: update --- .config/i3/config | 1 + 1 file changed, 1 insertion(+) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index 1740966..4c8973d 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -68,6 +68,7 @@ for_window [title="Task Manager - Chromium"] floating enable for_window [title="Gestionnaire de tâches – Chromium"] floating enable for_window [class="DeltaChat"] floating enable for_window [instance="DOTTY"] floating enable +for_window [instance="LEFTY text view"] floating enable for_window [class="discord"] floating enable for_window [class="easyeffects"] floating enable border normal for_window [class="Display"] floating enable -- cgit v1.3 From af0fca8574d84d172e5fb1165f3e35ed86f0f148 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 7 Oct 2022 09:36:01 +0200 Subject: update --- .config/i3/config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index 4c8973d..c9a93bb 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -124,9 +124,9 @@ bindsym $mod+t exec --no-startup-id uxterm bindsym $mod+Shift+t exec --no-startup-id xtb # kill focused window -bindsym $mod+Shift+a kill -bindsym $mod+w kill -bindsym --release button2 kill +bindsym $mod+q kill +#bindsym $mod+w kill +bindsym --release $mod+button2 kill # start dmenu (a program launcher) #bindsym $mod+d exec dmenu_run @@ -201,7 +201,7 @@ bindsym $mod+Shift+space floating toggle bindsym $mod+space focus mode_toggle # focus the parent container -bindsym $mod+q focus parent +#bindsym $mod+q focus parent # focus the child container #bindsym $mod+d focus child -- cgit v1.3 From 6aa36aad93b61538befff7b8c1454e73b93de8c0 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Mon, 17 Oct 2022 18:24:04 +0200 Subject: update --- .config/i3/config | 1 + bin/fv | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index c9a93bb..e0e8c9b 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -110,6 +110,7 @@ for_window [class="vlc"] floating enable for_window [instance="wish"] floating enable for_window [class="wpa_gui"] floating enable for_window [class="Xdialog"] floating enable +for_window [class="Xournalpp"] floating enable for_window [class="XVroot"] floating enable for_window [class="zoom"] floating enable diff --git a/bin/fv b/bin/fv index 5662ed3..1f54bdc 100755 --- a/bin/fv +++ b/bin/fv @@ -3,4 +3,4 @@ #exec fzf --multi --preview-window=right:66% --preview 'cat {1}' exec fzf --ansi --multi --preview-window=right:75% \ --bind=left:preview-page-up --bind=right:preview-page-down \ - --preview 'cat {1}' + --preview 'bat --color always {1}' -- cgit v1.3 From 7883e56fadc6c8be32c455b69fd43dedb95c9d20 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Wed, 7 Dec 2022 14:53:33 +0100 Subject: update --- .bashrc | 5 ++++- .config/i3/config | 3 +++ .xsession | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) (limited to '.config/i3') diff --git a/.bashrc b/.bashrc index 926f90e..adafe27 100644 --- a/.bashrc +++ b/.bashrc @@ -5,7 +5,7 @@ export PAGER=less export EDITOR=vim -export HISTIGNORE=ls:ps:history +export HISTIGNORE='sudo id:uname:date:exit:df:ll:ls:ps:pwd:top:history' export HISTCONTROL=ignoreboth:erasedups # no start space and duplicate entries export HISTSIZE=100000 # big big history export HISTFILESIZE=100000 # big big history @@ -147,3 +147,6 @@ eval "$(direnv hook bash)" #export GITHUB_TOKEN=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 set -o vi +bind -m vi-command ".":insert-last-argument +bind -m vi-command 'Control-l: clear-screen' +bind -m vi-insert 'Control-l: clear-screen' diff --git a/.config/i3/config b/.config/i3/config index e0e8c9b..6c871ae 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -77,6 +77,8 @@ for_window [class="feh"] floating enable for_window [class="firefox"] floating enable for_window [class="fluent-reader"] floating enable border normal for_window [class="Geeqie"] floating enable +for_window [class="Google-chrome"] floating enable +for_window [title="Google Chrome"] floating enable for_window [class="Gpicview"] floating enable for_window [class="Ghb"] floating enable for_window [class="Gitk"] floating enable @@ -86,6 +88,7 @@ for_window [class="index"] floating enable for_window [class="Keybase"] floating enable for_window [class="libreoffice"] floating enable for_window [class="Liferea"] floating enable +for_window [class="lagrange"] floating enable for_window [class="llpp"] floating enable for_window [class="MuPDF"] floating enable for_window [class="io.elementary.music"] floating enable diff --git a/.xsession b/.xsession index 25e7837..33a4251 100755 --- a/.xsession +++ b/.xsession @@ -26,3 +26,4 @@ feh --bg-fill ~/Pictures/night1.jpg # Start window manager #exec fvwm exec i3 +#exec cwm -- cgit v1.3 From 6bfaa0bd5de54bd8c9225832a83a6d606a84bbb5 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Tue, 14 Feb 2023 22:51:50 +0100 Subject: update --- .Xresources | 1 + .config/i3/config | 2 +- .fvwm2rc | 22 ++++++++++++---------- .xsession | 4 ++-- 4 files changed, 16 insertions(+), 13 deletions(-) (limited to '.config/i3') diff --git a/.Xresources b/.Xresources index 274ee87..4ca3ee9 100644 --- a/.Xresources +++ b/.Xresources @@ -24,6 +24,7 @@ URxvt.keysym.C-Next: font-size:decrease xterm*termName: xterm-256color xterm*internalBorder: 4 xterm*VT100.Translations: #override \ + F11: fullscreen(toggle) \n\ Ctrl Next: smaller-vt-font() \n\ Ctrl Prior: larger-vt-font() \n ! Meta minus: smaller-vt-font() \n\ diff --git a/.config/i3/config b/.config/i3/config index 6c871ae..0c7c3d3 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -95,7 +95,7 @@ for_window [class="io.elementary.music"] floating enable for_window [class="org.gnome.Music"] floating enable for_window [class="Org.gnome.Software"] floating enable for_window [class="Pavucontrol"] floating enable -for_window [class="Pcmanfm"] floating enable +for_window [class="pcmanfm-qt"] floating enable for_window [class="Picard"] floating enable for_window [title="QEMU"] floating enable for_window [class="Quodlibet"] floating enable diff --git a/.fvwm2rc b/.fvwm2rc index 1159092..84a402c 100644 --- a/.fvwm2rc +++ b/.fvwm2rc @@ -94,7 +94,7 @@ AddToMenu "Module-Popup" DestroyMenu "Desktop-Apps" AddToMenu "Desktop-Apps" -+ "&Brave" Exec exec brave +#+ "&Brave" Exec exec brave + "&Chromium" Exec exec chromium + "&Discord" Exec exec discord + "&Firefox" Exec exec firefox @@ -108,15 +108,17 @@ AddToMenu "Desktop-Apps" DestroyMenu "Settings" AddToMenu "Settings" + "&Display" Exec exec arandr -+ "&Keyboard" Exec exec setxkbmap fr -+ "&Power" Exec exec sudo xt -e powertop +#+ "&Keyboard" Exec exec setxkbmap fr ++ "&Power" Exec exec xt -e sudo powertop + "&Sound" Exec exec pavucontrol -+ "&Wifi" Exec exec sudo wpa_gui -i wlo1 ++ "&Wifi" Exec exec wpa_gui -i wlan0 DestroyMenu "Multimedia" AddToMenu "Multimedia" ++ "&Asunder" Exec exec asunder + "&Geeqie" Exec exec geeqie -+ "&Molotov" Exec exec molotov +#+ "&Molotov" Exec exec molotov + "&Quodlibet" Exec exec quodlibet + "&Spotify" Exec exec spotify + "&Vlc" Exec exec vlc @@ -126,14 +128,14 @@ AddToMenu "Utilities" #+ "&Top" Exec exec uxterm -T Top -n Top -e top #+ "&Xterm" Exec exec urxvtc +sb -sl 500 -j -ls -cr red + "&Xterm" Exec exec xt -+ "&Black Xterm" Exec exec bxt ++ "&Black Xterm" Exec exec xtb ++ "File manager" Exec exec pcmanfm-qt + "&Top" Exec exec xt -T Top -n Top -e /bin/top #+ "&Web" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache #+ "&Web" Exec exec brave -+ "&Web" Exec exec firefox -#+ "&Firefox" Exec exec firefox -#+ "&Chromium" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache -+ "&Mail" Exec exec thunderbird ++ "&Firefox" Exec exec firefox ++ "&Chromium" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache ++ "T&hunderbird" Exec exec thunderbird #+ "xclipboard" Exec exec xclipboard #+ "" Nop + "" Nop diff --git a/.xsession b/.xsession index 08383ba..804c3cd 100755 --- a/.xsession +++ b/.xsession @@ -24,6 +24,6 @@ xsetroot -solid rgb:1/3/4 #slock # Start window manager -#exec fvwm -exec i3 +exec fvwm +#exec i3 #exec cwm -- cgit v1.3 From abe00380ff8b708b890371c73116e1006ea05178 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 11 Mar 2023 16:11:37 +0100 Subject: update --- .bashrc | 8 ++++---- .config/i3/config | 2 +- .i3status.conf | 9 ++++++++- .xsession | 6 +++--- bin/lt | 1 + 5 files changed, 17 insertions(+), 9 deletions(-) (limited to '.config/i3') diff --git a/.bashrc b/.bashrc index 739bdb2..23a8084 100644 --- a/.bashrc +++ b/.bashrc @@ -148,7 +148,7 @@ meteo() { eval "$(direnv hook bash)" #export GITHUB_TOKEN=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 -set -o vi -bind -m vi-command ".":insert-last-argument -bind -m vi-command 'Control-l: clear-screen' -bind -m vi-insert 'Control-l: clear-screen' +#set -o vi +#bind -m vi-command ".":insert-last-argument +#bind -m vi-command 'Control-l: clear-screen' +#bind -m vi-insert 'Control-l: clear-screen' diff --git a/.config/i3/config b/.config/i3/config index 0c7c3d3..d898633 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -44,7 +44,7 @@ bindsym $mod+twosuperior exec --no-startup-id dunstctl history-pop # pulse audio systray icon -exec --no-startup-id pasystray +# exec --no-startup-id pasystray # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status diff --git a/.i3status.conf b/.i3status.conf index 6cc7210..31c0a8d 100644 --- a/.i3status.conf +++ b/.i3status.conf @@ -22,6 +22,7 @@ order += "disk /" order += "cpu_usage" #order += "load" order += "memory" +order += "volume master" order += "cpu_temperature 0" order += "tztime local" @@ -33,7 +34,7 @@ read_file hostname { wireless _first_ { #format_up = "🌐 %essid %quality" #format_up = "📶 %essid %quality" - format_up = "📡 %essid %quality" + format_up = "📡 %essid %signal %bitrate" format_down = "📡 down" } @@ -104,3 +105,9 @@ tztime local { format = "%a %d %b %H:%M:%S" #format = "📅 %a %d %b ⌚ %H:%M:%S" } + +volume master { + format = "🎜 %volume" + format_muted = "🎜 mute (%volume)" + device = "pulse:alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink" +} diff --git a/.xsession b/.xsession index 804c3cd..f4d42ec 100755 --- a/.xsession +++ b/.xsession @@ -10,7 +10,7 @@ eval $(ssh-agent) xinput --set-prop 'SYNA7DAB:00 06CB:CD40 Touchpad' 'libinput Tapping Enabled' 1 xinput --set-prop 'SYNA7DAB:00 06CB:CD40 Touchpad' 'libinput Natural Scrolling Enabled' 1 -# Better use /etc/X11/xorg.conf.d/10-keyboard.conf to handle hot plugged keyboards +# Better use /etc/X11/xorg.conf.d/10-keyboard.conf for hot plugged keyboards #setxkbmap fr #xk hdmi @@ -24,6 +24,6 @@ xsetroot -solid rgb:1/3/4 #slock # Start window manager -exec fvwm -#exec i3 +#exec fvwm +exec i3 #exec cwm diff --git a/bin/lt b/bin/lt index f09f3b7..2a182f7 100755 --- a/bin/lt +++ b/bin/lt @@ -36,6 +36,7 @@ ca() { pp() { pp_s=$1 pp_b=$2 R1='' while true; do + ! [ "$pp_s" ] && R1='' && return [ "$pp_b" = "$pp_s" ] && break pp_s=${pp_s%/*} [ "$R1" ] && R1=$R1/.. || R1=.. -- cgit v1.3