feat(*): scripts, mpd-watcher & sqrt-data

This commit is contained in:
Pavel Korytov 2022-01-13 11:23:19 +03:00
parent e68db3ed0d
commit 269a416e5b
5 changed files with 99 additions and 2 deletions

View file

@ -0,0 +1,5 @@
log_folder = '/home/pavel/logs-sync/mpd/logs'
exception_timeout = 5
exception_count = 10
listened_threshold = 0.5
custom_attrs = ['musicbrainz_albumid', 'musicbrainz_artistid', 'musicbrainz_trackid']

View file

@ -0,0 +1,65 @@
[database]
user = 'postgres'
password = 'localdbpass'
database = 'data'
host = 'postgres'
port = 5432
[general]
root = '@format {env[HOME]}/logs-sync'
hash_db = '@format {this.general.root}/hash.db'
temp_data_folder = '/tmp/sqrt-data'
[sync]
log_file = '@format {this.general.root}/sync.log'
target = 'ssh://pavel@sqrtminusone.xyz//home/pavel/logs-sync'
[archive]
days = 31
timeout = 5
[mpd]
library_csv = '@format {this.general.root}/mpd/mpd_library.csv'
log_folder = '@format {this.general.root}/mpd/logs'
[waka]
api_key = 'dummy'
api_url = 'https://wakatime.com/api/v1'
schema = 'wakatime'
[aw]
last_updated = '@format {this.general.root}/aw_last_updated.json'
logs_folder = '@format {this.general.root}/aw'
types = ['afkstatus', 'currentwindow', 'web.tab.current', 'app.editor.activity']
api = 'http://localhost:5600/api'
schema = 'aw'
skip_afk_interval = '900'
skip_afk_apps = '^(zoom|mpv)$'
skip_afk_titles = '^(YouTube)$'
webtab_apps = '^(Nightly|firefox)$'
skip_urls = '^(moz-extension|about:blank)'
[aw.apps_convert]
Nightly = 'firefox'
Chromium-browser = 'Chromium'
unknown = 'Emacs' # EXWM
[google]
android_file = '@format {this.general.root}/google/android-history.json'
android_schema = 'android'
[vk]
author = 'Pavel Korytov'
schema = 'vk'
[sleep]
file = '@format {this.general.root}/sleep/sleep-export.csv'
schema = 'sleep'
[sleep.geos]
e3336012 = 'test'
[location]
list_csv = '@format {this.general.root}/csv/locations.csv'
tz_csv = '@format {this.general.root}/csv/loc_timezones.csv'
hostnames_csv = '@format {this.general.root}/csv/loc_hostnames.csv'

View file

@ -131,6 +131,21 @@ for profile in $profiles; do
guix package --profile="$profilePath/$profileName" --manifest="$HOME/.config/guix/manifests/$profileName.scm"
done
#+end_src
** Run =guix package= in profile
#+begin_src bash :tangle ./bin/scripts/pp
GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
profileName=$(basename $1)
profileName="${profileName%.*}"
profilePath="$GUIX_EXTRA_PROFILES/$profileName"
if [ -d $profilePath ]; then
guix package --profile="$profilePath/$profileName" ${@:2}
else
echo -e "No profile found at path: " $profilePath
fi
#+end_src
* Channels
Specifying additional channels.

14
bin/scripts/pp Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# [[file:../../Guix.org::*Run =guix package= in profile][Run =guix package= in profile:1]]
GUIX_EXTRA_PROFILES=$HOME/.guix-extra-profiles
profileName=$(basename $1)
profileName="${profileName%.*}"
profilePath="$GUIX_EXTRA_PROFILES/$profileName"
if [ -d $profilePath ]; then
guix package --profile="$profilePath/$profileName" ${@:2}
else
echo -e "No profile found at path: " $profilePath
fi
# Run =guix package= in profile:1 ends here

View file

@ -1,2 +0,0 @@
#!/bin/bash
wego 7 | less -R