From 60d6583472cedd227eb813da8a16862471b2ed21 Mon Sep 17 00:00:00 2001 From: Jan Andrle Date: Wed, 27 Mar 2024 18:44:03 +0100 Subject: [PATCH] =?UTF-8?q?:zap:=20gcalendar/`=C2=A7time.mjs`/`shift-enter?= =?UTF-8?q?`=3Dhistory-and-alias-expand-line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bash/.bash_aliases | 3 ++ .inputrc | 2 +- bin/§time.mjs | 80 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100755 bin/§time.mjs diff --git a/.bash/.bash_aliases b/.bash/.bash_aliases index ab61c13..cd75416 100644 --- a/.bash/.bash_aliases +++ b/.bash/.bash_aliases @@ -54,6 +54,9 @@ alias m='cd.' alias cd-vifm='cd `vifm --choose-dir -`' mkcd(){ mkdir -p -- "$1" && cd -P -- "$1"; } +alias gcalendar-dovolené='gcalendar --account "práce" --calendar "Dovolené"' +alias gcalendar-události='gcalendar --account "default" --calendar "Události"' + alias §find.='find . -maxdepth 1' alias pdftk='java -jar $HOME/bin/pdftk-all.jar' diff --git a/.inputrc b/.inputrc index 1335016..03a4a45 100644 --- a/.inputrc +++ b/.inputrc @@ -17,7 +17,7 @@ set menu-complete-display-prefix on "\e[A":history-search-backward "\e[B":history-search-forward -"\e\C-e": history-and-alias-expand-line +"OM": history-and-alias-expand-line set colored-stats On diff --git a/bin/§time.mjs b/bin/§time.mjs new file mode 100755 index 0000000..a9d558b --- /dev/null +++ b/bin/§time.mjs @@ -0,0 +1,80 @@ +#!/usr/bin/env nodejsscript +/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */ +const units= { + second: 1000, + get minute(){ return this.second*60; }, + get hour(){ return this.minute*60; }, + get day(){ return this.hour*24; }, + get month(){ return this.day*30; }, + get year(){ return this.day*365; } +}; + +$.api() +.version("2024-03-27") +.command("diff