diff --git a/bashrc b/bashrc index 15fcf20..d0f18f4 100644 --- a/bashrc +++ b/bashrc @@ -43,6 +43,7 @@ alias rm='rm -Iv --one-file-system' alias free='free -m' alias df='df -h' alias pacman='pacman --color auto' +alias pacaur='pacaur --color auto' alias dmesg='dmesg --ctime' # Frequent mistakes diff --git a/config/i3/ashuffle b/config/i3/ashuffle new file mode 100755 index 0000000..77168ef --- /dev/null +++ b/config/i3/ashuffle @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +while true +do + ashuffle + sleep 1 +done diff --git a/config/i3/config b/config/i3/config index 04ffddd..ea9bdbe 100644 --- a/config/i3/config +++ b/config/i3/config @@ -371,6 +371,7 @@ exec --no-startup-id dunst # Notifications exec --no-startup-id keynav # Keyboard cursor controller #exec --no-startup-id $HOME/.config/i3/clipmenud # Clipboard manager exec --no-startup-id mpd # Music Player Daemon +exec --no-startup-id ~/.config/i3/ashuffle # MPD Auto-refill exec --no-startup-id autorandr --change # Screen configuration and everything that depends on it set $ignore #ff00000 diff --git a/config/khal/config b/config/khal/config new file mode 100644 index 0000000..f923a51 --- /dev/null +++ b/config/khal/config @@ -0,0 +1,38 @@ +[calendars] +[[perso]] +path = ~/.vdirsyncer/calendars/perso/ +color = light green + +[[clubs]] +path = ~/.vdirsyncer/calendars/clubs/ +color = yellow + +[[cours]] +path = ~/.vdirsyncer/calendars/cours/ +color = light blue +readonly = True + +[[polytech]] +path = ~/.vdirsyncer/calendars/polytech/ +color = dark blue + +[[bnei]] +path = ~/.vdirsyncer/calendars/bnei/ +color = light cyan + +# [[birthdays]] +# type=birthdays +# path = ~/.vdirsyncer/contacts/contacts/ +# color = light magenta + +[locale] +timeformat = %H:%M +dateformat = %d/%m +longdateformat = %d/%m/%Y +datetimeformat = %d/%m %H:%M +longdatetimeformat = %d/%m/%Y %H:%M +local_timezone = Europe/Paris + +[default] +highlight_event_days = True + diff --git a/config/khard/khard.conf b/config/khard/khard.conf new file mode 100644 index 0000000..eee27d6 --- /dev/null +++ b/config/khard/khard.conf @@ -0,0 +1,43 @@ +# example configuration file for khard version >= 0.11.0 +# place it under $HOME/.config/khard/khard.conf + +[addressbooks] +[[contacts]] +path = ~/.vdirsyncer/contacts/contacts/ + +[general] +debug = no +default_action = list +editor = vim +merge_editor = vimdiff + +[contact table] +# display names by first or last name: first_name / last_name +display = first_name +# group by address book: yes / no +group_by_addressbook = no +# reverse table ordering: yes / no +reverse = no +# append nicknames to name column: yes / no +show_nicknames = no +# show uid table column: yes / no +show_uids = yes +# sort by first or last name: first_name / last_name +sort = last_name +# localize dates: yes / no +localize_dates = yes + +[vcard] +# extend contacts with your own private objects +# these objects are stored with a leading "X-" before the object name in the vcard files +# every object label may only contain letters, digits and the - character +# example: +# private_objects = Jabber, Skype, Twitter +private_objects = Jabber, Skype, Twitter +# preferred vcard version: 3.0 / 4.0 +preferred_version = 3.0 +# Look into source vcf files to speed up search queries: yes / no +search_in_source_files = no +# skip unparsable vcard files: yes / no +skip_unparsable = no + diff --git a/config/systemd/user/default.target.wants/syncthing.service b/config/systemd/user/default.target.wants/syncthing.service new file mode 120000 index 0000000..eae00f7 --- /dev/null +++ b/config/systemd/user/default.target.wants/syncthing.service @@ -0,0 +1 @@ +/home/geoffrey/.local/share/systemd/user/syncthing.service \ No newline at end of file diff --git a/config/systemd/user/timers.target.wants/vdirsyncer.timer b/config/systemd/user/timers.target.wants/vdirsyncer.timer new file mode 120000 index 0000000..eed4fe0 --- /dev/null +++ b/config/systemd/user/timers.target.wants/vdirsyncer.timer @@ -0,0 +1 @@ +/home/geoffrey/.local/share/systemd/user/vdirsyncer.timer \ No newline at end of file diff --git a/config/todoman/todoman.conf b/config/todoman/todoman.conf new file mode 100644 index 0000000..677aa91 --- /dev/null +++ b/config/todoman/todoman.conf @@ -0,0 +1,4 @@ +[main] +path = ~/.vdirsyncer/calendars/* +default_list = perso +humanize = True diff --git a/config/vdirsyncer/.dfrecur b/config/vdirsyncer/.dfrecur new file mode 100644 index 0000000..e69de29 diff --git a/config/vdirsyncer/config b/config/vdirsyncer/config new file mode 100644 index 0000000..148fa0e --- /dev/null +++ b/config/vdirsyncer/config @@ -0,0 +1,68 @@ +# An example configuration for vdirsyncer. +# +# Move it to ~/.vdirsyncer/config or ~/.config/vdirsyncer/config and edit it. +# Run `vdirsyncer --help` for CLI usage. +# +# Optional parameters are commented out. +# This file doesn't document all available parameters, see +# http://vdirsyncer.pimutils.org/ for the rest of them. + +[general] +# A folder where vdirsyncer can store some metadata about each pair. +status_path = "~/.vdirsyncer/status/" + +# # CARDDAV +[pair geoffrey_contacts] +# A `[pair ]` block defines two storages `a` and `b` that should be +# synchronized. The definition of these storages follows in `[storage ]` +# blocks. This is similar to accounts in OfflineIMAP. +a = "geoffrey_contacts_local" +b = "geoffrey_contacts_remote" + +# Synchronize all collections that can be found. +# You need to run `vdirsyncer discover` if new calendars/addressbooks are added +# on the server. + +collections = ["from a", "from b"] + +# Synchronize the "display name" property into a local file (~/.contacts/displayname). +metadata = ["displayname"] + +# To resolve a conflict the following values are possible: +# `null` - abort when collisions occur (default) +# `"a wins"` - assume a's items to be more up-to-date +# `"b wins"` - assume b's items to be more up-to-date +#conflict_resolution = null + +[storage geoffrey_contacts_local] +# A storage references actual data on a remote server or on the local disk. +# Similar to repositories in OfflineIMAP. +type = "filesystem" +path = "~/.vdirsyncer/contacts/" +fileext = ".vcf" + +[storage geoffrey_contacts_remote] +type = "carddav" +url = "https://dav.frogeye.fr/caldav.php/" +username = "geoffrey" +password.fetch = ["command", "sh", "-c", "cat ~/.config/vdirsyncer/pass"] + +# CALDAV +[pair geoffrey_calendar] +a = "geoffrey_calendar_local" +b = "geoffrey_calendar_remote" +collections = ["from a", "from b"] + +# Calendars also have a color property +metadata = ["displayname", "color"] + +[storage geoffrey_calendar_local] +type = "filesystem" +path = "~/.vdirsyncer/calendars/" +fileext = ".ics" + +[storage geoffrey_calendar_remote] +type = "caldav" +url = "https://dav.frogeye.fr/caldav.php/" +username = "geoffrey" +password.fetch = ["command", "sh", "-c", "cat ~/.config/vdirsyncer/pass"] diff --git a/gitconfig b/gitconfig index 17d9812..6860844 100644 --- a/gitconfig +++ b/gitconfig @@ -8,3 +8,8 @@ default = matching [alias] git = !exec git +[filter "lfs"] + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process + required = true diff --git a/scripts/arch-kexec b/scripts/arch-kexec index b65004e..d5bdc48 100755 --- a/scripts/arch-kexec +++ b/scripts/arch-kexec @@ -1,3 +1,3 @@ #!/usr/bin/env bash -sudo kexec -l /boot/vmlinuz-linux --initrd=/boot/initramfs-linux.img --reuse-cmdlin +sudo kexec -l /boot/vmlinuz-linux --initrd=/boot/initramfs-linux.img --reuse-cmdline sudo systemctl kexec diff --git a/scripts/install-prefs b/scripts/install-prefs index f7e5434..365eab9 100755 --- a/scripts/install-prefs +++ b/scripts/install-prefs @@ -167,6 +167,10 @@ function altInst { done } +function systemdUserUnit { + mkdir -p ~/.local/share/systemd + ln -s /usr/lib/systemd/user/vdirsyncer.timer ~/.local/share/systemd/ +} # Common CLI @@ -315,16 +319,25 @@ if [ $GUI == 1 ]; then fi fi + if [ $EXTRA == 1 ]; then # Extra dev inst cmake clang llvm npm # Extra CLI inst ffmpeg youtube-dl optipng syncthing ccache + systemdUserUnit syncthing.service if [ $ARCH == 1 ]; then inst jq altInst pdftk translate-shell git-lfs js-beautify insect visidata-git + + # Orga + # TODO For others + inst vdirsyncer khard + altInst khal todoman + systemdUserUnit vdirsyncer.service + systemdUserUnit vdirsyncer.timer else # translate-shell curl -L git.io/trans > ~/.bin/trans @@ -337,7 +350,7 @@ if [ $EXTRA == 1 ]; then if [ $ARCH == 1 ]; then inst simplescreenrecorder - altInst pacmixer xcursor-menda-git menda-themes-git menda-maia-icon-theme vimpc-git mpc + altInst pacmixer xcursor-menda-git menda-themes-git menda-maia-icon-theme vimpc-git mpc ashuffle-git fi fi diff --git a/scripts/machines b/scripts/machines index b9c7fde..95fe7e9 100755 --- a/scripts/machines +++ b/scripts/machines @@ -127,6 +127,10 @@ function _machines-getAkey { # network SIGN_FILE=$(mktemp) _machines-api akey/$1 > $KEY_FILE _machines-api akey/$1?signature > $SIGN_FILE + md5sum $KEY_FILE &> /dev/stderr + md5sum $SIGN_FILE &> /dev/stderr + md5sum $MACHINES_CONFIG/machines.pub &> /dev/stderr + openssl dgst -sha256 -verify $MACHINES_CONFIG/machines.pub -signature $SIGN_FILE $KEY_FILE &> /dev/null if [ $? == 0 ]; then cat $KEY_FILE diff --git a/scripts/rms b/scripts/rms new file mode 100755 index 0000000..885b287 --- /dev/null +++ b/scripts/rms @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +find . -name "*.sync-conflict-*" -delete diff --git a/vimrc b/vimrc index 6e10446..c709f72 100644 --- a/vimrc +++ b/vimrc @@ -48,7 +48,7 @@ nmap :UndotreeToggle:UndotreeFocus let g:ctrlp_custom_ignore = { \ 'dir': '\v([\/]\.(git|hg|svn)|log|node_modules|bower_components|__pycache__|vendor|output|buildroot|doc)$', - \ 'file': '\v\.(exe|so|dll|o|pyc)$', + \ 'file': '\v\.(exe|so|dll|o|pyc|a)$', \ 'link': 'SOME_BAD_SYMBOLIC_LINKS', \ }